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::Url,
13    credential: crate::Credential,
14    scopes: Vec<String>,
15    pipeline: azure_core::Pipeline,
16}
17#[derive(Clone)]
18pub struct ClientBuilder {
19    credential: crate::Credential,
20    endpoint: Option<azure_core::Url>,
21    scopes: Option<Vec<String>>,
22    options: azure_core::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::ClientOptions::default(),
34        }
35    }
36    #[doc = "Set the endpoint."]
37    #[must_use]
38    pub fn endpoint(mut self, endpoint: impl Into<azure_core::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::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::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::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::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::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::Request,
100    ) -> azure_core::Result<azure_core::Response> {
101        let context = azure_core::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::Url>,
113        credential: crate::Credential,
114        scopes: Vec<String>,
115        options: azure_core::ClientOptions,
116    ) -> Self {
117        let endpoint = endpoint.into();
118        let pipeline = azure_core::Pipeline::new(
119            option_env!("CARGO_PKG_NAME"),
120            option_env!("CARGO_PKG_VERSION"),
121            options,
122            Vec::new(),
123            Vec::new(),
124        );
125        Self {
126            endpoint,
127            credential,
128            scopes,
129            pipeline,
130        }
131    }
132    pub fn artifacts_client(&self) -> artifacts::Client {
133        artifacts::Client(self.clone())
134    }
135    pub fn attachments_client(&self) -> attachments::Client {
136        attachments::Client(self.clone())
137    }
138    pub fn authorizedresources_client(&self) -> authorizedresources::Client {
139        authorizedresources::Client(self.clone())
140    }
141    pub fn badge_client(&self) -> badge::Client {
142        badge::Client(self.clone())
143    }
144    pub fn builds_client(&self) -> builds::Client {
145        builds::Client(self.clone())
146    }
147    pub fn controllers_client(&self) -> controllers::Client {
148        controllers::Client(self.clone())
149    }
150    pub fn definitions_client(&self) -> definitions::Client {
151        definitions::Client(self.clone())
152    }
153    pub fn folders_client(&self) -> folders::Client {
154        folders::Client(self.clone())
155    }
156    pub fn general_settings_client(&self) -> general_settings::Client {
157        general_settings::Client(self.clone())
158    }
159    pub fn history_client(&self) -> history::Client {
160        history::Client(self.clone())
161    }
162    pub fn latest_client(&self) -> latest::Client {
163        latest::Client(self.clone())
164    }
165    pub fn leases_client(&self) -> leases::Client {
166        leases::Client(self.clone())
167    }
168    pub fn metrics_client(&self) -> metrics::Client {
169        metrics::Client(self.clone())
170    }
171    pub fn options_client(&self) -> options::Client {
172        options::Client(self.clone())
173    }
174    pub fn properties_client(&self) -> properties::Client {
175        properties::Client(self.clone())
176    }
177    pub fn report_client(&self) -> report::Client {
178        report::Client(self.clone())
179    }
180    pub fn resource_usage_client(&self) -> resource_usage::Client {
181        resource_usage::Client(self.clone())
182    }
183    pub fn resources_client(&self) -> resources::Client {
184        resources::Client(self.clone())
185    }
186    pub fn retention_client(&self) -> retention::Client {
187        retention::Client(self.clone())
188    }
189    pub fn settings_client(&self) -> settings::Client {
190        settings::Client(self.clone())
191    }
192    pub fn source_providers_client(&self) -> source_providers::Client {
193        source_providers::Client(self.clone())
194    }
195    pub fn stages_client(&self) -> stages::Client {
196        stages::Client(self.clone())
197    }
198    pub fn status_client(&self) -> status::Client {
199        status::Client(self.clone())
200    }
201    pub fn tags_client(&self) -> tags::Client {
202        tags::Client(self.clone())
203    }
204    pub fn templates_client(&self) -> templates::Client {
205        templates::Client(self.clone())
206    }
207    pub fn timeline_client(&self) -> timeline::Client {
208        timeline::Client(self.clone())
209    }
210    pub fn yaml_client(&self) -> yaml::Client {
211        yaml::Client(self.clone())
212    }
213}
214pub mod artifacts {
215    use super::models;
216    #[cfg(not(target_arch = "wasm32"))]
217    use futures::future::BoxFuture;
218    #[cfg(target_arch = "wasm32")]
219    use futures::future::LocalBoxFuture as BoxFuture;
220    pub struct Client(pub(crate) super::Client);
221    impl Client {
222        #[doc = "Gets a specific artifact for a build."]
223        #[doc = ""]
224        #[doc = "Arguments:"]
225        #[doc = "* `organization`: The name of the Azure DevOps organization."]
226        #[doc = "* `project`: Project ID or project name"]
227        #[doc = "* `build_id`: The ID of the build."]
228        #[doc = "* `artifact_name`: The name of the artifact."]
229        pub fn get_artifact(
230            &self,
231            organization: impl Into<String>,
232            project: impl Into<String>,
233            build_id: i32,
234            artifact_name: impl Into<String>,
235        ) -> get_artifact::RequestBuilder {
236            get_artifact::RequestBuilder {
237                client: self.0.clone(),
238                organization: organization.into(),
239                project: project.into(),
240                build_id,
241                artifact_name: artifact_name.into(),
242            }
243        }
244        #[doc = "Gets a file from the build."]
245        #[doc = ""]
246        #[doc = "Arguments:"]
247        #[doc = "* `organization`: The name of the Azure DevOps organization."]
248        #[doc = "* `project`: Project ID or project name"]
249        #[doc = "* `build_id`: The ID of the build."]
250        #[doc = "* `artifact_name`: The name of the artifact."]
251        #[doc = "* `file_id`: The primary key for the file."]
252        #[doc = "* `file_name`: The name that the file will be set to."]
253        pub fn get_file(
254            &self,
255            organization: impl Into<String>,
256            project: impl Into<String>,
257            build_id: i32,
258            artifact_name: impl Into<String>,
259            file_id: impl Into<String>,
260            file_name: impl Into<String>,
261        ) -> get_file::RequestBuilder {
262            get_file::RequestBuilder {
263                client: self.0.clone(),
264                organization: organization.into(),
265                project: project.into(),
266                build_id,
267                artifact_name: artifact_name.into(),
268                file_id: file_id.into(),
269                file_name: file_name.into(),
270            }
271        }
272        #[doc = "Gets all artifacts for a build."]
273        #[doc = ""]
274        #[doc = "Arguments:"]
275        #[doc = "* `organization`: The name of the Azure DevOps organization."]
276        #[doc = "* `project`: Project ID or project name"]
277        #[doc = "* `build_id`: The ID of the build."]
278        pub fn list(
279            &self,
280            organization: impl Into<String>,
281            project: impl Into<String>,
282            build_id: i32,
283        ) -> list::RequestBuilder {
284            list::RequestBuilder {
285                client: self.0.clone(),
286                organization: organization.into(),
287                project: project.into(),
288                build_id,
289            }
290        }
291        #[doc = "Associates an artifact with a build."]
292        #[doc = ""]
293        #[doc = "Arguments:"]
294        #[doc = "* `organization`: The name of the Azure DevOps organization."]
295        #[doc = "* `body`: The artifact."]
296        #[doc = "* `project`: Project ID or project name"]
297        #[doc = "* `build_id`: The ID of the build."]
298        pub fn create(
299            &self,
300            organization: impl Into<String>,
301            body: impl Into<models::BuildArtifact>,
302            project: impl Into<String>,
303            build_id: i32,
304        ) -> create::RequestBuilder {
305            create::RequestBuilder {
306                client: self.0.clone(),
307                organization: organization.into(),
308                body: body.into(),
309                project: project.into(),
310                build_id,
311            }
312        }
313    }
314    pub mod get_artifact {
315        use super::models;
316        #[cfg(not(target_arch = "wasm32"))]
317        use futures::future::BoxFuture;
318        #[cfg(target_arch = "wasm32")]
319        use futures::future::LocalBoxFuture as BoxFuture;
320        #[derive(Debug)]
321        pub struct Response(azure_core::Response);
322        impl Response {
323            pub async fn into_raw_body(self) -> azure_core::Result<models::BuildArtifact> {
324                let bytes = self.0.into_raw_body().collect().await?;
325                let body: models::BuildArtifact = serde_json::from_slice(&bytes).map_err(|e| {
326                    azure_core::error::Error::full(
327                        azure_core::error::ErrorKind::DataConversion,
328                        e,
329                        format!(
330                            "Failed to deserialize response:\n{}",
331                            String::from_utf8_lossy(&bytes)
332                        ),
333                    )
334                })?;
335                Ok(body)
336            }
337            pub fn into_raw_response(self) -> azure_core::Response {
338                self.0
339            }
340            pub fn as_raw_response(&self) -> &azure_core::Response {
341                &self.0
342            }
343        }
344        impl From<Response> for azure_core::Response {
345            fn from(rsp: Response) -> Self {
346                rsp.into_raw_response()
347            }
348        }
349        impl AsRef<azure_core::Response> for Response {
350            fn as_ref(&self) -> &azure_core::Response {
351                self.as_raw_response()
352            }
353        }
354        #[derive(Clone)]
355        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
356        #[doc = r""]
357        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
358        #[doc = r" parameters can be chained."]
359        #[doc = r""]
360        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
361        #[doc = r" converts the [`RequestBuilder`] into a future,"]
362        #[doc = r" executes the request and returns a `Result` with the parsed"]
363        #[doc = r" response."]
364        #[doc = r""]
365        #[doc = r" If you need lower-level access to the raw response details"]
366        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
367        #[doc = r" can finalize the request using the"]
368        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
369        #[doc = r" that resolves to a lower-level [`Response`] value."]
370        pub struct RequestBuilder {
371            pub(crate) client: super::super::Client,
372            pub(crate) organization: String,
373            pub(crate) project: String,
374            pub(crate) build_id: i32,
375            pub(crate) artifact_name: String,
376        }
377        impl RequestBuilder {
378            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
379            #[doc = ""]
380            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
381            #[doc = "However, this function can provide more flexibility when required."]
382            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
383                Box::pin({
384                    let this = self.clone();
385                    async move {
386                        let url = this.url()?;
387                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
388                        if let Some(auth_header) = this
389                            .client
390                            .token_credential()
391                            .http_authorization_header(&this.client.scopes())
392                            .await?
393                        {
394                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
395                        }
396                        let artifact_name = &this.artifact_name;
397                        req.url_mut()
398                            .query_pairs_mut()
399                            .append_pair("artifactName", artifact_name);
400                        let req_body = azure_core::EMPTY_BODY;
401                        req.set_body(req_body);
402                        Ok(Response(this.client.send(&mut req).await?))
403                    }
404                })
405            }
406            fn url(&self) -> azure_core::Result<azure_core::Url> {
407                let mut url = azure_core::Url::parse(&format!(
408                    "{}/{}/{}/_apis/build/builds/{}/artifacts?artifactName={}",
409                    self.client.endpoint(),
410                    &self.organization,
411                    &self.project,
412                    &self.build_id,
413                    &self.artifact_name
414                ))?;
415                let has_api_version_already = url
416                    .query_pairs()
417                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
418                if !has_api_version_already {
419                    url.query_pairs_mut()
420                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
421                }
422                Ok(url)
423            }
424        }
425        impl std::future::IntoFuture for RequestBuilder {
426            type Output = azure_core::Result<models::BuildArtifact>;
427            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildArtifact>>;
428            #[doc = "Returns a future that sends the request and returns the parsed response body."]
429            #[doc = ""]
430            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
431            #[doc = ""]
432            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
433            fn into_future(self) -> Self::IntoFuture {
434                Box::pin(async move { self.send().await?.into_raw_body().await })
435            }
436        }
437    }
438    pub mod get_file {
439        use super::models;
440        #[cfg(not(target_arch = "wasm32"))]
441        use futures::future::BoxFuture;
442        #[cfg(target_arch = "wasm32")]
443        use futures::future::LocalBoxFuture as BoxFuture;
444        #[derive(Debug)]
445        pub struct Response(azure_core::Response);
446        impl Response {
447            pub async fn into_raw_body(self) -> azure_core::Result<String> {
448                let bytes = self.0.into_raw_body().collect().await?;
449                let body: String = serde_json::from_slice(&bytes).map_err(|e| {
450                    azure_core::error::Error::full(
451                        azure_core::error::ErrorKind::DataConversion,
452                        e,
453                        format!(
454                            "Failed to deserialize response:\n{}",
455                            String::from_utf8_lossy(&bytes)
456                        ),
457                    )
458                })?;
459                Ok(body)
460            }
461            pub fn into_raw_response(self) -> azure_core::Response {
462                self.0
463            }
464            pub fn as_raw_response(&self) -> &azure_core::Response {
465                &self.0
466            }
467        }
468        impl From<Response> for azure_core::Response {
469            fn from(rsp: Response) -> Self {
470                rsp.into_raw_response()
471            }
472        }
473        impl AsRef<azure_core::Response> for Response {
474            fn as_ref(&self) -> &azure_core::Response {
475                self.as_raw_response()
476            }
477        }
478        #[derive(Clone)]
479        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
480        #[doc = r""]
481        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
482        #[doc = r" parameters can be chained."]
483        #[doc = r""]
484        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
485        #[doc = r" converts the [`RequestBuilder`] into a future,"]
486        #[doc = r" executes the request and returns a `Result` with the parsed"]
487        #[doc = r" response."]
488        #[doc = r""]
489        #[doc = r" If you need lower-level access to the raw response details"]
490        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
491        #[doc = r" can finalize the request using the"]
492        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
493        #[doc = r" that resolves to a lower-level [`Response`] value."]
494        pub struct RequestBuilder {
495            pub(crate) client: super::super::Client,
496            pub(crate) organization: String,
497            pub(crate) project: String,
498            pub(crate) build_id: i32,
499            pub(crate) artifact_name: String,
500            pub(crate) file_id: String,
501            pub(crate) file_name: String,
502        }
503        impl RequestBuilder {
504            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
505            #[doc = ""]
506            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
507            #[doc = "However, this function can provide more flexibility when required."]
508            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
509                Box::pin({
510                    let this = self.clone();
511                    async move {
512                        let url = this.url()?;
513                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
514                        if let Some(auth_header) = this
515                            .client
516                            .token_credential()
517                            .http_authorization_header(&this.client.scopes())
518                            .await?
519                        {
520                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
521                        }
522                        let artifact_name = &this.artifact_name;
523                        req.url_mut()
524                            .query_pairs_mut()
525                            .append_pair("artifactName", artifact_name);
526                        let file_id = &this.file_id;
527                        req.url_mut()
528                            .query_pairs_mut()
529                            .append_pair("fileId", file_id);
530                        let file_name = &this.file_name;
531                        req.url_mut()
532                            .query_pairs_mut()
533                            .append_pair("fileName", file_name);
534                        let req_body = azure_core::EMPTY_BODY;
535                        req.set_body(req_body);
536                        Ok(Response(this.client.send(&mut req).await?))
537                    }
538                })
539            }
540            fn url(&self) -> azure_core::Result<azure_core::Url> {
541                let mut url = azure_core :: 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)) ? ;
542                let has_api_version_already = url
543                    .query_pairs()
544                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
545                if !has_api_version_already {
546                    url.query_pairs_mut()
547                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
548                }
549                Ok(url)
550            }
551        }
552        impl std::future::IntoFuture for RequestBuilder {
553            type Output = azure_core::Result<String>;
554            type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
555            #[doc = "Returns a future that sends the request and returns the parsed response body."]
556            #[doc = ""]
557            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
558            #[doc = ""]
559            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
560            fn into_future(self) -> Self::IntoFuture {
561                Box::pin(async move { self.send().await?.into_raw_body().await })
562            }
563        }
564    }
565    pub mod list {
566        use super::models;
567        #[cfg(not(target_arch = "wasm32"))]
568        use futures::future::BoxFuture;
569        #[cfg(target_arch = "wasm32")]
570        use futures::future::LocalBoxFuture as BoxFuture;
571        #[derive(Debug)]
572        pub struct Response(azure_core::Response);
573        impl Response {
574            pub async fn into_raw_body(self) -> azure_core::Result<models::BuildArtifactList> {
575                let bytes = self.0.into_raw_body().collect().await?;
576                let body: models::BuildArtifactList =
577                    serde_json::from_slice(&bytes).map_err(|e| {
578                        azure_core::error::Error::full(
579                            azure_core::error::ErrorKind::DataConversion,
580                            e,
581                            format!(
582                                "Failed to deserialize response:\n{}",
583                                String::from_utf8_lossy(&bytes)
584                            ),
585                        )
586                    })?;
587                Ok(body)
588            }
589            pub fn into_raw_response(self) -> azure_core::Response {
590                self.0
591            }
592            pub fn as_raw_response(&self) -> &azure_core::Response {
593                &self.0
594            }
595        }
596        impl From<Response> for azure_core::Response {
597            fn from(rsp: Response) -> Self {
598                rsp.into_raw_response()
599            }
600        }
601        impl AsRef<azure_core::Response> for Response {
602            fn as_ref(&self) -> &azure_core::Response {
603                self.as_raw_response()
604            }
605        }
606        #[derive(Clone)]
607        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
608        #[doc = r""]
609        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
610        #[doc = r" parameters can be chained."]
611        #[doc = r""]
612        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
613        #[doc = r" converts the [`RequestBuilder`] into a future,"]
614        #[doc = r" executes the request and returns a `Result` with the parsed"]
615        #[doc = r" response."]
616        #[doc = r""]
617        #[doc = r" If you need lower-level access to the raw response details"]
618        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
619        #[doc = r" can finalize the request using the"]
620        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
621        #[doc = r" that resolves to a lower-level [`Response`] value."]
622        pub struct RequestBuilder {
623            pub(crate) client: super::super::Client,
624            pub(crate) organization: String,
625            pub(crate) project: String,
626            pub(crate) build_id: i32,
627        }
628        impl RequestBuilder {
629            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
630            #[doc = ""]
631            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
632            #[doc = "However, this function can provide more flexibility when required."]
633            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
634                Box::pin({
635                    let this = self.clone();
636                    async move {
637                        let url = this.url()?;
638                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
639                        if let Some(auth_header) = this
640                            .client
641                            .token_credential()
642                            .http_authorization_header(&this.client.scopes())
643                            .await?
644                        {
645                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
646                        }
647                        let req_body = azure_core::EMPTY_BODY;
648                        req.set_body(req_body);
649                        Ok(Response(this.client.send(&mut req).await?))
650                    }
651                })
652            }
653            fn url(&self) -> azure_core::Result<azure_core::Url> {
654                let mut url = azure_core::Url::parse(&format!(
655                    "{}/{}/{}/_apis/build/builds/{}/artifacts",
656                    self.client.endpoint(),
657                    &self.organization,
658                    &self.project,
659                    &self.build_id
660                ))?;
661                let has_api_version_already = url
662                    .query_pairs()
663                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
664                if !has_api_version_already {
665                    url.query_pairs_mut()
666                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
667                }
668                Ok(url)
669            }
670        }
671        impl std::future::IntoFuture for RequestBuilder {
672            type Output = azure_core::Result<models::BuildArtifactList>;
673            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildArtifactList>>;
674            #[doc = "Returns a future that sends the request and returns the parsed response body."]
675            #[doc = ""]
676            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
677            #[doc = ""]
678            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
679            fn into_future(self) -> Self::IntoFuture {
680                Box::pin(async move { self.send().await?.into_raw_body().await })
681            }
682        }
683    }
684    pub mod create {
685        use super::models;
686        #[cfg(not(target_arch = "wasm32"))]
687        use futures::future::BoxFuture;
688        #[cfg(target_arch = "wasm32")]
689        use futures::future::LocalBoxFuture as BoxFuture;
690        #[derive(Debug)]
691        pub struct Response(azure_core::Response);
692        impl Response {
693            pub async fn into_raw_body(self) -> azure_core::Result<models::BuildArtifact> {
694                let bytes = self.0.into_raw_body().collect().await?;
695                let body: models::BuildArtifact = serde_json::from_slice(&bytes).map_err(|e| {
696                    azure_core::error::Error::full(
697                        azure_core::error::ErrorKind::DataConversion,
698                        e,
699                        format!(
700                            "Failed to deserialize response:\n{}",
701                            String::from_utf8_lossy(&bytes)
702                        ),
703                    )
704                })?;
705                Ok(body)
706            }
707            pub fn into_raw_response(self) -> azure_core::Response {
708                self.0
709            }
710            pub fn as_raw_response(&self) -> &azure_core::Response {
711                &self.0
712            }
713        }
714        impl From<Response> for azure_core::Response {
715            fn from(rsp: Response) -> Self {
716                rsp.into_raw_response()
717            }
718        }
719        impl AsRef<azure_core::Response> for Response {
720            fn as_ref(&self) -> &azure_core::Response {
721                self.as_raw_response()
722            }
723        }
724        #[derive(Clone)]
725        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
726        #[doc = r""]
727        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
728        #[doc = r" parameters can be chained."]
729        #[doc = r""]
730        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
731        #[doc = r" converts the [`RequestBuilder`] into a future,"]
732        #[doc = r" executes the request and returns a `Result` with the parsed"]
733        #[doc = r" response."]
734        #[doc = r""]
735        #[doc = r" If you need lower-level access to the raw response details"]
736        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
737        #[doc = r" can finalize the request using the"]
738        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
739        #[doc = r" that resolves to a lower-level [`Response`] value."]
740        pub struct RequestBuilder {
741            pub(crate) client: super::super::Client,
742            pub(crate) organization: String,
743            pub(crate) body: models::BuildArtifact,
744            pub(crate) project: String,
745            pub(crate) build_id: i32,
746        }
747        impl RequestBuilder {
748            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
749            #[doc = ""]
750            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
751            #[doc = "However, this function can provide more flexibility when required."]
752            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
753                Box::pin({
754                    let this = self.clone();
755                    async move {
756                        let url = this.url()?;
757                        let mut req = azure_core::Request::new(url, azure_core::Method::Post);
758                        if let Some(auth_header) = this
759                            .client
760                            .token_credential()
761                            .http_authorization_header(&this.client.scopes())
762                            .await?
763                        {
764                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
765                        }
766                        req.insert_header("content-type", "application/json");
767                        let req_body = azure_core::json::to_json(&this.body)?;
768                        req.set_body(req_body);
769                        Ok(Response(this.client.send(&mut req).await?))
770                    }
771                })
772            }
773            fn url(&self) -> azure_core::Result<azure_core::Url> {
774                let mut url = azure_core::Url::parse(&format!(
775                    "{}/{}/{}/_apis/build/builds/{}/artifacts",
776                    self.client.endpoint(),
777                    &self.organization,
778                    &self.project,
779                    &self.build_id
780                ))?;
781                let has_api_version_already = url
782                    .query_pairs()
783                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
784                if !has_api_version_already {
785                    url.query_pairs_mut()
786                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
787                }
788                Ok(url)
789            }
790        }
791        impl std::future::IntoFuture for RequestBuilder {
792            type Output = azure_core::Result<models::BuildArtifact>;
793            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildArtifact>>;
794            #[doc = "Returns a future that sends the request and returns the parsed response body."]
795            #[doc = ""]
796            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
797            #[doc = ""]
798            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
799            fn into_future(self) -> Self::IntoFuture {
800                Box::pin(async move { self.send().await?.into_raw_body().await })
801            }
802        }
803    }
804}
805pub mod leases {
806    use super::models;
807    #[cfg(not(target_arch = "wasm32"))]
808    use futures::future::BoxFuture;
809    #[cfg(target_arch = "wasm32")]
810    use futures::future::LocalBoxFuture as BoxFuture;
811    pub struct Client(pub(crate) super::Client);
812    impl Client {
813        #[doc = "Returns any leases owned by the specified user, optionally scoped to a single pipeline definition and run."]
814        #[doc = ""]
815        #[doc = "Arguments:"]
816        #[doc = "* `organization`: The name of the Azure DevOps organization."]
817        #[doc = "* `project`: Project ID or project name"]
818        #[doc = "* `user_owner_id`: The user id to search for."]
819        pub fn get_retention_leases_by_user_id(
820            &self,
821            organization: impl Into<String>,
822            project: impl Into<String>,
823            user_owner_id: impl Into<String>,
824        ) -> get_retention_leases_by_user_id::RequestBuilder {
825            get_retention_leases_by_user_id::RequestBuilder {
826                client: self.0.clone(),
827                organization: organization.into(),
828                project: project.into(),
829                user_owner_id: user_owner_id.into(),
830                definition_id: None,
831                run_id: None,
832            }
833        }
834        #[doc = "Returns any leases owned by the specified entity, optionally scoped to a single pipeline definition and run."]
835        #[doc = ""]
836        #[doc = "Arguments:"]
837        #[doc = "* `organization`: The name of the Azure DevOps organization."]
838        #[doc = "* `project`: Project ID or project name"]
839        pub fn get_retention_leases_by_owner_id(
840            &self,
841            organization: impl Into<String>,
842            project: impl Into<String>,
843        ) -> get_retention_leases_by_owner_id::RequestBuilder {
844            get_retention_leases_by_owner_id::RequestBuilder {
845                client: self.0.clone(),
846                organization: organization.into(),
847                project: project.into(),
848                owner_id: None,
849                definition_id: None,
850                run_id: None,
851            }
852        }
853        #[doc = "Returns any leases matching the specified MinimalRetentionLeases"]
854        #[doc = ""]
855        #[doc = "Arguments:"]
856        #[doc = "* `organization`: The name of the Azure DevOps organization."]
857        #[doc = "* `project`: Project ID or project name"]
858        #[doc = "* `leases_to_fetch`: List of JSON-serialized MinimalRetentionLeases separated by '|'"]
859        pub fn get_retention_leases_by_minimal_retention_leases(
860            &self,
861            organization: impl Into<String>,
862            project: impl Into<String>,
863            leases_to_fetch: impl Into<String>,
864        ) -> get_retention_leases_by_minimal_retention_leases::RequestBuilder {
865            get_retention_leases_by_minimal_retention_leases::RequestBuilder {
866                client: self.0.clone(),
867                organization: organization.into(),
868                project: project.into(),
869                leases_to_fetch: leases_to_fetch.into(),
870            }
871        }
872        #[doc = "Adds new leases for pipeline runs."]
873        #[doc = ""]
874        #[doc = "Arguments:"]
875        #[doc = "* `organization`: The name of the Azure DevOps organization."]
876        #[doc = "* `project`: Project ID or project name"]
877        pub fn add(
878            &self,
879            organization: impl Into<String>,
880            body: Vec<models::NewRetentionLease>,
881            project: impl Into<String>,
882        ) -> add::RequestBuilder {
883            add::RequestBuilder {
884                client: self.0.clone(),
885                organization: organization.into(),
886                body,
887                project: project.into(),
888            }
889        }
890        #[doc = "Removes specific retention leases."]
891        #[doc = ""]
892        #[doc = "Arguments:"]
893        #[doc = "* `organization`: The name of the Azure DevOps organization."]
894        #[doc = "* `project`: Project ID or project name"]
895        pub fn delete(
896            &self,
897            organization: impl Into<String>,
898            project: impl Into<String>,
899            ids: impl Into<String>,
900        ) -> delete::RequestBuilder {
901            delete::RequestBuilder {
902                client: self.0.clone(),
903                organization: organization.into(),
904                project: project.into(),
905                ids: ids.into(),
906            }
907        }
908        #[doc = "Returns the details of the retention lease given a lease id."]
909        #[doc = ""]
910        #[doc = "Arguments:"]
911        #[doc = "* `organization`: The name of the Azure DevOps organization."]
912        #[doc = "* `project`: Project ID or project name"]
913        pub fn get(
914            &self,
915            organization: impl Into<String>,
916            project: impl Into<String>,
917            lease_id: i32,
918        ) -> get::RequestBuilder {
919            get::RequestBuilder {
920                client: self.0.clone(),
921                organization: organization.into(),
922                project: project.into(),
923                lease_id,
924            }
925        }
926        #[doc = "Updates the duration or pipeline protection status of a retention lease."]
927        #[doc = ""]
928        #[doc = "Arguments:"]
929        #[doc = "* `organization`: The name of the Azure DevOps organization."]
930        #[doc = "* `body`: The new data for the retention lease."]
931        #[doc = "* `project`: Project ID or project name"]
932        #[doc = "* `lease_id`: The ID of the lease to update."]
933        pub fn update(
934            &self,
935            organization: impl Into<String>,
936            body: impl Into<models::RetentionLeaseUpdate>,
937            project: impl Into<String>,
938            lease_id: i32,
939        ) -> update::RequestBuilder {
940            update::RequestBuilder {
941                client: self.0.clone(),
942                organization: organization.into(),
943                body: body.into(),
944                project: project.into(),
945                lease_id,
946            }
947        }
948    }
949    pub mod get_retention_leases_by_user_id {
950        use super::models;
951        #[cfg(not(target_arch = "wasm32"))]
952        use futures::future::BoxFuture;
953        #[cfg(target_arch = "wasm32")]
954        use futures::future::LocalBoxFuture as BoxFuture;
955        #[derive(Debug)]
956        pub struct Response(azure_core::Response);
957        impl Response {
958            pub async fn into_raw_body(self) -> azure_core::Result<models::RetentionLeaseList> {
959                let bytes = self.0.into_raw_body().collect().await?;
960                let body: models::RetentionLeaseList =
961                    serde_json::from_slice(&bytes).map_err(|e| {
962                        azure_core::error::Error::full(
963                            azure_core::error::ErrorKind::DataConversion,
964                            e,
965                            format!(
966                                "Failed to deserialize response:\n{}",
967                                String::from_utf8_lossy(&bytes)
968                            ),
969                        )
970                    })?;
971                Ok(body)
972            }
973            pub fn into_raw_response(self) -> azure_core::Response {
974                self.0
975            }
976            pub fn as_raw_response(&self) -> &azure_core::Response {
977                &self.0
978            }
979        }
980        impl From<Response> for azure_core::Response {
981            fn from(rsp: Response) -> Self {
982                rsp.into_raw_response()
983            }
984        }
985        impl AsRef<azure_core::Response> for Response {
986            fn as_ref(&self) -> &azure_core::Response {
987                self.as_raw_response()
988            }
989        }
990        #[derive(Clone)]
991        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
992        #[doc = r""]
993        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
994        #[doc = r" parameters can be chained."]
995        #[doc = r""]
996        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
997        #[doc = r" converts the [`RequestBuilder`] into a future,"]
998        #[doc = r" executes the request and returns a `Result` with the parsed"]
999        #[doc = r" response."]
1000        #[doc = r""]
1001        #[doc = r" If you need lower-level access to the raw response details"]
1002        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1003        #[doc = r" can finalize the request using the"]
1004        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1005        #[doc = r" that resolves to a lower-level [`Response`] value."]
1006        pub struct RequestBuilder {
1007            pub(crate) client: super::super::Client,
1008            pub(crate) organization: String,
1009            pub(crate) project: String,
1010            pub(crate) user_owner_id: String,
1011            pub(crate) definition_id: Option<i32>,
1012            pub(crate) run_id: Option<i32>,
1013        }
1014        impl RequestBuilder {
1015            #[doc = "An optional parameter to limit the search to a specific pipeline definition."]
1016            pub fn definition_id(mut self, definition_id: i32) -> Self {
1017                self.definition_id = Some(definition_id);
1018                self
1019            }
1020            #[doc = "An optional parameter to limit the search to a single pipeline run. Requires definition_id."]
1021            pub fn run_id(mut self, run_id: i32) -> Self {
1022                self.run_id = Some(run_id);
1023                self
1024            }
1025            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1026            #[doc = ""]
1027            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1028            #[doc = "However, this function can provide more flexibility when required."]
1029            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1030                Box::pin({
1031                    let this = self.clone();
1032                    async move {
1033                        let url = this.url()?;
1034                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
1035                        if let Some(auth_header) = this
1036                            .client
1037                            .token_credential()
1038                            .http_authorization_header(&this.client.scopes())
1039                            .await?
1040                        {
1041                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
1042                        }
1043                        let user_owner_id = &this.user_owner_id;
1044                        req.url_mut()
1045                            .query_pairs_mut()
1046                            .append_pair("userOwnerId", user_owner_id);
1047                        if let Some(definition_id) = &this.definition_id {
1048                            req.url_mut()
1049                                .query_pairs_mut()
1050                                .append_pair("definitionId", &definition_id.to_string());
1051                        }
1052                        if let Some(run_id) = &this.run_id {
1053                            req.url_mut()
1054                                .query_pairs_mut()
1055                                .append_pair("runId", &run_id.to_string());
1056                        }
1057                        let req_body = azure_core::EMPTY_BODY;
1058                        req.set_body(req_body);
1059                        Ok(Response(this.client.send(&mut req).await?))
1060                    }
1061                })
1062            }
1063            fn url(&self) -> azure_core::Result<azure_core::Url> {
1064                let mut url = azure_core::Url::parse(&format!(
1065                    "{}/{}/{}/_apis/build/retention/leases?userOwnerId={}",
1066                    self.client.endpoint(),
1067                    &self.organization,
1068                    &self.project,
1069                    &self.user_owner_id
1070                ))?;
1071                let has_api_version_already = url
1072                    .query_pairs()
1073                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
1074                if !has_api_version_already {
1075                    url.query_pairs_mut()
1076                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
1077                }
1078                Ok(url)
1079            }
1080        }
1081        impl std::future::IntoFuture for RequestBuilder {
1082            type Output = azure_core::Result<models::RetentionLeaseList>;
1083            type IntoFuture = BoxFuture<'static, azure_core::Result<models::RetentionLeaseList>>;
1084            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1085            #[doc = ""]
1086            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1087            #[doc = ""]
1088            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1089            fn into_future(self) -> Self::IntoFuture {
1090                Box::pin(async move { self.send().await?.into_raw_body().await })
1091            }
1092        }
1093    }
1094    pub mod get_retention_leases_by_owner_id {
1095        use super::models;
1096        #[cfg(not(target_arch = "wasm32"))]
1097        use futures::future::BoxFuture;
1098        #[cfg(target_arch = "wasm32")]
1099        use futures::future::LocalBoxFuture as BoxFuture;
1100        #[derive(Debug)]
1101        pub struct Response(azure_core::Response);
1102        impl Response {
1103            pub async fn into_raw_body(self) -> azure_core::Result<models::RetentionLeaseList> {
1104                let bytes = self.0.into_raw_body().collect().await?;
1105                let body: models::RetentionLeaseList =
1106                    serde_json::from_slice(&bytes).map_err(|e| {
1107                        azure_core::error::Error::full(
1108                            azure_core::error::ErrorKind::DataConversion,
1109                            e,
1110                            format!(
1111                                "Failed to deserialize response:\n{}",
1112                                String::from_utf8_lossy(&bytes)
1113                            ),
1114                        )
1115                    })?;
1116                Ok(body)
1117            }
1118            pub fn into_raw_response(self) -> azure_core::Response {
1119                self.0
1120            }
1121            pub fn as_raw_response(&self) -> &azure_core::Response {
1122                &self.0
1123            }
1124        }
1125        impl From<Response> for azure_core::Response {
1126            fn from(rsp: Response) -> Self {
1127                rsp.into_raw_response()
1128            }
1129        }
1130        impl AsRef<azure_core::Response> for Response {
1131            fn as_ref(&self) -> &azure_core::Response {
1132                self.as_raw_response()
1133            }
1134        }
1135        #[derive(Clone)]
1136        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1137        #[doc = r""]
1138        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1139        #[doc = r" parameters can be chained."]
1140        #[doc = r""]
1141        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1142        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1143        #[doc = r" executes the request and returns a `Result` with the parsed"]
1144        #[doc = r" response."]
1145        #[doc = r""]
1146        #[doc = r" If you need lower-level access to the raw response details"]
1147        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1148        #[doc = r" can finalize the request using the"]
1149        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1150        #[doc = r" that resolves to a lower-level [`Response`] value."]
1151        pub struct RequestBuilder {
1152            pub(crate) client: super::super::Client,
1153            pub(crate) organization: String,
1154            pub(crate) project: String,
1155            pub(crate) owner_id: Option<String>,
1156            pub(crate) definition_id: Option<i32>,
1157            pub(crate) run_id: Option<i32>,
1158        }
1159        impl RequestBuilder {
1160            pub fn owner_id(mut self, owner_id: impl Into<String>) -> Self {
1161                self.owner_id = Some(owner_id.into());
1162                self
1163            }
1164            #[doc = "An optional parameter to limit the search to a specific pipeline definition."]
1165            pub fn definition_id(mut self, definition_id: i32) -> Self {
1166                self.definition_id = Some(definition_id);
1167                self
1168            }
1169            #[doc = "An optional parameter to limit the search to a single pipeline run. Requires definition_id."]
1170            pub fn run_id(mut self, run_id: i32) -> Self {
1171                self.run_id = Some(run_id);
1172                self
1173            }
1174            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1175            #[doc = ""]
1176            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1177            #[doc = "However, this function can provide more flexibility when required."]
1178            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1179                Box::pin({
1180                    let this = self.clone();
1181                    async move {
1182                        let url = this.url()?;
1183                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
1184                        if let Some(auth_header) = this
1185                            .client
1186                            .token_credential()
1187                            .http_authorization_header(&this.client.scopes())
1188                            .await?
1189                        {
1190                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
1191                        }
1192                        if let Some(owner_id) = &this.owner_id {
1193                            req.url_mut()
1194                                .query_pairs_mut()
1195                                .append_pair("ownerId", owner_id);
1196                        }
1197                        if let Some(definition_id) = &this.definition_id {
1198                            req.url_mut()
1199                                .query_pairs_mut()
1200                                .append_pair("definitionId", &definition_id.to_string());
1201                        }
1202                        if let Some(run_id) = &this.run_id {
1203                            req.url_mut()
1204                                .query_pairs_mut()
1205                                .append_pair("runId", &run_id.to_string());
1206                        }
1207                        let req_body = azure_core::EMPTY_BODY;
1208                        req.set_body(req_body);
1209                        Ok(Response(this.client.send(&mut req).await?))
1210                    }
1211                })
1212            }
1213            fn url(&self) -> azure_core::Result<azure_core::Url> {
1214                let mut url = azure_core::Url::parse(&format!(
1215                    "{}/{}/{}/_apis/build/retention/leases?",
1216                    self.client.endpoint(),
1217                    &self.organization,
1218                    &self.project
1219                ))?;
1220                let has_api_version_already = url
1221                    .query_pairs()
1222                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
1223                if !has_api_version_already {
1224                    url.query_pairs_mut()
1225                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
1226                }
1227                Ok(url)
1228            }
1229        }
1230        impl std::future::IntoFuture for RequestBuilder {
1231            type Output = azure_core::Result<models::RetentionLeaseList>;
1232            type IntoFuture = BoxFuture<'static, azure_core::Result<models::RetentionLeaseList>>;
1233            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1234            #[doc = ""]
1235            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1236            #[doc = ""]
1237            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1238            fn into_future(self) -> Self::IntoFuture {
1239                Box::pin(async move { self.send().await?.into_raw_body().await })
1240            }
1241        }
1242    }
1243    pub mod get_retention_leases_by_minimal_retention_leases {
1244        use super::models;
1245        #[cfg(not(target_arch = "wasm32"))]
1246        use futures::future::BoxFuture;
1247        #[cfg(target_arch = "wasm32")]
1248        use futures::future::LocalBoxFuture as BoxFuture;
1249        #[derive(Debug)]
1250        pub struct Response(azure_core::Response);
1251        impl Response {
1252            pub async fn into_raw_body(self) -> azure_core::Result<models::RetentionLeaseList> {
1253                let bytes = self.0.into_raw_body().collect().await?;
1254                let body: models::RetentionLeaseList =
1255                    serde_json::from_slice(&bytes).map_err(|e| {
1256                        azure_core::error::Error::full(
1257                            azure_core::error::ErrorKind::DataConversion,
1258                            e,
1259                            format!(
1260                                "Failed to deserialize response:\n{}",
1261                                String::from_utf8_lossy(&bytes)
1262                            ),
1263                        )
1264                    })?;
1265                Ok(body)
1266            }
1267            pub fn into_raw_response(self) -> azure_core::Response {
1268                self.0
1269            }
1270            pub fn as_raw_response(&self) -> &azure_core::Response {
1271                &self.0
1272            }
1273        }
1274        impl From<Response> for azure_core::Response {
1275            fn from(rsp: Response) -> Self {
1276                rsp.into_raw_response()
1277            }
1278        }
1279        impl AsRef<azure_core::Response> for Response {
1280            fn as_ref(&self) -> &azure_core::Response {
1281                self.as_raw_response()
1282            }
1283        }
1284        #[derive(Clone)]
1285        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1286        #[doc = r""]
1287        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1288        #[doc = r" parameters can be chained."]
1289        #[doc = r""]
1290        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1291        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1292        #[doc = r" executes the request and returns a `Result` with the parsed"]
1293        #[doc = r" response."]
1294        #[doc = r""]
1295        #[doc = r" If you need lower-level access to the raw response details"]
1296        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1297        #[doc = r" can finalize the request using the"]
1298        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1299        #[doc = r" that resolves to a lower-level [`Response`] value."]
1300        pub struct RequestBuilder {
1301            pub(crate) client: super::super::Client,
1302            pub(crate) organization: String,
1303            pub(crate) project: String,
1304            pub(crate) leases_to_fetch: String,
1305        }
1306        impl RequestBuilder {
1307            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1308            #[doc = ""]
1309            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1310            #[doc = "However, this function can provide more flexibility when required."]
1311            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1312                Box::pin({
1313                    let this = self.clone();
1314                    async move {
1315                        let url = this.url()?;
1316                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
1317                        if let Some(auth_header) = this
1318                            .client
1319                            .token_credential()
1320                            .http_authorization_header(&this.client.scopes())
1321                            .await?
1322                        {
1323                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
1324                        }
1325                        let leases_to_fetch = &this.leases_to_fetch;
1326                        req.url_mut()
1327                            .query_pairs_mut()
1328                            .append_pair("leasesToFetch", leases_to_fetch);
1329                        let req_body = azure_core::EMPTY_BODY;
1330                        req.set_body(req_body);
1331                        Ok(Response(this.client.send(&mut req).await?))
1332                    }
1333                })
1334            }
1335            fn url(&self) -> azure_core::Result<azure_core::Url> {
1336                let mut url = azure_core::Url::parse(&format!(
1337                    "{}/{}/{}/_apis/build/retention/leases",
1338                    self.client.endpoint(),
1339                    &self.organization,
1340                    &self.project
1341                ))?;
1342                let has_api_version_already = url
1343                    .query_pairs()
1344                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
1345                if !has_api_version_already {
1346                    url.query_pairs_mut()
1347                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
1348                }
1349                Ok(url)
1350            }
1351        }
1352        impl std::future::IntoFuture for RequestBuilder {
1353            type Output = azure_core::Result<models::RetentionLeaseList>;
1354            type IntoFuture = BoxFuture<'static, azure_core::Result<models::RetentionLeaseList>>;
1355            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1356            #[doc = ""]
1357            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1358            #[doc = ""]
1359            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1360            fn into_future(self) -> Self::IntoFuture {
1361                Box::pin(async move { self.send().await?.into_raw_body().await })
1362            }
1363        }
1364    }
1365    pub mod add {
1366        use super::models;
1367        #[cfg(not(target_arch = "wasm32"))]
1368        use futures::future::BoxFuture;
1369        #[cfg(target_arch = "wasm32")]
1370        use futures::future::LocalBoxFuture as BoxFuture;
1371        #[derive(Debug)]
1372        pub struct Response(azure_core::Response);
1373        impl Response {
1374            pub async fn into_raw_body(self) -> azure_core::Result<models::RetentionLeaseList> {
1375                let bytes = self.0.into_raw_body().collect().await?;
1376                let body: models::RetentionLeaseList =
1377                    serde_json::from_slice(&bytes).map_err(|e| {
1378                        azure_core::error::Error::full(
1379                            azure_core::error::ErrorKind::DataConversion,
1380                            e,
1381                            format!(
1382                                "Failed to deserialize response:\n{}",
1383                                String::from_utf8_lossy(&bytes)
1384                            ),
1385                        )
1386                    })?;
1387                Ok(body)
1388            }
1389            pub fn into_raw_response(self) -> azure_core::Response {
1390                self.0
1391            }
1392            pub fn as_raw_response(&self) -> &azure_core::Response {
1393                &self.0
1394            }
1395        }
1396        impl From<Response> for azure_core::Response {
1397            fn from(rsp: Response) -> Self {
1398                rsp.into_raw_response()
1399            }
1400        }
1401        impl AsRef<azure_core::Response> for Response {
1402            fn as_ref(&self) -> &azure_core::Response {
1403                self.as_raw_response()
1404            }
1405        }
1406        #[derive(Clone)]
1407        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1408        #[doc = r""]
1409        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1410        #[doc = r" parameters can be chained."]
1411        #[doc = r""]
1412        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1413        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1414        #[doc = r" executes the request and returns a `Result` with the parsed"]
1415        #[doc = r" response."]
1416        #[doc = r""]
1417        #[doc = r" If you need lower-level access to the raw response details"]
1418        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1419        #[doc = r" can finalize the request using the"]
1420        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1421        #[doc = r" that resolves to a lower-level [`Response`] value."]
1422        pub struct RequestBuilder {
1423            pub(crate) client: super::super::Client,
1424            pub(crate) organization: String,
1425            pub(crate) body: Vec<models::NewRetentionLease>,
1426            pub(crate) project: String,
1427        }
1428        impl RequestBuilder {
1429            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1430            #[doc = ""]
1431            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1432            #[doc = "However, this function can provide more flexibility when required."]
1433            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1434                Box::pin({
1435                    let this = self.clone();
1436                    async move {
1437                        let url = this.url()?;
1438                        let mut req = azure_core::Request::new(url, azure_core::Method::Post);
1439                        if let Some(auth_header) = this
1440                            .client
1441                            .token_credential()
1442                            .http_authorization_header(&this.client.scopes())
1443                            .await?
1444                        {
1445                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
1446                        }
1447                        req.insert_header("content-type", "application/json");
1448                        let req_body = azure_core::json::to_json(&this.body)?;
1449                        req.set_body(req_body);
1450                        Ok(Response(this.client.send(&mut req).await?))
1451                    }
1452                })
1453            }
1454            fn url(&self) -> azure_core::Result<azure_core::Url> {
1455                let mut url = azure_core::Url::parse(&format!(
1456                    "{}/{}/{}/_apis/build/retention/leases",
1457                    self.client.endpoint(),
1458                    &self.organization,
1459                    &self.project
1460                ))?;
1461                let has_api_version_already = url
1462                    .query_pairs()
1463                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
1464                if !has_api_version_already {
1465                    url.query_pairs_mut()
1466                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
1467                }
1468                Ok(url)
1469            }
1470        }
1471        impl std::future::IntoFuture for RequestBuilder {
1472            type Output = azure_core::Result<models::RetentionLeaseList>;
1473            type IntoFuture = BoxFuture<'static, azure_core::Result<models::RetentionLeaseList>>;
1474            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1475            #[doc = ""]
1476            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1477            #[doc = ""]
1478            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1479            fn into_future(self) -> Self::IntoFuture {
1480                Box::pin(async move { self.send().await?.into_raw_body().await })
1481            }
1482        }
1483    }
1484    pub mod delete {
1485        use super::models;
1486        #[cfg(not(target_arch = "wasm32"))]
1487        use futures::future::BoxFuture;
1488        #[cfg(target_arch = "wasm32")]
1489        use futures::future::LocalBoxFuture as BoxFuture;
1490        #[derive(Debug)]
1491        pub struct Response(azure_core::Response);
1492        impl Response {
1493            pub fn into_raw_response(self) -> azure_core::Response {
1494                self.0
1495            }
1496            pub fn as_raw_response(&self) -> &azure_core::Response {
1497                &self.0
1498            }
1499        }
1500        impl From<Response> for azure_core::Response {
1501            fn from(rsp: Response) -> Self {
1502                rsp.into_raw_response()
1503            }
1504        }
1505        impl AsRef<azure_core::Response> for Response {
1506            fn as_ref(&self) -> &azure_core::Response {
1507                self.as_raw_response()
1508            }
1509        }
1510        #[derive(Clone)]
1511        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1512        #[doc = r""]
1513        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1514        #[doc = r" parameters can be chained."]
1515        #[doc = r""]
1516        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1517        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1518        #[doc = r" executes the request and returns a `Result` with the parsed"]
1519        #[doc = r" response."]
1520        #[doc = r""]
1521        #[doc = r" If you need lower-level access to the raw response details"]
1522        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1523        #[doc = r" can finalize the request using the"]
1524        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1525        #[doc = r" that resolves to a lower-level [`Response`] value."]
1526        pub struct RequestBuilder {
1527            pub(crate) client: super::super::Client,
1528            pub(crate) organization: String,
1529            pub(crate) project: String,
1530            pub(crate) ids: String,
1531        }
1532        impl RequestBuilder {
1533            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1534            #[doc = ""]
1535            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1536            #[doc = "However, this function can provide more flexibility when required."]
1537            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1538                Box::pin({
1539                    let this = self.clone();
1540                    async move {
1541                        let url = this.url()?;
1542                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
1543                        if let Some(auth_header) = this
1544                            .client
1545                            .token_credential()
1546                            .http_authorization_header(&this.client.scopes())
1547                            .await?
1548                        {
1549                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
1550                        }
1551                        let ids = &this.ids;
1552                        req.url_mut().query_pairs_mut().append_pair("ids", ids);
1553                        let req_body = azure_core::EMPTY_BODY;
1554                        req.set_body(req_body);
1555                        Ok(Response(this.client.send(&mut req).await?))
1556                    }
1557                })
1558            }
1559            fn url(&self) -> azure_core::Result<azure_core::Url> {
1560                let mut url = azure_core::Url::parse(&format!(
1561                    "{}/{}/{}/_apis/build/retention/leases",
1562                    self.client.endpoint(),
1563                    &self.organization,
1564                    &self.project
1565                ))?;
1566                let has_api_version_already = url
1567                    .query_pairs()
1568                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
1569                if !has_api_version_already {
1570                    url.query_pairs_mut()
1571                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
1572                }
1573                Ok(url)
1574            }
1575        }
1576        impl std::future::IntoFuture for RequestBuilder {
1577            type Output = azure_core::Result<()>;
1578            type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
1579            #[doc = "Returns a future that sends the request and waits for the response."]
1580            #[doc = ""]
1581            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1582            #[doc = ""]
1583            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1584            fn into_future(self) -> Self::IntoFuture {
1585                Box::pin(async move {
1586                    let _rsp = self.send().await?;
1587                    Ok(())
1588                })
1589            }
1590        }
1591    }
1592    pub mod get {
1593        use super::models;
1594        #[cfg(not(target_arch = "wasm32"))]
1595        use futures::future::BoxFuture;
1596        #[cfg(target_arch = "wasm32")]
1597        use futures::future::LocalBoxFuture as BoxFuture;
1598        #[derive(Debug)]
1599        pub struct Response(azure_core::Response);
1600        impl Response {
1601            pub async fn into_raw_body(self) -> azure_core::Result<models::RetentionLease> {
1602                let bytes = self.0.into_raw_body().collect().await?;
1603                let body: models::RetentionLease = serde_json::from_slice(&bytes).map_err(|e| {
1604                    azure_core::error::Error::full(
1605                        azure_core::error::ErrorKind::DataConversion,
1606                        e,
1607                        format!(
1608                            "Failed to deserialize response:\n{}",
1609                            String::from_utf8_lossy(&bytes)
1610                        ),
1611                    )
1612                })?;
1613                Ok(body)
1614            }
1615            pub fn into_raw_response(self) -> azure_core::Response {
1616                self.0
1617            }
1618            pub fn as_raw_response(&self) -> &azure_core::Response {
1619                &self.0
1620            }
1621        }
1622        impl From<Response> for azure_core::Response {
1623            fn from(rsp: Response) -> Self {
1624                rsp.into_raw_response()
1625            }
1626        }
1627        impl AsRef<azure_core::Response> for Response {
1628            fn as_ref(&self) -> &azure_core::Response {
1629                self.as_raw_response()
1630            }
1631        }
1632        #[derive(Clone)]
1633        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1634        #[doc = r""]
1635        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1636        #[doc = r" parameters can be chained."]
1637        #[doc = r""]
1638        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1639        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1640        #[doc = r" executes the request and returns a `Result` with the parsed"]
1641        #[doc = r" response."]
1642        #[doc = r""]
1643        #[doc = r" If you need lower-level access to the raw response details"]
1644        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1645        #[doc = r" can finalize the request using the"]
1646        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1647        #[doc = r" that resolves to a lower-level [`Response`] value."]
1648        pub struct RequestBuilder {
1649            pub(crate) client: super::super::Client,
1650            pub(crate) organization: String,
1651            pub(crate) project: String,
1652            pub(crate) lease_id: i32,
1653        }
1654        impl RequestBuilder {
1655            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1656            #[doc = ""]
1657            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1658            #[doc = "However, this function can provide more flexibility when required."]
1659            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1660                Box::pin({
1661                    let this = self.clone();
1662                    async move {
1663                        let url = this.url()?;
1664                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
1665                        if let Some(auth_header) = this
1666                            .client
1667                            .token_credential()
1668                            .http_authorization_header(&this.client.scopes())
1669                            .await?
1670                        {
1671                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
1672                        }
1673                        let req_body = azure_core::EMPTY_BODY;
1674                        req.set_body(req_body);
1675                        Ok(Response(this.client.send(&mut req).await?))
1676                    }
1677                })
1678            }
1679            fn url(&self) -> azure_core::Result<azure_core::Url> {
1680                let mut url = azure_core::Url::parse(&format!(
1681                    "{}/{}/{}/_apis/build/retention/leases/{}",
1682                    self.client.endpoint(),
1683                    &self.organization,
1684                    &self.project,
1685                    &self.lease_id
1686                ))?;
1687                let has_api_version_already = url
1688                    .query_pairs()
1689                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
1690                if !has_api_version_already {
1691                    url.query_pairs_mut()
1692                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
1693                }
1694                Ok(url)
1695            }
1696        }
1697        impl std::future::IntoFuture for RequestBuilder {
1698            type Output = azure_core::Result<models::RetentionLease>;
1699            type IntoFuture = BoxFuture<'static, azure_core::Result<models::RetentionLease>>;
1700            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1701            #[doc = ""]
1702            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1703            #[doc = ""]
1704            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1705            fn into_future(self) -> Self::IntoFuture {
1706                Box::pin(async move { self.send().await?.into_raw_body().await })
1707            }
1708        }
1709    }
1710    pub mod update {
1711        use super::models;
1712        #[cfg(not(target_arch = "wasm32"))]
1713        use futures::future::BoxFuture;
1714        #[cfg(target_arch = "wasm32")]
1715        use futures::future::LocalBoxFuture as BoxFuture;
1716        #[derive(Debug)]
1717        pub struct Response(azure_core::Response);
1718        impl Response {
1719            pub async fn into_raw_body(self) -> azure_core::Result<models::RetentionLease> {
1720                let bytes = self.0.into_raw_body().collect().await?;
1721                let body: models::RetentionLease = serde_json::from_slice(&bytes).map_err(|e| {
1722                    azure_core::error::Error::full(
1723                        azure_core::error::ErrorKind::DataConversion,
1724                        e,
1725                        format!(
1726                            "Failed to deserialize response:\n{}",
1727                            String::from_utf8_lossy(&bytes)
1728                        ),
1729                    )
1730                })?;
1731                Ok(body)
1732            }
1733            pub fn into_raw_response(self) -> azure_core::Response {
1734                self.0
1735            }
1736            pub fn as_raw_response(&self) -> &azure_core::Response {
1737                &self.0
1738            }
1739        }
1740        impl From<Response> for azure_core::Response {
1741            fn from(rsp: Response) -> Self {
1742                rsp.into_raw_response()
1743            }
1744        }
1745        impl AsRef<azure_core::Response> for Response {
1746            fn as_ref(&self) -> &azure_core::Response {
1747                self.as_raw_response()
1748            }
1749        }
1750        #[derive(Clone)]
1751        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1752        #[doc = r""]
1753        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1754        #[doc = r" parameters can be chained."]
1755        #[doc = r""]
1756        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1757        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1758        #[doc = r" executes the request and returns a `Result` with the parsed"]
1759        #[doc = r" response."]
1760        #[doc = r""]
1761        #[doc = r" If you need lower-level access to the raw response details"]
1762        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1763        #[doc = r" can finalize the request using the"]
1764        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1765        #[doc = r" that resolves to a lower-level [`Response`] value."]
1766        pub struct RequestBuilder {
1767            pub(crate) client: super::super::Client,
1768            pub(crate) organization: String,
1769            pub(crate) body: models::RetentionLeaseUpdate,
1770            pub(crate) project: String,
1771            pub(crate) lease_id: i32,
1772        }
1773        impl RequestBuilder {
1774            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1775            #[doc = ""]
1776            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1777            #[doc = "However, this function can provide more flexibility when required."]
1778            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1779                Box::pin({
1780                    let this = self.clone();
1781                    async move {
1782                        let url = this.url()?;
1783                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
1784                        if let Some(auth_header) = this
1785                            .client
1786                            .token_credential()
1787                            .http_authorization_header(&this.client.scopes())
1788                            .await?
1789                        {
1790                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
1791                        }
1792                        req.insert_header("content-type", "application/json");
1793                        let req_body = azure_core::json::to_json(&this.body)?;
1794                        req.set_body(req_body);
1795                        Ok(Response(this.client.send(&mut req).await?))
1796                    }
1797                })
1798            }
1799            fn url(&self) -> azure_core::Result<azure_core::Url> {
1800                let mut url = azure_core::Url::parse(&format!(
1801                    "{}/{}/{}/_apis/build/retention/leases/{}",
1802                    self.client.endpoint(),
1803                    &self.organization,
1804                    &self.project,
1805                    &self.lease_id
1806                ))?;
1807                let has_api_version_already = url
1808                    .query_pairs()
1809                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
1810                if !has_api_version_already {
1811                    url.query_pairs_mut()
1812                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
1813                }
1814                Ok(url)
1815            }
1816        }
1817        impl std::future::IntoFuture for RequestBuilder {
1818            type Output = azure_core::Result<models::RetentionLease>;
1819            type IntoFuture = BoxFuture<'static, azure_core::Result<models::RetentionLease>>;
1820            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1821            #[doc = ""]
1822            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1823            #[doc = ""]
1824            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1825            fn into_future(self) -> Self::IntoFuture {
1826                Box::pin(async move { self.send().await?.into_raw_body().await })
1827            }
1828        }
1829    }
1830}
1831pub mod controllers {
1832    use super::models;
1833    #[cfg(not(target_arch = "wasm32"))]
1834    use futures::future::BoxFuture;
1835    #[cfg(target_arch = "wasm32")]
1836    use futures::future::LocalBoxFuture as BoxFuture;
1837    pub struct Client(pub(crate) super::Client);
1838    impl Client {
1839        #[doc = "Gets controller, optionally filtered by name"]
1840        #[doc = ""]
1841        #[doc = "Arguments:"]
1842        #[doc = "* `organization`: The name of the Azure DevOps organization."]
1843        pub fn list(&self, organization: impl Into<String>) -> list::RequestBuilder {
1844            list::RequestBuilder {
1845                client: self.0.clone(),
1846                organization: organization.into(),
1847                name: None,
1848            }
1849        }
1850        #[doc = "Gets a controller"]
1851        #[doc = ""]
1852        #[doc = "Arguments:"]
1853        #[doc = "* `organization`: The name of the Azure DevOps organization."]
1854        pub fn get(
1855            &self,
1856            organization: impl Into<String>,
1857            controller_id: i32,
1858        ) -> get::RequestBuilder {
1859            get::RequestBuilder {
1860                client: self.0.clone(),
1861                organization: organization.into(),
1862                controller_id,
1863            }
1864        }
1865    }
1866    pub mod list {
1867        use super::models;
1868        #[cfg(not(target_arch = "wasm32"))]
1869        use futures::future::BoxFuture;
1870        #[cfg(target_arch = "wasm32")]
1871        use futures::future::LocalBoxFuture as BoxFuture;
1872        #[derive(Debug)]
1873        pub struct Response(azure_core::Response);
1874        impl Response {
1875            pub async fn into_raw_body(self) -> azure_core::Result<models::BuildControllerList> {
1876                let bytes = self.0.into_raw_body().collect().await?;
1877                let body: models::BuildControllerList =
1878                    serde_json::from_slice(&bytes).map_err(|e| {
1879                        azure_core::error::Error::full(
1880                            azure_core::error::ErrorKind::DataConversion,
1881                            e,
1882                            format!(
1883                                "Failed to deserialize response:\n{}",
1884                                String::from_utf8_lossy(&bytes)
1885                            ),
1886                        )
1887                    })?;
1888                Ok(body)
1889            }
1890            pub fn into_raw_response(self) -> azure_core::Response {
1891                self.0
1892            }
1893            pub fn as_raw_response(&self) -> &azure_core::Response {
1894                &self.0
1895            }
1896        }
1897        impl From<Response> for azure_core::Response {
1898            fn from(rsp: Response) -> Self {
1899                rsp.into_raw_response()
1900            }
1901        }
1902        impl AsRef<azure_core::Response> for Response {
1903            fn as_ref(&self) -> &azure_core::Response {
1904                self.as_raw_response()
1905            }
1906        }
1907        #[derive(Clone)]
1908        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1909        #[doc = r""]
1910        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1911        #[doc = r" parameters can be chained."]
1912        #[doc = r""]
1913        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1914        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1915        #[doc = r" executes the request and returns a `Result` with the parsed"]
1916        #[doc = r" response."]
1917        #[doc = r""]
1918        #[doc = r" If you need lower-level access to the raw response details"]
1919        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1920        #[doc = r" can finalize the request using the"]
1921        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1922        #[doc = r" that resolves to a lower-level [`Response`] value."]
1923        pub struct RequestBuilder {
1924            pub(crate) client: super::super::Client,
1925            pub(crate) organization: String,
1926            pub(crate) name: Option<String>,
1927        }
1928        impl RequestBuilder {
1929            pub fn name(mut self, name: impl Into<String>) -> Self {
1930                self.name = Some(name.into());
1931                self
1932            }
1933            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1934            #[doc = ""]
1935            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1936            #[doc = "However, this function can provide more flexibility when required."]
1937            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1938                Box::pin({
1939                    let this = self.clone();
1940                    async move {
1941                        let url = this.url()?;
1942                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
1943                        if let Some(auth_header) = this
1944                            .client
1945                            .token_credential()
1946                            .http_authorization_header(&this.client.scopes())
1947                            .await?
1948                        {
1949                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
1950                        }
1951                        if let Some(name) = &this.name {
1952                            req.url_mut().query_pairs_mut().append_pair("name", name);
1953                        }
1954                        let req_body = azure_core::EMPTY_BODY;
1955                        req.set_body(req_body);
1956                        Ok(Response(this.client.send(&mut req).await?))
1957                    }
1958                })
1959            }
1960            fn url(&self) -> azure_core::Result<azure_core::Url> {
1961                let mut url = azure_core::Url::parse(&format!(
1962                    "{}/{}/_apis/build/controllers",
1963                    self.client.endpoint(),
1964                    &self.organization
1965                ))?;
1966                let has_api_version_already = url
1967                    .query_pairs()
1968                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
1969                if !has_api_version_already {
1970                    url.query_pairs_mut()
1971                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
1972                }
1973                Ok(url)
1974            }
1975        }
1976        impl std::future::IntoFuture for RequestBuilder {
1977            type Output = azure_core::Result<models::BuildControllerList>;
1978            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildControllerList>>;
1979            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1980            #[doc = ""]
1981            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1982            #[doc = ""]
1983            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1984            fn into_future(self) -> Self::IntoFuture {
1985                Box::pin(async move { self.send().await?.into_raw_body().await })
1986            }
1987        }
1988    }
1989    pub mod get {
1990        use super::models;
1991        #[cfg(not(target_arch = "wasm32"))]
1992        use futures::future::BoxFuture;
1993        #[cfg(target_arch = "wasm32")]
1994        use futures::future::LocalBoxFuture as BoxFuture;
1995        #[derive(Debug)]
1996        pub struct Response(azure_core::Response);
1997        impl Response {
1998            pub async fn into_raw_body(self) -> azure_core::Result<models::BuildController> {
1999                let bytes = self.0.into_raw_body().collect().await?;
2000                let body: models::BuildController =
2001                    serde_json::from_slice(&bytes).map_err(|e| {
2002                        azure_core::error::Error::full(
2003                            azure_core::error::ErrorKind::DataConversion,
2004                            e,
2005                            format!(
2006                                "Failed to deserialize response:\n{}",
2007                                String::from_utf8_lossy(&bytes)
2008                            ),
2009                        )
2010                    })?;
2011                Ok(body)
2012            }
2013            pub fn into_raw_response(self) -> azure_core::Response {
2014                self.0
2015            }
2016            pub fn as_raw_response(&self) -> &azure_core::Response {
2017                &self.0
2018            }
2019        }
2020        impl From<Response> for azure_core::Response {
2021            fn from(rsp: Response) -> Self {
2022                rsp.into_raw_response()
2023            }
2024        }
2025        impl AsRef<azure_core::Response> for Response {
2026            fn as_ref(&self) -> &azure_core::Response {
2027                self.as_raw_response()
2028            }
2029        }
2030        #[derive(Clone)]
2031        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2032        #[doc = r""]
2033        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2034        #[doc = r" parameters can be chained."]
2035        #[doc = r""]
2036        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2037        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2038        #[doc = r" executes the request and returns a `Result` with the parsed"]
2039        #[doc = r" response."]
2040        #[doc = r""]
2041        #[doc = r" If you need lower-level access to the raw response details"]
2042        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2043        #[doc = r" can finalize the request using the"]
2044        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2045        #[doc = r" that resolves to a lower-level [`Response`] value."]
2046        pub struct RequestBuilder {
2047            pub(crate) client: super::super::Client,
2048            pub(crate) organization: String,
2049            pub(crate) controller_id: i32,
2050        }
2051        impl RequestBuilder {
2052            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2053            #[doc = ""]
2054            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2055            #[doc = "However, this function can provide more flexibility when required."]
2056            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2057                Box::pin({
2058                    let this = self.clone();
2059                    async move {
2060                        let url = this.url()?;
2061                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
2062                        if let Some(auth_header) = this
2063                            .client
2064                            .token_credential()
2065                            .http_authorization_header(&this.client.scopes())
2066                            .await?
2067                        {
2068                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
2069                        }
2070                        let req_body = azure_core::EMPTY_BODY;
2071                        req.set_body(req_body);
2072                        Ok(Response(this.client.send(&mut req).await?))
2073                    }
2074                })
2075            }
2076            fn url(&self) -> azure_core::Result<azure_core::Url> {
2077                let mut url = azure_core::Url::parse(&format!(
2078                    "{}/{}/_apis/build/controllers/{}",
2079                    self.client.endpoint(),
2080                    &self.organization,
2081                    &self.controller_id
2082                ))?;
2083                let has_api_version_already = url
2084                    .query_pairs()
2085                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
2086                if !has_api_version_already {
2087                    url.query_pairs_mut()
2088                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
2089                }
2090                Ok(url)
2091            }
2092        }
2093        impl std::future::IntoFuture for RequestBuilder {
2094            type Output = azure_core::Result<models::BuildController>;
2095            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildController>>;
2096            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2097            #[doc = ""]
2098            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2099            #[doc = ""]
2100            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2101            fn into_future(self) -> Self::IntoFuture {
2102                Box::pin(async move { self.send().await?.into_raw_body().await })
2103            }
2104        }
2105    }
2106}
2107pub mod resource_usage {
2108    use super::models;
2109    #[cfg(not(target_arch = "wasm32"))]
2110    use futures::future::BoxFuture;
2111    #[cfg(target_arch = "wasm32")]
2112    use futures::future::LocalBoxFuture as BoxFuture;
2113    pub struct Client(pub(crate) super::Client);
2114    impl Client {
2115        #[doc = "Gets information about build resources in the system."]
2116        #[doc = ""]
2117        #[doc = "Arguments:"]
2118        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2119        pub fn get(&self, organization: impl Into<String>) -> get::RequestBuilder {
2120            get::RequestBuilder {
2121                client: self.0.clone(),
2122                organization: organization.into(),
2123            }
2124        }
2125    }
2126    pub mod get {
2127        use super::models;
2128        #[cfg(not(target_arch = "wasm32"))]
2129        use futures::future::BoxFuture;
2130        #[cfg(target_arch = "wasm32")]
2131        use futures::future::LocalBoxFuture as BoxFuture;
2132        #[derive(Debug)]
2133        pub struct Response(azure_core::Response);
2134        impl Response {
2135            pub async fn into_raw_body(self) -> azure_core::Result<models::BuildResourceUsage> {
2136                let bytes = self.0.into_raw_body().collect().await?;
2137                let body: models::BuildResourceUsage =
2138                    serde_json::from_slice(&bytes).map_err(|e| {
2139                        azure_core::error::Error::full(
2140                            azure_core::error::ErrorKind::DataConversion,
2141                            e,
2142                            format!(
2143                                "Failed to deserialize response:\n{}",
2144                                String::from_utf8_lossy(&bytes)
2145                            ),
2146                        )
2147                    })?;
2148                Ok(body)
2149            }
2150            pub fn into_raw_response(self) -> azure_core::Response {
2151                self.0
2152            }
2153            pub fn as_raw_response(&self) -> &azure_core::Response {
2154                &self.0
2155            }
2156        }
2157        impl From<Response> for azure_core::Response {
2158            fn from(rsp: Response) -> Self {
2159                rsp.into_raw_response()
2160            }
2161        }
2162        impl AsRef<azure_core::Response> for Response {
2163            fn as_ref(&self) -> &azure_core::Response {
2164                self.as_raw_response()
2165            }
2166        }
2167        #[derive(Clone)]
2168        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2169        #[doc = r""]
2170        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2171        #[doc = r" parameters can be chained."]
2172        #[doc = r""]
2173        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2174        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2175        #[doc = r" executes the request and returns a `Result` with the parsed"]
2176        #[doc = r" response."]
2177        #[doc = r""]
2178        #[doc = r" If you need lower-level access to the raw response details"]
2179        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2180        #[doc = r" can finalize the request using the"]
2181        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2182        #[doc = r" that resolves to a lower-level [`Response`] value."]
2183        pub struct RequestBuilder {
2184            pub(crate) client: super::super::Client,
2185            pub(crate) organization: String,
2186        }
2187        impl RequestBuilder {
2188            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2189            #[doc = ""]
2190            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2191            #[doc = "However, this function can provide more flexibility when required."]
2192            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2193                Box::pin({
2194                    let this = self.clone();
2195                    async move {
2196                        let url = this.url()?;
2197                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
2198                        if let Some(auth_header) = this
2199                            .client
2200                            .token_credential()
2201                            .http_authorization_header(&this.client.scopes())
2202                            .await?
2203                        {
2204                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
2205                        }
2206                        let req_body = azure_core::EMPTY_BODY;
2207                        req.set_body(req_body);
2208                        Ok(Response(this.client.send(&mut req).await?))
2209                    }
2210                })
2211            }
2212            fn url(&self) -> azure_core::Result<azure_core::Url> {
2213                let mut url = azure_core::Url::parse(&format!(
2214                    "{}/{}/_apis/build/resourceusage",
2215                    self.client.endpoint(),
2216                    &self.organization
2217                ))?;
2218                let has_api_version_already = url
2219                    .query_pairs()
2220                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
2221                if !has_api_version_already {
2222                    url.query_pairs_mut()
2223                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
2224                }
2225                Ok(url)
2226            }
2227        }
2228        impl std::future::IntoFuture for RequestBuilder {
2229            type Output = azure_core::Result<models::BuildResourceUsage>;
2230            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildResourceUsage>>;
2231            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2232            #[doc = ""]
2233            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2234            #[doc = ""]
2235            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2236            fn into_future(self) -> Self::IntoFuture {
2237                Box::pin(async move { self.send().await?.into_raw_body().await })
2238            }
2239        }
2240    }
2241}
2242pub mod history {
2243    use super::models;
2244    #[cfg(not(target_arch = "wasm32"))]
2245    use futures::future::BoxFuture;
2246    #[cfg(target_arch = "wasm32")]
2247    use futures::future::LocalBoxFuture as BoxFuture;
2248    pub struct Client(pub(crate) super::Client);
2249    impl Client {
2250        #[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."]
2251        #[doc = ""]
2252        #[doc = "Arguments:"]
2253        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2254        pub fn get(&self, organization: impl Into<String>) -> get::RequestBuilder {
2255            get::RequestBuilder {
2256                client: self.0.clone(),
2257                organization: organization.into(),
2258                days_to_lookback: None,
2259            }
2260        }
2261    }
2262    pub mod get {
2263        use super::models;
2264        #[cfg(not(target_arch = "wasm32"))]
2265        use futures::future::BoxFuture;
2266        #[cfg(target_arch = "wasm32")]
2267        use futures::future::LocalBoxFuture as BoxFuture;
2268        #[derive(Debug)]
2269        pub struct Response(azure_core::Response);
2270        impl Response {
2271            pub async fn into_raw_body(self) -> azure_core::Result<models::BuildRetentionHistory> {
2272                let bytes = self.0.into_raw_body().collect().await?;
2273                let body: models::BuildRetentionHistory =
2274                    serde_json::from_slice(&bytes).map_err(|e| {
2275                        azure_core::error::Error::full(
2276                            azure_core::error::ErrorKind::DataConversion,
2277                            e,
2278                            format!(
2279                                "Failed to deserialize response:\n{}",
2280                                String::from_utf8_lossy(&bytes)
2281                            ),
2282                        )
2283                    })?;
2284                Ok(body)
2285            }
2286            pub fn into_raw_response(self) -> azure_core::Response {
2287                self.0
2288            }
2289            pub fn as_raw_response(&self) -> &azure_core::Response {
2290                &self.0
2291            }
2292        }
2293        impl From<Response> for azure_core::Response {
2294            fn from(rsp: Response) -> Self {
2295                rsp.into_raw_response()
2296            }
2297        }
2298        impl AsRef<azure_core::Response> for Response {
2299            fn as_ref(&self) -> &azure_core::Response {
2300                self.as_raw_response()
2301            }
2302        }
2303        #[derive(Clone)]
2304        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2305        #[doc = r""]
2306        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2307        #[doc = r" parameters can be chained."]
2308        #[doc = r""]
2309        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2310        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2311        #[doc = r" executes the request and returns a `Result` with the parsed"]
2312        #[doc = r" response."]
2313        #[doc = r""]
2314        #[doc = r" If you need lower-level access to the raw response details"]
2315        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2316        #[doc = r" can finalize the request using the"]
2317        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2318        #[doc = r" that resolves to a lower-level [`Response`] value."]
2319        pub struct RequestBuilder {
2320            pub(crate) client: super::super::Client,
2321            pub(crate) organization: String,
2322            pub(crate) days_to_lookback: Option<i32>,
2323        }
2324        impl RequestBuilder {
2325            pub fn days_to_lookback(mut self, days_to_lookback: i32) -> Self {
2326                self.days_to_lookback = Some(days_to_lookback);
2327                self
2328            }
2329            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2330            #[doc = ""]
2331            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2332            #[doc = "However, this function can provide more flexibility when required."]
2333            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2334                Box::pin({
2335                    let this = self.clone();
2336                    async move {
2337                        let url = this.url()?;
2338                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
2339                        if let Some(auth_header) = this
2340                            .client
2341                            .token_credential()
2342                            .http_authorization_header(&this.client.scopes())
2343                            .await?
2344                        {
2345                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
2346                        }
2347                        if let Some(days_to_lookback) = &this.days_to_lookback {
2348                            req.url_mut()
2349                                .query_pairs_mut()
2350                                .append_pair("daysToLookback", &days_to_lookback.to_string());
2351                        }
2352                        let req_body = azure_core::EMPTY_BODY;
2353                        req.set_body(req_body);
2354                        Ok(Response(this.client.send(&mut req).await?))
2355                    }
2356                })
2357            }
2358            fn url(&self) -> azure_core::Result<azure_core::Url> {
2359                let mut url = azure_core::Url::parse(&format!(
2360                    "{}/{}/_apis/build/retention/history",
2361                    self.client.endpoint(),
2362                    &self.organization
2363                ))?;
2364                let has_api_version_already = url
2365                    .query_pairs()
2366                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
2367                if !has_api_version_already {
2368                    url.query_pairs_mut()
2369                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
2370                }
2371                Ok(url)
2372            }
2373        }
2374        impl std::future::IntoFuture for RequestBuilder {
2375            type Output = azure_core::Result<models::BuildRetentionHistory>;
2376            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildRetentionHistory>>;
2377            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2378            #[doc = ""]
2379            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2380            #[doc = ""]
2381            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2382            fn into_future(self) -> Self::IntoFuture {
2383                Box::pin(async move { self.send().await?.into_raw_body().await })
2384            }
2385        }
2386    }
2387}
2388pub mod badge {
2389    use super::models;
2390    #[cfg(not(target_arch = "wasm32"))]
2391    use futures::future::BoxFuture;
2392    #[cfg(target_arch = "wasm32")]
2393    use futures::future::LocalBoxFuture as BoxFuture;
2394    pub struct Client(pub(crate) super::Client);
2395    impl Client {
2396        #[doc = "This endpoint is deprecated. Please see the Build Status REST endpoint."]
2397        #[doc = ""]
2398        #[doc = "Arguments:"]
2399        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2400        #[doc = "* `project`: The project ID or name."]
2401        #[doc = "* `definition_id`: The ID of the definition."]
2402        pub fn get(
2403            &self,
2404            organization: impl Into<String>,
2405            project: impl Into<String>,
2406            definition_id: i32,
2407        ) -> get::RequestBuilder {
2408            get::RequestBuilder {
2409                client: self.0.clone(),
2410                organization: organization.into(),
2411                project: project.into(),
2412                definition_id,
2413                branch_name: None,
2414            }
2415        }
2416        #[doc = "Gets a badge that indicates the status of the most recent build for the specified branch."]
2417        #[doc = ""]
2418        #[doc = "Arguments:"]
2419        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2420        #[doc = "* `project`: Project ID or project name"]
2421        #[doc = "* `repo_type`: The repository type."]
2422        pub fn get_build_badge_data(
2423            &self,
2424            organization: impl Into<String>,
2425            project: impl Into<String>,
2426            repo_type: impl Into<String>,
2427        ) -> get_build_badge_data::RequestBuilder {
2428            get_build_badge_data::RequestBuilder {
2429                client: self.0.clone(),
2430                organization: organization.into(),
2431                project: project.into(),
2432                repo_type: repo_type.into(),
2433                repo_id: None,
2434                branch_name: None,
2435            }
2436        }
2437    }
2438    pub mod get {
2439        use super::models;
2440        #[cfg(not(target_arch = "wasm32"))]
2441        use futures::future::BoxFuture;
2442        #[cfg(target_arch = "wasm32")]
2443        use futures::future::LocalBoxFuture as BoxFuture;
2444        #[derive(Debug)]
2445        pub struct Response(azure_core::Response);
2446        impl Response {
2447            pub async fn into_raw_body(self) -> azure_core::Result<String> {
2448                let bytes = self.0.into_raw_body().collect().await?;
2449                let body: String = serde_json::from_slice(&bytes).map_err(|e| {
2450                    azure_core::error::Error::full(
2451                        azure_core::error::ErrorKind::DataConversion,
2452                        e,
2453                        format!(
2454                            "Failed to deserialize response:\n{}",
2455                            String::from_utf8_lossy(&bytes)
2456                        ),
2457                    )
2458                })?;
2459                Ok(body)
2460            }
2461            pub fn into_raw_response(self) -> azure_core::Response {
2462                self.0
2463            }
2464            pub fn as_raw_response(&self) -> &azure_core::Response {
2465                &self.0
2466            }
2467        }
2468        impl From<Response> for azure_core::Response {
2469            fn from(rsp: Response) -> Self {
2470                rsp.into_raw_response()
2471            }
2472        }
2473        impl AsRef<azure_core::Response> for Response {
2474            fn as_ref(&self) -> &azure_core::Response {
2475                self.as_raw_response()
2476            }
2477        }
2478        #[derive(Clone)]
2479        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2480        #[doc = r""]
2481        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2482        #[doc = r" parameters can be chained."]
2483        #[doc = r""]
2484        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2485        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2486        #[doc = r" executes the request and returns a `Result` with the parsed"]
2487        #[doc = r" response."]
2488        #[doc = r""]
2489        #[doc = r" If you need lower-level access to the raw response details"]
2490        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2491        #[doc = r" can finalize the request using the"]
2492        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2493        #[doc = r" that resolves to a lower-level [`Response`] value."]
2494        pub struct RequestBuilder {
2495            pub(crate) client: super::super::Client,
2496            pub(crate) organization: String,
2497            pub(crate) project: String,
2498            pub(crate) definition_id: i32,
2499            pub(crate) branch_name: Option<String>,
2500        }
2501        impl RequestBuilder {
2502            #[doc = "The name of the branch."]
2503            pub fn branch_name(mut self, branch_name: impl Into<String>) -> Self {
2504                self.branch_name = Some(branch_name.into());
2505                self
2506            }
2507            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2508            #[doc = ""]
2509            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2510            #[doc = "However, this function can provide more flexibility when required."]
2511            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2512                Box::pin({
2513                    let this = self.clone();
2514                    async move {
2515                        let url = this.url()?;
2516                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
2517                        if let Some(auth_header) = this
2518                            .client
2519                            .token_credential()
2520                            .http_authorization_header(&this.client.scopes())
2521                            .await?
2522                        {
2523                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
2524                        }
2525                        if let Some(branch_name) = &this.branch_name {
2526                            req.url_mut()
2527                                .query_pairs_mut()
2528                                .append_pair("branchName", branch_name);
2529                        }
2530                        let req_body = azure_core::EMPTY_BODY;
2531                        req.set_body(req_body);
2532                        Ok(Response(this.client.send(&mut req).await?))
2533                    }
2534                })
2535            }
2536            fn url(&self) -> azure_core::Result<azure_core::Url> {
2537                let mut url = azure_core::Url::parse(&format!(
2538                    "{}/{}/_apis/public/build/definitions/{}/{}/badge",
2539                    self.client.endpoint(),
2540                    &self.organization,
2541                    &self.project,
2542                    &self.definition_id
2543                ))?;
2544                let has_api_version_already = url
2545                    .query_pairs()
2546                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
2547                if !has_api_version_already {
2548                    url.query_pairs_mut()
2549                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
2550                }
2551                Ok(url)
2552            }
2553        }
2554        impl std::future::IntoFuture for RequestBuilder {
2555            type Output = azure_core::Result<String>;
2556            type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
2557            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2558            #[doc = ""]
2559            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2560            #[doc = ""]
2561            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2562            fn into_future(self) -> Self::IntoFuture {
2563                Box::pin(async move { self.send().await?.into_raw_body().await })
2564            }
2565        }
2566    }
2567    pub mod get_build_badge_data {
2568        use super::models;
2569        #[cfg(not(target_arch = "wasm32"))]
2570        use futures::future::BoxFuture;
2571        #[cfg(target_arch = "wasm32")]
2572        use futures::future::LocalBoxFuture as BoxFuture;
2573        #[derive(Debug)]
2574        pub struct Response(azure_core::Response);
2575        impl Response {
2576            pub async fn into_raw_body(self) -> azure_core::Result<String> {
2577                let bytes = self.0.into_raw_body().collect().await?;
2578                let body: String = serde_json::from_slice(&bytes).map_err(|e| {
2579                    azure_core::error::Error::full(
2580                        azure_core::error::ErrorKind::DataConversion,
2581                        e,
2582                        format!(
2583                            "Failed to deserialize response:\n{}",
2584                            String::from_utf8_lossy(&bytes)
2585                        ),
2586                    )
2587                })?;
2588                Ok(body)
2589            }
2590            pub fn into_raw_response(self) -> azure_core::Response {
2591                self.0
2592            }
2593            pub fn as_raw_response(&self) -> &azure_core::Response {
2594                &self.0
2595            }
2596        }
2597        impl From<Response> for azure_core::Response {
2598            fn from(rsp: Response) -> Self {
2599                rsp.into_raw_response()
2600            }
2601        }
2602        impl AsRef<azure_core::Response> for Response {
2603            fn as_ref(&self) -> &azure_core::Response {
2604                self.as_raw_response()
2605            }
2606        }
2607        #[derive(Clone)]
2608        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2609        #[doc = r""]
2610        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2611        #[doc = r" parameters can be chained."]
2612        #[doc = r""]
2613        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2614        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2615        #[doc = r" executes the request and returns a `Result` with the parsed"]
2616        #[doc = r" response."]
2617        #[doc = r""]
2618        #[doc = r" If you need lower-level access to the raw response details"]
2619        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2620        #[doc = r" can finalize the request using the"]
2621        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2622        #[doc = r" that resolves to a lower-level [`Response`] value."]
2623        pub struct RequestBuilder {
2624            pub(crate) client: super::super::Client,
2625            pub(crate) organization: String,
2626            pub(crate) project: String,
2627            pub(crate) repo_type: String,
2628            pub(crate) repo_id: Option<String>,
2629            pub(crate) branch_name: Option<String>,
2630        }
2631        impl RequestBuilder {
2632            #[doc = "The repository ID."]
2633            pub fn repo_id(mut self, repo_id: impl Into<String>) -> Self {
2634                self.repo_id = Some(repo_id.into());
2635                self
2636            }
2637            #[doc = "The branch name."]
2638            pub fn branch_name(mut self, branch_name: impl Into<String>) -> Self {
2639                self.branch_name = Some(branch_name.into());
2640                self
2641            }
2642            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2643            #[doc = ""]
2644            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2645            #[doc = "However, this function can provide more flexibility when required."]
2646            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2647                Box::pin({
2648                    let this = self.clone();
2649                    async move {
2650                        let url = this.url()?;
2651                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
2652                        if let Some(auth_header) = this
2653                            .client
2654                            .token_credential()
2655                            .http_authorization_header(&this.client.scopes())
2656                            .await?
2657                        {
2658                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
2659                        }
2660                        if let Some(repo_id) = &this.repo_id {
2661                            req.url_mut()
2662                                .query_pairs_mut()
2663                                .append_pair("repoId", repo_id);
2664                        }
2665                        if let Some(branch_name) = &this.branch_name {
2666                            req.url_mut()
2667                                .query_pairs_mut()
2668                                .append_pair("branchName", branch_name);
2669                        }
2670                        let req_body = azure_core::EMPTY_BODY;
2671                        req.set_body(req_body);
2672                        Ok(Response(this.client.send(&mut req).await?))
2673                    }
2674                })
2675            }
2676            fn url(&self) -> azure_core::Result<azure_core::Url> {
2677                let mut url = azure_core::Url::parse(&format!(
2678                    "{}/{}/{}/_apis/build/repos/{}/badge",
2679                    self.client.endpoint(),
2680                    &self.organization,
2681                    &self.project,
2682                    &self.repo_type
2683                ))?;
2684                let has_api_version_already = url
2685                    .query_pairs()
2686                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
2687                if !has_api_version_already {
2688                    url.query_pairs_mut()
2689                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
2690                }
2691                Ok(url)
2692            }
2693        }
2694        impl std::future::IntoFuture for RequestBuilder {
2695            type Output = azure_core::Result<String>;
2696            type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
2697            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2698            #[doc = ""]
2699            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2700            #[doc = ""]
2701            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2702            fn into_future(self) -> Self::IntoFuture {
2703                Box::pin(async move { self.send().await?.into_raw_body().await })
2704            }
2705        }
2706    }
2707}
2708pub mod authorizedresources {
2709    use super::models;
2710    #[cfg(not(target_arch = "wasm32"))]
2711    use futures::future::BoxFuture;
2712    #[cfg(target_arch = "wasm32")]
2713    use futures::future::LocalBoxFuture as BoxFuture;
2714    pub struct Client(pub(crate) super::Client);
2715    impl Client {
2716        #[doc = "Arguments:"]
2717        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2718        #[doc = "* `project`: Project ID or project name"]
2719        pub fn list(
2720            &self,
2721            organization: impl Into<String>,
2722            project: impl Into<String>,
2723        ) -> list::RequestBuilder {
2724            list::RequestBuilder {
2725                client: self.0.clone(),
2726                organization: organization.into(),
2727                project: project.into(),
2728                type_: None,
2729                id: None,
2730            }
2731        }
2732        #[doc = "Arguments:"]
2733        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2734        #[doc = "* `project`: Project ID or project name"]
2735        pub fn authorize_project_resources(
2736            &self,
2737            organization: impl Into<String>,
2738            body: Vec<models::DefinitionResourceReference>,
2739            project: impl Into<String>,
2740        ) -> authorize_project_resources::RequestBuilder {
2741            authorize_project_resources::RequestBuilder {
2742                client: self.0.clone(),
2743                organization: organization.into(),
2744                body,
2745                project: project.into(),
2746            }
2747        }
2748    }
2749    pub mod list {
2750        use super::models;
2751        #[cfg(not(target_arch = "wasm32"))]
2752        use futures::future::BoxFuture;
2753        #[cfg(target_arch = "wasm32")]
2754        use futures::future::LocalBoxFuture as BoxFuture;
2755        #[derive(Debug)]
2756        pub struct Response(azure_core::Response);
2757        impl Response {
2758            pub async fn into_raw_body(
2759                self,
2760            ) -> azure_core::Result<models::DefinitionResourceReferenceList> {
2761                let bytes = self.0.into_raw_body().collect().await?;
2762                let body: models::DefinitionResourceReferenceList = serde_json::from_slice(&bytes)
2763                    .map_err(|e| {
2764                        azure_core::error::Error::full(
2765                            azure_core::error::ErrorKind::DataConversion,
2766                            e,
2767                            format!(
2768                                "Failed to deserialize response:\n{}",
2769                                String::from_utf8_lossy(&bytes)
2770                            ),
2771                        )
2772                    })?;
2773                Ok(body)
2774            }
2775            pub fn into_raw_response(self) -> azure_core::Response {
2776                self.0
2777            }
2778            pub fn as_raw_response(&self) -> &azure_core::Response {
2779                &self.0
2780            }
2781        }
2782        impl From<Response> for azure_core::Response {
2783            fn from(rsp: Response) -> Self {
2784                rsp.into_raw_response()
2785            }
2786        }
2787        impl AsRef<azure_core::Response> for Response {
2788            fn as_ref(&self) -> &azure_core::Response {
2789                self.as_raw_response()
2790            }
2791        }
2792        #[derive(Clone)]
2793        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2794        #[doc = r""]
2795        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2796        #[doc = r" parameters can be chained."]
2797        #[doc = r""]
2798        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2799        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2800        #[doc = r" executes the request and returns a `Result` with the parsed"]
2801        #[doc = r" response."]
2802        #[doc = r""]
2803        #[doc = r" If you need lower-level access to the raw response details"]
2804        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2805        #[doc = r" can finalize the request using the"]
2806        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2807        #[doc = r" that resolves to a lower-level [`Response`] value."]
2808        pub struct RequestBuilder {
2809            pub(crate) client: super::super::Client,
2810            pub(crate) organization: String,
2811            pub(crate) project: String,
2812            pub(crate) type_: Option<String>,
2813            pub(crate) id: Option<String>,
2814        }
2815        impl RequestBuilder {
2816            pub fn type_(mut self, type_: impl Into<String>) -> Self {
2817                self.type_ = Some(type_.into());
2818                self
2819            }
2820            pub fn id(mut self, id: impl Into<String>) -> Self {
2821                self.id = Some(id.into());
2822                self
2823            }
2824            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2825            #[doc = ""]
2826            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2827            #[doc = "However, this function can provide more flexibility when required."]
2828            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2829                Box::pin({
2830                    let this = self.clone();
2831                    async move {
2832                        let url = this.url()?;
2833                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
2834                        if let Some(auth_header) = this
2835                            .client
2836                            .token_credential()
2837                            .http_authorization_header(&this.client.scopes())
2838                            .await?
2839                        {
2840                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
2841                        }
2842                        if let Some(type_) = &this.type_ {
2843                            req.url_mut().query_pairs_mut().append_pair("type", type_);
2844                        }
2845                        if let Some(id) = &this.id {
2846                            req.url_mut().query_pairs_mut().append_pair("id", id);
2847                        }
2848                        let req_body = azure_core::EMPTY_BODY;
2849                        req.set_body(req_body);
2850                        Ok(Response(this.client.send(&mut req).await?))
2851                    }
2852                })
2853            }
2854            fn url(&self) -> azure_core::Result<azure_core::Url> {
2855                let mut url = azure_core::Url::parse(&format!(
2856                    "{}/{}/{}/_apis/build/authorizedresources",
2857                    self.client.endpoint(),
2858                    &self.organization,
2859                    &self.project
2860                ))?;
2861                let has_api_version_already = url
2862                    .query_pairs()
2863                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
2864                if !has_api_version_already {
2865                    url.query_pairs_mut()
2866                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
2867                }
2868                Ok(url)
2869            }
2870        }
2871        impl std::future::IntoFuture for RequestBuilder {
2872            type Output = azure_core::Result<models::DefinitionResourceReferenceList>;
2873            type IntoFuture =
2874                BoxFuture<'static, azure_core::Result<models::DefinitionResourceReferenceList>>;
2875            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2876            #[doc = ""]
2877            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2878            #[doc = ""]
2879            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2880            fn into_future(self) -> Self::IntoFuture {
2881                Box::pin(async move { self.send().await?.into_raw_body().await })
2882            }
2883        }
2884    }
2885    pub mod authorize_project_resources {
2886        use super::models;
2887        #[cfg(not(target_arch = "wasm32"))]
2888        use futures::future::BoxFuture;
2889        #[cfg(target_arch = "wasm32")]
2890        use futures::future::LocalBoxFuture as BoxFuture;
2891        #[derive(Debug)]
2892        pub struct Response(azure_core::Response);
2893        impl Response {
2894            pub async fn into_raw_body(
2895                self,
2896            ) -> azure_core::Result<models::DefinitionResourceReferenceList> {
2897                let bytes = self.0.into_raw_body().collect().await?;
2898                let body: models::DefinitionResourceReferenceList = serde_json::from_slice(&bytes)
2899                    .map_err(|e| {
2900                        azure_core::error::Error::full(
2901                            azure_core::error::ErrorKind::DataConversion,
2902                            e,
2903                            format!(
2904                                "Failed to deserialize response:\n{}",
2905                                String::from_utf8_lossy(&bytes)
2906                            ),
2907                        )
2908                    })?;
2909                Ok(body)
2910            }
2911            pub fn into_raw_response(self) -> azure_core::Response {
2912                self.0
2913            }
2914            pub fn as_raw_response(&self) -> &azure_core::Response {
2915                &self.0
2916            }
2917        }
2918        impl From<Response> for azure_core::Response {
2919            fn from(rsp: Response) -> Self {
2920                rsp.into_raw_response()
2921            }
2922        }
2923        impl AsRef<azure_core::Response> for Response {
2924            fn as_ref(&self) -> &azure_core::Response {
2925                self.as_raw_response()
2926            }
2927        }
2928        #[derive(Clone)]
2929        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2930        #[doc = r""]
2931        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2932        #[doc = r" parameters can be chained."]
2933        #[doc = r""]
2934        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2935        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2936        #[doc = r" executes the request and returns a `Result` with the parsed"]
2937        #[doc = r" response."]
2938        #[doc = r""]
2939        #[doc = r" If you need lower-level access to the raw response details"]
2940        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2941        #[doc = r" can finalize the request using the"]
2942        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2943        #[doc = r" that resolves to a lower-level [`Response`] value."]
2944        pub struct RequestBuilder {
2945            pub(crate) client: super::super::Client,
2946            pub(crate) organization: String,
2947            pub(crate) body: Vec<models::DefinitionResourceReference>,
2948            pub(crate) project: String,
2949        }
2950        impl RequestBuilder {
2951            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2952            #[doc = ""]
2953            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2954            #[doc = "However, this function can provide more flexibility when required."]
2955            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2956                Box::pin({
2957                    let this = self.clone();
2958                    async move {
2959                        let url = this.url()?;
2960                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
2961                        if let Some(auth_header) = this
2962                            .client
2963                            .token_credential()
2964                            .http_authorization_header(&this.client.scopes())
2965                            .await?
2966                        {
2967                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
2968                        }
2969                        req.insert_header("content-type", "application/json");
2970                        let req_body = azure_core::json::to_json(&this.body)?;
2971                        req.set_body(req_body);
2972                        Ok(Response(this.client.send(&mut req).await?))
2973                    }
2974                })
2975            }
2976            fn url(&self) -> azure_core::Result<azure_core::Url> {
2977                let mut url = azure_core::Url::parse(&format!(
2978                    "{}/{}/{}/_apis/build/authorizedresources",
2979                    self.client.endpoint(),
2980                    &self.organization,
2981                    &self.project
2982                ))?;
2983                let has_api_version_already = url
2984                    .query_pairs()
2985                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
2986                if !has_api_version_already {
2987                    url.query_pairs_mut()
2988                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
2989                }
2990                Ok(url)
2991            }
2992        }
2993        impl std::future::IntoFuture for RequestBuilder {
2994            type Output = azure_core::Result<models::DefinitionResourceReferenceList>;
2995            type IntoFuture =
2996                BoxFuture<'static, azure_core::Result<models::DefinitionResourceReferenceList>>;
2997            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2998            #[doc = ""]
2999            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3000            #[doc = ""]
3001            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3002            fn into_future(self) -> Self::IntoFuture {
3003                Box::pin(async move { self.send().await?.into_raw_body().await })
3004            }
3005        }
3006    }
3007}
3008pub mod builds {
3009    use super::models;
3010    #[cfg(not(target_arch = "wasm32"))]
3011    use futures::future::BoxFuture;
3012    #[cfg(target_arch = "wasm32")]
3013    use futures::future::LocalBoxFuture as BoxFuture;
3014    pub struct Client(pub(crate) super::Client);
3015    impl Client {
3016        #[doc = "Gets a list of builds."]
3017        #[doc = ""]
3018        #[doc = "Arguments:"]
3019        #[doc = "* `organization`: The name of the Azure DevOps organization."]
3020        #[doc = "* `project`: Project ID or project name"]
3021        pub fn list(
3022            &self,
3023            organization: impl Into<String>,
3024            project: impl Into<String>,
3025        ) -> list::RequestBuilder {
3026            list::RequestBuilder {
3027                client: self.0.clone(),
3028                organization: organization.into(),
3029                project: project.into(),
3030                definitions: None,
3031                queues: None,
3032                build_number: None,
3033                min_time: None,
3034                max_time: None,
3035                requested_for: None,
3036                reason_filter: None,
3037                status_filter: None,
3038                result_filter: None,
3039                tag_filters: None,
3040                properties: None,
3041                top: None,
3042                continuation_token: None,
3043                max_builds_per_definition: None,
3044                deleted_filter: None,
3045                query_order: None,
3046                branch_name: None,
3047                build_ids: None,
3048                repository_id: None,
3049                repository_type: None,
3050            }
3051        }
3052        #[doc = "Queues a build"]
3053        #[doc = ""]
3054        #[doc = "Arguments:"]
3055        #[doc = "* `organization`: The name of the Azure DevOps organization."]
3056        #[doc = "* `project`: Project ID or project name"]
3057        pub fn queue(
3058            &self,
3059            organization: impl Into<String>,
3060            body: impl Into<models::Build>,
3061            project: impl Into<String>,
3062        ) -> queue::RequestBuilder {
3063            queue::RequestBuilder {
3064                client: self.0.clone(),
3065                organization: organization.into(),
3066                body: body.into(),
3067                project: project.into(),
3068                ignore_warnings: None,
3069                check_in_ticket: None,
3070                source_build_id: None,
3071                definition_id: None,
3072            }
3073        }
3074        #[doc = "Updates multiple builds."]
3075        #[doc = ""]
3076        #[doc = "Arguments:"]
3077        #[doc = "* `organization`: The name of the Azure DevOps organization."]
3078        #[doc = "* `body`: The builds to update."]
3079        #[doc = "* `project`: Project ID or project name"]
3080        pub fn update_builds(
3081            &self,
3082            organization: impl Into<String>,
3083            body: Vec<models::Build>,
3084            project: impl Into<String>,
3085        ) -> update_builds::RequestBuilder {
3086            update_builds::RequestBuilder {
3087                client: self.0.clone(),
3088                organization: organization.into(),
3089                body,
3090                project: project.into(),
3091            }
3092        }
3093        #[doc = "Gets a build"]
3094        #[doc = ""]
3095        #[doc = "Arguments:"]
3096        #[doc = "* `organization`: The name of the Azure DevOps organization."]
3097        #[doc = "* `project`: Project ID or project name"]
3098        pub fn get(
3099            &self,
3100            organization: impl Into<String>,
3101            project: impl Into<String>,
3102            build_id: i32,
3103        ) -> get::RequestBuilder {
3104            get::RequestBuilder {
3105                client: self.0.clone(),
3106                organization: organization.into(),
3107                project: project.into(),
3108                build_id,
3109                property_filters: None,
3110            }
3111        }
3112        #[doc = "Updates a build."]
3113        #[doc = ""]
3114        #[doc = "Arguments:"]
3115        #[doc = "* `organization`: The name of the Azure DevOps organization."]
3116        #[doc = "* `body`: The build."]
3117        #[doc = "* `project`: Project ID or project name"]
3118        #[doc = "* `build_id`: The ID of the build."]
3119        pub fn update_build(
3120            &self,
3121            organization: impl Into<String>,
3122            body: impl Into<models::Build>,
3123            project: impl Into<String>,
3124            build_id: i32,
3125        ) -> update_build::RequestBuilder {
3126            update_build::RequestBuilder {
3127                client: self.0.clone(),
3128                organization: organization.into(),
3129                body: body.into(),
3130                project: project.into(),
3131                build_id,
3132                retry: None,
3133            }
3134        }
3135        #[doc = "Deletes a build."]
3136        #[doc = ""]
3137        #[doc = "Arguments:"]
3138        #[doc = "* `organization`: The name of the Azure DevOps organization."]
3139        #[doc = "* `project`: Project ID or project name"]
3140        #[doc = "* `build_id`: The ID of the build."]
3141        pub fn delete(
3142            &self,
3143            organization: impl Into<String>,
3144            project: impl Into<String>,
3145            build_id: i32,
3146        ) -> delete::RequestBuilder {
3147            delete::RequestBuilder {
3148                client: self.0.clone(),
3149                organization: organization.into(),
3150                project: project.into(),
3151                build_id,
3152            }
3153        }
3154        #[doc = "Gets the changes associated with a build"]
3155        #[doc = ""]
3156        #[doc = "Arguments:"]
3157        #[doc = "* `organization`: The name of the Azure DevOps organization."]
3158        #[doc = "* `project`: Project ID or project name"]
3159        pub fn get_build_changes(
3160            &self,
3161            organization: impl Into<String>,
3162            project: impl Into<String>,
3163            build_id: i32,
3164        ) -> get_build_changes::RequestBuilder {
3165            get_build_changes::RequestBuilder {
3166                client: self.0.clone(),
3167                organization: organization.into(),
3168                project: project.into(),
3169                build_id,
3170                continuation_token: None,
3171                top: None,
3172                include_source_change: None,
3173            }
3174        }
3175        #[doc = "Gets all retention leases that apply to a specific build."]
3176        #[doc = ""]
3177        #[doc = "Arguments:"]
3178        #[doc = "* `organization`: The name of the Azure DevOps organization."]
3179        #[doc = "* `project`: Project ID or project name"]
3180        #[doc = "* `build_id`: The ID of the build."]
3181        pub fn get_retention_leases_for_build(
3182            &self,
3183            organization: impl Into<String>,
3184            project: impl Into<String>,
3185            build_id: i32,
3186        ) -> get_retention_leases_for_build::RequestBuilder {
3187            get_retention_leases_for_build::RequestBuilder {
3188                client: self.0.clone(),
3189                organization: organization.into(),
3190                project: project.into(),
3191                build_id,
3192            }
3193        }
3194        #[doc = "Gets the logs for a build."]
3195        #[doc = ""]
3196        #[doc = "Arguments:"]
3197        #[doc = "* `organization`: The name of the Azure DevOps organization."]
3198        #[doc = "* `project`: Project ID or project name"]
3199        #[doc = "* `build_id`: The ID of the build."]
3200        pub fn get_build_logs(
3201            &self,
3202            organization: impl Into<String>,
3203            project: impl Into<String>,
3204            build_id: i32,
3205        ) -> get_build_logs::RequestBuilder {
3206            get_build_logs::RequestBuilder {
3207                client: self.0.clone(),
3208                organization: organization.into(),
3209                project: project.into(),
3210                build_id,
3211            }
3212        }
3213        #[doc = "Gets an individual log file for a build."]
3214        #[doc = ""]
3215        #[doc = "Arguments:"]
3216        #[doc = "* `organization`: The name of the Azure DevOps organization."]
3217        #[doc = "* `project`: Project ID or project name"]
3218        #[doc = "* `build_id`: The ID of the build."]
3219        #[doc = "* `log_id`: The ID of the log file."]
3220        pub fn get_build_log(
3221            &self,
3222            organization: impl Into<String>,
3223            project: impl Into<String>,
3224            build_id: i32,
3225            log_id: i32,
3226        ) -> get_build_log::RequestBuilder {
3227            get_build_log::RequestBuilder {
3228                client: self.0.clone(),
3229                organization: organization.into(),
3230                project: project.into(),
3231                build_id,
3232                log_id,
3233                start_line: None,
3234                end_line: None,
3235            }
3236        }
3237        #[doc = "Gets the work items associated with a build. Only work items in the same project are returned."]
3238        #[doc = ""]
3239        #[doc = "Arguments:"]
3240        #[doc = "* `organization`: The name of the Azure DevOps organization."]
3241        #[doc = "* `project`: Project ID or project name"]
3242        #[doc = "* `build_id`: The ID of the build."]
3243        pub fn get_build_work_items_refs(
3244            &self,
3245            organization: impl Into<String>,
3246            project: impl Into<String>,
3247            build_id: i32,
3248        ) -> get_build_work_items_refs::RequestBuilder {
3249            get_build_work_items_refs::RequestBuilder {
3250                client: self.0.clone(),
3251                organization: organization.into(),
3252                project: project.into(),
3253                build_id,
3254                top: None,
3255            }
3256        }
3257        #[doc = "Gets the work items associated with a build, filtered to specific commits."]
3258        #[doc = ""]
3259        #[doc = "Arguments:"]
3260        #[doc = "* `organization`: The name of the Azure DevOps organization."]
3261        #[doc = "* `body`: A comma-delimited list of commit IDs."]
3262        #[doc = "* `project`: Project ID or project name"]
3263        #[doc = "* `build_id`: The ID of the build."]
3264        pub fn get_build_work_items_refs_from_commits(
3265            &self,
3266            organization: impl Into<String>,
3267            body: Vec<String>,
3268            project: impl Into<String>,
3269            build_id: i32,
3270        ) -> get_build_work_items_refs_from_commits::RequestBuilder {
3271            get_build_work_items_refs_from_commits::RequestBuilder {
3272                client: self.0.clone(),
3273                organization: organization.into(),
3274                body,
3275                project: project.into(),
3276                build_id,
3277                top: None,
3278            }
3279        }
3280        #[doc = "Gets the changes made to the repository between two given builds."]
3281        #[doc = ""]
3282        #[doc = "Arguments:"]
3283        #[doc = "* `organization`: The name of the Azure DevOps organization."]
3284        #[doc = "* `project`: Project ID or project name"]
3285        pub fn get_changes_between_builds(
3286            &self,
3287            organization: impl Into<String>,
3288            project: impl Into<String>,
3289        ) -> get_changes_between_builds::RequestBuilder {
3290            get_changes_between_builds::RequestBuilder {
3291                client: self.0.clone(),
3292                organization: organization.into(),
3293                project: project.into(),
3294                from_build_id: None,
3295                to_build_id: None,
3296                top: None,
3297            }
3298        }
3299        #[doc = "Gets all the work items between two builds."]
3300        #[doc = ""]
3301        #[doc = "Arguments:"]
3302        #[doc = "* `organization`: The name of the Azure DevOps organization."]
3303        #[doc = "* `project`: Project ID or project name"]
3304        #[doc = "* `from_build_id`: The ID of the first build."]
3305        #[doc = "* `to_build_id`: The ID of the last build."]
3306        pub fn get_work_items_between_builds(
3307            &self,
3308            organization: impl Into<String>,
3309            project: impl Into<String>,
3310            from_build_id: i32,
3311            to_build_id: i32,
3312        ) -> get_work_items_between_builds::RequestBuilder {
3313            get_work_items_between_builds::RequestBuilder {
3314                client: self.0.clone(),
3315                organization: organization.into(),
3316                project: project.into(),
3317                from_build_id,
3318                to_build_id,
3319                top: None,
3320            }
3321        }
3322    }
3323    pub mod list {
3324        use super::models;
3325        #[cfg(not(target_arch = "wasm32"))]
3326        use futures::future::BoxFuture;
3327        #[cfg(target_arch = "wasm32")]
3328        use futures::future::LocalBoxFuture as BoxFuture;
3329        #[derive(Debug)]
3330        pub struct Response(azure_core::Response);
3331        impl Response {
3332            pub async fn into_raw_body(self) -> azure_core::Result<models::BuildList> {
3333                let bytes = self.0.into_raw_body().collect().await?;
3334                let body: models::BuildList = serde_json::from_slice(&bytes).map_err(|e| {
3335                    azure_core::error::Error::full(
3336                        azure_core::error::ErrorKind::DataConversion,
3337                        e,
3338                        format!(
3339                            "Failed to deserialize response:\n{}",
3340                            String::from_utf8_lossy(&bytes)
3341                        ),
3342                    )
3343                })?;
3344                Ok(body)
3345            }
3346            pub fn into_raw_response(self) -> azure_core::Response {
3347                self.0
3348            }
3349            pub fn as_raw_response(&self) -> &azure_core::Response {
3350                &self.0
3351            }
3352        }
3353        impl From<Response> for azure_core::Response {
3354            fn from(rsp: Response) -> Self {
3355                rsp.into_raw_response()
3356            }
3357        }
3358        impl AsRef<azure_core::Response> for Response {
3359            fn as_ref(&self) -> &azure_core::Response {
3360                self.as_raw_response()
3361            }
3362        }
3363        #[derive(Clone)]
3364        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3365        #[doc = r""]
3366        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3367        #[doc = r" parameters can be chained."]
3368        #[doc = r""]
3369        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3370        #[doc = r" converts the [`RequestBuilder`] into a future,"]
3371        #[doc = r" executes the request and returns a `Result` with the parsed"]
3372        #[doc = r" response."]
3373        #[doc = r""]
3374        #[doc = r" If you need lower-level access to the raw response details"]
3375        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3376        #[doc = r" can finalize the request using the"]
3377        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3378        #[doc = r" that resolves to a lower-level [`Response`] value."]
3379        pub struct RequestBuilder {
3380            pub(crate) client: super::super::Client,
3381            pub(crate) organization: String,
3382            pub(crate) project: String,
3383            pub(crate) definitions: Option<String>,
3384            pub(crate) queues: Option<String>,
3385            pub(crate) build_number: Option<String>,
3386            pub(crate) min_time: Option<time::OffsetDateTime>,
3387            pub(crate) max_time: Option<time::OffsetDateTime>,
3388            pub(crate) requested_for: Option<String>,
3389            pub(crate) reason_filter: Option<String>,
3390            pub(crate) status_filter: Option<String>,
3391            pub(crate) result_filter: Option<String>,
3392            pub(crate) tag_filters: Option<String>,
3393            pub(crate) properties: Option<String>,
3394            pub(crate) top: Option<i32>,
3395            pub(crate) continuation_token: Option<String>,
3396            pub(crate) max_builds_per_definition: Option<i32>,
3397            pub(crate) deleted_filter: Option<String>,
3398            pub(crate) query_order: Option<String>,
3399            pub(crate) branch_name: Option<String>,
3400            pub(crate) build_ids: Option<String>,
3401            pub(crate) repository_id: Option<String>,
3402            pub(crate) repository_type: Option<String>,
3403        }
3404        impl RequestBuilder {
3405            #[doc = "A comma-delimited list of definition IDs. If specified, filters to builds for these definitions."]
3406            pub fn definitions(mut self, definitions: impl Into<String>) -> Self {
3407                self.definitions = Some(definitions.into());
3408                self
3409            }
3410            #[doc = "A comma-delimited list of queue IDs. If specified, filters to builds that ran against these queues."]
3411            pub fn queues(mut self, queues: impl Into<String>) -> Self {
3412                self.queues = Some(queues.into());
3413                self
3414            }
3415            #[doc = "If specified, filters to builds that match this build number. Append * to do a prefix search."]
3416            pub fn build_number(mut self, build_number: impl Into<String>) -> Self {
3417                self.build_number = Some(build_number.into());
3418                self
3419            }
3420            #[doc = "If specified, filters to builds that finished/started/queued after this date based on the queryOrder specified."]
3421            pub fn min_time(mut self, min_time: impl Into<time::OffsetDateTime>) -> Self {
3422                self.min_time = Some(min_time.into());
3423                self
3424            }
3425            #[doc = "If specified, filters to builds that finished/started/queued before this date based on the queryOrder specified."]
3426            pub fn max_time(mut self, max_time: impl Into<time::OffsetDateTime>) -> Self {
3427                self.max_time = Some(max_time.into());
3428                self
3429            }
3430            #[doc = "If specified, filters to builds requested for the specified user."]
3431            pub fn requested_for(mut self, requested_for: impl Into<String>) -> Self {
3432                self.requested_for = Some(requested_for.into());
3433                self
3434            }
3435            #[doc = "If specified, filters to builds that match this reason."]
3436            pub fn reason_filter(mut self, reason_filter: impl Into<String>) -> Self {
3437                self.reason_filter = Some(reason_filter.into());
3438                self
3439            }
3440            #[doc = "If specified, filters to builds that match this status."]
3441            pub fn status_filter(mut self, status_filter: impl Into<String>) -> Self {
3442                self.status_filter = Some(status_filter.into());
3443                self
3444            }
3445            #[doc = "If specified, filters to builds that match this result."]
3446            pub fn result_filter(mut self, result_filter: impl Into<String>) -> Self {
3447                self.result_filter = Some(result_filter.into());
3448                self
3449            }
3450            #[doc = "A comma-delimited list of tags. If specified, filters to builds that have the specified tags."]
3451            pub fn tag_filters(mut self, tag_filters: impl Into<String>) -> Self {
3452                self.tag_filters = Some(tag_filters.into());
3453                self
3454            }
3455            #[doc = "A comma-delimited list of properties to retrieve."]
3456            pub fn properties(mut self, properties: impl Into<String>) -> Self {
3457                self.properties = Some(properties.into());
3458                self
3459            }
3460            #[doc = "The maximum number of builds to return."]
3461            pub fn top(mut self, top: i32) -> Self {
3462                self.top = Some(top);
3463                self
3464            }
3465            #[doc = "A continuation token, returned by a previous call to this method, that can be used to return the next set of builds."]
3466            pub fn continuation_token(mut self, continuation_token: impl Into<String>) -> Self {
3467                self.continuation_token = Some(continuation_token.into());
3468                self
3469            }
3470            #[doc = "The maximum number of builds to return per definition."]
3471            pub fn max_builds_per_definition(mut self, max_builds_per_definition: i32) -> Self {
3472                self.max_builds_per_definition = Some(max_builds_per_definition);
3473                self
3474            }
3475            #[doc = "Indicates whether to exclude, include, or only return deleted builds."]
3476            pub fn deleted_filter(mut self, deleted_filter: impl Into<String>) -> Self {
3477                self.deleted_filter = Some(deleted_filter.into());
3478                self
3479            }
3480            #[doc = "The order in which builds should be returned."]
3481            pub fn query_order(mut self, query_order: impl Into<String>) -> Self {
3482                self.query_order = Some(query_order.into());
3483                self
3484            }
3485            #[doc = "If specified, filters to builds that built branches that built this branch."]
3486            pub fn branch_name(mut self, branch_name: impl Into<String>) -> Self {
3487                self.branch_name = Some(branch_name.into());
3488                self
3489            }
3490            #[doc = "A comma-delimited list that specifies the IDs of builds to retrieve."]
3491            pub fn build_ids(mut self, build_ids: impl Into<String>) -> Self {
3492                self.build_ids = Some(build_ids.into());
3493                self
3494            }
3495            #[doc = "If specified, filters to builds that built from this repository."]
3496            pub fn repository_id(mut self, repository_id: impl Into<String>) -> Self {
3497                self.repository_id = Some(repository_id.into());
3498                self
3499            }
3500            #[doc = "If specified, filters to builds that built from repositories of this type."]
3501            pub fn repository_type(mut self, repository_type: impl Into<String>) -> Self {
3502                self.repository_type = Some(repository_type.into());
3503                self
3504            }
3505            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3506            #[doc = ""]
3507            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3508            #[doc = "However, this function can provide more flexibility when required."]
3509            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3510                Box::pin({
3511                    let this = self.clone();
3512                    async move {
3513                        let url = this.url()?;
3514                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
3515                        if let Some(auth_header) = this
3516                            .client
3517                            .token_credential()
3518                            .http_authorization_header(&this.client.scopes())
3519                            .await?
3520                        {
3521                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
3522                        }
3523                        if let Some(definitions) = &this.definitions {
3524                            req.url_mut()
3525                                .query_pairs_mut()
3526                                .append_pair("definitions", definitions);
3527                        }
3528                        if let Some(queues) = &this.queues {
3529                            req.url_mut()
3530                                .query_pairs_mut()
3531                                .append_pair("queues", queues);
3532                        }
3533                        if let Some(build_number) = &this.build_number {
3534                            req.url_mut()
3535                                .query_pairs_mut()
3536                                .append_pair("buildNumber", build_number);
3537                        }
3538                        if let Some(min_time) = &this.min_time {
3539                            req.url_mut()
3540                                .query_pairs_mut()
3541                                .append_pair("minTime", &min_time.to_string());
3542                        }
3543                        if let Some(max_time) = &this.max_time {
3544                            req.url_mut()
3545                                .query_pairs_mut()
3546                                .append_pair("maxTime", &max_time.to_string());
3547                        }
3548                        if let Some(requested_for) = &this.requested_for {
3549                            req.url_mut()
3550                                .query_pairs_mut()
3551                                .append_pair("requestedFor", requested_for);
3552                        }
3553                        if let Some(reason_filter) = &this.reason_filter {
3554                            req.url_mut()
3555                                .query_pairs_mut()
3556                                .append_pair("reasonFilter", reason_filter);
3557                        }
3558                        if let Some(status_filter) = &this.status_filter {
3559                            req.url_mut()
3560                                .query_pairs_mut()
3561                                .append_pair("statusFilter", status_filter);
3562                        }
3563                        if let Some(result_filter) = &this.result_filter {
3564                            req.url_mut()
3565                                .query_pairs_mut()
3566                                .append_pair("resultFilter", result_filter);
3567                        }
3568                        if let Some(tag_filters) = &this.tag_filters {
3569                            req.url_mut()
3570                                .query_pairs_mut()
3571                                .append_pair("tagFilters", tag_filters);
3572                        }
3573                        if let Some(properties) = &this.properties {
3574                            req.url_mut()
3575                                .query_pairs_mut()
3576                                .append_pair("properties", properties);
3577                        }
3578                        if let Some(top) = &this.top {
3579                            req.url_mut()
3580                                .query_pairs_mut()
3581                                .append_pair("$top", &top.to_string());
3582                        }
3583                        if let Some(continuation_token) = &this.continuation_token {
3584                            req.url_mut()
3585                                .query_pairs_mut()
3586                                .append_pair("continuationToken", continuation_token);
3587                        }
3588                        if let Some(max_builds_per_definition) = &this.max_builds_per_definition {
3589                            req.url_mut().query_pairs_mut().append_pair(
3590                                "maxBuildsPerDefinition",
3591                                &max_builds_per_definition.to_string(),
3592                            );
3593                        }
3594                        if let Some(deleted_filter) = &this.deleted_filter {
3595                            req.url_mut()
3596                                .query_pairs_mut()
3597                                .append_pair("deletedFilter", deleted_filter);
3598                        }
3599                        if let Some(query_order) = &this.query_order {
3600                            req.url_mut()
3601                                .query_pairs_mut()
3602                                .append_pair("queryOrder", query_order);
3603                        }
3604                        if let Some(branch_name) = &this.branch_name {
3605                            req.url_mut()
3606                                .query_pairs_mut()
3607                                .append_pair("branchName", branch_name);
3608                        }
3609                        if let Some(build_ids) = &this.build_ids {
3610                            req.url_mut()
3611                                .query_pairs_mut()
3612                                .append_pair("buildIds", build_ids);
3613                        }
3614                        if let Some(repository_id) = &this.repository_id {
3615                            req.url_mut()
3616                                .query_pairs_mut()
3617                                .append_pair("repositoryId", repository_id);
3618                        }
3619                        if let Some(repository_type) = &this.repository_type {
3620                            req.url_mut()
3621                                .query_pairs_mut()
3622                                .append_pair("repositoryType", repository_type);
3623                        }
3624                        let req_body = azure_core::EMPTY_BODY;
3625                        req.set_body(req_body);
3626                        Ok(Response(this.client.send(&mut req).await?))
3627                    }
3628                })
3629            }
3630            fn url(&self) -> azure_core::Result<azure_core::Url> {
3631                let mut url = azure_core::Url::parse(&format!(
3632                    "{}/{}/{}/_apis/build/builds",
3633                    self.client.endpoint(),
3634                    &self.organization,
3635                    &self.project
3636                ))?;
3637                let has_api_version_already = url
3638                    .query_pairs()
3639                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
3640                if !has_api_version_already {
3641                    url.query_pairs_mut()
3642                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
3643                }
3644                Ok(url)
3645            }
3646        }
3647        impl std::future::IntoFuture for RequestBuilder {
3648            type Output = azure_core::Result<models::BuildList>;
3649            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildList>>;
3650            #[doc = "Returns a future that sends the request and returns the parsed response body."]
3651            #[doc = ""]
3652            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3653            #[doc = ""]
3654            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3655            fn into_future(self) -> Self::IntoFuture {
3656                Box::pin(async move { self.send().await?.into_raw_body().await })
3657            }
3658        }
3659    }
3660    pub mod queue {
3661        use super::models;
3662        #[cfg(not(target_arch = "wasm32"))]
3663        use futures::future::BoxFuture;
3664        #[cfg(target_arch = "wasm32")]
3665        use futures::future::LocalBoxFuture as BoxFuture;
3666        #[derive(Debug)]
3667        pub struct Response(azure_core::Response);
3668        impl Response {
3669            pub async fn into_raw_body(self) -> azure_core::Result<models::Build> {
3670                let bytes = self.0.into_raw_body().collect().await?;
3671                let body: models::Build = serde_json::from_slice(&bytes).map_err(|e| {
3672                    azure_core::error::Error::full(
3673                        azure_core::error::ErrorKind::DataConversion,
3674                        e,
3675                        format!(
3676                            "Failed to deserialize response:\n{}",
3677                            String::from_utf8_lossy(&bytes)
3678                        ),
3679                    )
3680                })?;
3681                Ok(body)
3682            }
3683            pub fn into_raw_response(self) -> azure_core::Response {
3684                self.0
3685            }
3686            pub fn as_raw_response(&self) -> &azure_core::Response {
3687                &self.0
3688            }
3689        }
3690        impl From<Response> for azure_core::Response {
3691            fn from(rsp: Response) -> Self {
3692                rsp.into_raw_response()
3693            }
3694        }
3695        impl AsRef<azure_core::Response> for Response {
3696            fn as_ref(&self) -> &azure_core::Response {
3697                self.as_raw_response()
3698            }
3699        }
3700        #[derive(Clone)]
3701        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3702        #[doc = r""]
3703        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3704        #[doc = r" parameters can be chained."]
3705        #[doc = r""]
3706        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3707        #[doc = r" converts the [`RequestBuilder`] into a future,"]
3708        #[doc = r" executes the request and returns a `Result` with the parsed"]
3709        #[doc = r" response."]
3710        #[doc = r""]
3711        #[doc = r" If you need lower-level access to the raw response details"]
3712        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3713        #[doc = r" can finalize the request using the"]
3714        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3715        #[doc = r" that resolves to a lower-level [`Response`] value."]
3716        pub struct RequestBuilder {
3717            pub(crate) client: super::super::Client,
3718            pub(crate) organization: String,
3719            pub(crate) body: models::Build,
3720            pub(crate) project: String,
3721            pub(crate) ignore_warnings: Option<bool>,
3722            pub(crate) check_in_ticket: Option<String>,
3723            pub(crate) source_build_id: Option<i32>,
3724            pub(crate) definition_id: Option<i32>,
3725        }
3726        impl RequestBuilder {
3727            pub fn ignore_warnings(mut self, ignore_warnings: bool) -> Self {
3728                self.ignore_warnings = Some(ignore_warnings);
3729                self
3730            }
3731            pub fn check_in_ticket(mut self, check_in_ticket: impl Into<String>) -> Self {
3732                self.check_in_ticket = Some(check_in_ticket.into());
3733                self
3734            }
3735            pub fn source_build_id(mut self, source_build_id: i32) -> Self {
3736                self.source_build_id = Some(source_build_id);
3737                self
3738            }
3739            #[doc = "Optional definition id to queue a build without a body. Ignored if there's a valid body"]
3740            pub fn definition_id(mut self, definition_id: i32) -> Self {
3741                self.definition_id = Some(definition_id);
3742                self
3743            }
3744            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3745            #[doc = ""]
3746            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3747            #[doc = "However, this function can provide more flexibility when required."]
3748            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3749                Box::pin({
3750                    let this = self.clone();
3751                    async move {
3752                        let url = this.url()?;
3753                        let mut req = azure_core::Request::new(url, azure_core::Method::Post);
3754                        if let Some(auth_header) = this
3755                            .client
3756                            .token_credential()
3757                            .http_authorization_header(&this.client.scopes())
3758                            .await?
3759                        {
3760                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
3761                        }
3762                        req.insert_header("content-type", "application/json");
3763                        let req_body = azure_core::json::to_json(&this.body)?;
3764                        if let Some(ignore_warnings) = &this.ignore_warnings {
3765                            req.url_mut()
3766                                .query_pairs_mut()
3767                                .append_pair("ignoreWarnings", &ignore_warnings.to_string());
3768                        }
3769                        if let Some(check_in_ticket) = &this.check_in_ticket {
3770                            req.url_mut()
3771                                .query_pairs_mut()
3772                                .append_pair("checkInTicket", check_in_ticket);
3773                        }
3774                        if let Some(source_build_id) = &this.source_build_id {
3775                            req.url_mut()
3776                                .query_pairs_mut()
3777                                .append_pair("sourceBuildId", &source_build_id.to_string());
3778                        }
3779                        if let Some(definition_id) = &this.definition_id {
3780                            req.url_mut()
3781                                .query_pairs_mut()
3782                                .append_pair("definitionId", &definition_id.to_string());
3783                        }
3784                        req.set_body(req_body);
3785                        Ok(Response(this.client.send(&mut req).await?))
3786                    }
3787                })
3788            }
3789            fn url(&self) -> azure_core::Result<azure_core::Url> {
3790                let mut url = azure_core::Url::parse(&format!(
3791                    "{}/{}/{}/_apis/build/builds",
3792                    self.client.endpoint(),
3793                    &self.organization,
3794                    &self.project
3795                ))?;
3796                let has_api_version_already = url
3797                    .query_pairs()
3798                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
3799                if !has_api_version_already {
3800                    url.query_pairs_mut()
3801                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
3802                }
3803                Ok(url)
3804            }
3805        }
3806        impl std::future::IntoFuture for RequestBuilder {
3807            type Output = azure_core::Result<models::Build>;
3808            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Build>>;
3809            #[doc = "Returns a future that sends the request and returns the parsed response body."]
3810            #[doc = ""]
3811            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3812            #[doc = ""]
3813            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3814            fn into_future(self) -> Self::IntoFuture {
3815                Box::pin(async move { self.send().await?.into_raw_body().await })
3816            }
3817        }
3818    }
3819    pub mod update_builds {
3820        use super::models;
3821        #[cfg(not(target_arch = "wasm32"))]
3822        use futures::future::BoxFuture;
3823        #[cfg(target_arch = "wasm32")]
3824        use futures::future::LocalBoxFuture as BoxFuture;
3825        #[derive(Debug)]
3826        pub struct Response(azure_core::Response);
3827        impl Response {
3828            pub async fn into_raw_body(self) -> azure_core::Result<models::BuildList> {
3829                let bytes = self.0.into_raw_body().collect().await?;
3830                let body: models::BuildList = serde_json::from_slice(&bytes).map_err(|e| {
3831                    azure_core::error::Error::full(
3832                        azure_core::error::ErrorKind::DataConversion,
3833                        e,
3834                        format!(
3835                            "Failed to deserialize response:\n{}",
3836                            String::from_utf8_lossy(&bytes)
3837                        ),
3838                    )
3839                })?;
3840                Ok(body)
3841            }
3842            pub fn into_raw_response(self) -> azure_core::Response {
3843                self.0
3844            }
3845            pub fn as_raw_response(&self) -> &azure_core::Response {
3846                &self.0
3847            }
3848        }
3849        impl From<Response> for azure_core::Response {
3850            fn from(rsp: Response) -> Self {
3851                rsp.into_raw_response()
3852            }
3853        }
3854        impl AsRef<azure_core::Response> for Response {
3855            fn as_ref(&self) -> &azure_core::Response {
3856                self.as_raw_response()
3857            }
3858        }
3859        #[derive(Clone)]
3860        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3861        #[doc = r""]
3862        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3863        #[doc = r" parameters can be chained."]
3864        #[doc = r""]
3865        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3866        #[doc = r" converts the [`RequestBuilder`] into a future,"]
3867        #[doc = r" executes the request and returns a `Result` with the parsed"]
3868        #[doc = r" response."]
3869        #[doc = r""]
3870        #[doc = r" If you need lower-level access to the raw response details"]
3871        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3872        #[doc = r" can finalize the request using the"]
3873        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3874        #[doc = r" that resolves to a lower-level [`Response`] value."]
3875        pub struct RequestBuilder {
3876            pub(crate) client: super::super::Client,
3877            pub(crate) organization: String,
3878            pub(crate) body: Vec<models::Build>,
3879            pub(crate) project: String,
3880        }
3881        impl RequestBuilder {
3882            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3883            #[doc = ""]
3884            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3885            #[doc = "However, this function can provide more flexibility when required."]
3886            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3887                Box::pin({
3888                    let this = self.clone();
3889                    async move {
3890                        let url = this.url()?;
3891                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
3892                        if let Some(auth_header) = this
3893                            .client
3894                            .token_credential()
3895                            .http_authorization_header(&this.client.scopes())
3896                            .await?
3897                        {
3898                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
3899                        }
3900                        req.insert_header("content-type", "application/json");
3901                        let req_body = azure_core::json::to_json(&this.body)?;
3902                        req.set_body(req_body);
3903                        Ok(Response(this.client.send(&mut req).await?))
3904                    }
3905                })
3906            }
3907            fn url(&self) -> azure_core::Result<azure_core::Url> {
3908                let mut url = azure_core::Url::parse(&format!(
3909                    "{}/{}/{}/_apis/build/builds",
3910                    self.client.endpoint(),
3911                    &self.organization,
3912                    &self.project
3913                ))?;
3914                let has_api_version_already = url
3915                    .query_pairs()
3916                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
3917                if !has_api_version_already {
3918                    url.query_pairs_mut()
3919                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
3920                }
3921                Ok(url)
3922            }
3923        }
3924        impl std::future::IntoFuture for RequestBuilder {
3925            type Output = azure_core::Result<models::BuildList>;
3926            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildList>>;
3927            #[doc = "Returns a future that sends the request and returns the parsed response body."]
3928            #[doc = ""]
3929            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3930            #[doc = ""]
3931            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3932            fn into_future(self) -> Self::IntoFuture {
3933                Box::pin(async move { self.send().await?.into_raw_body().await })
3934            }
3935        }
3936    }
3937    pub mod get {
3938        use super::models;
3939        #[cfg(not(target_arch = "wasm32"))]
3940        use futures::future::BoxFuture;
3941        #[cfg(target_arch = "wasm32")]
3942        use futures::future::LocalBoxFuture as BoxFuture;
3943        #[derive(Debug)]
3944        pub struct Response(azure_core::Response);
3945        impl Response {
3946            pub async fn into_raw_body(self) -> azure_core::Result<models::Build> {
3947                let bytes = self.0.into_raw_body().collect().await?;
3948                let body: models::Build = serde_json::from_slice(&bytes).map_err(|e| {
3949                    azure_core::error::Error::full(
3950                        azure_core::error::ErrorKind::DataConversion,
3951                        e,
3952                        format!(
3953                            "Failed to deserialize response:\n{}",
3954                            String::from_utf8_lossy(&bytes)
3955                        ),
3956                    )
3957                })?;
3958                Ok(body)
3959            }
3960            pub fn into_raw_response(self) -> azure_core::Response {
3961                self.0
3962            }
3963            pub fn as_raw_response(&self) -> &azure_core::Response {
3964                &self.0
3965            }
3966        }
3967        impl From<Response> for azure_core::Response {
3968            fn from(rsp: Response) -> Self {
3969                rsp.into_raw_response()
3970            }
3971        }
3972        impl AsRef<azure_core::Response> for Response {
3973            fn as_ref(&self) -> &azure_core::Response {
3974                self.as_raw_response()
3975            }
3976        }
3977        #[derive(Clone)]
3978        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3979        #[doc = r""]
3980        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3981        #[doc = r" parameters can be chained."]
3982        #[doc = r""]
3983        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3984        #[doc = r" converts the [`RequestBuilder`] into a future,"]
3985        #[doc = r" executes the request and returns a `Result` with the parsed"]
3986        #[doc = r" response."]
3987        #[doc = r""]
3988        #[doc = r" If you need lower-level access to the raw response details"]
3989        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3990        #[doc = r" can finalize the request using the"]
3991        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3992        #[doc = r" that resolves to a lower-level [`Response`] value."]
3993        pub struct RequestBuilder {
3994            pub(crate) client: super::super::Client,
3995            pub(crate) organization: String,
3996            pub(crate) project: String,
3997            pub(crate) build_id: i32,
3998            pub(crate) property_filters: Option<String>,
3999        }
4000        impl RequestBuilder {
4001            pub fn property_filters(mut self, property_filters: impl Into<String>) -> Self {
4002                self.property_filters = Some(property_filters.into());
4003                self
4004            }
4005            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4006            #[doc = ""]
4007            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4008            #[doc = "However, this function can provide more flexibility when required."]
4009            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4010                Box::pin({
4011                    let this = self.clone();
4012                    async move {
4013                        let url = this.url()?;
4014                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
4015                        if let Some(auth_header) = this
4016                            .client
4017                            .token_credential()
4018                            .http_authorization_header(&this.client.scopes())
4019                            .await?
4020                        {
4021                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
4022                        }
4023                        if let Some(property_filters) = &this.property_filters {
4024                            req.url_mut()
4025                                .query_pairs_mut()
4026                                .append_pair("propertyFilters", property_filters);
4027                        }
4028                        let req_body = azure_core::EMPTY_BODY;
4029                        req.set_body(req_body);
4030                        Ok(Response(this.client.send(&mut req).await?))
4031                    }
4032                })
4033            }
4034            fn url(&self) -> azure_core::Result<azure_core::Url> {
4035                let mut url = azure_core::Url::parse(&format!(
4036                    "{}/{}/{}/_apis/build/builds/{}",
4037                    self.client.endpoint(),
4038                    &self.organization,
4039                    &self.project,
4040                    &self.build_id
4041                ))?;
4042                let has_api_version_already = url
4043                    .query_pairs()
4044                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
4045                if !has_api_version_already {
4046                    url.query_pairs_mut()
4047                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
4048                }
4049                Ok(url)
4050            }
4051        }
4052        impl std::future::IntoFuture for RequestBuilder {
4053            type Output = azure_core::Result<models::Build>;
4054            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Build>>;
4055            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4056            #[doc = ""]
4057            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4058            #[doc = ""]
4059            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4060            fn into_future(self) -> Self::IntoFuture {
4061                Box::pin(async move { self.send().await?.into_raw_body().await })
4062            }
4063        }
4064    }
4065    pub mod update_build {
4066        use super::models;
4067        #[cfg(not(target_arch = "wasm32"))]
4068        use futures::future::BoxFuture;
4069        #[cfg(target_arch = "wasm32")]
4070        use futures::future::LocalBoxFuture as BoxFuture;
4071        #[derive(Debug)]
4072        pub struct Response(azure_core::Response);
4073        impl Response {
4074            pub async fn into_raw_body(self) -> azure_core::Result<models::Build> {
4075                let bytes = self.0.into_raw_body().collect().await?;
4076                let body: models::Build = serde_json::from_slice(&bytes).map_err(|e| {
4077                    azure_core::error::Error::full(
4078                        azure_core::error::ErrorKind::DataConversion,
4079                        e,
4080                        format!(
4081                            "Failed to deserialize response:\n{}",
4082                            String::from_utf8_lossy(&bytes)
4083                        ),
4084                    )
4085                })?;
4086                Ok(body)
4087            }
4088            pub fn into_raw_response(self) -> azure_core::Response {
4089                self.0
4090            }
4091            pub fn as_raw_response(&self) -> &azure_core::Response {
4092                &self.0
4093            }
4094        }
4095        impl From<Response> for azure_core::Response {
4096            fn from(rsp: Response) -> Self {
4097                rsp.into_raw_response()
4098            }
4099        }
4100        impl AsRef<azure_core::Response> for Response {
4101            fn as_ref(&self) -> &azure_core::Response {
4102                self.as_raw_response()
4103            }
4104        }
4105        #[derive(Clone)]
4106        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4107        #[doc = r""]
4108        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4109        #[doc = r" parameters can be chained."]
4110        #[doc = r""]
4111        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4112        #[doc = r" converts the [`RequestBuilder`] into a future,"]
4113        #[doc = r" executes the request and returns a `Result` with the parsed"]
4114        #[doc = r" response."]
4115        #[doc = r""]
4116        #[doc = r" If you need lower-level access to the raw response details"]
4117        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4118        #[doc = r" can finalize the request using the"]
4119        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4120        #[doc = r" that resolves to a lower-level [`Response`] value."]
4121        pub struct RequestBuilder {
4122            pub(crate) client: super::super::Client,
4123            pub(crate) organization: String,
4124            pub(crate) body: models::Build,
4125            pub(crate) project: String,
4126            pub(crate) build_id: i32,
4127            pub(crate) retry: Option<bool>,
4128        }
4129        impl RequestBuilder {
4130            pub fn retry(mut self, retry: bool) -> Self {
4131                self.retry = Some(retry);
4132                self
4133            }
4134            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4135            #[doc = ""]
4136            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4137            #[doc = "However, this function can provide more flexibility when required."]
4138            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4139                Box::pin({
4140                    let this = self.clone();
4141                    async move {
4142                        let url = this.url()?;
4143                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
4144                        if let Some(auth_header) = this
4145                            .client
4146                            .token_credential()
4147                            .http_authorization_header(&this.client.scopes())
4148                            .await?
4149                        {
4150                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
4151                        }
4152                        req.insert_header("content-type", "application/json");
4153                        let req_body = azure_core::json::to_json(&this.body)?;
4154                        if let Some(retry) = &this.retry {
4155                            req.url_mut()
4156                                .query_pairs_mut()
4157                                .append_pair("retry", &retry.to_string());
4158                        }
4159                        req.set_body(req_body);
4160                        Ok(Response(this.client.send(&mut req).await?))
4161                    }
4162                })
4163            }
4164            fn url(&self) -> azure_core::Result<azure_core::Url> {
4165                let mut url = azure_core::Url::parse(&format!(
4166                    "{}/{}/{}/_apis/build/builds/{}",
4167                    self.client.endpoint(),
4168                    &self.organization,
4169                    &self.project,
4170                    &self.build_id
4171                ))?;
4172                let has_api_version_already = url
4173                    .query_pairs()
4174                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
4175                if !has_api_version_already {
4176                    url.query_pairs_mut()
4177                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
4178                }
4179                Ok(url)
4180            }
4181        }
4182        impl std::future::IntoFuture for RequestBuilder {
4183            type Output = azure_core::Result<models::Build>;
4184            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Build>>;
4185            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4186            #[doc = ""]
4187            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4188            #[doc = ""]
4189            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4190            fn into_future(self) -> Self::IntoFuture {
4191                Box::pin(async move { self.send().await?.into_raw_body().await })
4192            }
4193        }
4194    }
4195    pub mod delete {
4196        use super::models;
4197        #[cfg(not(target_arch = "wasm32"))]
4198        use futures::future::BoxFuture;
4199        #[cfg(target_arch = "wasm32")]
4200        use futures::future::LocalBoxFuture as BoxFuture;
4201        #[derive(Debug)]
4202        pub struct Response(azure_core::Response);
4203        impl Response {
4204            pub fn into_raw_response(self) -> azure_core::Response {
4205                self.0
4206            }
4207            pub fn as_raw_response(&self) -> &azure_core::Response {
4208                &self.0
4209            }
4210        }
4211        impl From<Response> for azure_core::Response {
4212            fn from(rsp: Response) -> Self {
4213                rsp.into_raw_response()
4214            }
4215        }
4216        impl AsRef<azure_core::Response> for Response {
4217            fn as_ref(&self) -> &azure_core::Response {
4218                self.as_raw_response()
4219            }
4220        }
4221        #[derive(Clone)]
4222        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4223        #[doc = r""]
4224        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4225        #[doc = r" parameters can be chained."]
4226        #[doc = r""]
4227        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4228        #[doc = r" converts the [`RequestBuilder`] into a future,"]
4229        #[doc = r" executes the request and returns a `Result` with the parsed"]
4230        #[doc = r" response."]
4231        #[doc = r""]
4232        #[doc = r" If you need lower-level access to the raw response details"]
4233        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4234        #[doc = r" can finalize the request using the"]
4235        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4236        #[doc = r" that resolves to a lower-level [`Response`] value."]
4237        pub struct RequestBuilder {
4238            pub(crate) client: super::super::Client,
4239            pub(crate) organization: String,
4240            pub(crate) project: String,
4241            pub(crate) build_id: i32,
4242        }
4243        impl RequestBuilder {
4244            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4245            #[doc = ""]
4246            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4247            #[doc = "However, this function can provide more flexibility when required."]
4248            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4249                Box::pin({
4250                    let this = self.clone();
4251                    async move {
4252                        let url = this.url()?;
4253                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
4254                        if let Some(auth_header) = this
4255                            .client
4256                            .token_credential()
4257                            .http_authorization_header(&this.client.scopes())
4258                            .await?
4259                        {
4260                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
4261                        }
4262                        let req_body = azure_core::EMPTY_BODY;
4263                        req.set_body(req_body);
4264                        Ok(Response(this.client.send(&mut req).await?))
4265                    }
4266                })
4267            }
4268            fn url(&self) -> azure_core::Result<azure_core::Url> {
4269                let mut url = azure_core::Url::parse(&format!(
4270                    "{}/{}/{}/_apis/build/builds/{}",
4271                    self.client.endpoint(),
4272                    &self.organization,
4273                    &self.project,
4274                    &self.build_id
4275                ))?;
4276                let has_api_version_already = url
4277                    .query_pairs()
4278                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
4279                if !has_api_version_already {
4280                    url.query_pairs_mut()
4281                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
4282                }
4283                Ok(url)
4284            }
4285        }
4286        impl std::future::IntoFuture for RequestBuilder {
4287            type Output = azure_core::Result<()>;
4288            type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
4289            #[doc = "Returns a future that sends the request and waits for the response."]
4290            #[doc = ""]
4291            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4292            #[doc = ""]
4293            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4294            fn into_future(self) -> Self::IntoFuture {
4295                Box::pin(async move {
4296                    let _rsp = self.send().await?;
4297                    Ok(())
4298                })
4299            }
4300        }
4301    }
4302    pub mod get_build_changes {
4303        use super::models;
4304        #[cfg(not(target_arch = "wasm32"))]
4305        use futures::future::BoxFuture;
4306        #[cfg(target_arch = "wasm32")]
4307        use futures::future::LocalBoxFuture as BoxFuture;
4308        #[derive(Debug)]
4309        pub struct Response(azure_core::Response);
4310        impl Response {
4311            pub async fn into_raw_body(self) -> azure_core::Result<models::ChangeList> {
4312                let bytes = self.0.into_raw_body().collect().await?;
4313                let body: models::ChangeList = serde_json::from_slice(&bytes).map_err(|e| {
4314                    azure_core::error::Error::full(
4315                        azure_core::error::ErrorKind::DataConversion,
4316                        e,
4317                        format!(
4318                            "Failed to deserialize response:\n{}",
4319                            String::from_utf8_lossy(&bytes)
4320                        ),
4321                    )
4322                })?;
4323                Ok(body)
4324            }
4325            pub fn into_raw_response(self) -> azure_core::Response {
4326                self.0
4327            }
4328            pub fn as_raw_response(&self) -> &azure_core::Response {
4329                &self.0
4330            }
4331        }
4332        impl From<Response> for azure_core::Response {
4333            fn from(rsp: Response) -> Self {
4334                rsp.into_raw_response()
4335            }
4336        }
4337        impl AsRef<azure_core::Response> for Response {
4338            fn as_ref(&self) -> &azure_core::Response {
4339                self.as_raw_response()
4340            }
4341        }
4342        #[derive(Clone)]
4343        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4344        #[doc = r""]
4345        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4346        #[doc = r" parameters can be chained."]
4347        #[doc = r""]
4348        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4349        #[doc = r" converts the [`RequestBuilder`] into a future,"]
4350        #[doc = r" executes the request and returns a `Result` with the parsed"]
4351        #[doc = r" response."]
4352        #[doc = r""]
4353        #[doc = r" If you need lower-level access to the raw response details"]
4354        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4355        #[doc = r" can finalize the request using the"]
4356        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4357        #[doc = r" that resolves to a lower-level [`Response`] value."]
4358        pub struct RequestBuilder {
4359            pub(crate) client: super::super::Client,
4360            pub(crate) organization: String,
4361            pub(crate) project: String,
4362            pub(crate) build_id: i32,
4363            pub(crate) continuation_token: Option<String>,
4364            pub(crate) top: Option<i32>,
4365            pub(crate) include_source_change: Option<bool>,
4366        }
4367        impl RequestBuilder {
4368            pub fn continuation_token(mut self, continuation_token: impl Into<String>) -> Self {
4369                self.continuation_token = Some(continuation_token.into());
4370                self
4371            }
4372            #[doc = "The maximum number of changes to return"]
4373            pub fn top(mut self, top: i32) -> Self {
4374                self.top = Some(top);
4375                self
4376            }
4377            pub fn include_source_change(mut self, include_source_change: bool) -> Self {
4378                self.include_source_change = Some(include_source_change);
4379                self
4380            }
4381            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4382            #[doc = ""]
4383            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4384            #[doc = "However, this function can provide more flexibility when required."]
4385            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4386                Box::pin({
4387                    let this = self.clone();
4388                    async move {
4389                        let url = this.url()?;
4390                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
4391                        if let Some(auth_header) = this
4392                            .client
4393                            .token_credential()
4394                            .http_authorization_header(&this.client.scopes())
4395                            .await?
4396                        {
4397                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
4398                        }
4399                        if let Some(continuation_token) = &this.continuation_token {
4400                            req.url_mut()
4401                                .query_pairs_mut()
4402                                .append_pair("continuationToken", continuation_token);
4403                        }
4404                        if let Some(top) = &this.top {
4405                            req.url_mut()
4406                                .query_pairs_mut()
4407                                .append_pair("$top", &top.to_string());
4408                        }
4409                        if let Some(include_source_change) = &this.include_source_change {
4410                            req.url_mut().query_pairs_mut().append_pair(
4411                                "includeSourceChange",
4412                                &include_source_change.to_string(),
4413                            );
4414                        }
4415                        let req_body = azure_core::EMPTY_BODY;
4416                        req.set_body(req_body);
4417                        Ok(Response(this.client.send(&mut req).await?))
4418                    }
4419                })
4420            }
4421            fn url(&self) -> azure_core::Result<azure_core::Url> {
4422                let mut url = azure_core::Url::parse(&format!(
4423                    "{}/{}/{}/_apis/build/builds/{}/changes",
4424                    self.client.endpoint(),
4425                    &self.organization,
4426                    &self.project,
4427                    &self.build_id
4428                ))?;
4429                let has_api_version_already = url
4430                    .query_pairs()
4431                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
4432                if !has_api_version_already {
4433                    url.query_pairs_mut()
4434                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
4435                }
4436                Ok(url)
4437            }
4438        }
4439        impl std::future::IntoFuture for RequestBuilder {
4440            type Output = azure_core::Result<models::ChangeList>;
4441            type IntoFuture = BoxFuture<'static, azure_core::Result<models::ChangeList>>;
4442            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4443            #[doc = ""]
4444            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4445            #[doc = ""]
4446            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4447            fn into_future(self) -> Self::IntoFuture {
4448                Box::pin(async move { self.send().await?.into_raw_body().await })
4449            }
4450        }
4451    }
4452    pub mod get_retention_leases_for_build {
4453        use super::models;
4454        #[cfg(not(target_arch = "wasm32"))]
4455        use futures::future::BoxFuture;
4456        #[cfg(target_arch = "wasm32")]
4457        use futures::future::LocalBoxFuture as BoxFuture;
4458        #[derive(Debug)]
4459        pub struct Response(azure_core::Response);
4460        impl Response {
4461            pub async fn into_raw_body(self) -> azure_core::Result<models::RetentionLeaseList> {
4462                let bytes = self.0.into_raw_body().collect().await?;
4463                let body: models::RetentionLeaseList =
4464                    serde_json::from_slice(&bytes).map_err(|e| {
4465                        azure_core::error::Error::full(
4466                            azure_core::error::ErrorKind::DataConversion,
4467                            e,
4468                            format!(
4469                                "Failed to deserialize response:\n{}",
4470                                String::from_utf8_lossy(&bytes)
4471                            ),
4472                        )
4473                    })?;
4474                Ok(body)
4475            }
4476            pub fn into_raw_response(self) -> azure_core::Response {
4477                self.0
4478            }
4479            pub fn as_raw_response(&self) -> &azure_core::Response {
4480                &self.0
4481            }
4482        }
4483        impl From<Response> for azure_core::Response {
4484            fn from(rsp: Response) -> Self {
4485                rsp.into_raw_response()
4486            }
4487        }
4488        impl AsRef<azure_core::Response> for Response {
4489            fn as_ref(&self) -> &azure_core::Response {
4490                self.as_raw_response()
4491            }
4492        }
4493        #[derive(Clone)]
4494        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4495        #[doc = r""]
4496        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4497        #[doc = r" parameters can be chained."]
4498        #[doc = r""]
4499        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4500        #[doc = r" converts the [`RequestBuilder`] into a future,"]
4501        #[doc = r" executes the request and returns a `Result` with the parsed"]
4502        #[doc = r" response."]
4503        #[doc = r""]
4504        #[doc = r" If you need lower-level access to the raw response details"]
4505        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4506        #[doc = r" can finalize the request using the"]
4507        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4508        #[doc = r" that resolves to a lower-level [`Response`] value."]
4509        pub struct RequestBuilder {
4510            pub(crate) client: super::super::Client,
4511            pub(crate) organization: String,
4512            pub(crate) project: String,
4513            pub(crate) build_id: i32,
4514        }
4515        impl RequestBuilder {
4516            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4517            #[doc = ""]
4518            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4519            #[doc = "However, this function can provide more flexibility when required."]
4520            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4521                Box::pin({
4522                    let this = self.clone();
4523                    async move {
4524                        let url = this.url()?;
4525                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
4526                        if let Some(auth_header) = this
4527                            .client
4528                            .token_credential()
4529                            .http_authorization_header(&this.client.scopes())
4530                            .await?
4531                        {
4532                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
4533                        }
4534                        let req_body = azure_core::EMPTY_BODY;
4535                        req.set_body(req_body);
4536                        Ok(Response(this.client.send(&mut req).await?))
4537                    }
4538                })
4539            }
4540            fn url(&self) -> azure_core::Result<azure_core::Url> {
4541                let mut url = azure_core::Url::parse(&format!(
4542                    "{}/{}/{}/_apis/build/builds/{}/leases",
4543                    self.client.endpoint(),
4544                    &self.organization,
4545                    &self.project,
4546                    &self.build_id
4547                ))?;
4548                let has_api_version_already = url
4549                    .query_pairs()
4550                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
4551                if !has_api_version_already {
4552                    url.query_pairs_mut()
4553                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
4554                }
4555                Ok(url)
4556            }
4557        }
4558        impl std::future::IntoFuture for RequestBuilder {
4559            type Output = azure_core::Result<models::RetentionLeaseList>;
4560            type IntoFuture = BoxFuture<'static, azure_core::Result<models::RetentionLeaseList>>;
4561            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4562            #[doc = ""]
4563            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4564            #[doc = ""]
4565            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4566            fn into_future(self) -> Self::IntoFuture {
4567                Box::pin(async move { self.send().await?.into_raw_body().await })
4568            }
4569        }
4570    }
4571    pub mod get_build_logs {
4572        use super::models;
4573        #[cfg(not(target_arch = "wasm32"))]
4574        use futures::future::BoxFuture;
4575        #[cfg(target_arch = "wasm32")]
4576        use futures::future::LocalBoxFuture as BoxFuture;
4577        #[derive(Debug)]
4578        pub struct Response(azure_core::Response);
4579        impl Response {
4580            pub async fn into_raw_body(self) -> azure_core::Result<models::BuildLogList> {
4581                let bytes = self.0.into_raw_body().collect().await?;
4582                let body: models::BuildLogList = serde_json::from_slice(&bytes).map_err(|e| {
4583                    azure_core::error::Error::full(
4584                        azure_core::error::ErrorKind::DataConversion,
4585                        e,
4586                        format!(
4587                            "Failed to deserialize response:\n{}",
4588                            String::from_utf8_lossy(&bytes)
4589                        ),
4590                    )
4591                })?;
4592                Ok(body)
4593            }
4594            pub fn into_raw_response(self) -> azure_core::Response {
4595                self.0
4596            }
4597            pub fn as_raw_response(&self) -> &azure_core::Response {
4598                &self.0
4599            }
4600        }
4601        impl From<Response> for azure_core::Response {
4602            fn from(rsp: Response) -> Self {
4603                rsp.into_raw_response()
4604            }
4605        }
4606        impl AsRef<azure_core::Response> for Response {
4607            fn as_ref(&self) -> &azure_core::Response {
4608                self.as_raw_response()
4609            }
4610        }
4611        #[derive(Clone)]
4612        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4613        #[doc = r""]
4614        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4615        #[doc = r" parameters can be chained."]
4616        #[doc = r""]
4617        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4618        #[doc = r" converts the [`RequestBuilder`] into a future,"]
4619        #[doc = r" executes the request and returns a `Result` with the parsed"]
4620        #[doc = r" response."]
4621        #[doc = r""]
4622        #[doc = r" If you need lower-level access to the raw response details"]
4623        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4624        #[doc = r" can finalize the request using the"]
4625        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4626        #[doc = r" that resolves to a lower-level [`Response`] value."]
4627        pub struct RequestBuilder {
4628            pub(crate) client: super::super::Client,
4629            pub(crate) organization: String,
4630            pub(crate) project: String,
4631            pub(crate) build_id: i32,
4632        }
4633        impl RequestBuilder {
4634            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4635            #[doc = ""]
4636            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4637            #[doc = "However, this function can provide more flexibility when required."]
4638            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4639                Box::pin({
4640                    let this = self.clone();
4641                    async move {
4642                        let url = this.url()?;
4643                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
4644                        if let Some(auth_header) = this
4645                            .client
4646                            .token_credential()
4647                            .http_authorization_header(&this.client.scopes())
4648                            .await?
4649                        {
4650                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
4651                        }
4652                        let req_body = azure_core::EMPTY_BODY;
4653                        req.set_body(req_body);
4654                        Ok(Response(this.client.send(&mut req).await?))
4655                    }
4656                })
4657            }
4658            fn url(&self) -> azure_core::Result<azure_core::Url> {
4659                let mut url = azure_core::Url::parse(&format!(
4660                    "{}/{}/{}/_apis/build/builds/{}/logs",
4661                    self.client.endpoint(),
4662                    &self.organization,
4663                    &self.project,
4664                    &self.build_id
4665                ))?;
4666                let has_api_version_already = url
4667                    .query_pairs()
4668                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
4669                if !has_api_version_already {
4670                    url.query_pairs_mut()
4671                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
4672                }
4673                Ok(url)
4674            }
4675        }
4676        impl std::future::IntoFuture for RequestBuilder {
4677            type Output = azure_core::Result<models::BuildLogList>;
4678            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildLogList>>;
4679            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4680            #[doc = ""]
4681            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4682            #[doc = ""]
4683            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4684            fn into_future(self) -> Self::IntoFuture {
4685                Box::pin(async move { self.send().await?.into_raw_body().await })
4686            }
4687        }
4688    }
4689    pub mod get_build_log {
4690        use super::models;
4691        #[cfg(not(target_arch = "wasm32"))]
4692        use futures::future::BoxFuture;
4693        #[cfg(target_arch = "wasm32")]
4694        use futures::future::LocalBoxFuture as BoxFuture;
4695        #[derive(Debug)]
4696        pub struct Response(azure_core::Response);
4697        impl Response {
4698            pub async fn into_raw_body(self) -> azure_core::Result<String> {
4699                let bytes = self.0.into_raw_body().collect().await?;
4700                let body: String = serde_json::from_slice(&bytes).map_err(|e| {
4701                    azure_core::error::Error::full(
4702                        azure_core::error::ErrorKind::DataConversion,
4703                        e,
4704                        format!(
4705                            "Failed to deserialize response:\n{}",
4706                            String::from_utf8_lossy(&bytes)
4707                        ),
4708                    )
4709                })?;
4710                Ok(body)
4711            }
4712            pub fn into_raw_response(self) -> azure_core::Response {
4713                self.0
4714            }
4715            pub fn as_raw_response(&self) -> &azure_core::Response {
4716                &self.0
4717            }
4718        }
4719        impl From<Response> for azure_core::Response {
4720            fn from(rsp: Response) -> Self {
4721                rsp.into_raw_response()
4722            }
4723        }
4724        impl AsRef<azure_core::Response> for Response {
4725            fn as_ref(&self) -> &azure_core::Response {
4726                self.as_raw_response()
4727            }
4728        }
4729        #[derive(Clone)]
4730        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4731        #[doc = r""]
4732        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4733        #[doc = r" parameters can be chained."]
4734        #[doc = r""]
4735        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4736        #[doc = r" converts the [`RequestBuilder`] into a future,"]
4737        #[doc = r" executes the request and returns a `Result` with the parsed"]
4738        #[doc = r" response."]
4739        #[doc = r""]
4740        #[doc = r" If you need lower-level access to the raw response details"]
4741        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4742        #[doc = r" can finalize the request using the"]
4743        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4744        #[doc = r" that resolves to a lower-level [`Response`] value."]
4745        pub struct RequestBuilder {
4746            pub(crate) client: super::super::Client,
4747            pub(crate) organization: String,
4748            pub(crate) project: String,
4749            pub(crate) build_id: i32,
4750            pub(crate) log_id: i32,
4751            pub(crate) start_line: Option<i64>,
4752            pub(crate) end_line: Option<i64>,
4753        }
4754        impl RequestBuilder {
4755            #[doc = "The start line."]
4756            pub fn start_line(mut self, start_line: i64) -> Self {
4757                self.start_line = Some(start_line);
4758                self
4759            }
4760            #[doc = "The end line."]
4761            pub fn end_line(mut self, end_line: i64) -> Self {
4762                self.end_line = Some(end_line);
4763                self
4764            }
4765            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4766            #[doc = ""]
4767            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4768            #[doc = "However, this function can provide more flexibility when required."]
4769            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4770                Box::pin({
4771                    let this = self.clone();
4772                    async move {
4773                        let url = this.url()?;
4774                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
4775                        if let Some(auth_header) = this
4776                            .client
4777                            .token_credential()
4778                            .http_authorization_header(&this.client.scopes())
4779                            .await?
4780                        {
4781                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
4782                        }
4783                        if let Some(start_line) = &this.start_line {
4784                            req.url_mut()
4785                                .query_pairs_mut()
4786                                .append_pair("startLine", &start_line.to_string());
4787                        }
4788                        if let Some(end_line) = &this.end_line {
4789                            req.url_mut()
4790                                .query_pairs_mut()
4791                                .append_pair("endLine", &end_line.to_string());
4792                        }
4793                        let req_body = azure_core::EMPTY_BODY;
4794                        req.set_body(req_body);
4795                        Ok(Response(this.client.send(&mut req).await?))
4796                    }
4797                })
4798            }
4799            fn url(&self) -> azure_core::Result<azure_core::Url> {
4800                let mut url = azure_core::Url::parse(&format!(
4801                    "{}/{}/{}/_apis/build/builds/{}/logs/{}",
4802                    self.client.endpoint(),
4803                    &self.organization,
4804                    &self.project,
4805                    &self.build_id,
4806                    &self.log_id
4807                ))?;
4808                let has_api_version_already = url
4809                    .query_pairs()
4810                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
4811                if !has_api_version_already {
4812                    url.query_pairs_mut()
4813                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
4814                }
4815                Ok(url)
4816            }
4817        }
4818        impl std::future::IntoFuture for RequestBuilder {
4819            type Output = azure_core::Result<String>;
4820            type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
4821            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4822            #[doc = ""]
4823            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4824            #[doc = ""]
4825            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4826            fn into_future(self) -> Self::IntoFuture {
4827                Box::pin(async move { self.send().await?.into_raw_body().await })
4828            }
4829        }
4830    }
4831    pub mod get_build_work_items_refs {
4832        use super::models;
4833        #[cfg(not(target_arch = "wasm32"))]
4834        use futures::future::BoxFuture;
4835        #[cfg(target_arch = "wasm32")]
4836        use futures::future::LocalBoxFuture as BoxFuture;
4837        #[derive(Debug)]
4838        pub struct Response(azure_core::Response);
4839        impl Response {
4840            pub async fn into_raw_body(self) -> azure_core::Result<models::ResourceRefList> {
4841                let bytes = self.0.into_raw_body().collect().await?;
4842                let body: models::ResourceRefList =
4843                    serde_json::from_slice(&bytes).map_err(|e| {
4844                        azure_core::error::Error::full(
4845                            azure_core::error::ErrorKind::DataConversion,
4846                            e,
4847                            format!(
4848                                "Failed to deserialize response:\n{}",
4849                                String::from_utf8_lossy(&bytes)
4850                            ),
4851                        )
4852                    })?;
4853                Ok(body)
4854            }
4855            pub fn into_raw_response(self) -> azure_core::Response {
4856                self.0
4857            }
4858            pub fn as_raw_response(&self) -> &azure_core::Response {
4859                &self.0
4860            }
4861        }
4862        impl From<Response> for azure_core::Response {
4863            fn from(rsp: Response) -> Self {
4864                rsp.into_raw_response()
4865            }
4866        }
4867        impl AsRef<azure_core::Response> for Response {
4868            fn as_ref(&self) -> &azure_core::Response {
4869                self.as_raw_response()
4870            }
4871        }
4872        #[derive(Clone)]
4873        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4874        #[doc = r""]
4875        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4876        #[doc = r" parameters can be chained."]
4877        #[doc = r""]
4878        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4879        #[doc = r" converts the [`RequestBuilder`] into a future,"]
4880        #[doc = r" executes the request and returns a `Result` with the parsed"]
4881        #[doc = r" response."]
4882        #[doc = r""]
4883        #[doc = r" If you need lower-level access to the raw response details"]
4884        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4885        #[doc = r" can finalize the request using the"]
4886        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4887        #[doc = r" that resolves to a lower-level [`Response`] value."]
4888        pub struct RequestBuilder {
4889            pub(crate) client: super::super::Client,
4890            pub(crate) organization: String,
4891            pub(crate) project: String,
4892            pub(crate) build_id: i32,
4893            pub(crate) top: Option<i32>,
4894        }
4895        impl RequestBuilder {
4896            #[doc = "The maximum number of work items to return."]
4897            pub fn top(mut self, top: i32) -> Self {
4898                self.top = Some(top);
4899                self
4900            }
4901            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4902            #[doc = ""]
4903            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4904            #[doc = "However, this function can provide more flexibility when required."]
4905            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4906                Box::pin({
4907                    let this = self.clone();
4908                    async move {
4909                        let url = this.url()?;
4910                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
4911                        if let Some(auth_header) = this
4912                            .client
4913                            .token_credential()
4914                            .http_authorization_header(&this.client.scopes())
4915                            .await?
4916                        {
4917                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
4918                        }
4919                        if let Some(top) = &this.top {
4920                            req.url_mut()
4921                                .query_pairs_mut()
4922                                .append_pair("$top", &top.to_string());
4923                        }
4924                        let req_body = azure_core::EMPTY_BODY;
4925                        req.set_body(req_body);
4926                        Ok(Response(this.client.send(&mut req).await?))
4927                    }
4928                })
4929            }
4930            fn url(&self) -> azure_core::Result<azure_core::Url> {
4931                let mut url = azure_core::Url::parse(&format!(
4932                    "{}/{}/{}/_apis/build/builds/{}/workitems",
4933                    self.client.endpoint(),
4934                    &self.organization,
4935                    &self.project,
4936                    &self.build_id
4937                ))?;
4938                let has_api_version_already = url
4939                    .query_pairs()
4940                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
4941                if !has_api_version_already {
4942                    url.query_pairs_mut()
4943                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
4944                }
4945                Ok(url)
4946            }
4947        }
4948        impl std::future::IntoFuture for RequestBuilder {
4949            type Output = azure_core::Result<models::ResourceRefList>;
4950            type IntoFuture = BoxFuture<'static, azure_core::Result<models::ResourceRefList>>;
4951            #[doc = "Returns a future that sends the request and returns the parsed response body."]
4952            #[doc = ""]
4953            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4954            #[doc = ""]
4955            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4956            fn into_future(self) -> Self::IntoFuture {
4957                Box::pin(async move { self.send().await?.into_raw_body().await })
4958            }
4959        }
4960    }
4961    pub mod get_build_work_items_refs_from_commits {
4962        use super::models;
4963        #[cfg(not(target_arch = "wasm32"))]
4964        use futures::future::BoxFuture;
4965        #[cfg(target_arch = "wasm32")]
4966        use futures::future::LocalBoxFuture as BoxFuture;
4967        #[derive(Debug)]
4968        pub struct Response(azure_core::Response);
4969        impl Response {
4970            pub async fn into_raw_body(self) -> azure_core::Result<models::ResourceRefList> {
4971                let bytes = self.0.into_raw_body().collect().await?;
4972                let body: models::ResourceRefList =
4973                    serde_json::from_slice(&bytes).map_err(|e| {
4974                        azure_core::error::Error::full(
4975                            azure_core::error::ErrorKind::DataConversion,
4976                            e,
4977                            format!(
4978                                "Failed to deserialize response:\n{}",
4979                                String::from_utf8_lossy(&bytes)
4980                            ),
4981                        )
4982                    })?;
4983                Ok(body)
4984            }
4985            pub fn into_raw_response(self) -> azure_core::Response {
4986                self.0
4987            }
4988            pub fn as_raw_response(&self) -> &azure_core::Response {
4989                &self.0
4990            }
4991        }
4992        impl From<Response> for azure_core::Response {
4993            fn from(rsp: Response) -> Self {
4994                rsp.into_raw_response()
4995            }
4996        }
4997        impl AsRef<azure_core::Response> for Response {
4998            fn as_ref(&self) -> &azure_core::Response {
4999                self.as_raw_response()
5000            }
5001        }
5002        #[derive(Clone)]
5003        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5004        #[doc = r""]
5005        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5006        #[doc = r" parameters can be chained."]
5007        #[doc = r""]
5008        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5009        #[doc = r" converts the [`RequestBuilder`] into a future,"]
5010        #[doc = r" executes the request and returns a `Result` with the parsed"]
5011        #[doc = r" response."]
5012        #[doc = r""]
5013        #[doc = r" If you need lower-level access to the raw response details"]
5014        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5015        #[doc = r" can finalize the request using the"]
5016        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5017        #[doc = r" that resolves to a lower-level [`Response`] value."]
5018        pub struct RequestBuilder {
5019            pub(crate) client: super::super::Client,
5020            pub(crate) organization: String,
5021            pub(crate) body: Vec<String>,
5022            pub(crate) project: String,
5023            pub(crate) build_id: i32,
5024            pub(crate) top: Option<i32>,
5025        }
5026        impl RequestBuilder {
5027            #[doc = "The maximum number of work items to return, or the number of commits to consider if no commit IDs are specified."]
5028            pub fn top(mut self, top: i32) -> Self {
5029                self.top = Some(top);
5030                self
5031            }
5032            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5033            #[doc = ""]
5034            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5035            #[doc = "However, this function can provide more flexibility when required."]
5036            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5037                Box::pin({
5038                    let this = self.clone();
5039                    async move {
5040                        let url = this.url()?;
5041                        let mut req = azure_core::Request::new(url, azure_core::Method::Post);
5042                        if let Some(auth_header) = this
5043                            .client
5044                            .token_credential()
5045                            .http_authorization_header(&this.client.scopes())
5046                            .await?
5047                        {
5048                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
5049                        }
5050                        req.insert_header("content-type", "application/json");
5051                        let req_body = azure_core::json::to_json(&this.body)?;
5052                        if let Some(top) = &this.top {
5053                            req.url_mut()
5054                                .query_pairs_mut()
5055                                .append_pair("$top", &top.to_string());
5056                        }
5057                        req.set_body(req_body);
5058                        Ok(Response(this.client.send(&mut req).await?))
5059                    }
5060                })
5061            }
5062            fn url(&self) -> azure_core::Result<azure_core::Url> {
5063                let mut url = azure_core::Url::parse(&format!(
5064                    "{}/{}/{}/_apis/build/builds/{}/workitems",
5065                    self.client.endpoint(),
5066                    &self.organization,
5067                    &self.project,
5068                    &self.build_id
5069                ))?;
5070                let has_api_version_already = url
5071                    .query_pairs()
5072                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
5073                if !has_api_version_already {
5074                    url.query_pairs_mut()
5075                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
5076                }
5077                Ok(url)
5078            }
5079        }
5080        impl std::future::IntoFuture for RequestBuilder {
5081            type Output = azure_core::Result<models::ResourceRefList>;
5082            type IntoFuture = BoxFuture<'static, azure_core::Result<models::ResourceRefList>>;
5083            #[doc = "Returns a future that sends the request and returns the parsed response body."]
5084            #[doc = ""]
5085            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5086            #[doc = ""]
5087            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5088            fn into_future(self) -> Self::IntoFuture {
5089                Box::pin(async move { self.send().await?.into_raw_body().await })
5090            }
5091        }
5092    }
5093    pub mod get_changes_between_builds {
5094        use super::models;
5095        #[cfg(not(target_arch = "wasm32"))]
5096        use futures::future::BoxFuture;
5097        #[cfg(target_arch = "wasm32")]
5098        use futures::future::LocalBoxFuture as BoxFuture;
5099        #[derive(Debug)]
5100        pub struct Response(azure_core::Response);
5101        impl Response {
5102            pub async fn into_raw_body(self) -> azure_core::Result<models::ChangeList> {
5103                let bytes = self.0.into_raw_body().collect().await?;
5104                let body: models::ChangeList = serde_json::from_slice(&bytes).map_err(|e| {
5105                    azure_core::error::Error::full(
5106                        azure_core::error::ErrorKind::DataConversion,
5107                        e,
5108                        format!(
5109                            "Failed to deserialize response:\n{}",
5110                            String::from_utf8_lossy(&bytes)
5111                        ),
5112                    )
5113                })?;
5114                Ok(body)
5115            }
5116            pub fn into_raw_response(self) -> azure_core::Response {
5117                self.0
5118            }
5119            pub fn as_raw_response(&self) -> &azure_core::Response {
5120                &self.0
5121            }
5122        }
5123        impl From<Response> for azure_core::Response {
5124            fn from(rsp: Response) -> Self {
5125                rsp.into_raw_response()
5126            }
5127        }
5128        impl AsRef<azure_core::Response> for Response {
5129            fn as_ref(&self) -> &azure_core::Response {
5130                self.as_raw_response()
5131            }
5132        }
5133        #[derive(Clone)]
5134        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5135        #[doc = r""]
5136        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5137        #[doc = r" parameters can be chained."]
5138        #[doc = r""]
5139        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5140        #[doc = r" converts the [`RequestBuilder`] into a future,"]
5141        #[doc = r" executes the request and returns a `Result` with the parsed"]
5142        #[doc = r" response."]
5143        #[doc = r""]
5144        #[doc = r" If you need lower-level access to the raw response details"]
5145        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5146        #[doc = r" can finalize the request using the"]
5147        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5148        #[doc = r" that resolves to a lower-level [`Response`] value."]
5149        pub struct RequestBuilder {
5150            pub(crate) client: super::super::Client,
5151            pub(crate) organization: String,
5152            pub(crate) project: String,
5153            pub(crate) from_build_id: Option<i32>,
5154            pub(crate) to_build_id: Option<i32>,
5155            pub(crate) top: Option<i32>,
5156        }
5157        impl RequestBuilder {
5158            #[doc = "The ID of the first build."]
5159            pub fn from_build_id(mut self, from_build_id: i32) -> Self {
5160                self.from_build_id = Some(from_build_id);
5161                self
5162            }
5163            #[doc = "The ID of the last build."]
5164            pub fn to_build_id(mut self, to_build_id: i32) -> Self {
5165                self.to_build_id = Some(to_build_id);
5166                self
5167            }
5168            #[doc = "The maximum number of changes to return."]
5169            pub fn top(mut self, top: i32) -> Self {
5170                self.top = Some(top);
5171                self
5172            }
5173            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5174            #[doc = ""]
5175            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5176            #[doc = "However, this function can provide more flexibility when required."]
5177            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5178                Box::pin({
5179                    let this = self.clone();
5180                    async move {
5181                        let url = this.url()?;
5182                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
5183                        if let Some(auth_header) = this
5184                            .client
5185                            .token_credential()
5186                            .http_authorization_header(&this.client.scopes())
5187                            .await?
5188                        {
5189                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
5190                        }
5191                        if let Some(from_build_id) = &this.from_build_id {
5192                            req.url_mut()
5193                                .query_pairs_mut()
5194                                .append_pair("fromBuildId", &from_build_id.to_string());
5195                        }
5196                        if let Some(to_build_id) = &this.to_build_id {
5197                            req.url_mut()
5198                                .query_pairs_mut()
5199                                .append_pair("toBuildId", &to_build_id.to_string());
5200                        }
5201                        if let Some(top) = &this.top {
5202                            req.url_mut()
5203                                .query_pairs_mut()
5204                                .append_pair("$top", &top.to_string());
5205                        }
5206                        let req_body = azure_core::EMPTY_BODY;
5207                        req.set_body(req_body);
5208                        Ok(Response(this.client.send(&mut req).await?))
5209                    }
5210                })
5211            }
5212            fn url(&self) -> azure_core::Result<azure_core::Url> {
5213                let mut url = azure_core::Url::parse(&format!(
5214                    "{}/{}/{}/_apis/build/changes",
5215                    self.client.endpoint(),
5216                    &self.organization,
5217                    &self.project
5218                ))?;
5219                let has_api_version_already = url
5220                    .query_pairs()
5221                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
5222                if !has_api_version_already {
5223                    url.query_pairs_mut()
5224                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
5225                }
5226                Ok(url)
5227            }
5228        }
5229        impl std::future::IntoFuture for RequestBuilder {
5230            type Output = azure_core::Result<models::ChangeList>;
5231            type IntoFuture = BoxFuture<'static, azure_core::Result<models::ChangeList>>;
5232            #[doc = "Returns a future that sends the request and returns the parsed response body."]
5233            #[doc = ""]
5234            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5235            #[doc = ""]
5236            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5237            fn into_future(self) -> Self::IntoFuture {
5238                Box::pin(async move { self.send().await?.into_raw_body().await })
5239            }
5240        }
5241    }
5242    pub mod get_work_items_between_builds {
5243        use super::models;
5244        #[cfg(not(target_arch = "wasm32"))]
5245        use futures::future::BoxFuture;
5246        #[cfg(target_arch = "wasm32")]
5247        use futures::future::LocalBoxFuture as BoxFuture;
5248        #[derive(Debug)]
5249        pub struct Response(azure_core::Response);
5250        impl Response {
5251            pub async fn into_raw_body(self) -> azure_core::Result<models::ResourceRefList> {
5252                let bytes = self.0.into_raw_body().collect().await?;
5253                let body: models::ResourceRefList =
5254                    serde_json::from_slice(&bytes).map_err(|e| {
5255                        azure_core::error::Error::full(
5256                            azure_core::error::ErrorKind::DataConversion,
5257                            e,
5258                            format!(
5259                                "Failed to deserialize response:\n{}",
5260                                String::from_utf8_lossy(&bytes)
5261                            ),
5262                        )
5263                    })?;
5264                Ok(body)
5265            }
5266            pub fn into_raw_response(self) -> azure_core::Response {
5267                self.0
5268            }
5269            pub fn as_raw_response(&self) -> &azure_core::Response {
5270                &self.0
5271            }
5272        }
5273        impl From<Response> for azure_core::Response {
5274            fn from(rsp: Response) -> Self {
5275                rsp.into_raw_response()
5276            }
5277        }
5278        impl AsRef<azure_core::Response> for Response {
5279            fn as_ref(&self) -> &azure_core::Response {
5280                self.as_raw_response()
5281            }
5282        }
5283        #[derive(Clone)]
5284        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5285        #[doc = r""]
5286        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5287        #[doc = r" parameters can be chained."]
5288        #[doc = r""]
5289        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5290        #[doc = r" converts the [`RequestBuilder`] into a future,"]
5291        #[doc = r" executes the request and returns a `Result` with the parsed"]
5292        #[doc = r" response."]
5293        #[doc = r""]
5294        #[doc = r" If you need lower-level access to the raw response details"]
5295        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5296        #[doc = r" can finalize the request using the"]
5297        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5298        #[doc = r" that resolves to a lower-level [`Response`] value."]
5299        pub struct RequestBuilder {
5300            pub(crate) client: super::super::Client,
5301            pub(crate) organization: String,
5302            pub(crate) project: String,
5303            pub(crate) from_build_id: i32,
5304            pub(crate) to_build_id: i32,
5305            pub(crate) top: Option<i32>,
5306        }
5307        impl RequestBuilder {
5308            #[doc = "The maximum number of work items to return."]
5309            pub fn top(mut self, top: i32) -> Self {
5310                self.top = Some(top);
5311                self
5312            }
5313            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5314            #[doc = ""]
5315            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5316            #[doc = "However, this function can provide more flexibility when required."]
5317            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5318                Box::pin({
5319                    let this = self.clone();
5320                    async move {
5321                        let url = this.url()?;
5322                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
5323                        if let Some(auth_header) = this
5324                            .client
5325                            .token_credential()
5326                            .http_authorization_header(&this.client.scopes())
5327                            .await?
5328                        {
5329                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
5330                        }
5331                        let from_build_id = &this.from_build_id;
5332                        req.url_mut()
5333                            .query_pairs_mut()
5334                            .append_pair("fromBuildId", &from_build_id.to_string());
5335                        let to_build_id = &this.to_build_id;
5336                        req.url_mut()
5337                            .query_pairs_mut()
5338                            .append_pair("toBuildId", &to_build_id.to_string());
5339                        if let Some(top) = &this.top {
5340                            req.url_mut()
5341                                .query_pairs_mut()
5342                                .append_pair("$top", &top.to_string());
5343                        }
5344                        let req_body = azure_core::EMPTY_BODY;
5345                        req.set_body(req_body);
5346                        Ok(Response(this.client.send(&mut req).await?))
5347                    }
5348                })
5349            }
5350            fn url(&self) -> azure_core::Result<azure_core::Url> {
5351                let mut url = azure_core::Url::parse(&format!(
5352                    "{}/{}/{}/_apis/build/workitems",
5353                    self.client.endpoint(),
5354                    &self.organization,
5355                    &self.project
5356                ))?;
5357                let has_api_version_already = url
5358                    .query_pairs()
5359                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
5360                if !has_api_version_already {
5361                    url.query_pairs_mut()
5362                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
5363                }
5364                Ok(url)
5365            }
5366        }
5367        impl std::future::IntoFuture for RequestBuilder {
5368            type Output = azure_core::Result<models::ResourceRefList>;
5369            type IntoFuture = BoxFuture<'static, azure_core::Result<models::ResourceRefList>>;
5370            #[doc = "Returns a future that sends the request and returns the parsed response body."]
5371            #[doc = ""]
5372            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5373            #[doc = ""]
5374            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5375            fn into_future(self) -> Self::IntoFuture {
5376                Box::pin(async move { self.send().await?.into_raw_body().await })
5377            }
5378        }
5379    }
5380}
5381pub mod attachments {
5382    use super::models;
5383    #[cfg(not(target_arch = "wasm32"))]
5384    use futures::future::BoxFuture;
5385    #[cfg(target_arch = "wasm32")]
5386    use futures::future::LocalBoxFuture as BoxFuture;
5387    pub struct Client(pub(crate) super::Client);
5388    impl Client {
5389        #[doc = "Gets a specific attachment."]
5390        #[doc = ""]
5391        #[doc = "Arguments:"]
5392        #[doc = "* `organization`: The name of the Azure DevOps organization."]
5393        #[doc = "* `project`: Project ID or project name"]
5394        #[doc = "* `build_id`: The ID of the build."]
5395        #[doc = "* `timeline_id`: The ID of the timeline."]
5396        #[doc = "* `record_id`: The ID of the timeline record."]
5397        #[doc = "* `type_`: The type of the attachment."]
5398        #[doc = "* `name`: The name of the attachment."]
5399        pub fn get(
5400            &self,
5401            organization: impl Into<String>,
5402            project: impl Into<String>,
5403            build_id: i32,
5404            timeline_id: impl Into<String>,
5405            record_id: impl Into<String>,
5406            type_: impl Into<String>,
5407            name: impl Into<String>,
5408        ) -> get::RequestBuilder {
5409            get::RequestBuilder {
5410                client: self.0.clone(),
5411                organization: organization.into(),
5412                project: project.into(),
5413                build_id,
5414                timeline_id: timeline_id.into(),
5415                record_id: record_id.into(),
5416                type_: type_.into(),
5417                name: name.into(),
5418            }
5419        }
5420        #[doc = "Gets the list of attachments of a specific type that are associated with a build."]
5421        #[doc = ""]
5422        #[doc = "Arguments:"]
5423        #[doc = "* `organization`: The name of the Azure DevOps organization."]
5424        #[doc = "* `project`: Project ID or project name"]
5425        #[doc = "* `build_id`: The ID of the build."]
5426        #[doc = "* `type_`: The type of attachment."]
5427        pub fn list(
5428            &self,
5429            organization: impl Into<String>,
5430            project: impl Into<String>,
5431            build_id: i32,
5432            type_: impl Into<String>,
5433        ) -> list::RequestBuilder {
5434            list::RequestBuilder {
5435                client: self.0.clone(),
5436                organization: organization.into(),
5437                project: project.into(),
5438                build_id,
5439                type_: type_.into(),
5440            }
5441        }
5442    }
5443    pub mod get {
5444        use super::models;
5445        #[cfg(not(target_arch = "wasm32"))]
5446        use futures::future::BoxFuture;
5447        #[cfg(target_arch = "wasm32")]
5448        use futures::future::LocalBoxFuture as BoxFuture;
5449        #[derive(Debug)]
5450        pub struct Response(azure_core::Response);
5451        impl Response {
5452            pub async fn into_raw_body(self) -> azure_core::Result<String> {
5453                let bytes = self.0.into_raw_body().collect().await?;
5454                let body: String = serde_json::from_slice(&bytes).map_err(|e| {
5455                    azure_core::error::Error::full(
5456                        azure_core::error::ErrorKind::DataConversion,
5457                        e,
5458                        format!(
5459                            "Failed to deserialize response:\n{}",
5460                            String::from_utf8_lossy(&bytes)
5461                        ),
5462                    )
5463                })?;
5464                Ok(body)
5465            }
5466            pub fn into_raw_response(self) -> azure_core::Response {
5467                self.0
5468            }
5469            pub fn as_raw_response(&self) -> &azure_core::Response {
5470                &self.0
5471            }
5472        }
5473        impl From<Response> for azure_core::Response {
5474            fn from(rsp: Response) -> Self {
5475                rsp.into_raw_response()
5476            }
5477        }
5478        impl AsRef<azure_core::Response> for Response {
5479            fn as_ref(&self) -> &azure_core::Response {
5480                self.as_raw_response()
5481            }
5482        }
5483        #[derive(Clone)]
5484        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5485        #[doc = r""]
5486        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5487        #[doc = r" parameters can be chained."]
5488        #[doc = r""]
5489        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5490        #[doc = r" converts the [`RequestBuilder`] into a future,"]
5491        #[doc = r" executes the request and returns a `Result` with the parsed"]
5492        #[doc = r" response."]
5493        #[doc = r""]
5494        #[doc = r" If you need lower-level access to the raw response details"]
5495        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5496        #[doc = r" can finalize the request using the"]
5497        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5498        #[doc = r" that resolves to a lower-level [`Response`] value."]
5499        pub struct RequestBuilder {
5500            pub(crate) client: super::super::Client,
5501            pub(crate) organization: String,
5502            pub(crate) project: String,
5503            pub(crate) build_id: i32,
5504            pub(crate) timeline_id: String,
5505            pub(crate) record_id: String,
5506            pub(crate) type_: String,
5507            pub(crate) name: String,
5508        }
5509        impl RequestBuilder {
5510            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5511            #[doc = ""]
5512            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5513            #[doc = "However, this function can provide more flexibility when required."]
5514            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5515                Box::pin({
5516                    let this = self.clone();
5517                    async move {
5518                        let url = this.url()?;
5519                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
5520                        if let Some(auth_header) = this
5521                            .client
5522                            .token_credential()
5523                            .http_authorization_header(&this.client.scopes())
5524                            .await?
5525                        {
5526                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
5527                        }
5528                        let req_body = azure_core::EMPTY_BODY;
5529                        req.set_body(req_body);
5530                        Ok(Response(this.client.send(&mut req).await?))
5531                    }
5532                })
5533            }
5534            fn url(&self) -> azure_core::Result<azure_core::Url> {
5535                let mut url = azure_core::Url::parse(&format!(
5536                    "{}/{}/{}/_apis/build/builds/{}/{}/{}/attachments/{}/{}",
5537                    self.client.endpoint(),
5538                    &self.organization,
5539                    &self.project,
5540                    &self.build_id,
5541                    &self.timeline_id,
5542                    &self.record_id,
5543                    &self.type_,
5544                    &self.name
5545                ))?;
5546                let has_api_version_already = url
5547                    .query_pairs()
5548                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
5549                if !has_api_version_already {
5550                    url.query_pairs_mut()
5551                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
5552                }
5553                Ok(url)
5554            }
5555        }
5556        impl std::future::IntoFuture for RequestBuilder {
5557            type Output = azure_core::Result<String>;
5558            type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
5559            #[doc = "Returns a future that sends the request and returns the parsed response body."]
5560            #[doc = ""]
5561            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5562            #[doc = ""]
5563            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5564            fn into_future(self) -> Self::IntoFuture {
5565                Box::pin(async move { self.send().await?.into_raw_body().await })
5566            }
5567        }
5568    }
5569    pub mod list {
5570        use super::models;
5571        #[cfg(not(target_arch = "wasm32"))]
5572        use futures::future::BoxFuture;
5573        #[cfg(target_arch = "wasm32")]
5574        use futures::future::LocalBoxFuture as BoxFuture;
5575        #[derive(Debug)]
5576        pub struct Response(azure_core::Response);
5577        impl Response {
5578            pub async fn into_raw_body(self) -> azure_core::Result<models::AttachmentList> {
5579                let bytes = self.0.into_raw_body().collect().await?;
5580                let body: models::AttachmentList = serde_json::from_slice(&bytes).map_err(|e| {
5581                    azure_core::error::Error::full(
5582                        azure_core::error::ErrorKind::DataConversion,
5583                        e,
5584                        format!(
5585                            "Failed to deserialize response:\n{}",
5586                            String::from_utf8_lossy(&bytes)
5587                        ),
5588                    )
5589                })?;
5590                Ok(body)
5591            }
5592            pub fn into_raw_response(self) -> azure_core::Response {
5593                self.0
5594            }
5595            pub fn as_raw_response(&self) -> &azure_core::Response {
5596                &self.0
5597            }
5598        }
5599        impl From<Response> for azure_core::Response {
5600            fn from(rsp: Response) -> Self {
5601                rsp.into_raw_response()
5602            }
5603        }
5604        impl AsRef<azure_core::Response> for Response {
5605            fn as_ref(&self) -> &azure_core::Response {
5606                self.as_raw_response()
5607            }
5608        }
5609        #[derive(Clone)]
5610        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5611        #[doc = r""]
5612        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5613        #[doc = r" parameters can be chained."]
5614        #[doc = r""]
5615        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5616        #[doc = r" converts the [`RequestBuilder`] into a future,"]
5617        #[doc = r" executes the request and returns a `Result` with the parsed"]
5618        #[doc = r" response."]
5619        #[doc = r""]
5620        #[doc = r" If you need lower-level access to the raw response details"]
5621        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5622        #[doc = r" can finalize the request using the"]
5623        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5624        #[doc = r" that resolves to a lower-level [`Response`] value."]
5625        pub struct RequestBuilder {
5626            pub(crate) client: super::super::Client,
5627            pub(crate) organization: String,
5628            pub(crate) project: String,
5629            pub(crate) build_id: i32,
5630            pub(crate) type_: String,
5631        }
5632        impl RequestBuilder {
5633            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5634            #[doc = ""]
5635            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5636            #[doc = "However, this function can provide more flexibility when required."]
5637            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5638                Box::pin({
5639                    let this = self.clone();
5640                    async move {
5641                        let url = this.url()?;
5642                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
5643                        if let Some(auth_header) = this
5644                            .client
5645                            .token_credential()
5646                            .http_authorization_header(&this.client.scopes())
5647                            .await?
5648                        {
5649                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
5650                        }
5651                        let req_body = azure_core::EMPTY_BODY;
5652                        req.set_body(req_body);
5653                        Ok(Response(this.client.send(&mut req).await?))
5654                    }
5655                })
5656            }
5657            fn url(&self) -> azure_core::Result<azure_core::Url> {
5658                let mut url = azure_core::Url::parse(&format!(
5659                    "{}/{}/{}/_apis/build/builds/{}/attachments/{}",
5660                    self.client.endpoint(),
5661                    &self.organization,
5662                    &self.project,
5663                    &self.build_id,
5664                    &self.type_
5665                ))?;
5666                let has_api_version_already = url
5667                    .query_pairs()
5668                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
5669                if !has_api_version_already {
5670                    url.query_pairs_mut()
5671                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
5672                }
5673                Ok(url)
5674            }
5675        }
5676        impl std::future::IntoFuture for RequestBuilder {
5677            type Output = azure_core::Result<models::AttachmentList>;
5678            type IntoFuture = BoxFuture<'static, azure_core::Result<models::AttachmentList>>;
5679            #[doc = "Returns a future that sends the request and returns the parsed response body."]
5680            #[doc = ""]
5681            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5682            #[doc = ""]
5683            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5684            fn into_future(self) -> Self::IntoFuture {
5685                Box::pin(async move { self.send().await?.into_raw_body().await })
5686            }
5687        }
5688    }
5689}
5690pub mod properties {
5691    use super::models;
5692    #[cfg(not(target_arch = "wasm32"))]
5693    use futures::future::BoxFuture;
5694    #[cfg(target_arch = "wasm32")]
5695    use futures::future::LocalBoxFuture as BoxFuture;
5696    pub struct Client(pub(crate) super::Client);
5697    impl Client {
5698        #[doc = "Gets properties for a build."]
5699        #[doc = ""]
5700        #[doc = "Arguments:"]
5701        #[doc = "* `organization`: The name of the Azure DevOps organization."]
5702        #[doc = "* `project`: Project ID or project name"]
5703        #[doc = "* `build_id`: The ID of the build."]
5704        pub fn get_build_properties(
5705            &self,
5706            organization: impl Into<String>,
5707            project: impl Into<String>,
5708            build_id: i32,
5709        ) -> get_build_properties::RequestBuilder {
5710            get_build_properties::RequestBuilder {
5711                client: self.0.clone(),
5712                organization: organization.into(),
5713                project: project.into(),
5714                build_id,
5715                filter: None,
5716            }
5717        }
5718        #[doc = "Updates properties for a build."]
5719        #[doc = ""]
5720        #[doc = "Arguments:"]
5721        #[doc = "* `organization`: The name of the Azure DevOps organization."]
5722        #[doc = "* `body`: A json-patch document describing the properties to update."]
5723        #[doc = "* `project`: Project ID or project name"]
5724        #[doc = "* `build_id`: The ID of the build."]
5725        pub fn update_build_properties(
5726            &self,
5727            organization: impl Into<String>,
5728            body: impl Into<models::JsonPatchDocument>,
5729            project: impl Into<String>,
5730            build_id: i32,
5731        ) -> update_build_properties::RequestBuilder {
5732            update_build_properties::RequestBuilder {
5733                client: self.0.clone(),
5734                organization: organization.into(),
5735                body: body.into(),
5736                project: project.into(),
5737                build_id,
5738            }
5739        }
5740        #[doc = "Gets properties for a definition."]
5741        #[doc = ""]
5742        #[doc = "Arguments:"]
5743        #[doc = "* `organization`: The name of the Azure DevOps organization."]
5744        #[doc = "* `project`: Project ID or project name"]
5745        #[doc = "* `definition_id`: The ID of the definition."]
5746        pub fn get_definition_properties(
5747            &self,
5748            organization: impl Into<String>,
5749            project: impl Into<String>,
5750            definition_id: i32,
5751        ) -> get_definition_properties::RequestBuilder {
5752            get_definition_properties::RequestBuilder {
5753                client: self.0.clone(),
5754                organization: organization.into(),
5755                project: project.into(),
5756                definition_id,
5757                filter: None,
5758            }
5759        }
5760        #[doc = "Updates properties for a definition."]
5761        #[doc = ""]
5762        #[doc = "Arguments:"]
5763        #[doc = "* `organization`: The name of the Azure DevOps organization."]
5764        #[doc = "* `body`: A json-patch document describing the properties to update."]
5765        #[doc = "* `project`: Project ID or project name"]
5766        #[doc = "* `definition_id`: The ID of the definition."]
5767        pub fn update_definition_properties(
5768            &self,
5769            organization: impl Into<String>,
5770            body: impl Into<models::JsonPatchDocument>,
5771            project: impl Into<String>,
5772            definition_id: i32,
5773        ) -> update_definition_properties::RequestBuilder {
5774            update_definition_properties::RequestBuilder {
5775                client: self.0.clone(),
5776                organization: organization.into(),
5777                body: body.into(),
5778                project: project.into(),
5779                definition_id,
5780            }
5781        }
5782    }
5783    pub mod get_build_properties {
5784        use super::models;
5785        #[cfg(not(target_arch = "wasm32"))]
5786        use futures::future::BoxFuture;
5787        #[cfg(target_arch = "wasm32")]
5788        use futures::future::LocalBoxFuture as BoxFuture;
5789        #[derive(Debug)]
5790        pub struct Response(azure_core::Response);
5791        impl Response {
5792            pub async fn into_raw_body(self) -> azure_core::Result<models::PropertiesCollection> {
5793                let bytes = self.0.into_raw_body().collect().await?;
5794                let body: models::PropertiesCollection =
5795                    serde_json::from_slice(&bytes).map_err(|e| {
5796                        azure_core::error::Error::full(
5797                            azure_core::error::ErrorKind::DataConversion,
5798                            e,
5799                            format!(
5800                                "Failed to deserialize response:\n{}",
5801                                String::from_utf8_lossy(&bytes)
5802                            ),
5803                        )
5804                    })?;
5805                Ok(body)
5806            }
5807            pub fn into_raw_response(self) -> azure_core::Response {
5808                self.0
5809            }
5810            pub fn as_raw_response(&self) -> &azure_core::Response {
5811                &self.0
5812            }
5813        }
5814        impl From<Response> for azure_core::Response {
5815            fn from(rsp: Response) -> Self {
5816                rsp.into_raw_response()
5817            }
5818        }
5819        impl AsRef<azure_core::Response> for Response {
5820            fn as_ref(&self) -> &azure_core::Response {
5821                self.as_raw_response()
5822            }
5823        }
5824        #[derive(Clone)]
5825        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5826        #[doc = r""]
5827        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5828        #[doc = r" parameters can be chained."]
5829        #[doc = r""]
5830        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5831        #[doc = r" converts the [`RequestBuilder`] into a future,"]
5832        #[doc = r" executes the request and returns a `Result` with the parsed"]
5833        #[doc = r" response."]
5834        #[doc = r""]
5835        #[doc = r" If you need lower-level access to the raw response details"]
5836        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5837        #[doc = r" can finalize the request using the"]
5838        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5839        #[doc = r" that resolves to a lower-level [`Response`] value."]
5840        pub struct RequestBuilder {
5841            pub(crate) client: super::super::Client,
5842            pub(crate) organization: String,
5843            pub(crate) project: String,
5844            pub(crate) build_id: i32,
5845            pub(crate) filter: Option<String>,
5846        }
5847        impl RequestBuilder {
5848            #[doc = "A comma-delimited list of properties. If specified, filters to these specific properties."]
5849            pub fn filter(mut self, filter: impl Into<String>) -> Self {
5850                self.filter = Some(filter.into());
5851                self
5852            }
5853            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5854            #[doc = ""]
5855            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5856            #[doc = "However, this function can provide more flexibility when required."]
5857            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5858                Box::pin({
5859                    let this = self.clone();
5860                    async move {
5861                        let url = this.url()?;
5862                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
5863                        if let Some(auth_header) = this
5864                            .client
5865                            .token_credential()
5866                            .http_authorization_header(&this.client.scopes())
5867                            .await?
5868                        {
5869                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
5870                        }
5871                        if let Some(filter) = &this.filter {
5872                            req.url_mut()
5873                                .query_pairs_mut()
5874                                .append_pair("filter", filter);
5875                        }
5876                        let req_body = azure_core::EMPTY_BODY;
5877                        req.set_body(req_body);
5878                        Ok(Response(this.client.send(&mut req).await?))
5879                    }
5880                })
5881            }
5882            fn url(&self) -> azure_core::Result<azure_core::Url> {
5883                let mut url = azure_core::Url::parse(&format!(
5884                    "{}/{}/{}/_apis/build/builds/{}/properties",
5885                    self.client.endpoint(),
5886                    &self.organization,
5887                    &self.project,
5888                    &self.build_id
5889                ))?;
5890                let has_api_version_already = url
5891                    .query_pairs()
5892                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
5893                if !has_api_version_already {
5894                    url.query_pairs_mut()
5895                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
5896                }
5897                Ok(url)
5898            }
5899        }
5900        impl std::future::IntoFuture for RequestBuilder {
5901            type Output = azure_core::Result<models::PropertiesCollection>;
5902            type IntoFuture = BoxFuture<'static, azure_core::Result<models::PropertiesCollection>>;
5903            #[doc = "Returns a future that sends the request and returns the parsed response body."]
5904            #[doc = ""]
5905            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5906            #[doc = ""]
5907            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5908            fn into_future(self) -> Self::IntoFuture {
5909                Box::pin(async move { self.send().await?.into_raw_body().await })
5910            }
5911        }
5912    }
5913    pub mod update_build_properties {
5914        use super::models;
5915        #[cfg(not(target_arch = "wasm32"))]
5916        use futures::future::BoxFuture;
5917        #[cfg(target_arch = "wasm32")]
5918        use futures::future::LocalBoxFuture as BoxFuture;
5919        #[derive(Debug)]
5920        pub struct Response(azure_core::Response);
5921        impl Response {
5922            pub async fn into_raw_body(self) -> azure_core::Result<models::PropertiesCollection> {
5923                let bytes = self.0.into_raw_body().collect().await?;
5924                let body: models::PropertiesCollection =
5925                    serde_json::from_slice(&bytes).map_err(|e| {
5926                        azure_core::error::Error::full(
5927                            azure_core::error::ErrorKind::DataConversion,
5928                            e,
5929                            format!(
5930                                "Failed to deserialize response:\n{}",
5931                                String::from_utf8_lossy(&bytes)
5932                            ),
5933                        )
5934                    })?;
5935                Ok(body)
5936            }
5937            pub fn into_raw_response(self) -> azure_core::Response {
5938                self.0
5939            }
5940            pub fn as_raw_response(&self) -> &azure_core::Response {
5941                &self.0
5942            }
5943        }
5944        impl From<Response> for azure_core::Response {
5945            fn from(rsp: Response) -> Self {
5946                rsp.into_raw_response()
5947            }
5948        }
5949        impl AsRef<azure_core::Response> for Response {
5950            fn as_ref(&self) -> &azure_core::Response {
5951                self.as_raw_response()
5952            }
5953        }
5954        #[derive(Clone)]
5955        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5956        #[doc = r""]
5957        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5958        #[doc = r" parameters can be chained."]
5959        #[doc = r""]
5960        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5961        #[doc = r" converts the [`RequestBuilder`] into a future,"]
5962        #[doc = r" executes the request and returns a `Result` with the parsed"]
5963        #[doc = r" response."]
5964        #[doc = r""]
5965        #[doc = r" If you need lower-level access to the raw response details"]
5966        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5967        #[doc = r" can finalize the request using the"]
5968        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5969        #[doc = r" that resolves to a lower-level [`Response`] value."]
5970        pub struct RequestBuilder {
5971            pub(crate) client: super::super::Client,
5972            pub(crate) organization: String,
5973            pub(crate) body: models::JsonPatchDocument,
5974            pub(crate) project: String,
5975            pub(crate) build_id: i32,
5976        }
5977        impl RequestBuilder {
5978            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5979            #[doc = ""]
5980            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5981            #[doc = "However, this function can provide more flexibility when required."]
5982            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5983                Box::pin({
5984                    let this = self.clone();
5985                    async move {
5986                        let url = this.url()?;
5987                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
5988                        if let Some(auth_header) = this
5989                            .client
5990                            .token_credential()
5991                            .http_authorization_header(&this.client.scopes())
5992                            .await?
5993                        {
5994                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
5995                        }
5996                        req.insert_header("content-type", "application/json-patch+json");
5997                        let req_body = azure_core::json::to_json(&this.body)?;
5998                        req.set_body(req_body);
5999                        Ok(Response(this.client.send(&mut req).await?))
6000                    }
6001                })
6002            }
6003            fn url(&self) -> azure_core::Result<azure_core::Url> {
6004                let mut url = azure_core::Url::parse(&format!(
6005                    "{}/{}/{}/_apis/build/builds/{}/properties",
6006                    self.client.endpoint(),
6007                    &self.organization,
6008                    &self.project,
6009                    &self.build_id
6010                ))?;
6011                let has_api_version_already = url
6012                    .query_pairs()
6013                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
6014                if !has_api_version_already {
6015                    url.query_pairs_mut()
6016                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
6017                }
6018                Ok(url)
6019            }
6020        }
6021        impl std::future::IntoFuture for RequestBuilder {
6022            type Output = azure_core::Result<models::PropertiesCollection>;
6023            type IntoFuture = BoxFuture<'static, azure_core::Result<models::PropertiesCollection>>;
6024            #[doc = "Returns a future that sends the request and returns the parsed response body."]
6025            #[doc = ""]
6026            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6027            #[doc = ""]
6028            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6029            fn into_future(self) -> Self::IntoFuture {
6030                Box::pin(async move { self.send().await?.into_raw_body().await })
6031            }
6032        }
6033    }
6034    pub mod get_definition_properties {
6035        use super::models;
6036        #[cfg(not(target_arch = "wasm32"))]
6037        use futures::future::BoxFuture;
6038        #[cfg(target_arch = "wasm32")]
6039        use futures::future::LocalBoxFuture as BoxFuture;
6040        #[derive(Debug)]
6041        pub struct Response(azure_core::Response);
6042        impl Response {
6043            pub async fn into_raw_body(self) -> azure_core::Result<models::PropertiesCollection> {
6044                let bytes = self.0.into_raw_body().collect().await?;
6045                let body: models::PropertiesCollection =
6046                    serde_json::from_slice(&bytes).map_err(|e| {
6047                        azure_core::error::Error::full(
6048                            azure_core::error::ErrorKind::DataConversion,
6049                            e,
6050                            format!(
6051                                "Failed to deserialize response:\n{}",
6052                                String::from_utf8_lossy(&bytes)
6053                            ),
6054                        )
6055                    })?;
6056                Ok(body)
6057            }
6058            pub fn into_raw_response(self) -> azure_core::Response {
6059                self.0
6060            }
6061            pub fn as_raw_response(&self) -> &azure_core::Response {
6062                &self.0
6063            }
6064        }
6065        impl From<Response> for azure_core::Response {
6066            fn from(rsp: Response) -> Self {
6067                rsp.into_raw_response()
6068            }
6069        }
6070        impl AsRef<azure_core::Response> for Response {
6071            fn as_ref(&self) -> &azure_core::Response {
6072                self.as_raw_response()
6073            }
6074        }
6075        #[derive(Clone)]
6076        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6077        #[doc = r""]
6078        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6079        #[doc = r" parameters can be chained."]
6080        #[doc = r""]
6081        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6082        #[doc = r" converts the [`RequestBuilder`] into a future,"]
6083        #[doc = r" executes the request and returns a `Result` with the parsed"]
6084        #[doc = r" response."]
6085        #[doc = r""]
6086        #[doc = r" If you need lower-level access to the raw response details"]
6087        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6088        #[doc = r" can finalize the request using the"]
6089        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6090        #[doc = r" that resolves to a lower-level [`Response`] value."]
6091        pub struct RequestBuilder {
6092            pub(crate) client: super::super::Client,
6093            pub(crate) organization: String,
6094            pub(crate) project: String,
6095            pub(crate) definition_id: i32,
6096            pub(crate) filter: Option<String>,
6097        }
6098        impl RequestBuilder {
6099            #[doc = "A comma-delimited list of properties. If specified, filters to these specific properties."]
6100            pub fn filter(mut self, filter: impl Into<String>) -> Self {
6101                self.filter = Some(filter.into());
6102                self
6103            }
6104            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6105            #[doc = ""]
6106            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6107            #[doc = "However, this function can provide more flexibility when required."]
6108            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6109                Box::pin({
6110                    let this = self.clone();
6111                    async move {
6112                        let url = this.url()?;
6113                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
6114                        if let Some(auth_header) = this
6115                            .client
6116                            .token_credential()
6117                            .http_authorization_header(&this.client.scopes())
6118                            .await?
6119                        {
6120                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
6121                        }
6122                        if let Some(filter) = &this.filter {
6123                            req.url_mut()
6124                                .query_pairs_mut()
6125                                .append_pair("filter", filter);
6126                        }
6127                        let req_body = azure_core::EMPTY_BODY;
6128                        req.set_body(req_body);
6129                        Ok(Response(this.client.send(&mut req).await?))
6130                    }
6131                })
6132            }
6133            fn url(&self) -> azure_core::Result<azure_core::Url> {
6134                let mut url = azure_core::Url::parse(&format!(
6135                    "{}/{}/{}/_apis/build/definitions/{}/properties",
6136                    self.client.endpoint(),
6137                    &self.organization,
6138                    &self.project,
6139                    &self.definition_id
6140                ))?;
6141                let has_api_version_already = url
6142                    .query_pairs()
6143                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
6144                if !has_api_version_already {
6145                    url.query_pairs_mut()
6146                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
6147                }
6148                Ok(url)
6149            }
6150        }
6151        impl std::future::IntoFuture for RequestBuilder {
6152            type Output = azure_core::Result<models::PropertiesCollection>;
6153            type IntoFuture = BoxFuture<'static, azure_core::Result<models::PropertiesCollection>>;
6154            #[doc = "Returns a future that sends the request and returns the parsed response body."]
6155            #[doc = ""]
6156            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6157            #[doc = ""]
6158            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6159            fn into_future(self) -> Self::IntoFuture {
6160                Box::pin(async move { self.send().await?.into_raw_body().await })
6161            }
6162        }
6163    }
6164    pub mod update_definition_properties {
6165        use super::models;
6166        #[cfg(not(target_arch = "wasm32"))]
6167        use futures::future::BoxFuture;
6168        #[cfg(target_arch = "wasm32")]
6169        use futures::future::LocalBoxFuture as BoxFuture;
6170        #[derive(Debug)]
6171        pub struct Response(azure_core::Response);
6172        impl Response {
6173            pub async fn into_raw_body(self) -> azure_core::Result<models::PropertiesCollection> {
6174                let bytes = self.0.into_raw_body().collect().await?;
6175                let body: models::PropertiesCollection =
6176                    serde_json::from_slice(&bytes).map_err(|e| {
6177                        azure_core::error::Error::full(
6178                            azure_core::error::ErrorKind::DataConversion,
6179                            e,
6180                            format!(
6181                                "Failed to deserialize response:\n{}",
6182                                String::from_utf8_lossy(&bytes)
6183                            ),
6184                        )
6185                    })?;
6186                Ok(body)
6187            }
6188            pub fn into_raw_response(self) -> azure_core::Response {
6189                self.0
6190            }
6191            pub fn as_raw_response(&self) -> &azure_core::Response {
6192                &self.0
6193            }
6194        }
6195        impl From<Response> for azure_core::Response {
6196            fn from(rsp: Response) -> Self {
6197                rsp.into_raw_response()
6198            }
6199        }
6200        impl AsRef<azure_core::Response> for Response {
6201            fn as_ref(&self) -> &azure_core::Response {
6202                self.as_raw_response()
6203            }
6204        }
6205        #[derive(Clone)]
6206        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6207        #[doc = r""]
6208        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6209        #[doc = r" parameters can be chained."]
6210        #[doc = r""]
6211        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6212        #[doc = r" converts the [`RequestBuilder`] into a future,"]
6213        #[doc = r" executes the request and returns a `Result` with the parsed"]
6214        #[doc = r" response."]
6215        #[doc = r""]
6216        #[doc = r" If you need lower-level access to the raw response details"]
6217        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6218        #[doc = r" can finalize the request using the"]
6219        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6220        #[doc = r" that resolves to a lower-level [`Response`] value."]
6221        pub struct RequestBuilder {
6222            pub(crate) client: super::super::Client,
6223            pub(crate) organization: String,
6224            pub(crate) body: models::JsonPatchDocument,
6225            pub(crate) project: String,
6226            pub(crate) definition_id: i32,
6227        }
6228        impl RequestBuilder {
6229            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6230            #[doc = ""]
6231            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6232            #[doc = "However, this function can provide more flexibility when required."]
6233            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6234                Box::pin({
6235                    let this = self.clone();
6236                    async move {
6237                        let url = this.url()?;
6238                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
6239                        if let Some(auth_header) = this
6240                            .client
6241                            .token_credential()
6242                            .http_authorization_header(&this.client.scopes())
6243                            .await?
6244                        {
6245                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
6246                        }
6247                        req.insert_header("content-type", "application/json-patch+json");
6248                        let req_body = azure_core::json::to_json(&this.body)?;
6249                        req.set_body(req_body);
6250                        Ok(Response(this.client.send(&mut req).await?))
6251                    }
6252                })
6253            }
6254            fn url(&self) -> azure_core::Result<azure_core::Url> {
6255                let mut url = azure_core::Url::parse(&format!(
6256                    "{}/{}/{}/_apis/build/definitions/{}/properties",
6257                    self.client.endpoint(),
6258                    &self.organization,
6259                    &self.project,
6260                    &self.definition_id
6261                ))?;
6262                let has_api_version_already = url
6263                    .query_pairs()
6264                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
6265                if !has_api_version_already {
6266                    url.query_pairs_mut()
6267                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
6268                }
6269                Ok(url)
6270            }
6271        }
6272        impl std::future::IntoFuture for RequestBuilder {
6273            type Output = azure_core::Result<models::PropertiesCollection>;
6274            type IntoFuture = BoxFuture<'static, azure_core::Result<models::PropertiesCollection>>;
6275            #[doc = "Returns a future that sends the request and returns the parsed response body."]
6276            #[doc = ""]
6277            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6278            #[doc = ""]
6279            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6280            fn into_future(self) -> Self::IntoFuture {
6281                Box::pin(async move { self.send().await?.into_raw_body().await })
6282            }
6283        }
6284    }
6285}
6286pub mod report {
6287    use super::models;
6288    #[cfg(not(target_arch = "wasm32"))]
6289    use futures::future::BoxFuture;
6290    #[cfg(target_arch = "wasm32")]
6291    use futures::future::LocalBoxFuture as BoxFuture;
6292    pub struct Client(pub(crate) super::Client);
6293    impl Client {
6294        #[doc = "Gets a build report."]
6295        #[doc = ""]
6296        #[doc = "Arguments:"]
6297        #[doc = "* `organization`: The name of the Azure DevOps organization."]
6298        #[doc = "* `project`: Project ID or project name"]
6299        #[doc = "* `build_id`: The ID of the build."]
6300        pub fn get(
6301            &self,
6302            organization: impl Into<String>,
6303            project: impl Into<String>,
6304            build_id: i32,
6305        ) -> get::RequestBuilder {
6306            get::RequestBuilder {
6307                client: self.0.clone(),
6308                organization: organization.into(),
6309                project: project.into(),
6310                build_id,
6311                type_: None,
6312            }
6313        }
6314    }
6315    pub mod get {
6316        use super::models;
6317        #[cfg(not(target_arch = "wasm32"))]
6318        use futures::future::BoxFuture;
6319        #[cfg(target_arch = "wasm32")]
6320        use futures::future::LocalBoxFuture as BoxFuture;
6321        #[derive(Debug)]
6322        pub struct Response(azure_core::Response);
6323        impl Response {
6324            pub async fn into_raw_body(self) -> azure_core::Result<models::BuildReportMetadata> {
6325                let bytes = self.0.into_raw_body().collect().await?;
6326                let body: models::BuildReportMetadata =
6327                    serde_json::from_slice(&bytes).map_err(|e| {
6328                        azure_core::error::Error::full(
6329                            azure_core::error::ErrorKind::DataConversion,
6330                            e,
6331                            format!(
6332                                "Failed to deserialize response:\n{}",
6333                                String::from_utf8_lossy(&bytes)
6334                            ),
6335                        )
6336                    })?;
6337                Ok(body)
6338            }
6339            pub fn into_raw_response(self) -> azure_core::Response {
6340                self.0
6341            }
6342            pub fn as_raw_response(&self) -> &azure_core::Response {
6343                &self.0
6344            }
6345        }
6346        impl From<Response> for azure_core::Response {
6347            fn from(rsp: Response) -> Self {
6348                rsp.into_raw_response()
6349            }
6350        }
6351        impl AsRef<azure_core::Response> for Response {
6352            fn as_ref(&self) -> &azure_core::Response {
6353                self.as_raw_response()
6354            }
6355        }
6356        #[derive(Clone)]
6357        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6358        #[doc = r""]
6359        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6360        #[doc = r" parameters can be chained."]
6361        #[doc = r""]
6362        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6363        #[doc = r" converts the [`RequestBuilder`] into a future,"]
6364        #[doc = r" executes the request and returns a `Result` with the parsed"]
6365        #[doc = r" response."]
6366        #[doc = r""]
6367        #[doc = r" If you need lower-level access to the raw response details"]
6368        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6369        #[doc = r" can finalize the request using the"]
6370        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6371        #[doc = r" that resolves to a lower-level [`Response`] value."]
6372        pub struct RequestBuilder {
6373            pub(crate) client: super::super::Client,
6374            pub(crate) organization: String,
6375            pub(crate) project: String,
6376            pub(crate) build_id: i32,
6377            pub(crate) type_: Option<String>,
6378        }
6379        impl RequestBuilder {
6380            pub fn type_(mut self, type_: impl Into<String>) -> Self {
6381                self.type_ = Some(type_.into());
6382                self
6383            }
6384            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6385            #[doc = ""]
6386            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6387            #[doc = "However, this function can provide more flexibility when required."]
6388            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6389                Box::pin({
6390                    let this = self.clone();
6391                    async move {
6392                        let url = this.url()?;
6393                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
6394                        if let Some(auth_header) = this
6395                            .client
6396                            .token_credential()
6397                            .http_authorization_header(&this.client.scopes())
6398                            .await?
6399                        {
6400                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
6401                        }
6402                        if let Some(type_) = &this.type_ {
6403                            req.url_mut().query_pairs_mut().append_pair("type", type_);
6404                        }
6405                        let req_body = azure_core::EMPTY_BODY;
6406                        req.set_body(req_body);
6407                        Ok(Response(this.client.send(&mut req).await?))
6408                    }
6409                })
6410            }
6411            fn url(&self) -> azure_core::Result<azure_core::Url> {
6412                let mut url = azure_core::Url::parse(&format!(
6413                    "{}/{}/{}/_apis/build/builds/{}/report",
6414                    self.client.endpoint(),
6415                    &self.organization,
6416                    &self.project,
6417                    &self.build_id
6418                ))?;
6419                let has_api_version_already = url
6420                    .query_pairs()
6421                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
6422                if !has_api_version_already {
6423                    url.query_pairs_mut()
6424                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
6425                }
6426                Ok(url)
6427            }
6428        }
6429        impl std::future::IntoFuture for RequestBuilder {
6430            type Output = azure_core::Result<models::BuildReportMetadata>;
6431            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildReportMetadata>>;
6432            #[doc = "Returns a future that sends the request and returns the parsed response body."]
6433            #[doc = ""]
6434            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6435            #[doc = ""]
6436            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6437            fn into_future(self) -> Self::IntoFuture {
6438                Box::pin(async move { self.send().await?.into_raw_body().await })
6439            }
6440        }
6441    }
6442}
6443pub mod stages {
6444    use super::models;
6445    #[cfg(not(target_arch = "wasm32"))]
6446    use futures::future::BoxFuture;
6447    #[cfg(target_arch = "wasm32")]
6448    use futures::future::LocalBoxFuture as BoxFuture;
6449    pub struct Client(pub(crate) super::Client);
6450    impl Client {
6451        #[doc = "Update a build stage"]
6452        #[doc = ""]
6453        #[doc = "Arguments:"]
6454        #[doc = "* `organization`: The name of the Azure DevOps organization."]
6455        #[doc = "* `project`: Project ID or project name"]
6456        pub fn update(
6457            &self,
6458            organization: impl Into<String>,
6459            body: impl Into<models::UpdateStageParameters>,
6460            build_id: i32,
6461            stage_ref_name: impl Into<String>,
6462            project: impl Into<String>,
6463        ) -> update::RequestBuilder {
6464            update::RequestBuilder {
6465                client: self.0.clone(),
6466                organization: organization.into(),
6467                body: body.into(),
6468                build_id,
6469                stage_ref_name: stage_ref_name.into(),
6470                project: project.into(),
6471            }
6472        }
6473    }
6474    pub mod update {
6475        use super::models;
6476        #[cfg(not(target_arch = "wasm32"))]
6477        use futures::future::BoxFuture;
6478        #[cfg(target_arch = "wasm32")]
6479        use futures::future::LocalBoxFuture as BoxFuture;
6480        #[derive(Debug)]
6481        pub struct Response(azure_core::Response);
6482        impl Response {
6483            pub fn into_raw_response(self) -> azure_core::Response {
6484                self.0
6485            }
6486            pub fn as_raw_response(&self) -> &azure_core::Response {
6487                &self.0
6488            }
6489        }
6490        impl From<Response> for azure_core::Response {
6491            fn from(rsp: Response) -> Self {
6492                rsp.into_raw_response()
6493            }
6494        }
6495        impl AsRef<azure_core::Response> for Response {
6496            fn as_ref(&self) -> &azure_core::Response {
6497                self.as_raw_response()
6498            }
6499        }
6500        #[derive(Clone)]
6501        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6502        #[doc = r""]
6503        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6504        #[doc = r" parameters can be chained."]
6505        #[doc = r""]
6506        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6507        #[doc = r" converts the [`RequestBuilder`] into a future,"]
6508        #[doc = r" executes the request and returns a `Result` with the parsed"]
6509        #[doc = r" response."]
6510        #[doc = r""]
6511        #[doc = r" If you need lower-level access to the raw response details"]
6512        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6513        #[doc = r" can finalize the request using the"]
6514        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6515        #[doc = r" that resolves to a lower-level [`Response`] value."]
6516        pub struct RequestBuilder {
6517            pub(crate) client: super::super::Client,
6518            pub(crate) organization: String,
6519            pub(crate) body: models::UpdateStageParameters,
6520            pub(crate) build_id: i32,
6521            pub(crate) stage_ref_name: String,
6522            pub(crate) project: String,
6523        }
6524        impl RequestBuilder {
6525            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6526            #[doc = ""]
6527            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6528            #[doc = "However, this function can provide more flexibility when required."]
6529            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6530                Box::pin({
6531                    let this = self.clone();
6532                    async move {
6533                        let url = this.url()?;
6534                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
6535                        if let Some(auth_header) = this
6536                            .client
6537                            .token_credential()
6538                            .http_authorization_header(&this.client.scopes())
6539                            .await?
6540                        {
6541                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
6542                        }
6543                        req.insert_header("content-type", "application/json");
6544                        let req_body = azure_core::json::to_json(&this.body)?;
6545                        req.set_body(req_body);
6546                        Ok(Response(this.client.send(&mut req).await?))
6547                    }
6548                })
6549            }
6550            fn url(&self) -> azure_core::Result<azure_core::Url> {
6551                let mut url = azure_core::Url::parse(&format!(
6552                    "{}/{}/{}/_apis/build/builds/{}/stages/{}",
6553                    self.client.endpoint(),
6554                    &self.organization,
6555                    &self.project,
6556                    &self.build_id,
6557                    &self.stage_ref_name
6558                ))?;
6559                let has_api_version_already = url
6560                    .query_pairs()
6561                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
6562                if !has_api_version_already {
6563                    url.query_pairs_mut()
6564                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
6565                }
6566                Ok(url)
6567            }
6568        }
6569        impl std::future::IntoFuture for RequestBuilder {
6570            type Output = azure_core::Result<()>;
6571            type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
6572            #[doc = "Returns a future that sends the request and waits for the response."]
6573            #[doc = ""]
6574            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6575            #[doc = ""]
6576            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6577            fn into_future(self) -> Self::IntoFuture {
6578                Box::pin(async move {
6579                    let _rsp = self.send().await?;
6580                    Ok(())
6581                })
6582            }
6583        }
6584    }
6585}
6586pub mod tags {
6587    use super::models;
6588    #[cfg(not(target_arch = "wasm32"))]
6589    use futures::future::BoxFuture;
6590    #[cfg(target_arch = "wasm32")]
6591    use futures::future::LocalBoxFuture as BoxFuture;
6592    pub struct Client(pub(crate) super::Client);
6593    impl Client {
6594        #[doc = "Gets the tags for a build."]
6595        #[doc = ""]
6596        #[doc = "Arguments:"]
6597        #[doc = "* `organization`: The name of the Azure DevOps organization."]
6598        #[doc = "* `project`: Project ID or project name"]
6599        #[doc = "* `build_id`: The ID of the build."]
6600        pub fn get_build_tags(
6601            &self,
6602            organization: impl Into<String>,
6603            project: impl Into<String>,
6604            build_id: i32,
6605        ) -> get_build_tags::RequestBuilder {
6606            get_build_tags::RequestBuilder {
6607                client: self.0.clone(),
6608                organization: organization.into(),
6609                project: project.into(),
6610                build_id,
6611            }
6612        }
6613        #[doc = "Adds tags to a build."]
6614        #[doc = ""]
6615        #[doc = "Arguments:"]
6616        #[doc = "* `organization`: The name of the Azure DevOps organization."]
6617        #[doc = "* `body`: The tags to add. Request body is composed directly from listed tags."]
6618        #[doc = "* `project`: Project ID or project name"]
6619        #[doc = "* `build_id`: The ID of the build."]
6620        pub fn add_build_tags(
6621            &self,
6622            organization: impl Into<String>,
6623            body: Vec<String>,
6624            project: impl Into<String>,
6625            build_id: i32,
6626        ) -> add_build_tags::RequestBuilder {
6627            add_build_tags::RequestBuilder {
6628                client: self.0.clone(),
6629                organization: organization.into(),
6630                body,
6631                project: project.into(),
6632                build_id,
6633            }
6634        }
6635        #[doc = "Adds/Removes tags from a build."]
6636        #[doc = ""]
6637        #[doc = "Arguments:"]
6638        #[doc = "* `organization`: The name of the Azure DevOps organization."]
6639        #[doc = "* `body`: The tags to add/remove."]
6640        #[doc = "* `project`: Project ID or project name"]
6641        #[doc = "* `build_id`: The ID of the build."]
6642        pub fn update_build_tags(
6643            &self,
6644            organization: impl Into<String>,
6645            body: impl Into<models::UpdateTagParameters>,
6646            project: impl Into<String>,
6647            build_id: i32,
6648        ) -> update_build_tags::RequestBuilder {
6649            update_build_tags::RequestBuilder {
6650                client: self.0.clone(),
6651                organization: organization.into(),
6652                body: body.into(),
6653                project: project.into(),
6654                build_id,
6655            }
6656        }
6657        #[doc = "Adds a tag to a build."]
6658        #[doc = ""]
6659        #[doc = "Arguments:"]
6660        #[doc = "* `organization`: The name of the Azure DevOps organization."]
6661        #[doc = "* `project`: Project ID or project name"]
6662        #[doc = "* `build_id`: The ID of the build."]
6663        #[doc = "* `tag`: The tag to add."]
6664        pub fn add_build_tag(
6665            &self,
6666            organization: impl Into<String>,
6667            project: impl Into<String>,
6668            build_id: i32,
6669            tag: impl Into<String>,
6670        ) -> add_build_tag::RequestBuilder {
6671            add_build_tag::RequestBuilder {
6672                client: self.0.clone(),
6673                organization: organization.into(),
6674                project: project.into(),
6675                build_id,
6676                tag: tag.into(),
6677            }
6678        }
6679        #[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+)"]
6680        #[doc = ""]
6681        #[doc = "Arguments:"]
6682        #[doc = "* `organization`: The name of the Azure DevOps organization."]
6683        #[doc = "* `project`: Project ID or project name"]
6684        #[doc = "* `build_id`: The ID of the build."]
6685        #[doc = "* `tag`: The tag to remove."]
6686        pub fn delete_build_tag(
6687            &self,
6688            organization: impl Into<String>,
6689            project: impl Into<String>,
6690            build_id: i32,
6691            tag: impl Into<String>,
6692        ) -> delete_build_tag::RequestBuilder {
6693            delete_build_tag::RequestBuilder {
6694                client: self.0.clone(),
6695                organization: organization.into(),
6696                project: project.into(),
6697                build_id,
6698                tag: tag.into(),
6699            }
6700        }
6701        #[doc = "Gets the tags for a definition."]
6702        #[doc = ""]
6703        #[doc = "Arguments:"]
6704        #[doc = "* `organization`: The name of the Azure DevOps organization."]
6705        #[doc = "* `project`: Project ID or project name"]
6706        #[doc = "* `definition_id`: The ID of the definition."]
6707        pub fn get_definition_tags(
6708            &self,
6709            organization: impl Into<String>,
6710            project: impl Into<String>,
6711            definition_id: i32,
6712        ) -> get_definition_tags::RequestBuilder {
6713            get_definition_tags::RequestBuilder {
6714                client: self.0.clone(),
6715                organization: organization.into(),
6716                project: project.into(),
6717                definition_id,
6718                revision: None,
6719            }
6720        }
6721        #[doc = "Adds multiple tags to a definition."]
6722        #[doc = ""]
6723        #[doc = "Arguments:"]
6724        #[doc = "* `organization`: The name of the Azure DevOps organization."]
6725        #[doc = "* `body`: The tags to add."]
6726        #[doc = "* `project`: Project ID or project name"]
6727        #[doc = "* `definition_id`: The ID of the definition."]
6728        pub fn add_definition_tags(
6729            &self,
6730            organization: impl Into<String>,
6731            body: Vec<String>,
6732            project: impl Into<String>,
6733            definition_id: i32,
6734        ) -> add_definition_tags::RequestBuilder {
6735            add_definition_tags::RequestBuilder {
6736                client: self.0.clone(),
6737                organization: organization.into(),
6738                body,
6739                project: project.into(),
6740                definition_id,
6741            }
6742        }
6743        #[doc = "Adds/Removes tags from a definition."]
6744        #[doc = ""]
6745        #[doc = "Arguments:"]
6746        #[doc = "* `organization`: The name of the Azure DevOps organization."]
6747        #[doc = "* `body`: The tags to add/remove."]
6748        #[doc = "* `project`: Project ID or project name"]
6749        #[doc = "* `definition_id`: The ID of the definition."]
6750        pub fn update_definition_tags(
6751            &self,
6752            organization: impl Into<String>,
6753            body: impl Into<models::UpdateTagParameters>,
6754            project: impl Into<String>,
6755            definition_id: i32,
6756        ) -> update_definition_tags::RequestBuilder {
6757            update_definition_tags::RequestBuilder {
6758                client: self.0.clone(),
6759                organization: organization.into(),
6760                body: body.into(),
6761                project: project.into(),
6762                definition_id,
6763            }
6764        }
6765        #[doc = "Adds a tag to a definition"]
6766        #[doc = ""]
6767        #[doc = "Arguments:"]
6768        #[doc = "* `organization`: The name of the Azure DevOps organization."]
6769        #[doc = "* `project`: Project ID or project name"]
6770        #[doc = "* `definition_id`: The ID of the definition."]
6771        #[doc = "* `tag`: The tag to add."]
6772        pub fn add_definition_tag(
6773            &self,
6774            organization: impl Into<String>,
6775            project: impl Into<String>,
6776            definition_id: i32,
6777            tag: impl Into<String>,
6778        ) -> add_definition_tag::RequestBuilder {
6779            add_definition_tag::RequestBuilder {
6780                client: self.0.clone(),
6781                organization: organization.into(),
6782                project: project.into(),
6783                definition_id,
6784                tag: tag.into(),
6785            }
6786        }
6787        #[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+)"]
6788        #[doc = ""]
6789        #[doc = "Arguments:"]
6790        #[doc = "* `organization`: The name of the Azure DevOps organization."]
6791        #[doc = "* `project`: Project ID or project name"]
6792        #[doc = "* `definition_id`: The ID of the definition."]
6793        #[doc = "* `tag`: The tag to remove."]
6794        pub fn delete_definition_tag(
6795            &self,
6796            organization: impl Into<String>,
6797            project: impl Into<String>,
6798            definition_id: i32,
6799            tag: impl Into<String>,
6800        ) -> delete_definition_tag::RequestBuilder {
6801            delete_definition_tag::RequestBuilder {
6802                client: self.0.clone(),
6803                organization: organization.into(),
6804                project: project.into(),
6805                definition_id,
6806                tag: tag.into(),
6807            }
6808        }
6809        #[doc = "Gets a list of all build tags in the project."]
6810        #[doc = ""]
6811        #[doc = "Arguments:"]
6812        #[doc = "* `organization`: The name of the Azure DevOps organization."]
6813        #[doc = "* `project`: Project ID or project name"]
6814        pub fn get_tags(
6815            &self,
6816            organization: impl Into<String>,
6817            project: impl Into<String>,
6818        ) -> get_tags::RequestBuilder {
6819            get_tags::RequestBuilder {
6820                client: self.0.clone(),
6821                organization: organization.into(),
6822                project: project.into(),
6823            }
6824        }
6825        #[doc = "Removes a tag from builds, definitions, and from the tag store"]
6826        #[doc = ""]
6827        #[doc = "Arguments:"]
6828        #[doc = "* `organization`: The name of the Azure DevOps organization."]
6829        #[doc = "* `project`: Project ID or project name"]
6830        #[doc = "* `tag`: The tag to remove."]
6831        pub fn delete_tag(
6832            &self,
6833            organization: impl Into<String>,
6834            project: impl Into<String>,
6835            tag: impl Into<String>,
6836        ) -> delete_tag::RequestBuilder {
6837            delete_tag::RequestBuilder {
6838                client: self.0.clone(),
6839                organization: organization.into(),
6840                project: project.into(),
6841                tag: tag.into(),
6842            }
6843        }
6844    }
6845    pub mod get_build_tags {
6846        use super::models;
6847        #[cfg(not(target_arch = "wasm32"))]
6848        use futures::future::BoxFuture;
6849        #[cfg(target_arch = "wasm32")]
6850        use futures::future::LocalBoxFuture as BoxFuture;
6851        #[derive(Debug)]
6852        pub struct Response(azure_core::Response);
6853        impl Response {
6854            pub async fn into_raw_body(self) -> azure_core::Result<Vec<String>> {
6855                let bytes = self.0.into_raw_body().collect().await?;
6856                let body: Vec<String> = serde_json::from_slice(&bytes).map_err(|e| {
6857                    azure_core::error::Error::full(
6858                        azure_core::error::ErrorKind::DataConversion,
6859                        e,
6860                        format!(
6861                            "Failed to deserialize response:\n{}",
6862                            String::from_utf8_lossy(&bytes)
6863                        ),
6864                    )
6865                })?;
6866                Ok(body)
6867            }
6868            pub fn into_raw_response(self) -> azure_core::Response {
6869                self.0
6870            }
6871            pub fn as_raw_response(&self) -> &azure_core::Response {
6872                &self.0
6873            }
6874        }
6875        impl From<Response> for azure_core::Response {
6876            fn from(rsp: Response) -> Self {
6877                rsp.into_raw_response()
6878            }
6879        }
6880        impl AsRef<azure_core::Response> for Response {
6881            fn as_ref(&self) -> &azure_core::Response {
6882                self.as_raw_response()
6883            }
6884        }
6885        #[derive(Clone)]
6886        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6887        #[doc = r""]
6888        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6889        #[doc = r" parameters can be chained."]
6890        #[doc = r""]
6891        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6892        #[doc = r" converts the [`RequestBuilder`] into a future,"]
6893        #[doc = r" executes the request and returns a `Result` with the parsed"]
6894        #[doc = r" response."]
6895        #[doc = r""]
6896        #[doc = r" If you need lower-level access to the raw response details"]
6897        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6898        #[doc = r" can finalize the request using the"]
6899        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6900        #[doc = r" that resolves to a lower-level [`Response`] value."]
6901        pub struct RequestBuilder {
6902            pub(crate) client: super::super::Client,
6903            pub(crate) organization: String,
6904            pub(crate) project: String,
6905            pub(crate) build_id: i32,
6906        }
6907        impl RequestBuilder {
6908            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6909            #[doc = ""]
6910            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6911            #[doc = "However, this function can provide more flexibility when required."]
6912            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6913                Box::pin({
6914                    let this = self.clone();
6915                    async move {
6916                        let url = this.url()?;
6917                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
6918                        if let Some(auth_header) = this
6919                            .client
6920                            .token_credential()
6921                            .http_authorization_header(&this.client.scopes())
6922                            .await?
6923                        {
6924                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
6925                        }
6926                        let req_body = azure_core::EMPTY_BODY;
6927                        req.set_body(req_body);
6928                        Ok(Response(this.client.send(&mut req).await?))
6929                    }
6930                })
6931            }
6932            fn url(&self) -> azure_core::Result<azure_core::Url> {
6933                let mut url = azure_core::Url::parse(&format!(
6934                    "{}/{}/{}/_apis/build/builds/{}/tags",
6935                    self.client.endpoint(),
6936                    &self.organization,
6937                    &self.project,
6938                    &self.build_id
6939                ))?;
6940                let has_api_version_already = url
6941                    .query_pairs()
6942                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
6943                if !has_api_version_already {
6944                    url.query_pairs_mut()
6945                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
6946                }
6947                Ok(url)
6948            }
6949        }
6950        impl std::future::IntoFuture for RequestBuilder {
6951            type Output = azure_core::Result<Vec<String>>;
6952            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
6953            #[doc = "Returns a future that sends the request and returns the parsed response body."]
6954            #[doc = ""]
6955            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6956            #[doc = ""]
6957            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6958            fn into_future(self) -> Self::IntoFuture {
6959                Box::pin(async move { self.send().await?.into_raw_body().await })
6960            }
6961        }
6962    }
6963    pub mod add_build_tags {
6964        use super::models;
6965        #[cfg(not(target_arch = "wasm32"))]
6966        use futures::future::BoxFuture;
6967        #[cfg(target_arch = "wasm32")]
6968        use futures::future::LocalBoxFuture as BoxFuture;
6969        #[derive(Debug)]
6970        pub struct Response(azure_core::Response);
6971        impl Response {
6972            pub async fn into_raw_body(self) -> azure_core::Result<Vec<String>> {
6973                let bytes = self.0.into_raw_body().collect().await?;
6974                let body: Vec<String> = serde_json::from_slice(&bytes).map_err(|e| {
6975                    azure_core::error::Error::full(
6976                        azure_core::error::ErrorKind::DataConversion,
6977                        e,
6978                        format!(
6979                            "Failed to deserialize response:\n{}",
6980                            String::from_utf8_lossy(&bytes)
6981                        ),
6982                    )
6983                })?;
6984                Ok(body)
6985            }
6986            pub fn into_raw_response(self) -> azure_core::Response {
6987                self.0
6988            }
6989            pub fn as_raw_response(&self) -> &azure_core::Response {
6990                &self.0
6991            }
6992        }
6993        impl From<Response> for azure_core::Response {
6994            fn from(rsp: Response) -> Self {
6995                rsp.into_raw_response()
6996            }
6997        }
6998        impl AsRef<azure_core::Response> for Response {
6999            fn as_ref(&self) -> &azure_core::Response {
7000                self.as_raw_response()
7001            }
7002        }
7003        #[derive(Clone)]
7004        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7005        #[doc = r""]
7006        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7007        #[doc = r" parameters can be chained."]
7008        #[doc = r""]
7009        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7010        #[doc = r" converts the [`RequestBuilder`] into a future,"]
7011        #[doc = r" executes the request and returns a `Result` with the parsed"]
7012        #[doc = r" response."]
7013        #[doc = r""]
7014        #[doc = r" If you need lower-level access to the raw response details"]
7015        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7016        #[doc = r" can finalize the request using the"]
7017        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7018        #[doc = r" that resolves to a lower-level [`Response`] value."]
7019        pub struct RequestBuilder {
7020            pub(crate) client: super::super::Client,
7021            pub(crate) organization: String,
7022            pub(crate) body: Vec<String>,
7023            pub(crate) project: String,
7024            pub(crate) build_id: i32,
7025        }
7026        impl RequestBuilder {
7027            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7028            #[doc = ""]
7029            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7030            #[doc = "However, this function can provide more flexibility when required."]
7031            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7032                Box::pin({
7033                    let this = self.clone();
7034                    async move {
7035                        let url = this.url()?;
7036                        let mut req = azure_core::Request::new(url, azure_core::Method::Post);
7037                        if let Some(auth_header) = this
7038                            .client
7039                            .token_credential()
7040                            .http_authorization_header(&this.client.scopes())
7041                            .await?
7042                        {
7043                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
7044                        }
7045                        req.insert_header("content-type", "application/json");
7046                        let req_body = azure_core::json::to_json(&this.body)?;
7047                        req.set_body(req_body);
7048                        Ok(Response(this.client.send(&mut req).await?))
7049                    }
7050                })
7051            }
7052            fn url(&self) -> azure_core::Result<azure_core::Url> {
7053                let mut url = azure_core::Url::parse(&format!(
7054                    "{}/{}/{}/_apis/build/builds/{}/tags",
7055                    self.client.endpoint(),
7056                    &self.organization,
7057                    &self.project,
7058                    &self.build_id
7059                ))?;
7060                let has_api_version_already = url
7061                    .query_pairs()
7062                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
7063                if !has_api_version_already {
7064                    url.query_pairs_mut()
7065                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
7066                }
7067                Ok(url)
7068            }
7069        }
7070        impl std::future::IntoFuture for RequestBuilder {
7071            type Output = azure_core::Result<Vec<String>>;
7072            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
7073            #[doc = "Returns a future that sends the request and returns the parsed response body."]
7074            #[doc = ""]
7075            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7076            #[doc = ""]
7077            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7078            fn into_future(self) -> Self::IntoFuture {
7079                Box::pin(async move { self.send().await?.into_raw_body().await })
7080            }
7081        }
7082    }
7083    pub mod update_build_tags {
7084        use super::models;
7085        #[cfg(not(target_arch = "wasm32"))]
7086        use futures::future::BoxFuture;
7087        #[cfg(target_arch = "wasm32")]
7088        use futures::future::LocalBoxFuture as BoxFuture;
7089        #[derive(Debug)]
7090        pub struct Response(azure_core::Response);
7091        impl Response {
7092            pub async fn into_raw_body(self) -> azure_core::Result<Vec<String>> {
7093                let bytes = self.0.into_raw_body().collect().await?;
7094                let body: Vec<String> = serde_json::from_slice(&bytes).map_err(|e| {
7095                    azure_core::error::Error::full(
7096                        azure_core::error::ErrorKind::DataConversion,
7097                        e,
7098                        format!(
7099                            "Failed to deserialize response:\n{}",
7100                            String::from_utf8_lossy(&bytes)
7101                        ),
7102                    )
7103                })?;
7104                Ok(body)
7105            }
7106            pub fn into_raw_response(self) -> azure_core::Response {
7107                self.0
7108            }
7109            pub fn as_raw_response(&self) -> &azure_core::Response {
7110                &self.0
7111            }
7112        }
7113        impl From<Response> for azure_core::Response {
7114            fn from(rsp: Response) -> Self {
7115                rsp.into_raw_response()
7116            }
7117        }
7118        impl AsRef<azure_core::Response> for Response {
7119            fn as_ref(&self) -> &azure_core::Response {
7120                self.as_raw_response()
7121            }
7122        }
7123        #[derive(Clone)]
7124        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7125        #[doc = r""]
7126        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7127        #[doc = r" parameters can be chained."]
7128        #[doc = r""]
7129        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7130        #[doc = r" converts the [`RequestBuilder`] into a future,"]
7131        #[doc = r" executes the request and returns a `Result` with the parsed"]
7132        #[doc = r" response."]
7133        #[doc = r""]
7134        #[doc = r" If you need lower-level access to the raw response details"]
7135        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7136        #[doc = r" can finalize the request using the"]
7137        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7138        #[doc = r" that resolves to a lower-level [`Response`] value."]
7139        pub struct RequestBuilder {
7140            pub(crate) client: super::super::Client,
7141            pub(crate) organization: String,
7142            pub(crate) body: models::UpdateTagParameters,
7143            pub(crate) project: String,
7144            pub(crate) build_id: i32,
7145        }
7146        impl RequestBuilder {
7147            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7148            #[doc = ""]
7149            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7150            #[doc = "However, this function can provide more flexibility when required."]
7151            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7152                Box::pin({
7153                    let this = self.clone();
7154                    async move {
7155                        let url = this.url()?;
7156                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
7157                        if let Some(auth_header) = this
7158                            .client
7159                            .token_credential()
7160                            .http_authorization_header(&this.client.scopes())
7161                            .await?
7162                        {
7163                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
7164                        }
7165                        req.insert_header("content-type", "application/json");
7166                        let req_body = azure_core::json::to_json(&this.body)?;
7167                        req.set_body(req_body);
7168                        Ok(Response(this.client.send(&mut req).await?))
7169                    }
7170                })
7171            }
7172            fn url(&self) -> azure_core::Result<azure_core::Url> {
7173                let mut url = azure_core::Url::parse(&format!(
7174                    "{}/{}/{}/_apis/build/builds/{}/tags",
7175                    self.client.endpoint(),
7176                    &self.organization,
7177                    &self.project,
7178                    &self.build_id
7179                ))?;
7180                let has_api_version_already = url
7181                    .query_pairs()
7182                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
7183                if !has_api_version_already {
7184                    url.query_pairs_mut()
7185                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
7186                }
7187                Ok(url)
7188            }
7189        }
7190        impl std::future::IntoFuture for RequestBuilder {
7191            type Output = azure_core::Result<Vec<String>>;
7192            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
7193            #[doc = "Returns a future that sends the request and returns the parsed response body."]
7194            #[doc = ""]
7195            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7196            #[doc = ""]
7197            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7198            fn into_future(self) -> Self::IntoFuture {
7199                Box::pin(async move { self.send().await?.into_raw_body().await })
7200            }
7201        }
7202    }
7203    pub mod add_build_tag {
7204        use super::models;
7205        #[cfg(not(target_arch = "wasm32"))]
7206        use futures::future::BoxFuture;
7207        #[cfg(target_arch = "wasm32")]
7208        use futures::future::LocalBoxFuture as BoxFuture;
7209        #[derive(Debug)]
7210        pub struct Response(azure_core::Response);
7211        impl Response {
7212            pub async fn into_raw_body(self) -> azure_core::Result<Vec<String>> {
7213                let bytes = self.0.into_raw_body().collect().await?;
7214                let body: Vec<String> = serde_json::from_slice(&bytes).map_err(|e| {
7215                    azure_core::error::Error::full(
7216                        azure_core::error::ErrorKind::DataConversion,
7217                        e,
7218                        format!(
7219                            "Failed to deserialize response:\n{}",
7220                            String::from_utf8_lossy(&bytes)
7221                        ),
7222                    )
7223                })?;
7224                Ok(body)
7225            }
7226            pub fn into_raw_response(self) -> azure_core::Response {
7227                self.0
7228            }
7229            pub fn as_raw_response(&self) -> &azure_core::Response {
7230                &self.0
7231            }
7232        }
7233        impl From<Response> for azure_core::Response {
7234            fn from(rsp: Response) -> Self {
7235                rsp.into_raw_response()
7236            }
7237        }
7238        impl AsRef<azure_core::Response> for Response {
7239            fn as_ref(&self) -> &azure_core::Response {
7240                self.as_raw_response()
7241            }
7242        }
7243        #[derive(Clone)]
7244        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7245        #[doc = r""]
7246        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7247        #[doc = r" parameters can be chained."]
7248        #[doc = r""]
7249        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7250        #[doc = r" converts the [`RequestBuilder`] into a future,"]
7251        #[doc = r" executes the request and returns a `Result` with the parsed"]
7252        #[doc = r" response."]
7253        #[doc = r""]
7254        #[doc = r" If you need lower-level access to the raw response details"]
7255        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7256        #[doc = r" can finalize the request using the"]
7257        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7258        #[doc = r" that resolves to a lower-level [`Response`] value."]
7259        pub struct RequestBuilder {
7260            pub(crate) client: super::super::Client,
7261            pub(crate) organization: String,
7262            pub(crate) project: String,
7263            pub(crate) build_id: i32,
7264            pub(crate) tag: String,
7265        }
7266        impl RequestBuilder {
7267            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7268            #[doc = ""]
7269            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7270            #[doc = "However, this function can provide more flexibility when required."]
7271            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7272                Box::pin({
7273                    let this = self.clone();
7274                    async move {
7275                        let url = this.url()?;
7276                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
7277                        if let Some(auth_header) = this
7278                            .client
7279                            .token_credential()
7280                            .http_authorization_header(&this.client.scopes())
7281                            .await?
7282                        {
7283                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
7284                        }
7285                        let req_body = azure_core::EMPTY_BODY;
7286                        req.set_body(req_body);
7287                        Ok(Response(this.client.send(&mut req).await?))
7288                    }
7289                })
7290            }
7291            fn url(&self) -> azure_core::Result<azure_core::Url> {
7292                let mut url = azure_core::Url::parse(&format!(
7293                    "{}/{}/{}/_apis/build/builds/{}/tags/{}",
7294                    self.client.endpoint(),
7295                    &self.organization,
7296                    &self.project,
7297                    &self.build_id,
7298                    &self.tag
7299                ))?;
7300                let has_api_version_already = url
7301                    .query_pairs()
7302                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
7303                if !has_api_version_already {
7304                    url.query_pairs_mut()
7305                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
7306                }
7307                Ok(url)
7308            }
7309        }
7310        impl std::future::IntoFuture for RequestBuilder {
7311            type Output = azure_core::Result<Vec<String>>;
7312            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
7313            #[doc = "Returns a future that sends the request and returns the parsed response body."]
7314            #[doc = ""]
7315            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7316            #[doc = ""]
7317            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7318            fn into_future(self) -> Self::IntoFuture {
7319                Box::pin(async move { self.send().await?.into_raw_body().await })
7320            }
7321        }
7322    }
7323    pub mod delete_build_tag {
7324        use super::models;
7325        #[cfg(not(target_arch = "wasm32"))]
7326        use futures::future::BoxFuture;
7327        #[cfg(target_arch = "wasm32")]
7328        use futures::future::LocalBoxFuture as BoxFuture;
7329        #[derive(Debug)]
7330        pub struct Response(azure_core::Response);
7331        impl Response {
7332            pub async fn into_raw_body(self) -> azure_core::Result<Vec<String>> {
7333                let bytes = self.0.into_raw_body().collect().await?;
7334                let body: Vec<String> = serde_json::from_slice(&bytes).map_err(|e| {
7335                    azure_core::error::Error::full(
7336                        azure_core::error::ErrorKind::DataConversion,
7337                        e,
7338                        format!(
7339                            "Failed to deserialize response:\n{}",
7340                            String::from_utf8_lossy(&bytes)
7341                        ),
7342                    )
7343                })?;
7344                Ok(body)
7345            }
7346            pub fn into_raw_response(self) -> azure_core::Response {
7347                self.0
7348            }
7349            pub fn as_raw_response(&self) -> &azure_core::Response {
7350                &self.0
7351            }
7352        }
7353        impl From<Response> for azure_core::Response {
7354            fn from(rsp: Response) -> Self {
7355                rsp.into_raw_response()
7356            }
7357        }
7358        impl AsRef<azure_core::Response> for Response {
7359            fn as_ref(&self) -> &azure_core::Response {
7360                self.as_raw_response()
7361            }
7362        }
7363        #[derive(Clone)]
7364        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7365        #[doc = r""]
7366        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7367        #[doc = r" parameters can be chained."]
7368        #[doc = r""]
7369        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7370        #[doc = r" converts the [`RequestBuilder`] into a future,"]
7371        #[doc = r" executes the request and returns a `Result` with the parsed"]
7372        #[doc = r" response."]
7373        #[doc = r""]
7374        #[doc = r" If you need lower-level access to the raw response details"]
7375        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7376        #[doc = r" can finalize the request using the"]
7377        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7378        #[doc = r" that resolves to a lower-level [`Response`] value."]
7379        pub struct RequestBuilder {
7380            pub(crate) client: super::super::Client,
7381            pub(crate) organization: String,
7382            pub(crate) project: String,
7383            pub(crate) build_id: i32,
7384            pub(crate) tag: String,
7385        }
7386        impl RequestBuilder {
7387            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7388            #[doc = ""]
7389            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7390            #[doc = "However, this function can provide more flexibility when required."]
7391            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7392                Box::pin({
7393                    let this = self.clone();
7394                    async move {
7395                        let url = this.url()?;
7396                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
7397                        if let Some(auth_header) = this
7398                            .client
7399                            .token_credential()
7400                            .http_authorization_header(&this.client.scopes())
7401                            .await?
7402                        {
7403                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
7404                        }
7405                        let req_body = azure_core::EMPTY_BODY;
7406                        req.set_body(req_body);
7407                        Ok(Response(this.client.send(&mut req).await?))
7408                    }
7409                })
7410            }
7411            fn url(&self) -> azure_core::Result<azure_core::Url> {
7412                let mut url = azure_core::Url::parse(&format!(
7413                    "{}/{}/{}/_apis/build/builds/{}/tags/{}",
7414                    self.client.endpoint(),
7415                    &self.organization,
7416                    &self.project,
7417                    &self.build_id,
7418                    &self.tag
7419                ))?;
7420                let has_api_version_already = url
7421                    .query_pairs()
7422                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
7423                if !has_api_version_already {
7424                    url.query_pairs_mut()
7425                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
7426                }
7427                Ok(url)
7428            }
7429        }
7430        impl std::future::IntoFuture for RequestBuilder {
7431            type Output = azure_core::Result<Vec<String>>;
7432            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
7433            #[doc = "Returns a future that sends the request and returns the parsed response body."]
7434            #[doc = ""]
7435            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7436            #[doc = ""]
7437            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7438            fn into_future(self) -> Self::IntoFuture {
7439                Box::pin(async move { self.send().await?.into_raw_body().await })
7440            }
7441        }
7442    }
7443    pub mod get_definition_tags {
7444        use super::models;
7445        #[cfg(not(target_arch = "wasm32"))]
7446        use futures::future::BoxFuture;
7447        #[cfg(target_arch = "wasm32")]
7448        use futures::future::LocalBoxFuture as BoxFuture;
7449        #[derive(Debug)]
7450        pub struct Response(azure_core::Response);
7451        impl Response {
7452            pub async fn into_raw_body(self) -> azure_core::Result<Vec<String>> {
7453                let bytes = self.0.into_raw_body().collect().await?;
7454                let body: Vec<String> = serde_json::from_slice(&bytes).map_err(|e| {
7455                    azure_core::error::Error::full(
7456                        azure_core::error::ErrorKind::DataConversion,
7457                        e,
7458                        format!(
7459                            "Failed to deserialize response:\n{}",
7460                            String::from_utf8_lossy(&bytes)
7461                        ),
7462                    )
7463                })?;
7464                Ok(body)
7465            }
7466            pub fn into_raw_response(self) -> azure_core::Response {
7467                self.0
7468            }
7469            pub fn as_raw_response(&self) -> &azure_core::Response {
7470                &self.0
7471            }
7472        }
7473        impl From<Response> for azure_core::Response {
7474            fn from(rsp: Response) -> Self {
7475                rsp.into_raw_response()
7476            }
7477        }
7478        impl AsRef<azure_core::Response> for Response {
7479            fn as_ref(&self) -> &azure_core::Response {
7480                self.as_raw_response()
7481            }
7482        }
7483        #[derive(Clone)]
7484        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7485        #[doc = r""]
7486        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7487        #[doc = r" parameters can be chained."]
7488        #[doc = r""]
7489        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7490        #[doc = r" converts the [`RequestBuilder`] into a future,"]
7491        #[doc = r" executes the request and returns a `Result` with the parsed"]
7492        #[doc = r" response."]
7493        #[doc = r""]
7494        #[doc = r" If you need lower-level access to the raw response details"]
7495        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7496        #[doc = r" can finalize the request using the"]
7497        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7498        #[doc = r" that resolves to a lower-level [`Response`] value."]
7499        pub struct RequestBuilder {
7500            pub(crate) client: super::super::Client,
7501            pub(crate) organization: String,
7502            pub(crate) project: String,
7503            pub(crate) definition_id: i32,
7504            pub(crate) revision: Option<i32>,
7505        }
7506        impl RequestBuilder {
7507            #[doc = "The definition revision number. If not specified, uses the latest revision of the definition."]
7508            pub fn revision(mut self, revision: i32) -> Self {
7509                self.revision = Some(revision);
7510                self
7511            }
7512            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7513            #[doc = ""]
7514            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7515            #[doc = "However, this function can provide more flexibility when required."]
7516            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7517                Box::pin({
7518                    let this = self.clone();
7519                    async move {
7520                        let url = this.url()?;
7521                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
7522                        if let Some(auth_header) = this
7523                            .client
7524                            .token_credential()
7525                            .http_authorization_header(&this.client.scopes())
7526                            .await?
7527                        {
7528                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
7529                        }
7530                        if let Some(revision) = &this.revision {
7531                            req.url_mut()
7532                                .query_pairs_mut()
7533                                .append_pair("revision", &revision.to_string());
7534                        }
7535                        let req_body = azure_core::EMPTY_BODY;
7536                        req.set_body(req_body);
7537                        Ok(Response(this.client.send(&mut req).await?))
7538                    }
7539                })
7540            }
7541            fn url(&self) -> azure_core::Result<azure_core::Url> {
7542                let mut url = azure_core::Url::parse(&format!(
7543                    "{}/{}/{}/_apis/build/definitions/{}/tags",
7544                    self.client.endpoint(),
7545                    &self.organization,
7546                    &self.project,
7547                    &self.definition_id
7548                ))?;
7549                let has_api_version_already = url
7550                    .query_pairs()
7551                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
7552                if !has_api_version_already {
7553                    url.query_pairs_mut()
7554                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
7555                }
7556                Ok(url)
7557            }
7558        }
7559        impl std::future::IntoFuture for RequestBuilder {
7560            type Output = azure_core::Result<Vec<String>>;
7561            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
7562            #[doc = "Returns a future that sends the request and returns the parsed response body."]
7563            #[doc = ""]
7564            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7565            #[doc = ""]
7566            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7567            fn into_future(self) -> Self::IntoFuture {
7568                Box::pin(async move { self.send().await?.into_raw_body().await })
7569            }
7570        }
7571    }
7572    pub mod add_definition_tags {
7573        use super::models;
7574        #[cfg(not(target_arch = "wasm32"))]
7575        use futures::future::BoxFuture;
7576        #[cfg(target_arch = "wasm32")]
7577        use futures::future::LocalBoxFuture as BoxFuture;
7578        #[derive(Debug)]
7579        pub struct Response(azure_core::Response);
7580        impl Response {
7581            pub async fn into_raw_body(self) -> azure_core::Result<Vec<String>> {
7582                let bytes = self.0.into_raw_body().collect().await?;
7583                let body: Vec<String> = serde_json::from_slice(&bytes).map_err(|e| {
7584                    azure_core::error::Error::full(
7585                        azure_core::error::ErrorKind::DataConversion,
7586                        e,
7587                        format!(
7588                            "Failed to deserialize response:\n{}",
7589                            String::from_utf8_lossy(&bytes)
7590                        ),
7591                    )
7592                })?;
7593                Ok(body)
7594            }
7595            pub fn into_raw_response(self) -> azure_core::Response {
7596                self.0
7597            }
7598            pub fn as_raw_response(&self) -> &azure_core::Response {
7599                &self.0
7600            }
7601        }
7602        impl From<Response> for azure_core::Response {
7603            fn from(rsp: Response) -> Self {
7604                rsp.into_raw_response()
7605            }
7606        }
7607        impl AsRef<azure_core::Response> for Response {
7608            fn as_ref(&self) -> &azure_core::Response {
7609                self.as_raw_response()
7610            }
7611        }
7612        #[derive(Clone)]
7613        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7614        #[doc = r""]
7615        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7616        #[doc = r" parameters can be chained."]
7617        #[doc = r""]
7618        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7619        #[doc = r" converts the [`RequestBuilder`] into a future,"]
7620        #[doc = r" executes the request and returns a `Result` with the parsed"]
7621        #[doc = r" response."]
7622        #[doc = r""]
7623        #[doc = r" If you need lower-level access to the raw response details"]
7624        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7625        #[doc = r" can finalize the request using the"]
7626        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7627        #[doc = r" that resolves to a lower-level [`Response`] value."]
7628        pub struct RequestBuilder {
7629            pub(crate) client: super::super::Client,
7630            pub(crate) organization: String,
7631            pub(crate) body: Vec<String>,
7632            pub(crate) project: String,
7633            pub(crate) definition_id: i32,
7634        }
7635        impl RequestBuilder {
7636            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7637            #[doc = ""]
7638            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7639            #[doc = "However, this function can provide more flexibility when required."]
7640            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7641                Box::pin({
7642                    let this = self.clone();
7643                    async move {
7644                        let url = this.url()?;
7645                        let mut req = azure_core::Request::new(url, azure_core::Method::Post);
7646                        if let Some(auth_header) = this
7647                            .client
7648                            .token_credential()
7649                            .http_authorization_header(&this.client.scopes())
7650                            .await?
7651                        {
7652                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
7653                        }
7654                        req.insert_header("content-type", "application/json");
7655                        let req_body = azure_core::json::to_json(&this.body)?;
7656                        req.set_body(req_body);
7657                        Ok(Response(this.client.send(&mut req).await?))
7658                    }
7659                })
7660            }
7661            fn url(&self) -> azure_core::Result<azure_core::Url> {
7662                let mut url = azure_core::Url::parse(&format!(
7663                    "{}/{}/{}/_apis/build/definitions/{}/tags",
7664                    self.client.endpoint(),
7665                    &self.organization,
7666                    &self.project,
7667                    &self.definition_id
7668                ))?;
7669                let has_api_version_already = url
7670                    .query_pairs()
7671                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
7672                if !has_api_version_already {
7673                    url.query_pairs_mut()
7674                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
7675                }
7676                Ok(url)
7677            }
7678        }
7679        impl std::future::IntoFuture for RequestBuilder {
7680            type Output = azure_core::Result<Vec<String>>;
7681            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
7682            #[doc = "Returns a future that sends the request and returns the parsed response body."]
7683            #[doc = ""]
7684            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7685            #[doc = ""]
7686            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7687            fn into_future(self) -> Self::IntoFuture {
7688                Box::pin(async move { self.send().await?.into_raw_body().await })
7689            }
7690        }
7691    }
7692    pub mod update_definition_tags {
7693        use super::models;
7694        #[cfg(not(target_arch = "wasm32"))]
7695        use futures::future::BoxFuture;
7696        #[cfg(target_arch = "wasm32")]
7697        use futures::future::LocalBoxFuture as BoxFuture;
7698        #[derive(Debug)]
7699        pub struct Response(azure_core::Response);
7700        impl Response {
7701            pub async fn into_raw_body(self) -> azure_core::Result<Vec<String>> {
7702                let bytes = self.0.into_raw_body().collect().await?;
7703                let body: Vec<String> = serde_json::from_slice(&bytes).map_err(|e| {
7704                    azure_core::error::Error::full(
7705                        azure_core::error::ErrorKind::DataConversion,
7706                        e,
7707                        format!(
7708                            "Failed to deserialize response:\n{}",
7709                            String::from_utf8_lossy(&bytes)
7710                        ),
7711                    )
7712                })?;
7713                Ok(body)
7714            }
7715            pub fn into_raw_response(self) -> azure_core::Response {
7716                self.0
7717            }
7718            pub fn as_raw_response(&self) -> &azure_core::Response {
7719                &self.0
7720            }
7721        }
7722        impl From<Response> for azure_core::Response {
7723            fn from(rsp: Response) -> Self {
7724                rsp.into_raw_response()
7725            }
7726        }
7727        impl AsRef<azure_core::Response> for Response {
7728            fn as_ref(&self) -> &azure_core::Response {
7729                self.as_raw_response()
7730            }
7731        }
7732        #[derive(Clone)]
7733        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7734        #[doc = r""]
7735        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7736        #[doc = r" parameters can be chained."]
7737        #[doc = r""]
7738        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7739        #[doc = r" converts the [`RequestBuilder`] into a future,"]
7740        #[doc = r" executes the request and returns a `Result` with the parsed"]
7741        #[doc = r" response."]
7742        #[doc = r""]
7743        #[doc = r" If you need lower-level access to the raw response details"]
7744        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7745        #[doc = r" can finalize the request using the"]
7746        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7747        #[doc = r" that resolves to a lower-level [`Response`] value."]
7748        pub struct RequestBuilder {
7749            pub(crate) client: super::super::Client,
7750            pub(crate) organization: String,
7751            pub(crate) body: models::UpdateTagParameters,
7752            pub(crate) project: String,
7753            pub(crate) definition_id: i32,
7754        }
7755        impl RequestBuilder {
7756            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7757            #[doc = ""]
7758            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7759            #[doc = "However, this function can provide more flexibility when required."]
7760            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7761                Box::pin({
7762                    let this = self.clone();
7763                    async move {
7764                        let url = this.url()?;
7765                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
7766                        if let Some(auth_header) = this
7767                            .client
7768                            .token_credential()
7769                            .http_authorization_header(&this.client.scopes())
7770                            .await?
7771                        {
7772                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
7773                        }
7774                        req.insert_header("content-type", "application/json");
7775                        let req_body = azure_core::json::to_json(&this.body)?;
7776                        req.set_body(req_body);
7777                        Ok(Response(this.client.send(&mut req).await?))
7778                    }
7779                })
7780            }
7781            fn url(&self) -> azure_core::Result<azure_core::Url> {
7782                let mut url = azure_core::Url::parse(&format!(
7783                    "{}/{}/{}/_apis/build/definitions/{}/tags",
7784                    self.client.endpoint(),
7785                    &self.organization,
7786                    &self.project,
7787                    &self.definition_id
7788                ))?;
7789                let has_api_version_already = url
7790                    .query_pairs()
7791                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
7792                if !has_api_version_already {
7793                    url.query_pairs_mut()
7794                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
7795                }
7796                Ok(url)
7797            }
7798        }
7799        impl std::future::IntoFuture for RequestBuilder {
7800            type Output = azure_core::Result<Vec<String>>;
7801            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
7802            #[doc = "Returns a future that sends the request and returns the parsed response body."]
7803            #[doc = ""]
7804            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7805            #[doc = ""]
7806            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7807            fn into_future(self) -> Self::IntoFuture {
7808                Box::pin(async move { self.send().await?.into_raw_body().await })
7809            }
7810        }
7811    }
7812    pub mod add_definition_tag {
7813        use super::models;
7814        #[cfg(not(target_arch = "wasm32"))]
7815        use futures::future::BoxFuture;
7816        #[cfg(target_arch = "wasm32")]
7817        use futures::future::LocalBoxFuture as BoxFuture;
7818        #[derive(Debug)]
7819        pub struct Response(azure_core::Response);
7820        impl Response {
7821            pub async fn into_raw_body(self) -> azure_core::Result<Vec<String>> {
7822                let bytes = self.0.into_raw_body().collect().await?;
7823                let body: Vec<String> = serde_json::from_slice(&bytes).map_err(|e| {
7824                    azure_core::error::Error::full(
7825                        azure_core::error::ErrorKind::DataConversion,
7826                        e,
7827                        format!(
7828                            "Failed to deserialize response:\n{}",
7829                            String::from_utf8_lossy(&bytes)
7830                        ),
7831                    )
7832                })?;
7833                Ok(body)
7834            }
7835            pub fn into_raw_response(self) -> azure_core::Response {
7836                self.0
7837            }
7838            pub fn as_raw_response(&self) -> &azure_core::Response {
7839                &self.0
7840            }
7841        }
7842        impl From<Response> for azure_core::Response {
7843            fn from(rsp: Response) -> Self {
7844                rsp.into_raw_response()
7845            }
7846        }
7847        impl AsRef<azure_core::Response> for Response {
7848            fn as_ref(&self) -> &azure_core::Response {
7849                self.as_raw_response()
7850            }
7851        }
7852        #[derive(Clone)]
7853        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7854        #[doc = r""]
7855        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7856        #[doc = r" parameters can be chained."]
7857        #[doc = r""]
7858        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7859        #[doc = r" converts the [`RequestBuilder`] into a future,"]
7860        #[doc = r" executes the request and returns a `Result` with the parsed"]
7861        #[doc = r" response."]
7862        #[doc = r""]
7863        #[doc = r" If you need lower-level access to the raw response details"]
7864        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7865        #[doc = r" can finalize the request using the"]
7866        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7867        #[doc = r" that resolves to a lower-level [`Response`] value."]
7868        pub struct RequestBuilder {
7869            pub(crate) client: super::super::Client,
7870            pub(crate) organization: String,
7871            pub(crate) project: String,
7872            pub(crate) definition_id: i32,
7873            pub(crate) tag: String,
7874        }
7875        impl RequestBuilder {
7876            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7877            #[doc = ""]
7878            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7879            #[doc = "However, this function can provide more flexibility when required."]
7880            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7881                Box::pin({
7882                    let this = self.clone();
7883                    async move {
7884                        let url = this.url()?;
7885                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
7886                        if let Some(auth_header) = this
7887                            .client
7888                            .token_credential()
7889                            .http_authorization_header(&this.client.scopes())
7890                            .await?
7891                        {
7892                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
7893                        }
7894                        let req_body = azure_core::EMPTY_BODY;
7895                        req.set_body(req_body);
7896                        Ok(Response(this.client.send(&mut req).await?))
7897                    }
7898                })
7899            }
7900            fn url(&self) -> azure_core::Result<azure_core::Url> {
7901                let mut url = azure_core::Url::parse(&format!(
7902                    "{}/{}/{}/_apis/build/definitions/{}/tags/{}",
7903                    self.client.endpoint(),
7904                    &self.organization,
7905                    &self.project,
7906                    &self.definition_id,
7907                    &self.tag
7908                ))?;
7909                let has_api_version_already = url
7910                    .query_pairs()
7911                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
7912                if !has_api_version_already {
7913                    url.query_pairs_mut()
7914                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
7915                }
7916                Ok(url)
7917            }
7918        }
7919        impl std::future::IntoFuture for RequestBuilder {
7920            type Output = azure_core::Result<Vec<String>>;
7921            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
7922            #[doc = "Returns a future that sends the request and returns the parsed response body."]
7923            #[doc = ""]
7924            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7925            #[doc = ""]
7926            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7927            fn into_future(self) -> Self::IntoFuture {
7928                Box::pin(async move { self.send().await?.into_raw_body().await })
7929            }
7930        }
7931    }
7932    pub mod delete_definition_tag {
7933        use super::models;
7934        #[cfg(not(target_arch = "wasm32"))]
7935        use futures::future::BoxFuture;
7936        #[cfg(target_arch = "wasm32")]
7937        use futures::future::LocalBoxFuture as BoxFuture;
7938        #[derive(Debug)]
7939        pub struct Response(azure_core::Response);
7940        impl Response {
7941            pub async fn into_raw_body(self) -> azure_core::Result<Vec<String>> {
7942                let bytes = self.0.into_raw_body().collect().await?;
7943                let body: Vec<String> = serde_json::from_slice(&bytes).map_err(|e| {
7944                    azure_core::error::Error::full(
7945                        azure_core::error::ErrorKind::DataConversion,
7946                        e,
7947                        format!(
7948                            "Failed to deserialize response:\n{}",
7949                            String::from_utf8_lossy(&bytes)
7950                        ),
7951                    )
7952                })?;
7953                Ok(body)
7954            }
7955            pub fn into_raw_response(self) -> azure_core::Response {
7956                self.0
7957            }
7958            pub fn as_raw_response(&self) -> &azure_core::Response {
7959                &self.0
7960            }
7961        }
7962        impl From<Response> for azure_core::Response {
7963            fn from(rsp: Response) -> Self {
7964                rsp.into_raw_response()
7965            }
7966        }
7967        impl AsRef<azure_core::Response> for Response {
7968            fn as_ref(&self) -> &azure_core::Response {
7969                self.as_raw_response()
7970            }
7971        }
7972        #[derive(Clone)]
7973        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7974        #[doc = r""]
7975        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7976        #[doc = r" parameters can be chained."]
7977        #[doc = r""]
7978        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7979        #[doc = r" converts the [`RequestBuilder`] into a future,"]
7980        #[doc = r" executes the request and returns a `Result` with the parsed"]
7981        #[doc = r" response."]
7982        #[doc = r""]
7983        #[doc = r" If you need lower-level access to the raw response details"]
7984        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7985        #[doc = r" can finalize the request using the"]
7986        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7987        #[doc = r" that resolves to a lower-level [`Response`] value."]
7988        pub struct RequestBuilder {
7989            pub(crate) client: super::super::Client,
7990            pub(crate) organization: String,
7991            pub(crate) project: String,
7992            pub(crate) definition_id: i32,
7993            pub(crate) tag: String,
7994        }
7995        impl RequestBuilder {
7996            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7997            #[doc = ""]
7998            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7999            #[doc = "However, this function can provide more flexibility when required."]
8000            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
8001                Box::pin({
8002                    let this = self.clone();
8003                    async move {
8004                        let url = this.url()?;
8005                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
8006                        if let Some(auth_header) = this
8007                            .client
8008                            .token_credential()
8009                            .http_authorization_header(&this.client.scopes())
8010                            .await?
8011                        {
8012                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
8013                        }
8014                        let req_body = azure_core::EMPTY_BODY;
8015                        req.set_body(req_body);
8016                        Ok(Response(this.client.send(&mut req).await?))
8017                    }
8018                })
8019            }
8020            fn url(&self) -> azure_core::Result<azure_core::Url> {
8021                let mut url = azure_core::Url::parse(&format!(
8022                    "{}/{}/{}/_apis/build/definitions/{}/tags/{}",
8023                    self.client.endpoint(),
8024                    &self.organization,
8025                    &self.project,
8026                    &self.definition_id,
8027                    &self.tag
8028                ))?;
8029                let has_api_version_already = url
8030                    .query_pairs()
8031                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
8032                if !has_api_version_already {
8033                    url.query_pairs_mut()
8034                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
8035                }
8036                Ok(url)
8037            }
8038        }
8039        impl std::future::IntoFuture for RequestBuilder {
8040            type Output = azure_core::Result<Vec<String>>;
8041            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
8042            #[doc = "Returns a future that sends the request and returns the parsed response body."]
8043            #[doc = ""]
8044            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
8045            #[doc = ""]
8046            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
8047            fn into_future(self) -> Self::IntoFuture {
8048                Box::pin(async move { self.send().await?.into_raw_body().await })
8049            }
8050        }
8051    }
8052    pub mod get_tags {
8053        use super::models;
8054        #[cfg(not(target_arch = "wasm32"))]
8055        use futures::future::BoxFuture;
8056        #[cfg(target_arch = "wasm32")]
8057        use futures::future::LocalBoxFuture as BoxFuture;
8058        #[derive(Debug)]
8059        pub struct Response(azure_core::Response);
8060        impl Response {
8061            pub async fn into_raw_body(self) -> azure_core::Result<Vec<String>> {
8062                let bytes = self.0.into_raw_body().collect().await?;
8063                let body: Vec<String> = serde_json::from_slice(&bytes).map_err(|e| {
8064                    azure_core::error::Error::full(
8065                        azure_core::error::ErrorKind::DataConversion,
8066                        e,
8067                        format!(
8068                            "Failed to deserialize response:\n{}",
8069                            String::from_utf8_lossy(&bytes)
8070                        ),
8071                    )
8072                })?;
8073                Ok(body)
8074            }
8075            pub fn into_raw_response(self) -> azure_core::Response {
8076                self.0
8077            }
8078            pub fn as_raw_response(&self) -> &azure_core::Response {
8079                &self.0
8080            }
8081        }
8082        impl From<Response> for azure_core::Response {
8083            fn from(rsp: Response) -> Self {
8084                rsp.into_raw_response()
8085            }
8086        }
8087        impl AsRef<azure_core::Response> for Response {
8088            fn as_ref(&self) -> &azure_core::Response {
8089                self.as_raw_response()
8090            }
8091        }
8092        #[derive(Clone)]
8093        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
8094        #[doc = r""]
8095        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
8096        #[doc = r" parameters can be chained."]
8097        #[doc = r""]
8098        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
8099        #[doc = r" converts the [`RequestBuilder`] into a future,"]
8100        #[doc = r" executes the request and returns a `Result` with the parsed"]
8101        #[doc = r" response."]
8102        #[doc = r""]
8103        #[doc = r" If you need lower-level access to the raw response details"]
8104        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
8105        #[doc = r" can finalize the request using the"]
8106        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
8107        #[doc = r" that resolves to a lower-level [`Response`] value."]
8108        pub struct RequestBuilder {
8109            pub(crate) client: super::super::Client,
8110            pub(crate) organization: String,
8111            pub(crate) project: String,
8112        }
8113        impl RequestBuilder {
8114            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
8115            #[doc = ""]
8116            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
8117            #[doc = "However, this function can provide more flexibility when required."]
8118            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
8119                Box::pin({
8120                    let this = self.clone();
8121                    async move {
8122                        let url = this.url()?;
8123                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
8124                        if let Some(auth_header) = this
8125                            .client
8126                            .token_credential()
8127                            .http_authorization_header(&this.client.scopes())
8128                            .await?
8129                        {
8130                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
8131                        }
8132                        let req_body = azure_core::EMPTY_BODY;
8133                        req.set_body(req_body);
8134                        Ok(Response(this.client.send(&mut req).await?))
8135                    }
8136                })
8137            }
8138            fn url(&self) -> azure_core::Result<azure_core::Url> {
8139                let mut url = azure_core::Url::parse(&format!(
8140                    "{}/{}/{}/_apis/build/tags",
8141                    self.client.endpoint(),
8142                    &self.organization,
8143                    &self.project
8144                ))?;
8145                let has_api_version_already = url
8146                    .query_pairs()
8147                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
8148                if !has_api_version_already {
8149                    url.query_pairs_mut()
8150                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
8151                }
8152                Ok(url)
8153            }
8154        }
8155        impl std::future::IntoFuture for RequestBuilder {
8156            type Output = azure_core::Result<Vec<String>>;
8157            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
8158            #[doc = "Returns a future that sends the request and returns the parsed response body."]
8159            #[doc = ""]
8160            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
8161            #[doc = ""]
8162            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
8163            fn into_future(self) -> Self::IntoFuture {
8164                Box::pin(async move { self.send().await?.into_raw_body().await })
8165            }
8166        }
8167    }
8168    pub mod delete_tag {
8169        use super::models;
8170        #[cfg(not(target_arch = "wasm32"))]
8171        use futures::future::BoxFuture;
8172        #[cfg(target_arch = "wasm32")]
8173        use futures::future::LocalBoxFuture as BoxFuture;
8174        #[derive(Debug)]
8175        pub struct Response(azure_core::Response);
8176        impl Response {
8177            pub async fn into_raw_body(self) -> azure_core::Result<Vec<String>> {
8178                let bytes = self.0.into_raw_body().collect().await?;
8179                let body: Vec<String> = serde_json::from_slice(&bytes).map_err(|e| {
8180                    azure_core::error::Error::full(
8181                        azure_core::error::ErrorKind::DataConversion,
8182                        e,
8183                        format!(
8184                            "Failed to deserialize response:\n{}",
8185                            String::from_utf8_lossy(&bytes)
8186                        ),
8187                    )
8188                })?;
8189                Ok(body)
8190            }
8191            pub fn into_raw_response(self) -> azure_core::Response {
8192                self.0
8193            }
8194            pub fn as_raw_response(&self) -> &azure_core::Response {
8195                &self.0
8196            }
8197        }
8198        impl From<Response> for azure_core::Response {
8199            fn from(rsp: Response) -> Self {
8200                rsp.into_raw_response()
8201            }
8202        }
8203        impl AsRef<azure_core::Response> for Response {
8204            fn as_ref(&self) -> &azure_core::Response {
8205                self.as_raw_response()
8206            }
8207        }
8208        #[derive(Clone)]
8209        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
8210        #[doc = r""]
8211        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
8212        #[doc = r" parameters can be chained."]
8213        #[doc = r""]
8214        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
8215        #[doc = r" converts the [`RequestBuilder`] into a future,"]
8216        #[doc = r" executes the request and returns a `Result` with the parsed"]
8217        #[doc = r" response."]
8218        #[doc = r""]
8219        #[doc = r" If you need lower-level access to the raw response details"]
8220        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
8221        #[doc = r" can finalize the request using the"]
8222        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
8223        #[doc = r" that resolves to a lower-level [`Response`] value."]
8224        pub struct RequestBuilder {
8225            pub(crate) client: super::super::Client,
8226            pub(crate) organization: String,
8227            pub(crate) project: String,
8228            pub(crate) tag: String,
8229        }
8230        impl RequestBuilder {
8231            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
8232            #[doc = ""]
8233            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
8234            #[doc = "However, this function can provide more flexibility when required."]
8235            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
8236                Box::pin({
8237                    let this = self.clone();
8238                    async move {
8239                        let url = this.url()?;
8240                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
8241                        if let Some(auth_header) = this
8242                            .client
8243                            .token_credential()
8244                            .http_authorization_header(&this.client.scopes())
8245                            .await?
8246                        {
8247                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
8248                        }
8249                        let req_body = azure_core::EMPTY_BODY;
8250                        req.set_body(req_body);
8251                        Ok(Response(this.client.send(&mut req).await?))
8252                    }
8253                })
8254            }
8255            fn url(&self) -> azure_core::Result<azure_core::Url> {
8256                let mut url = azure_core::Url::parse(&format!(
8257                    "{}/{}/{}/_apis/build/tags/{}",
8258                    self.client.endpoint(),
8259                    &self.organization,
8260                    &self.project,
8261                    &self.tag
8262                ))?;
8263                let has_api_version_already = url
8264                    .query_pairs()
8265                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
8266                if !has_api_version_already {
8267                    url.query_pairs_mut()
8268                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
8269                }
8270                Ok(url)
8271            }
8272        }
8273        impl std::future::IntoFuture for RequestBuilder {
8274            type Output = azure_core::Result<Vec<String>>;
8275            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
8276            #[doc = "Returns a future that sends the request and returns the parsed response body."]
8277            #[doc = ""]
8278            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
8279            #[doc = ""]
8280            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
8281            fn into_future(self) -> Self::IntoFuture {
8282                Box::pin(async move { self.send().await?.into_raw_body().await })
8283            }
8284        }
8285    }
8286}
8287pub mod timeline {
8288    use super::models;
8289    #[cfg(not(target_arch = "wasm32"))]
8290    use futures::future::BoxFuture;
8291    #[cfg(target_arch = "wasm32")]
8292    use futures::future::LocalBoxFuture as BoxFuture;
8293    pub struct Client(pub(crate) super::Client);
8294    impl Client {
8295        #[doc = "Gets details for a build"]
8296        #[doc = ""]
8297        #[doc = "Arguments:"]
8298        #[doc = "* `organization`: The name of the Azure DevOps organization."]
8299        #[doc = "* `project`: Project ID or project name"]
8300        pub fn get(
8301            &self,
8302            organization: impl Into<String>,
8303            project: impl Into<String>,
8304            build_id: i32,
8305            timeline_id: impl Into<String>,
8306        ) -> get::RequestBuilder {
8307            get::RequestBuilder {
8308                client: self.0.clone(),
8309                organization: organization.into(),
8310                project: project.into(),
8311                build_id,
8312                timeline_id: timeline_id.into(),
8313                change_id: None,
8314                plan_id: None,
8315            }
8316        }
8317    }
8318    pub mod get {
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(azure_core::Response);
8326        impl Response {
8327            pub async fn into_raw_body(self) -> azure_core::Result<models::Timeline> {
8328                let bytes = self.0.into_raw_body().collect().await?;
8329                let body: models::Timeline = serde_json::from_slice(&bytes).map_err(|e| {
8330                    azure_core::error::Error::full(
8331                        azure_core::error::ErrorKind::DataConversion,
8332                        e,
8333                        format!(
8334                            "Failed to deserialize response:\n{}",
8335                            String::from_utf8_lossy(&bytes)
8336                        ),
8337                    )
8338                })?;
8339                Ok(body)
8340            }
8341            pub fn into_raw_response(self) -> azure_core::Response {
8342                self.0
8343            }
8344            pub fn as_raw_response(&self) -> &azure_core::Response {
8345                &self.0
8346            }
8347        }
8348        impl From<Response> for azure_core::Response {
8349            fn from(rsp: Response) -> Self {
8350                rsp.into_raw_response()
8351            }
8352        }
8353        impl AsRef<azure_core::Response> for Response {
8354            fn as_ref(&self) -> &azure_core::Response {
8355                self.as_raw_response()
8356            }
8357        }
8358        #[derive(Clone)]
8359        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
8360        #[doc = r""]
8361        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
8362        #[doc = r" parameters can be chained."]
8363        #[doc = r""]
8364        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
8365        #[doc = r" converts the [`RequestBuilder`] into a future,"]
8366        #[doc = r" executes the request and returns a `Result` with the parsed"]
8367        #[doc = r" response."]
8368        #[doc = r""]
8369        #[doc = r" If you need lower-level access to the raw response details"]
8370        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
8371        #[doc = r" can finalize the request using the"]
8372        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
8373        #[doc = r" that resolves to a lower-level [`Response`] value."]
8374        pub struct RequestBuilder {
8375            pub(crate) client: super::super::Client,
8376            pub(crate) organization: String,
8377            pub(crate) project: String,
8378            pub(crate) build_id: i32,
8379            pub(crate) timeline_id: String,
8380            pub(crate) change_id: Option<i32>,
8381            pub(crate) plan_id: Option<String>,
8382        }
8383        impl RequestBuilder {
8384            pub fn change_id(mut self, change_id: i32) -> Self {
8385                self.change_id = Some(change_id);
8386                self
8387            }
8388            pub fn plan_id(mut self, plan_id: impl Into<String>) -> Self {
8389                self.plan_id = Some(plan_id.into());
8390                self
8391            }
8392            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
8393            #[doc = ""]
8394            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
8395            #[doc = "However, this function can provide more flexibility when required."]
8396            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
8397                Box::pin({
8398                    let this = self.clone();
8399                    async move {
8400                        let url = this.url()?;
8401                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
8402                        if let Some(auth_header) = this
8403                            .client
8404                            .token_credential()
8405                            .http_authorization_header(&this.client.scopes())
8406                            .await?
8407                        {
8408                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
8409                        }
8410                        if let Some(change_id) = &this.change_id {
8411                            req.url_mut()
8412                                .query_pairs_mut()
8413                                .append_pair("changeId", &change_id.to_string());
8414                        }
8415                        if let Some(plan_id) = &this.plan_id {
8416                            req.url_mut()
8417                                .query_pairs_mut()
8418                                .append_pair("planId", plan_id);
8419                        }
8420                        let req_body = azure_core::EMPTY_BODY;
8421                        req.set_body(req_body);
8422                        Ok(Response(this.client.send(&mut req).await?))
8423                    }
8424                })
8425            }
8426            fn url(&self) -> azure_core::Result<azure_core::Url> {
8427                let mut url = azure_core::Url::parse(&format!(
8428                    "{}/{}/{}/_apis/build/builds/{}/timeline/{}",
8429                    self.client.endpoint(),
8430                    &self.organization,
8431                    &self.project,
8432                    &self.build_id,
8433                    &self.timeline_id
8434                ))?;
8435                let has_api_version_already = url
8436                    .query_pairs()
8437                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
8438                if !has_api_version_already {
8439                    url.query_pairs_mut()
8440                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
8441                }
8442                Ok(url)
8443            }
8444        }
8445        impl std::future::IntoFuture for RequestBuilder {
8446            type Output = azure_core::Result<models::Timeline>;
8447            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Timeline>>;
8448            #[doc = "Returns a future that sends the request and returns the parsed response body."]
8449            #[doc = ""]
8450            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
8451            #[doc = ""]
8452            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
8453            fn into_future(self) -> Self::IntoFuture {
8454                Box::pin(async move { self.send().await?.into_raw_body().await })
8455            }
8456        }
8457    }
8458}
8459pub mod definitions {
8460    use super::models;
8461    #[cfg(not(target_arch = "wasm32"))]
8462    use futures::future::BoxFuture;
8463    #[cfg(target_arch = "wasm32")]
8464    use futures::future::LocalBoxFuture as BoxFuture;
8465    pub struct Client(pub(crate) super::Client);
8466    impl Client {
8467        #[doc = "Gets a list of definitions."]
8468        #[doc = ""]
8469        #[doc = "Arguments:"]
8470        #[doc = "* `organization`: The name of the Azure DevOps organization."]
8471        #[doc = "* `project`: Project ID or project name"]
8472        pub fn list(
8473            &self,
8474            organization: impl Into<String>,
8475            project: impl Into<String>,
8476        ) -> list::RequestBuilder {
8477            list::RequestBuilder {
8478                client: self.0.clone(),
8479                organization: organization.into(),
8480                project: project.into(),
8481                name: None,
8482                repository_id: None,
8483                repository_type: None,
8484                query_order: None,
8485                top: None,
8486                continuation_token: None,
8487                min_metrics_time: None,
8488                definition_ids: None,
8489                path: None,
8490                built_after: None,
8491                not_built_after: None,
8492                include_all_properties: None,
8493                include_latest_builds: None,
8494                task_id_filter: None,
8495                process_type: None,
8496                yaml_filename: None,
8497            }
8498        }
8499        #[doc = "Creates a new definition."]
8500        #[doc = ""]
8501        #[doc = "Arguments:"]
8502        #[doc = "* `organization`: The name of the Azure DevOps organization."]
8503        #[doc = "* `body`: The definition."]
8504        #[doc = "* `project`: Project ID or project name"]
8505        pub fn create(
8506            &self,
8507            organization: impl Into<String>,
8508            body: impl Into<models::BuildDefinition>,
8509            project: impl Into<String>,
8510        ) -> create::RequestBuilder {
8511            create::RequestBuilder {
8512                client: self.0.clone(),
8513                organization: organization.into(),
8514                body: body.into(),
8515                project: project.into(),
8516                definition_to_clone_id: None,
8517                definition_to_clone_revision: None,
8518            }
8519        }
8520        #[doc = "Gets a definition, optionally at a specific revision."]
8521        #[doc = ""]
8522        #[doc = "Arguments:"]
8523        #[doc = "* `organization`: The name of the Azure DevOps organization."]
8524        #[doc = "* `project`: Project ID or project name"]
8525        #[doc = "* `definition_id`: The ID of the definition."]
8526        pub fn get(
8527            &self,
8528            organization: impl Into<String>,
8529            project: impl Into<String>,
8530            definition_id: i32,
8531        ) -> get::RequestBuilder {
8532            get::RequestBuilder {
8533                client: self.0.clone(),
8534                organization: organization.into(),
8535                project: project.into(),
8536                definition_id,
8537                revision: None,
8538                min_metrics_time: None,
8539                property_filters: None,
8540                include_latest_builds: None,
8541            }
8542        }
8543        #[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."]
8544        #[doc = ""]
8545        #[doc = "Arguments:"]
8546        #[doc = "* `organization`: The name of the Azure DevOps organization."]
8547        #[doc = "* `body`: The new version of the definition. Its \"Revision\" property must match the existing definition for the update to be accepted."]
8548        #[doc = "* `project`: Project ID or project name"]
8549        #[doc = "* `definition_id`: The ID of the definition."]
8550        pub fn update(
8551            &self,
8552            organization: impl Into<String>,
8553            body: impl Into<models::BuildDefinition>,
8554            project: impl Into<String>,
8555            definition_id: i32,
8556        ) -> update::RequestBuilder {
8557            update::RequestBuilder {
8558                client: self.0.clone(),
8559                organization: organization.into(),
8560                body: body.into(),
8561                project: project.into(),
8562                definition_id,
8563                secrets_source_definition_id: None,
8564                secrets_source_definition_revision: None,
8565            }
8566        }
8567        #[doc = "Restores a deleted definition"]
8568        #[doc = ""]
8569        #[doc = "Arguments:"]
8570        #[doc = "* `organization`: The name of the Azure DevOps organization."]
8571        #[doc = "* `project`: Project ID or project name"]
8572        #[doc = "* `definition_id`: The identifier of the definition to restore."]
8573        #[doc = "* `deleted`: When false, restores a deleted definition."]
8574        pub fn restore_definition(
8575            &self,
8576            organization: impl Into<String>,
8577            project: impl Into<String>,
8578            definition_id: i32,
8579            deleted: bool,
8580        ) -> restore_definition::RequestBuilder {
8581            restore_definition::RequestBuilder {
8582                client: self.0.clone(),
8583                organization: organization.into(),
8584                project: project.into(),
8585                definition_id,
8586                deleted,
8587            }
8588        }
8589        #[doc = "Deletes a definition and all associated builds."]
8590        #[doc = ""]
8591        #[doc = "Arguments:"]
8592        #[doc = "* `organization`: The name of the Azure DevOps organization."]
8593        #[doc = "* `project`: Project ID or project name"]
8594        #[doc = "* `definition_id`: The ID of the definition."]
8595        pub fn delete(
8596            &self,
8597            organization: impl Into<String>,
8598            project: impl Into<String>,
8599            definition_id: i32,
8600        ) -> delete::RequestBuilder {
8601            delete::RequestBuilder {
8602                client: self.0.clone(),
8603                organization: organization.into(),
8604                project: project.into(),
8605                definition_id,
8606            }
8607        }
8608        #[doc = "Gets all revisions of a definition."]
8609        #[doc = ""]
8610        #[doc = "Arguments:"]
8611        #[doc = "* `organization`: The name of the Azure DevOps organization."]
8612        #[doc = "* `project`: Project ID or project name"]
8613        #[doc = "* `definition_id`: The ID of the definition."]
8614        pub fn get_definition_revisions(
8615            &self,
8616            organization: impl Into<String>,
8617            project: impl Into<String>,
8618            definition_id: i32,
8619        ) -> get_definition_revisions::RequestBuilder {
8620            get_definition_revisions::RequestBuilder {
8621                client: self.0.clone(),
8622                organization: organization.into(),
8623                project: project.into(),
8624                definition_id,
8625            }
8626        }
8627    }
8628    pub mod list {
8629        use super::models;
8630        #[cfg(not(target_arch = "wasm32"))]
8631        use futures::future::BoxFuture;
8632        #[cfg(target_arch = "wasm32")]
8633        use futures::future::LocalBoxFuture as BoxFuture;
8634        #[derive(Debug)]
8635        pub struct Response(azure_core::Response);
8636        impl Response {
8637            pub async fn into_raw_body(
8638                self,
8639            ) -> azure_core::Result<models::BuildDefinitionReferenceList> {
8640                let bytes = self.0.into_raw_body().collect().await?;
8641                let body: models::BuildDefinitionReferenceList = serde_json::from_slice(&bytes)
8642                    .map_err(|e| {
8643                        azure_core::error::Error::full(
8644                            azure_core::error::ErrorKind::DataConversion,
8645                            e,
8646                            format!(
8647                                "Failed to deserialize response:\n{}",
8648                                String::from_utf8_lossy(&bytes)
8649                            ),
8650                        )
8651                    })?;
8652                Ok(body)
8653            }
8654            pub fn into_raw_response(self) -> azure_core::Response {
8655                self.0
8656            }
8657            pub fn as_raw_response(&self) -> &azure_core::Response {
8658                &self.0
8659            }
8660        }
8661        impl From<Response> for azure_core::Response {
8662            fn from(rsp: Response) -> Self {
8663                rsp.into_raw_response()
8664            }
8665        }
8666        impl AsRef<azure_core::Response> for Response {
8667            fn as_ref(&self) -> &azure_core::Response {
8668                self.as_raw_response()
8669            }
8670        }
8671        #[derive(Clone)]
8672        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
8673        #[doc = r""]
8674        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
8675        #[doc = r" parameters can be chained."]
8676        #[doc = r""]
8677        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
8678        #[doc = r" converts the [`RequestBuilder`] into a future,"]
8679        #[doc = r" executes the request and returns a `Result` with the parsed"]
8680        #[doc = r" response."]
8681        #[doc = r""]
8682        #[doc = r" If you need lower-level access to the raw response details"]
8683        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
8684        #[doc = r" can finalize the request using the"]
8685        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
8686        #[doc = r" that resolves to a lower-level [`Response`] value."]
8687        pub struct RequestBuilder {
8688            pub(crate) client: super::super::Client,
8689            pub(crate) organization: String,
8690            pub(crate) project: String,
8691            pub(crate) name: Option<String>,
8692            pub(crate) repository_id: Option<String>,
8693            pub(crate) repository_type: Option<String>,
8694            pub(crate) query_order: Option<String>,
8695            pub(crate) top: Option<i32>,
8696            pub(crate) continuation_token: Option<String>,
8697            pub(crate) min_metrics_time: Option<time::OffsetDateTime>,
8698            pub(crate) definition_ids: Option<String>,
8699            pub(crate) path: Option<String>,
8700            pub(crate) built_after: Option<time::OffsetDateTime>,
8701            pub(crate) not_built_after: Option<time::OffsetDateTime>,
8702            pub(crate) include_all_properties: Option<bool>,
8703            pub(crate) include_latest_builds: Option<bool>,
8704            pub(crate) task_id_filter: Option<String>,
8705            pub(crate) process_type: Option<i32>,
8706            pub(crate) yaml_filename: Option<String>,
8707        }
8708        impl RequestBuilder {
8709            #[doc = "If specified, filters to definitions whose names match this pattern."]
8710            pub fn name(mut self, name: impl Into<String>) -> Self {
8711                self.name = Some(name.into());
8712                self
8713            }
8714            #[doc = "A repository ID. If specified, filters to definitions that use this repository."]
8715            pub fn repository_id(mut self, repository_id: impl Into<String>) -> Self {
8716                self.repository_id = Some(repository_id.into());
8717                self
8718            }
8719            #[doc = "If specified, filters to definitions that have a repository of this type."]
8720            pub fn repository_type(mut self, repository_type: impl Into<String>) -> Self {
8721                self.repository_type = Some(repository_type.into());
8722                self
8723            }
8724            #[doc = "Indicates the order in which definitions should be returned."]
8725            pub fn query_order(mut self, query_order: impl Into<String>) -> Self {
8726                self.query_order = Some(query_order.into());
8727                self
8728            }
8729            #[doc = "The maximum number of definitions to return."]
8730            pub fn top(mut self, top: i32) -> Self {
8731                self.top = Some(top);
8732                self
8733            }
8734            #[doc = "A continuation token, returned by a previous call to this method, that can be used to return the next set of definitions."]
8735            pub fn continuation_token(mut self, continuation_token: impl Into<String>) -> Self {
8736                self.continuation_token = Some(continuation_token.into());
8737                self
8738            }
8739            #[doc = "If specified, indicates the date from which metrics should be included."]
8740            pub fn min_metrics_time(
8741                mut self,
8742                min_metrics_time: impl Into<time::OffsetDateTime>,
8743            ) -> Self {
8744                self.min_metrics_time = Some(min_metrics_time.into());
8745                self
8746            }
8747            #[doc = "A comma-delimited list that specifies the IDs of definitions to retrieve."]
8748            pub fn definition_ids(mut self, definition_ids: impl Into<String>) -> Self {
8749                self.definition_ids = Some(definition_ids.into());
8750                self
8751            }
8752            #[doc = "If specified, filters to definitions under this folder."]
8753            pub fn path(mut self, path: impl Into<String>) -> Self {
8754                self.path = Some(path.into());
8755                self
8756            }
8757            #[doc = "If specified, filters to definitions that have builds after this date."]
8758            pub fn built_after(mut self, built_after: impl Into<time::OffsetDateTime>) -> Self {
8759                self.built_after = Some(built_after.into());
8760                self
8761            }
8762            #[doc = "If specified, filters to definitions that do not have builds after this date."]
8763            pub fn not_built_after(
8764                mut self,
8765                not_built_after: impl Into<time::OffsetDateTime>,
8766            ) -> Self {
8767                self.not_built_after = Some(not_built_after.into());
8768                self
8769            }
8770            #[doc = "Indicates whether the full definitions should be returned. By default, shallow representations of the definitions are returned."]
8771            pub fn include_all_properties(mut self, include_all_properties: bool) -> Self {
8772                self.include_all_properties = Some(include_all_properties);
8773                self
8774            }
8775            #[doc = "Indicates whether to return the latest and latest completed builds for this definition."]
8776            pub fn include_latest_builds(mut self, include_latest_builds: bool) -> Self {
8777                self.include_latest_builds = Some(include_latest_builds);
8778                self
8779            }
8780            #[doc = "If specified, filters to definitions that use the specified task."]
8781            pub fn task_id_filter(mut self, task_id_filter: impl Into<String>) -> Self {
8782                self.task_id_filter = Some(task_id_filter.into());
8783                self
8784            }
8785            #[doc = "If specified, filters to definitions with the given process type."]
8786            pub fn process_type(mut self, process_type: i32) -> Self {
8787                self.process_type = Some(process_type);
8788                self
8789            }
8790            #[doc = "If specified, filters to YAML definitions that match the given filename. To use this filter includeAllProperties should be set to true"]
8791            pub fn yaml_filename(mut self, yaml_filename: impl Into<String>) -> Self {
8792                self.yaml_filename = Some(yaml_filename.into());
8793                self
8794            }
8795            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
8796            #[doc = ""]
8797            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
8798            #[doc = "However, this function can provide more flexibility when required."]
8799            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
8800                Box::pin({
8801                    let this = self.clone();
8802                    async move {
8803                        let url = this.url()?;
8804                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
8805                        if let Some(auth_header) = this
8806                            .client
8807                            .token_credential()
8808                            .http_authorization_header(&this.client.scopes())
8809                            .await?
8810                        {
8811                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
8812                        }
8813                        if let Some(name) = &this.name {
8814                            req.url_mut().query_pairs_mut().append_pair("name", name);
8815                        }
8816                        if let Some(repository_id) = &this.repository_id {
8817                            req.url_mut()
8818                                .query_pairs_mut()
8819                                .append_pair("repositoryId", repository_id);
8820                        }
8821                        if let Some(repository_type) = &this.repository_type {
8822                            req.url_mut()
8823                                .query_pairs_mut()
8824                                .append_pair("repositoryType", repository_type);
8825                        }
8826                        if let Some(query_order) = &this.query_order {
8827                            req.url_mut()
8828                                .query_pairs_mut()
8829                                .append_pair("queryOrder", query_order);
8830                        }
8831                        if let Some(top) = &this.top {
8832                            req.url_mut()
8833                                .query_pairs_mut()
8834                                .append_pair("$top", &top.to_string());
8835                        }
8836                        if let Some(continuation_token) = &this.continuation_token {
8837                            req.url_mut()
8838                                .query_pairs_mut()
8839                                .append_pair("continuationToken", continuation_token);
8840                        }
8841                        if let Some(min_metrics_time) = &this.min_metrics_time {
8842                            req.url_mut()
8843                                .query_pairs_mut()
8844                                .append_pair("minMetricsTime", &min_metrics_time.to_string());
8845                        }
8846                        if let Some(definition_ids) = &this.definition_ids {
8847                            req.url_mut()
8848                                .query_pairs_mut()
8849                                .append_pair("definitionIds", definition_ids);
8850                        }
8851                        if let Some(path) = &this.path {
8852                            req.url_mut().query_pairs_mut().append_pair("path", path);
8853                        }
8854                        if let Some(built_after) = &this.built_after {
8855                            req.url_mut()
8856                                .query_pairs_mut()
8857                                .append_pair("builtAfter", &built_after.to_string());
8858                        }
8859                        if let Some(not_built_after) = &this.not_built_after {
8860                            req.url_mut()
8861                                .query_pairs_mut()
8862                                .append_pair("notBuiltAfter", &not_built_after.to_string());
8863                        }
8864                        if let Some(include_all_properties) = &this.include_all_properties {
8865                            req.url_mut().query_pairs_mut().append_pair(
8866                                "includeAllProperties",
8867                                &include_all_properties.to_string(),
8868                            );
8869                        }
8870                        if let Some(include_latest_builds) = &this.include_latest_builds {
8871                            req.url_mut().query_pairs_mut().append_pair(
8872                                "includeLatestBuilds",
8873                                &include_latest_builds.to_string(),
8874                            );
8875                        }
8876                        if let Some(task_id_filter) = &this.task_id_filter {
8877                            req.url_mut()
8878                                .query_pairs_mut()
8879                                .append_pair("taskIdFilter", task_id_filter);
8880                        }
8881                        if let Some(process_type) = &this.process_type {
8882                            req.url_mut()
8883                                .query_pairs_mut()
8884                                .append_pair("processType", &process_type.to_string());
8885                        }
8886                        if let Some(yaml_filename) = &this.yaml_filename {
8887                            req.url_mut()
8888                                .query_pairs_mut()
8889                                .append_pair("yamlFilename", yaml_filename);
8890                        }
8891                        let req_body = azure_core::EMPTY_BODY;
8892                        req.set_body(req_body);
8893                        Ok(Response(this.client.send(&mut req).await?))
8894                    }
8895                })
8896            }
8897            fn url(&self) -> azure_core::Result<azure_core::Url> {
8898                let mut url = azure_core::Url::parse(&format!(
8899                    "{}/{}/{}/_apis/build/definitions",
8900                    self.client.endpoint(),
8901                    &self.organization,
8902                    &self.project
8903                ))?;
8904                let has_api_version_already = url
8905                    .query_pairs()
8906                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
8907                if !has_api_version_already {
8908                    url.query_pairs_mut()
8909                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
8910                }
8911                Ok(url)
8912            }
8913        }
8914        impl std::future::IntoFuture for RequestBuilder {
8915            type Output = azure_core::Result<models::BuildDefinitionReferenceList>;
8916            type IntoFuture =
8917                BoxFuture<'static, azure_core::Result<models::BuildDefinitionReferenceList>>;
8918            #[doc = "Returns a future that sends the request and returns the parsed response body."]
8919            #[doc = ""]
8920            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
8921            #[doc = ""]
8922            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
8923            fn into_future(self) -> Self::IntoFuture {
8924                Box::pin(async move { self.send().await?.into_raw_body().await })
8925            }
8926        }
8927    }
8928    pub mod create {
8929        use super::models;
8930        #[cfg(not(target_arch = "wasm32"))]
8931        use futures::future::BoxFuture;
8932        #[cfg(target_arch = "wasm32")]
8933        use futures::future::LocalBoxFuture as BoxFuture;
8934        #[derive(Debug)]
8935        pub struct Response(azure_core::Response);
8936        impl Response {
8937            pub async fn into_raw_body(self) -> azure_core::Result<models::BuildDefinition> {
8938                let bytes = self.0.into_raw_body().collect().await?;
8939                let body: models::BuildDefinition =
8940                    serde_json::from_slice(&bytes).map_err(|e| {
8941                        azure_core::error::Error::full(
8942                            azure_core::error::ErrorKind::DataConversion,
8943                            e,
8944                            format!(
8945                                "Failed to deserialize response:\n{}",
8946                                String::from_utf8_lossy(&bytes)
8947                            ),
8948                        )
8949                    })?;
8950                Ok(body)
8951            }
8952            pub fn into_raw_response(self) -> azure_core::Response {
8953                self.0
8954            }
8955            pub fn as_raw_response(&self) -> &azure_core::Response {
8956                &self.0
8957            }
8958        }
8959        impl From<Response> for azure_core::Response {
8960            fn from(rsp: Response) -> Self {
8961                rsp.into_raw_response()
8962            }
8963        }
8964        impl AsRef<azure_core::Response> for Response {
8965            fn as_ref(&self) -> &azure_core::Response {
8966                self.as_raw_response()
8967            }
8968        }
8969        #[derive(Clone)]
8970        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
8971        #[doc = r""]
8972        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
8973        #[doc = r" parameters can be chained."]
8974        #[doc = r""]
8975        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
8976        #[doc = r" converts the [`RequestBuilder`] into a future,"]
8977        #[doc = r" executes the request and returns a `Result` with the parsed"]
8978        #[doc = r" response."]
8979        #[doc = r""]
8980        #[doc = r" If you need lower-level access to the raw response details"]
8981        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
8982        #[doc = r" can finalize the request using the"]
8983        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
8984        #[doc = r" that resolves to a lower-level [`Response`] value."]
8985        pub struct RequestBuilder {
8986            pub(crate) client: super::super::Client,
8987            pub(crate) organization: String,
8988            pub(crate) body: models::BuildDefinition,
8989            pub(crate) project: String,
8990            pub(crate) definition_to_clone_id: Option<i32>,
8991            pub(crate) definition_to_clone_revision: Option<i32>,
8992        }
8993        impl RequestBuilder {
8994            pub fn definition_to_clone_id(mut self, definition_to_clone_id: i32) -> Self {
8995                self.definition_to_clone_id = Some(definition_to_clone_id);
8996                self
8997            }
8998            pub fn definition_to_clone_revision(
8999                mut self,
9000                definition_to_clone_revision: i32,
9001            ) -> Self {
9002                self.definition_to_clone_revision = Some(definition_to_clone_revision);
9003                self
9004            }
9005            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
9006            #[doc = ""]
9007            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
9008            #[doc = "However, this function can provide more flexibility when required."]
9009            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
9010                Box::pin({
9011                    let this = self.clone();
9012                    async move {
9013                        let url = this.url()?;
9014                        let mut req = azure_core::Request::new(url, azure_core::Method::Post);
9015                        if let Some(auth_header) = this
9016                            .client
9017                            .token_credential()
9018                            .http_authorization_header(&this.client.scopes())
9019                            .await?
9020                        {
9021                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
9022                        }
9023                        req.insert_header("content-type", "application/json");
9024                        let req_body = azure_core::json::to_json(&this.body)?;
9025                        if let Some(definition_to_clone_id) = &this.definition_to_clone_id {
9026                            req.url_mut().query_pairs_mut().append_pair(
9027                                "definitionToCloneId",
9028                                &definition_to_clone_id.to_string(),
9029                            );
9030                        }
9031                        if let Some(definition_to_clone_revision) =
9032                            &this.definition_to_clone_revision
9033                        {
9034                            req.url_mut().query_pairs_mut().append_pair(
9035                                "definitionToCloneRevision",
9036                                &definition_to_clone_revision.to_string(),
9037                            );
9038                        }
9039                        req.set_body(req_body);
9040                        Ok(Response(this.client.send(&mut req).await?))
9041                    }
9042                })
9043            }
9044            fn url(&self) -> azure_core::Result<azure_core::Url> {
9045                let mut url = azure_core::Url::parse(&format!(
9046                    "{}/{}/{}/_apis/build/definitions",
9047                    self.client.endpoint(),
9048                    &self.organization,
9049                    &self.project
9050                ))?;
9051                let has_api_version_already = url
9052                    .query_pairs()
9053                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
9054                if !has_api_version_already {
9055                    url.query_pairs_mut()
9056                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
9057                }
9058                Ok(url)
9059            }
9060        }
9061        impl std::future::IntoFuture for RequestBuilder {
9062            type Output = azure_core::Result<models::BuildDefinition>;
9063            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildDefinition>>;
9064            #[doc = "Returns a future that sends the request and returns the parsed response body."]
9065            #[doc = ""]
9066            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
9067            #[doc = ""]
9068            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
9069            fn into_future(self) -> Self::IntoFuture {
9070                Box::pin(async move { self.send().await?.into_raw_body().await })
9071            }
9072        }
9073    }
9074    pub mod get {
9075        use super::models;
9076        #[cfg(not(target_arch = "wasm32"))]
9077        use futures::future::BoxFuture;
9078        #[cfg(target_arch = "wasm32")]
9079        use futures::future::LocalBoxFuture as BoxFuture;
9080        #[derive(Debug)]
9081        pub struct Response(azure_core::Response);
9082        impl Response {
9083            pub async fn into_raw_body(self) -> azure_core::Result<models::BuildDefinition> {
9084                let bytes = self.0.into_raw_body().collect().await?;
9085                let body: models::BuildDefinition =
9086                    serde_json::from_slice(&bytes).map_err(|e| {
9087                        azure_core::error::Error::full(
9088                            azure_core::error::ErrorKind::DataConversion,
9089                            e,
9090                            format!(
9091                                "Failed to deserialize response:\n{}",
9092                                String::from_utf8_lossy(&bytes)
9093                            ),
9094                        )
9095                    })?;
9096                Ok(body)
9097            }
9098            pub fn into_raw_response(self) -> azure_core::Response {
9099                self.0
9100            }
9101            pub fn as_raw_response(&self) -> &azure_core::Response {
9102                &self.0
9103            }
9104        }
9105        impl From<Response> for azure_core::Response {
9106            fn from(rsp: Response) -> Self {
9107                rsp.into_raw_response()
9108            }
9109        }
9110        impl AsRef<azure_core::Response> for Response {
9111            fn as_ref(&self) -> &azure_core::Response {
9112                self.as_raw_response()
9113            }
9114        }
9115        #[derive(Clone)]
9116        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
9117        #[doc = r""]
9118        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
9119        #[doc = r" parameters can be chained."]
9120        #[doc = r""]
9121        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
9122        #[doc = r" converts the [`RequestBuilder`] into a future,"]
9123        #[doc = r" executes the request and returns a `Result` with the parsed"]
9124        #[doc = r" response."]
9125        #[doc = r""]
9126        #[doc = r" If you need lower-level access to the raw response details"]
9127        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
9128        #[doc = r" can finalize the request using the"]
9129        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
9130        #[doc = r" that resolves to a lower-level [`Response`] value."]
9131        pub struct RequestBuilder {
9132            pub(crate) client: super::super::Client,
9133            pub(crate) organization: String,
9134            pub(crate) project: String,
9135            pub(crate) definition_id: i32,
9136            pub(crate) revision: Option<i32>,
9137            pub(crate) min_metrics_time: Option<time::OffsetDateTime>,
9138            pub(crate) property_filters: Option<String>,
9139            pub(crate) include_latest_builds: Option<bool>,
9140        }
9141        impl RequestBuilder {
9142            #[doc = "The revision number to retrieve. If this is not specified, the latest version will be returned."]
9143            pub fn revision(mut self, revision: i32) -> Self {
9144                self.revision = Some(revision);
9145                self
9146            }
9147            #[doc = "If specified, indicates the date from which metrics should be included."]
9148            pub fn min_metrics_time(
9149                mut self,
9150                min_metrics_time: impl Into<time::OffsetDateTime>,
9151            ) -> Self {
9152                self.min_metrics_time = Some(min_metrics_time.into());
9153                self
9154            }
9155            #[doc = "A comma-delimited list of properties to include in the results."]
9156            pub fn property_filters(mut self, property_filters: impl Into<String>) -> Self {
9157                self.property_filters = Some(property_filters.into());
9158                self
9159            }
9160            pub fn include_latest_builds(mut self, include_latest_builds: bool) -> Self {
9161                self.include_latest_builds = Some(include_latest_builds);
9162                self
9163            }
9164            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
9165            #[doc = ""]
9166            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
9167            #[doc = "However, this function can provide more flexibility when required."]
9168            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
9169                Box::pin({
9170                    let this = self.clone();
9171                    async move {
9172                        let url = this.url()?;
9173                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
9174                        if let Some(auth_header) = this
9175                            .client
9176                            .token_credential()
9177                            .http_authorization_header(&this.client.scopes())
9178                            .await?
9179                        {
9180                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
9181                        }
9182                        if let Some(revision) = &this.revision {
9183                            req.url_mut()
9184                                .query_pairs_mut()
9185                                .append_pair("revision", &revision.to_string());
9186                        }
9187                        if let Some(min_metrics_time) = &this.min_metrics_time {
9188                            req.url_mut()
9189                                .query_pairs_mut()
9190                                .append_pair("minMetricsTime", &min_metrics_time.to_string());
9191                        }
9192                        if let Some(property_filters) = &this.property_filters {
9193                            req.url_mut()
9194                                .query_pairs_mut()
9195                                .append_pair("propertyFilters", property_filters);
9196                        }
9197                        if let Some(include_latest_builds) = &this.include_latest_builds {
9198                            req.url_mut().query_pairs_mut().append_pair(
9199                                "includeLatestBuilds",
9200                                &include_latest_builds.to_string(),
9201                            );
9202                        }
9203                        let req_body = azure_core::EMPTY_BODY;
9204                        req.set_body(req_body);
9205                        Ok(Response(this.client.send(&mut req).await?))
9206                    }
9207                })
9208            }
9209            fn url(&self) -> azure_core::Result<azure_core::Url> {
9210                let mut url = azure_core::Url::parse(&format!(
9211                    "{}/{}/{}/_apis/build/definitions/{}",
9212                    self.client.endpoint(),
9213                    &self.organization,
9214                    &self.project,
9215                    &self.definition_id
9216                ))?;
9217                let has_api_version_already = url
9218                    .query_pairs()
9219                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
9220                if !has_api_version_already {
9221                    url.query_pairs_mut()
9222                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
9223                }
9224                Ok(url)
9225            }
9226        }
9227        impl std::future::IntoFuture for RequestBuilder {
9228            type Output = azure_core::Result<models::BuildDefinition>;
9229            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildDefinition>>;
9230            #[doc = "Returns a future that sends the request and returns the parsed response body."]
9231            #[doc = ""]
9232            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
9233            #[doc = ""]
9234            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
9235            fn into_future(self) -> Self::IntoFuture {
9236                Box::pin(async move { self.send().await?.into_raw_body().await })
9237            }
9238        }
9239    }
9240    pub mod update {
9241        use super::models;
9242        #[cfg(not(target_arch = "wasm32"))]
9243        use futures::future::BoxFuture;
9244        #[cfg(target_arch = "wasm32")]
9245        use futures::future::LocalBoxFuture as BoxFuture;
9246        #[derive(Debug)]
9247        pub struct Response(azure_core::Response);
9248        impl Response {
9249            pub async fn into_raw_body(self) -> azure_core::Result<models::BuildDefinition> {
9250                let bytes = self.0.into_raw_body().collect().await?;
9251                let body: models::BuildDefinition =
9252                    serde_json::from_slice(&bytes).map_err(|e| {
9253                        azure_core::error::Error::full(
9254                            azure_core::error::ErrorKind::DataConversion,
9255                            e,
9256                            format!(
9257                                "Failed to deserialize response:\n{}",
9258                                String::from_utf8_lossy(&bytes)
9259                            ),
9260                        )
9261                    })?;
9262                Ok(body)
9263            }
9264            pub fn into_raw_response(self) -> azure_core::Response {
9265                self.0
9266            }
9267            pub fn as_raw_response(&self) -> &azure_core::Response {
9268                &self.0
9269            }
9270        }
9271        impl From<Response> for azure_core::Response {
9272            fn from(rsp: Response) -> Self {
9273                rsp.into_raw_response()
9274            }
9275        }
9276        impl AsRef<azure_core::Response> for Response {
9277            fn as_ref(&self) -> &azure_core::Response {
9278                self.as_raw_response()
9279            }
9280        }
9281        #[derive(Clone)]
9282        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
9283        #[doc = r""]
9284        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
9285        #[doc = r" parameters can be chained."]
9286        #[doc = r""]
9287        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
9288        #[doc = r" converts the [`RequestBuilder`] into a future,"]
9289        #[doc = r" executes the request and returns a `Result` with the parsed"]
9290        #[doc = r" response."]
9291        #[doc = r""]
9292        #[doc = r" If you need lower-level access to the raw response details"]
9293        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
9294        #[doc = r" can finalize the request using the"]
9295        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
9296        #[doc = r" that resolves to a lower-level [`Response`] value."]
9297        pub struct RequestBuilder {
9298            pub(crate) client: super::super::Client,
9299            pub(crate) organization: String,
9300            pub(crate) body: models::BuildDefinition,
9301            pub(crate) project: String,
9302            pub(crate) definition_id: i32,
9303            pub(crate) secrets_source_definition_id: Option<i32>,
9304            pub(crate) secrets_source_definition_revision: Option<i32>,
9305        }
9306        impl RequestBuilder {
9307            pub fn secrets_source_definition_id(
9308                mut self,
9309                secrets_source_definition_id: i32,
9310            ) -> Self {
9311                self.secrets_source_definition_id = Some(secrets_source_definition_id);
9312                self
9313            }
9314            pub fn secrets_source_definition_revision(
9315                mut self,
9316                secrets_source_definition_revision: i32,
9317            ) -> Self {
9318                self.secrets_source_definition_revision = Some(secrets_source_definition_revision);
9319                self
9320            }
9321            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
9322            #[doc = ""]
9323            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
9324            #[doc = "However, this function can provide more flexibility when required."]
9325            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
9326                Box::pin({
9327                    let this = self.clone();
9328                    async move {
9329                        let url = this.url()?;
9330                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
9331                        if let Some(auth_header) = this
9332                            .client
9333                            .token_credential()
9334                            .http_authorization_header(&this.client.scopes())
9335                            .await?
9336                        {
9337                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
9338                        }
9339                        req.insert_header("content-type", "application/json");
9340                        let req_body = azure_core::json::to_json(&this.body)?;
9341                        if let Some(secrets_source_definition_id) =
9342                            &this.secrets_source_definition_id
9343                        {
9344                            req.url_mut().query_pairs_mut().append_pair(
9345                                "secretsSourceDefinitionId",
9346                                &secrets_source_definition_id.to_string(),
9347                            );
9348                        }
9349                        if let Some(secrets_source_definition_revision) =
9350                            &this.secrets_source_definition_revision
9351                        {
9352                            req.url_mut().query_pairs_mut().append_pair(
9353                                "secretsSourceDefinitionRevision",
9354                                &secrets_source_definition_revision.to_string(),
9355                            );
9356                        }
9357                        req.set_body(req_body);
9358                        Ok(Response(this.client.send(&mut req).await?))
9359                    }
9360                })
9361            }
9362            fn url(&self) -> azure_core::Result<azure_core::Url> {
9363                let mut url = azure_core::Url::parse(&format!(
9364                    "{}/{}/{}/_apis/build/definitions/{}",
9365                    self.client.endpoint(),
9366                    &self.organization,
9367                    &self.project,
9368                    &self.definition_id
9369                ))?;
9370                let has_api_version_already = url
9371                    .query_pairs()
9372                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
9373                if !has_api_version_already {
9374                    url.query_pairs_mut()
9375                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
9376                }
9377                Ok(url)
9378            }
9379        }
9380        impl std::future::IntoFuture for RequestBuilder {
9381            type Output = azure_core::Result<models::BuildDefinition>;
9382            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildDefinition>>;
9383            #[doc = "Returns a future that sends the request and returns the parsed response body."]
9384            #[doc = ""]
9385            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
9386            #[doc = ""]
9387            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
9388            fn into_future(self) -> Self::IntoFuture {
9389                Box::pin(async move { self.send().await?.into_raw_body().await })
9390            }
9391        }
9392    }
9393    pub mod restore_definition {
9394        use super::models;
9395        #[cfg(not(target_arch = "wasm32"))]
9396        use futures::future::BoxFuture;
9397        #[cfg(target_arch = "wasm32")]
9398        use futures::future::LocalBoxFuture as BoxFuture;
9399        #[derive(Debug)]
9400        pub struct Response(azure_core::Response);
9401        impl Response {
9402            pub async fn into_raw_body(self) -> azure_core::Result<models::BuildDefinition> {
9403                let bytes = self.0.into_raw_body().collect().await?;
9404                let body: models::BuildDefinition =
9405                    serde_json::from_slice(&bytes).map_err(|e| {
9406                        azure_core::error::Error::full(
9407                            azure_core::error::ErrorKind::DataConversion,
9408                            e,
9409                            format!(
9410                                "Failed to deserialize response:\n{}",
9411                                String::from_utf8_lossy(&bytes)
9412                            ),
9413                        )
9414                    })?;
9415                Ok(body)
9416            }
9417            pub fn into_raw_response(self) -> azure_core::Response {
9418                self.0
9419            }
9420            pub fn as_raw_response(&self) -> &azure_core::Response {
9421                &self.0
9422            }
9423        }
9424        impl From<Response> for azure_core::Response {
9425            fn from(rsp: Response) -> Self {
9426                rsp.into_raw_response()
9427            }
9428        }
9429        impl AsRef<azure_core::Response> for Response {
9430            fn as_ref(&self) -> &azure_core::Response {
9431                self.as_raw_response()
9432            }
9433        }
9434        #[derive(Clone)]
9435        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
9436        #[doc = r""]
9437        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
9438        #[doc = r" parameters can be chained."]
9439        #[doc = r""]
9440        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
9441        #[doc = r" converts the [`RequestBuilder`] into a future,"]
9442        #[doc = r" executes the request and returns a `Result` with the parsed"]
9443        #[doc = r" response."]
9444        #[doc = r""]
9445        #[doc = r" If you need lower-level access to the raw response details"]
9446        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
9447        #[doc = r" can finalize the request using the"]
9448        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
9449        #[doc = r" that resolves to a lower-level [`Response`] value."]
9450        pub struct RequestBuilder {
9451            pub(crate) client: super::super::Client,
9452            pub(crate) organization: String,
9453            pub(crate) project: String,
9454            pub(crate) definition_id: i32,
9455            pub(crate) deleted: bool,
9456        }
9457        impl RequestBuilder {
9458            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
9459            #[doc = ""]
9460            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
9461            #[doc = "However, this function can provide more flexibility when required."]
9462            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
9463                Box::pin({
9464                    let this = self.clone();
9465                    async move {
9466                        let url = this.url()?;
9467                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
9468                        if let Some(auth_header) = this
9469                            .client
9470                            .token_credential()
9471                            .http_authorization_header(&this.client.scopes())
9472                            .await?
9473                        {
9474                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
9475                        }
9476                        let deleted = &this.deleted;
9477                        req.url_mut()
9478                            .query_pairs_mut()
9479                            .append_pair("deleted", &deleted.to_string());
9480                        let req_body = azure_core::EMPTY_BODY;
9481                        req.set_body(req_body);
9482                        Ok(Response(this.client.send(&mut req).await?))
9483                    }
9484                })
9485            }
9486            fn url(&self) -> azure_core::Result<azure_core::Url> {
9487                let mut url = azure_core::Url::parse(&format!(
9488                    "{}/{}/{}/_apis/build/definitions/{}",
9489                    self.client.endpoint(),
9490                    &self.organization,
9491                    &self.project,
9492                    &self.definition_id
9493                ))?;
9494                let has_api_version_already = url
9495                    .query_pairs()
9496                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
9497                if !has_api_version_already {
9498                    url.query_pairs_mut()
9499                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
9500                }
9501                Ok(url)
9502            }
9503        }
9504        impl std::future::IntoFuture for RequestBuilder {
9505            type Output = azure_core::Result<models::BuildDefinition>;
9506            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildDefinition>>;
9507            #[doc = "Returns a future that sends the request and returns the parsed response body."]
9508            #[doc = ""]
9509            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
9510            #[doc = ""]
9511            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
9512            fn into_future(self) -> Self::IntoFuture {
9513                Box::pin(async move { self.send().await?.into_raw_body().await })
9514            }
9515        }
9516    }
9517    pub mod delete {
9518        use super::models;
9519        #[cfg(not(target_arch = "wasm32"))]
9520        use futures::future::BoxFuture;
9521        #[cfg(target_arch = "wasm32")]
9522        use futures::future::LocalBoxFuture as BoxFuture;
9523        #[derive(Debug)]
9524        pub struct Response(azure_core::Response);
9525        impl Response {
9526            pub fn into_raw_response(self) -> azure_core::Response {
9527                self.0
9528            }
9529            pub fn as_raw_response(&self) -> &azure_core::Response {
9530                &self.0
9531            }
9532        }
9533        impl From<Response> for azure_core::Response {
9534            fn from(rsp: Response) -> Self {
9535                rsp.into_raw_response()
9536            }
9537        }
9538        impl AsRef<azure_core::Response> for Response {
9539            fn as_ref(&self) -> &azure_core::Response {
9540                self.as_raw_response()
9541            }
9542        }
9543        #[derive(Clone)]
9544        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
9545        #[doc = r""]
9546        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
9547        #[doc = r" parameters can be chained."]
9548        #[doc = r""]
9549        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
9550        #[doc = r" converts the [`RequestBuilder`] into a future,"]
9551        #[doc = r" executes the request and returns a `Result` with the parsed"]
9552        #[doc = r" response."]
9553        #[doc = r""]
9554        #[doc = r" If you need lower-level access to the raw response details"]
9555        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
9556        #[doc = r" can finalize the request using the"]
9557        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
9558        #[doc = r" that resolves to a lower-level [`Response`] value."]
9559        pub struct RequestBuilder {
9560            pub(crate) client: super::super::Client,
9561            pub(crate) organization: String,
9562            pub(crate) project: String,
9563            pub(crate) definition_id: i32,
9564        }
9565        impl RequestBuilder {
9566            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
9567            #[doc = ""]
9568            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
9569            #[doc = "However, this function can provide more flexibility when required."]
9570            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
9571                Box::pin({
9572                    let this = self.clone();
9573                    async move {
9574                        let url = this.url()?;
9575                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
9576                        if let Some(auth_header) = this
9577                            .client
9578                            .token_credential()
9579                            .http_authorization_header(&this.client.scopes())
9580                            .await?
9581                        {
9582                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
9583                        }
9584                        let req_body = azure_core::EMPTY_BODY;
9585                        req.set_body(req_body);
9586                        Ok(Response(this.client.send(&mut req).await?))
9587                    }
9588                })
9589            }
9590            fn url(&self) -> azure_core::Result<azure_core::Url> {
9591                let mut url = azure_core::Url::parse(&format!(
9592                    "{}/{}/{}/_apis/build/definitions/{}",
9593                    self.client.endpoint(),
9594                    &self.organization,
9595                    &self.project,
9596                    &self.definition_id
9597                ))?;
9598                let has_api_version_already = url
9599                    .query_pairs()
9600                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
9601                if !has_api_version_already {
9602                    url.query_pairs_mut()
9603                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
9604                }
9605                Ok(url)
9606            }
9607        }
9608        impl std::future::IntoFuture for RequestBuilder {
9609            type Output = azure_core::Result<()>;
9610            type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
9611            #[doc = "Returns a future that sends the request and waits for the response."]
9612            #[doc = ""]
9613            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
9614            #[doc = ""]
9615            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
9616            fn into_future(self) -> Self::IntoFuture {
9617                Box::pin(async move {
9618                    let _rsp = self.send().await?;
9619                    Ok(())
9620                })
9621            }
9622        }
9623    }
9624    pub mod get_definition_revisions {
9625        use super::models;
9626        #[cfg(not(target_arch = "wasm32"))]
9627        use futures::future::BoxFuture;
9628        #[cfg(target_arch = "wasm32")]
9629        use futures::future::LocalBoxFuture as BoxFuture;
9630        #[derive(Debug)]
9631        pub struct Response(azure_core::Response);
9632        impl Response {
9633            pub async fn into_raw_body(
9634                self,
9635            ) -> azure_core::Result<models::BuildDefinitionRevisionList> {
9636                let bytes = self.0.into_raw_body().collect().await?;
9637                let body: models::BuildDefinitionRevisionList = serde_json::from_slice(&bytes)
9638                    .map_err(|e| {
9639                        azure_core::error::Error::full(
9640                            azure_core::error::ErrorKind::DataConversion,
9641                            e,
9642                            format!(
9643                                "Failed to deserialize response:\n{}",
9644                                String::from_utf8_lossy(&bytes)
9645                            ),
9646                        )
9647                    })?;
9648                Ok(body)
9649            }
9650            pub fn into_raw_response(self) -> azure_core::Response {
9651                self.0
9652            }
9653            pub fn as_raw_response(&self) -> &azure_core::Response {
9654                &self.0
9655            }
9656        }
9657        impl From<Response> for azure_core::Response {
9658            fn from(rsp: Response) -> Self {
9659                rsp.into_raw_response()
9660            }
9661        }
9662        impl AsRef<azure_core::Response> for Response {
9663            fn as_ref(&self) -> &azure_core::Response {
9664                self.as_raw_response()
9665            }
9666        }
9667        #[derive(Clone)]
9668        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
9669        #[doc = r""]
9670        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
9671        #[doc = r" parameters can be chained."]
9672        #[doc = r""]
9673        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
9674        #[doc = r" converts the [`RequestBuilder`] into a future,"]
9675        #[doc = r" executes the request and returns a `Result` with the parsed"]
9676        #[doc = r" response."]
9677        #[doc = r""]
9678        #[doc = r" If you need lower-level access to the raw response details"]
9679        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
9680        #[doc = r" can finalize the request using the"]
9681        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
9682        #[doc = r" that resolves to a lower-level [`Response`] value."]
9683        pub struct RequestBuilder {
9684            pub(crate) client: super::super::Client,
9685            pub(crate) organization: String,
9686            pub(crate) project: String,
9687            pub(crate) definition_id: i32,
9688        }
9689        impl RequestBuilder {
9690            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
9691            #[doc = ""]
9692            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
9693            #[doc = "However, this function can provide more flexibility when required."]
9694            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
9695                Box::pin({
9696                    let this = self.clone();
9697                    async move {
9698                        let url = this.url()?;
9699                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
9700                        if let Some(auth_header) = this
9701                            .client
9702                            .token_credential()
9703                            .http_authorization_header(&this.client.scopes())
9704                            .await?
9705                        {
9706                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
9707                        }
9708                        let req_body = azure_core::EMPTY_BODY;
9709                        req.set_body(req_body);
9710                        Ok(Response(this.client.send(&mut req).await?))
9711                    }
9712                })
9713            }
9714            fn url(&self) -> azure_core::Result<azure_core::Url> {
9715                let mut url = azure_core::Url::parse(&format!(
9716                    "{}/{}/{}/_apis/build/definitions/{}/revisions",
9717                    self.client.endpoint(),
9718                    &self.organization,
9719                    &self.project,
9720                    &self.definition_id
9721                ))?;
9722                let has_api_version_already = url
9723                    .query_pairs()
9724                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
9725                if !has_api_version_already {
9726                    url.query_pairs_mut()
9727                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
9728                }
9729                Ok(url)
9730            }
9731        }
9732        impl std::future::IntoFuture for RequestBuilder {
9733            type Output = azure_core::Result<models::BuildDefinitionRevisionList>;
9734            type IntoFuture =
9735                BoxFuture<'static, azure_core::Result<models::BuildDefinitionRevisionList>>;
9736            #[doc = "Returns a future that sends the request and returns the parsed response body."]
9737            #[doc = ""]
9738            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
9739            #[doc = ""]
9740            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
9741            fn into_future(self) -> Self::IntoFuture {
9742                Box::pin(async move { self.send().await?.into_raw_body().await })
9743            }
9744        }
9745    }
9746}
9747pub mod metrics {
9748    use super::models;
9749    #[cfg(not(target_arch = "wasm32"))]
9750    use futures::future::BoxFuture;
9751    #[cfg(target_arch = "wasm32")]
9752    use futures::future::LocalBoxFuture as BoxFuture;
9753    pub struct Client(pub(crate) super::Client);
9754    impl Client {
9755        #[doc = "Gets build metrics for a definition."]
9756        #[doc = ""]
9757        #[doc = "Arguments:"]
9758        #[doc = "* `organization`: The name of the Azure DevOps organization."]
9759        #[doc = "* `project`: Project ID or project name"]
9760        #[doc = "* `definition_id`: The ID of the definition."]
9761        pub fn get_definition_metrics(
9762            &self,
9763            organization: impl Into<String>,
9764            project: impl Into<String>,
9765            definition_id: i32,
9766        ) -> get_definition_metrics::RequestBuilder {
9767            get_definition_metrics::RequestBuilder {
9768                client: self.0.clone(),
9769                organization: organization.into(),
9770                project: project.into(),
9771                definition_id,
9772                min_metrics_time: None,
9773            }
9774        }
9775        #[doc = "Gets build metrics for a project."]
9776        #[doc = ""]
9777        #[doc = "Arguments:"]
9778        #[doc = "* `organization`: The name of the Azure DevOps organization."]
9779        #[doc = "* `project`: Project ID or project name"]
9780        #[doc = "* `metric_aggregation_type`: The aggregation type to use (hourly, daily)."]
9781        pub fn get_project_metrics(
9782            &self,
9783            organization: impl Into<String>,
9784            project: impl Into<String>,
9785            metric_aggregation_type: impl Into<String>,
9786        ) -> get_project_metrics::RequestBuilder {
9787            get_project_metrics::RequestBuilder {
9788                client: self.0.clone(),
9789                organization: organization.into(),
9790                project: project.into(),
9791                metric_aggregation_type: metric_aggregation_type.into(),
9792                min_metrics_time: None,
9793            }
9794        }
9795    }
9796    pub mod get_definition_metrics {
9797        use super::models;
9798        #[cfg(not(target_arch = "wasm32"))]
9799        use futures::future::BoxFuture;
9800        #[cfg(target_arch = "wasm32")]
9801        use futures::future::LocalBoxFuture as BoxFuture;
9802        #[derive(Debug)]
9803        pub struct Response(azure_core::Response);
9804        impl Response {
9805            pub async fn into_raw_body(self) -> azure_core::Result<models::BuildMetricList> {
9806                let bytes = self.0.into_raw_body().collect().await?;
9807                let body: models::BuildMetricList =
9808                    serde_json::from_slice(&bytes).map_err(|e| {
9809                        azure_core::error::Error::full(
9810                            azure_core::error::ErrorKind::DataConversion,
9811                            e,
9812                            format!(
9813                                "Failed to deserialize response:\n{}",
9814                                String::from_utf8_lossy(&bytes)
9815                            ),
9816                        )
9817                    })?;
9818                Ok(body)
9819            }
9820            pub fn into_raw_response(self) -> azure_core::Response {
9821                self.0
9822            }
9823            pub fn as_raw_response(&self) -> &azure_core::Response {
9824                &self.0
9825            }
9826        }
9827        impl From<Response> for azure_core::Response {
9828            fn from(rsp: Response) -> Self {
9829                rsp.into_raw_response()
9830            }
9831        }
9832        impl AsRef<azure_core::Response> for Response {
9833            fn as_ref(&self) -> &azure_core::Response {
9834                self.as_raw_response()
9835            }
9836        }
9837        #[derive(Clone)]
9838        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
9839        #[doc = r""]
9840        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
9841        #[doc = r" parameters can be chained."]
9842        #[doc = r""]
9843        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
9844        #[doc = r" converts the [`RequestBuilder`] into a future,"]
9845        #[doc = r" executes the request and returns a `Result` with the parsed"]
9846        #[doc = r" response."]
9847        #[doc = r""]
9848        #[doc = r" If you need lower-level access to the raw response details"]
9849        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
9850        #[doc = r" can finalize the request using the"]
9851        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
9852        #[doc = r" that resolves to a lower-level [`Response`] value."]
9853        pub struct RequestBuilder {
9854            pub(crate) client: super::super::Client,
9855            pub(crate) organization: String,
9856            pub(crate) project: String,
9857            pub(crate) definition_id: i32,
9858            pub(crate) min_metrics_time: Option<time::OffsetDateTime>,
9859        }
9860        impl RequestBuilder {
9861            #[doc = "The date from which to calculate metrics."]
9862            pub fn min_metrics_time(
9863                mut self,
9864                min_metrics_time: impl Into<time::OffsetDateTime>,
9865            ) -> Self {
9866                self.min_metrics_time = Some(min_metrics_time.into());
9867                self
9868            }
9869            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
9870            #[doc = ""]
9871            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
9872            #[doc = "However, this function can provide more flexibility when required."]
9873            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
9874                Box::pin({
9875                    let this = self.clone();
9876                    async move {
9877                        let url = this.url()?;
9878                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
9879                        if let Some(auth_header) = this
9880                            .client
9881                            .token_credential()
9882                            .http_authorization_header(&this.client.scopes())
9883                            .await?
9884                        {
9885                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
9886                        }
9887                        if let Some(min_metrics_time) = &this.min_metrics_time {
9888                            req.url_mut()
9889                                .query_pairs_mut()
9890                                .append_pair("minMetricsTime", &min_metrics_time.to_string());
9891                        }
9892                        let req_body = azure_core::EMPTY_BODY;
9893                        req.set_body(req_body);
9894                        Ok(Response(this.client.send(&mut req).await?))
9895                    }
9896                })
9897            }
9898            fn url(&self) -> azure_core::Result<azure_core::Url> {
9899                let mut url = azure_core::Url::parse(&format!(
9900                    "{}/{}/{}/_apis/build/definitions/{}/metrics",
9901                    self.client.endpoint(),
9902                    &self.organization,
9903                    &self.project,
9904                    &self.definition_id
9905                ))?;
9906                let has_api_version_already = url
9907                    .query_pairs()
9908                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
9909                if !has_api_version_already {
9910                    url.query_pairs_mut()
9911                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
9912                }
9913                Ok(url)
9914            }
9915        }
9916        impl std::future::IntoFuture for RequestBuilder {
9917            type Output = azure_core::Result<models::BuildMetricList>;
9918            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildMetricList>>;
9919            #[doc = "Returns a future that sends the request and returns the parsed response body."]
9920            #[doc = ""]
9921            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
9922            #[doc = ""]
9923            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
9924            fn into_future(self) -> Self::IntoFuture {
9925                Box::pin(async move { self.send().await?.into_raw_body().await })
9926            }
9927        }
9928    }
9929    pub mod get_project_metrics {
9930        use super::models;
9931        #[cfg(not(target_arch = "wasm32"))]
9932        use futures::future::BoxFuture;
9933        #[cfg(target_arch = "wasm32")]
9934        use futures::future::LocalBoxFuture as BoxFuture;
9935        #[derive(Debug)]
9936        pub struct Response(azure_core::Response);
9937        impl Response {
9938            pub async fn into_raw_body(self) -> azure_core::Result<models::BuildMetricList> {
9939                let bytes = self.0.into_raw_body().collect().await?;
9940                let body: models::BuildMetricList =
9941                    serde_json::from_slice(&bytes).map_err(|e| {
9942                        azure_core::error::Error::full(
9943                            azure_core::error::ErrorKind::DataConversion,
9944                            e,
9945                            format!(
9946                                "Failed to deserialize response:\n{}",
9947                                String::from_utf8_lossy(&bytes)
9948                            ),
9949                        )
9950                    })?;
9951                Ok(body)
9952            }
9953            pub fn into_raw_response(self) -> azure_core::Response {
9954                self.0
9955            }
9956            pub fn as_raw_response(&self) -> &azure_core::Response {
9957                &self.0
9958            }
9959        }
9960        impl From<Response> for azure_core::Response {
9961            fn from(rsp: Response) -> Self {
9962                rsp.into_raw_response()
9963            }
9964        }
9965        impl AsRef<azure_core::Response> for Response {
9966            fn as_ref(&self) -> &azure_core::Response {
9967                self.as_raw_response()
9968            }
9969        }
9970        #[derive(Clone)]
9971        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
9972        #[doc = r""]
9973        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
9974        #[doc = r" parameters can be chained."]
9975        #[doc = r""]
9976        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
9977        #[doc = r" converts the [`RequestBuilder`] into a future,"]
9978        #[doc = r" executes the request and returns a `Result` with the parsed"]
9979        #[doc = r" response."]
9980        #[doc = r""]
9981        #[doc = r" If you need lower-level access to the raw response details"]
9982        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
9983        #[doc = r" can finalize the request using the"]
9984        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
9985        #[doc = r" that resolves to a lower-level [`Response`] value."]
9986        pub struct RequestBuilder {
9987            pub(crate) client: super::super::Client,
9988            pub(crate) organization: String,
9989            pub(crate) project: String,
9990            pub(crate) metric_aggregation_type: String,
9991            pub(crate) min_metrics_time: Option<time::OffsetDateTime>,
9992        }
9993        impl RequestBuilder {
9994            #[doc = "The date from which to calculate metrics."]
9995            pub fn min_metrics_time(
9996                mut self,
9997                min_metrics_time: impl Into<time::OffsetDateTime>,
9998            ) -> Self {
9999                self.min_metrics_time = Some(min_metrics_time.into());
10000                self
10001            }
10002            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
10003            #[doc = ""]
10004            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
10005            #[doc = "However, this function can provide more flexibility when required."]
10006            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
10007                Box::pin({
10008                    let this = self.clone();
10009                    async move {
10010                        let url = this.url()?;
10011                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
10012                        if let Some(auth_header) = this
10013                            .client
10014                            .token_credential()
10015                            .http_authorization_header(&this.client.scopes())
10016                            .await?
10017                        {
10018                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
10019                        }
10020                        if let Some(min_metrics_time) = &this.min_metrics_time {
10021                            req.url_mut()
10022                                .query_pairs_mut()
10023                                .append_pair("minMetricsTime", &min_metrics_time.to_string());
10024                        }
10025                        let req_body = azure_core::EMPTY_BODY;
10026                        req.set_body(req_body);
10027                        Ok(Response(this.client.send(&mut req).await?))
10028                    }
10029                })
10030            }
10031            fn url(&self) -> azure_core::Result<azure_core::Url> {
10032                let mut url = azure_core::Url::parse(&format!(
10033                    "{}/{}/{}/_apis/build/metrics/{}",
10034                    self.client.endpoint(),
10035                    &self.organization,
10036                    &self.project,
10037                    &self.metric_aggregation_type
10038                ))?;
10039                let has_api_version_already = url
10040                    .query_pairs()
10041                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
10042                if !has_api_version_already {
10043                    url.query_pairs_mut()
10044                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
10045                }
10046                Ok(url)
10047            }
10048        }
10049        impl std::future::IntoFuture for RequestBuilder {
10050            type Output = azure_core::Result<models::BuildMetricList>;
10051            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildMetricList>>;
10052            #[doc = "Returns a future that sends the request and returns the parsed response body."]
10053            #[doc = ""]
10054            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
10055            #[doc = ""]
10056            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
10057            fn into_future(self) -> Self::IntoFuture {
10058                Box::pin(async move { self.send().await?.into_raw_body().await })
10059            }
10060        }
10061    }
10062}
10063pub mod resources {
10064    use super::models;
10065    #[cfg(not(target_arch = "wasm32"))]
10066    use futures::future::BoxFuture;
10067    #[cfg(target_arch = "wasm32")]
10068    use futures::future::LocalBoxFuture as BoxFuture;
10069    pub struct Client(pub(crate) super::Client);
10070    impl Client {
10071        #[doc = "Arguments:"]
10072        #[doc = "* `organization`: The name of the Azure DevOps organization."]
10073        #[doc = "* `project`: Project ID or project name"]
10074        pub fn list(
10075            &self,
10076            organization: impl Into<String>,
10077            project: impl Into<String>,
10078            definition_id: i32,
10079        ) -> list::RequestBuilder {
10080            list::RequestBuilder {
10081                client: self.0.clone(),
10082                organization: organization.into(),
10083                project: project.into(),
10084                definition_id,
10085            }
10086        }
10087        #[doc = "Arguments:"]
10088        #[doc = "* `organization`: The name of the Azure DevOps organization."]
10089        #[doc = "* `project`: Project ID or project name"]
10090        pub fn authorize_definition_resources(
10091            &self,
10092            organization: impl Into<String>,
10093            body: Vec<models::DefinitionResourceReference>,
10094            project: impl Into<String>,
10095            definition_id: i32,
10096        ) -> authorize_definition_resources::RequestBuilder {
10097            authorize_definition_resources::RequestBuilder {
10098                client: self.0.clone(),
10099                organization: organization.into(),
10100                body,
10101                project: project.into(),
10102                definition_id,
10103            }
10104        }
10105    }
10106    pub mod list {
10107        use super::models;
10108        #[cfg(not(target_arch = "wasm32"))]
10109        use futures::future::BoxFuture;
10110        #[cfg(target_arch = "wasm32")]
10111        use futures::future::LocalBoxFuture as BoxFuture;
10112        #[derive(Debug)]
10113        pub struct Response(azure_core::Response);
10114        impl Response {
10115            pub async fn into_raw_body(
10116                self,
10117            ) -> azure_core::Result<models::DefinitionResourceReferenceList> {
10118                let bytes = self.0.into_raw_body().collect().await?;
10119                let body: models::DefinitionResourceReferenceList = serde_json::from_slice(&bytes)
10120                    .map_err(|e| {
10121                        azure_core::error::Error::full(
10122                            azure_core::error::ErrorKind::DataConversion,
10123                            e,
10124                            format!(
10125                                "Failed to deserialize response:\n{}",
10126                                String::from_utf8_lossy(&bytes)
10127                            ),
10128                        )
10129                    })?;
10130                Ok(body)
10131            }
10132            pub fn into_raw_response(self) -> azure_core::Response {
10133                self.0
10134            }
10135            pub fn as_raw_response(&self) -> &azure_core::Response {
10136                &self.0
10137            }
10138        }
10139        impl From<Response> for azure_core::Response {
10140            fn from(rsp: Response) -> Self {
10141                rsp.into_raw_response()
10142            }
10143        }
10144        impl AsRef<azure_core::Response> for Response {
10145            fn as_ref(&self) -> &azure_core::Response {
10146                self.as_raw_response()
10147            }
10148        }
10149        #[derive(Clone)]
10150        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
10151        #[doc = r""]
10152        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
10153        #[doc = r" parameters can be chained."]
10154        #[doc = r""]
10155        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
10156        #[doc = r" converts the [`RequestBuilder`] into a future,"]
10157        #[doc = r" executes the request and returns a `Result` with the parsed"]
10158        #[doc = r" response."]
10159        #[doc = r""]
10160        #[doc = r" If you need lower-level access to the raw response details"]
10161        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
10162        #[doc = r" can finalize the request using the"]
10163        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
10164        #[doc = r" that resolves to a lower-level [`Response`] value."]
10165        pub struct RequestBuilder {
10166            pub(crate) client: super::super::Client,
10167            pub(crate) organization: String,
10168            pub(crate) project: String,
10169            pub(crate) definition_id: i32,
10170        }
10171        impl RequestBuilder {
10172            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
10173            #[doc = ""]
10174            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
10175            #[doc = "However, this function can provide more flexibility when required."]
10176            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
10177                Box::pin({
10178                    let this = self.clone();
10179                    async move {
10180                        let url = this.url()?;
10181                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
10182                        if let Some(auth_header) = this
10183                            .client
10184                            .token_credential()
10185                            .http_authorization_header(&this.client.scopes())
10186                            .await?
10187                        {
10188                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
10189                        }
10190                        let req_body = azure_core::EMPTY_BODY;
10191                        req.set_body(req_body);
10192                        Ok(Response(this.client.send(&mut req).await?))
10193                    }
10194                })
10195            }
10196            fn url(&self) -> azure_core::Result<azure_core::Url> {
10197                let mut url = azure_core::Url::parse(&format!(
10198                    "{}/{}/{}/_apis/build/definitions/{}/resources",
10199                    self.client.endpoint(),
10200                    &self.organization,
10201                    &self.project,
10202                    &self.definition_id
10203                ))?;
10204                let has_api_version_already = url
10205                    .query_pairs()
10206                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
10207                if !has_api_version_already {
10208                    url.query_pairs_mut()
10209                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
10210                }
10211                Ok(url)
10212            }
10213        }
10214        impl std::future::IntoFuture for RequestBuilder {
10215            type Output = azure_core::Result<models::DefinitionResourceReferenceList>;
10216            type IntoFuture =
10217                BoxFuture<'static, azure_core::Result<models::DefinitionResourceReferenceList>>;
10218            #[doc = "Returns a future that sends the request and returns the parsed response body."]
10219            #[doc = ""]
10220            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
10221            #[doc = ""]
10222            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
10223            fn into_future(self) -> Self::IntoFuture {
10224                Box::pin(async move { self.send().await?.into_raw_body().await })
10225            }
10226        }
10227    }
10228    pub mod authorize_definition_resources {
10229        use super::models;
10230        #[cfg(not(target_arch = "wasm32"))]
10231        use futures::future::BoxFuture;
10232        #[cfg(target_arch = "wasm32")]
10233        use futures::future::LocalBoxFuture as BoxFuture;
10234        #[derive(Debug)]
10235        pub struct Response(azure_core::Response);
10236        impl Response {
10237            pub async fn into_raw_body(
10238                self,
10239            ) -> azure_core::Result<models::DefinitionResourceReferenceList> {
10240                let bytes = self.0.into_raw_body().collect().await?;
10241                let body: models::DefinitionResourceReferenceList = serde_json::from_slice(&bytes)
10242                    .map_err(|e| {
10243                        azure_core::error::Error::full(
10244                            azure_core::error::ErrorKind::DataConversion,
10245                            e,
10246                            format!(
10247                                "Failed to deserialize response:\n{}",
10248                                String::from_utf8_lossy(&bytes)
10249                            ),
10250                        )
10251                    })?;
10252                Ok(body)
10253            }
10254            pub fn into_raw_response(self) -> azure_core::Response {
10255                self.0
10256            }
10257            pub fn as_raw_response(&self) -> &azure_core::Response {
10258                &self.0
10259            }
10260        }
10261        impl From<Response> for azure_core::Response {
10262            fn from(rsp: Response) -> Self {
10263                rsp.into_raw_response()
10264            }
10265        }
10266        impl AsRef<azure_core::Response> for Response {
10267            fn as_ref(&self) -> &azure_core::Response {
10268                self.as_raw_response()
10269            }
10270        }
10271        #[derive(Clone)]
10272        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
10273        #[doc = r""]
10274        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
10275        #[doc = r" parameters can be chained."]
10276        #[doc = r""]
10277        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
10278        #[doc = r" converts the [`RequestBuilder`] into a future,"]
10279        #[doc = r" executes the request and returns a `Result` with the parsed"]
10280        #[doc = r" response."]
10281        #[doc = r""]
10282        #[doc = r" If you need lower-level access to the raw response details"]
10283        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
10284        #[doc = r" can finalize the request using the"]
10285        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
10286        #[doc = r" that resolves to a lower-level [`Response`] value."]
10287        pub struct RequestBuilder {
10288            pub(crate) client: super::super::Client,
10289            pub(crate) organization: String,
10290            pub(crate) body: Vec<models::DefinitionResourceReference>,
10291            pub(crate) project: String,
10292            pub(crate) definition_id: i32,
10293        }
10294        impl RequestBuilder {
10295            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
10296            #[doc = ""]
10297            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
10298            #[doc = "However, this function can provide more flexibility when required."]
10299            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
10300                Box::pin({
10301                    let this = self.clone();
10302                    async move {
10303                        let url = this.url()?;
10304                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
10305                        if let Some(auth_header) = this
10306                            .client
10307                            .token_credential()
10308                            .http_authorization_header(&this.client.scopes())
10309                            .await?
10310                        {
10311                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
10312                        }
10313                        req.insert_header("content-type", "application/json");
10314                        let req_body = azure_core::json::to_json(&this.body)?;
10315                        req.set_body(req_body);
10316                        Ok(Response(this.client.send(&mut req).await?))
10317                    }
10318                })
10319            }
10320            fn url(&self) -> azure_core::Result<azure_core::Url> {
10321                let mut url = azure_core::Url::parse(&format!(
10322                    "{}/{}/{}/_apis/build/definitions/{}/resources",
10323                    self.client.endpoint(),
10324                    &self.organization,
10325                    &self.project,
10326                    &self.definition_id
10327                ))?;
10328                let has_api_version_already = url
10329                    .query_pairs()
10330                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
10331                if !has_api_version_already {
10332                    url.query_pairs_mut()
10333                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
10334                }
10335                Ok(url)
10336            }
10337        }
10338        impl std::future::IntoFuture for RequestBuilder {
10339            type Output = azure_core::Result<models::DefinitionResourceReferenceList>;
10340            type IntoFuture =
10341                BoxFuture<'static, azure_core::Result<models::DefinitionResourceReferenceList>>;
10342            #[doc = "Returns a future that sends the request and returns the parsed response body."]
10343            #[doc = ""]
10344            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
10345            #[doc = ""]
10346            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
10347            fn into_future(self) -> Self::IntoFuture {
10348                Box::pin(async move { self.send().await?.into_raw_body().await })
10349            }
10350        }
10351    }
10352}
10353pub mod yaml {
10354    use super::models;
10355    #[cfg(not(target_arch = "wasm32"))]
10356    use futures::future::BoxFuture;
10357    #[cfg(target_arch = "wasm32")]
10358    use futures::future::LocalBoxFuture as BoxFuture;
10359    pub struct Client(pub(crate) super::Client);
10360    impl Client {
10361        #[doc = "Converts a definition to YAML, optionally at a specific revision."]
10362        #[doc = ""]
10363        #[doc = "Arguments:"]
10364        #[doc = "* `organization`: The name of the Azure DevOps organization."]
10365        #[doc = "* `project`: Project ID or project name"]
10366        #[doc = "* `definition_id`: The ID of the definition."]
10367        pub fn get(
10368            &self,
10369            organization: impl Into<String>,
10370            project: impl Into<String>,
10371            definition_id: i32,
10372        ) -> get::RequestBuilder {
10373            get::RequestBuilder {
10374                client: self.0.clone(),
10375                organization: organization.into(),
10376                project: project.into(),
10377                definition_id,
10378                revision: None,
10379                min_metrics_time: None,
10380                property_filters: None,
10381                include_latest_builds: None,
10382            }
10383        }
10384    }
10385    pub mod get {
10386        use super::models;
10387        #[cfg(not(target_arch = "wasm32"))]
10388        use futures::future::BoxFuture;
10389        #[cfg(target_arch = "wasm32")]
10390        use futures::future::LocalBoxFuture as BoxFuture;
10391        #[derive(Debug)]
10392        pub struct Response(azure_core::Response);
10393        impl Response {
10394            pub async fn into_raw_body(self) -> azure_core::Result<models::YamlBuild> {
10395                let bytes = self.0.into_raw_body().collect().await?;
10396                let body: models::YamlBuild = serde_json::from_slice(&bytes).map_err(|e| {
10397                    azure_core::error::Error::full(
10398                        azure_core::error::ErrorKind::DataConversion,
10399                        e,
10400                        format!(
10401                            "Failed to deserialize response:\n{}",
10402                            String::from_utf8_lossy(&bytes)
10403                        ),
10404                    )
10405                })?;
10406                Ok(body)
10407            }
10408            pub fn into_raw_response(self) -> azure_core::Response {
10409                self.0
10410            }
10411            pub fn as_raw_response(&self) -> &azure_core::Response {
10412                &self.0
10413            }
10414        }
10415        impl From<Response> for azure_core::Response {
10416            fn from(rsp: Response) -> Self {
10417                rsp.into_raw_response()
10418            }
10419        }
10420        impl AsRef<azure_core::Response> for Response {
10421            fn as_ref(&self) -> &azure_core::Response {
10422                self.as_raw_response()
10423            }
10424        }
10425        #[derive(Clone)]
10426        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
10427        #[doc = r""]
10428        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
10429        #[doc = r" parameters can be chained."]
10430        #[doc = r""]
10431        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
10432        #[doc = r" converts the [`RequestBuilder`] into a future,"]
10433        #[doc = r" executes the request and returns a `Result` with the parsed"]
10434        #[doc = r" response."]
10435        #[doc = r""]
10436        #[doc = r" If you need lower-level access to the raw response details"]
10437        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
10438        #[doc = r" can finalize the request using the"]
10439        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
10440        #[doc = r" that resolves to a lower-level [`Response`] value."]
10441        pub struct RequestBuilder {
10442            pub(crate) client: super::super::Client,
10443            pub(crate) organization: String,
10444            pub(crate) project: String,
10445            pub(crate) definition_id: i32,
10446            pub(crate) revision: Option<i32>,
10447            pub(crate) min_metrics_time: Option<time::OffsetDateTime>,
10448            pub(crate) property_filters: Option<String>,
10449            pub(crate) include_latest_builds: Option<bool>,
10450        }
10451        impl RequestBuilder {
10452            #[doc = "The revision number to retrieve. If this is not specified, the latest version will be returned."]
10453            pub fn revision(mut self, revision: i32) -> Self {
10454                self.revision = Some(revision);
10455                self
10456            }
10457            #[doc = "If specified, indicates the date from which metrics should be included."]
10458            pub fn min_metrics_time(
10459                mut self,
10460                min_metrics_time: impl Into<time::OffsetDateTime>,
10461            ) -> Self {
10462                self.min_metrics_time = Some(min_metrics_time.into());
10463                self
10464            }
10465            #[doc = "A comma-delimited list of properties to include in the results."]
10466            pub fn property_filters(mut self, property_filters: impl Into<String>) -> Self {
10467                self.property_filters = Some(property_filters.into());
10468                self
10469            }
10470            pub fn include_latest_builds(mut self, include_latest_builds: bool) -> Self {
10471                self.include_latest_builds = Some(include_latest_builds);
10472                self
10473            }
10474            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
10475            #[doc = ""]
10476            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
10477            #[doc = "However, this function can provide more flexibility when required."]
10478            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
10479                Box::pin({
10480                    let this = self.clone();
10481                    async move {
10482                        let url = this.url()?;
10483                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
10484                        if let Some(auth_header) = this
10485                            .client
10486                            .token_credential()
10487                            .http_authorization_header(&this.client.scopes())
10488                            .await?
10489                        {
10490                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
10491                        }
10492                        if let Some(revision) = &this.revision {
10493                            req.url_mut()
10494                                .query_pairs_mut()
10495                                .append_pair("revision", &revision.to_string());
10496                        }
10497                        if let Some(min_metrics_time) = &this.min_metrics_time {
10498                            req.url_mut()
10499                                .query_pairs_mut()
10500                                .append_pair("minMetricsTime", &min_metrics_time.to_string());
10501                        }
10502                        if let Some(property_filters) = &this.property_filters {
10503                            req.url_mut()
10504                                .query_pairs_mut()
10505                                .append_pair("propertyFilters", property_filters);
10506                        }
10507                        if let Some(include_latest_builds) = &this.include_latest_builds {
10508                            req.url_mut().query_pairs_mut().append_pair(
10509                                "includeLatestBuilds",
10510                                &include_latest_builds.to_string(),
10511                            );
10512                        }
10513                        let req_body = azure_core::EMPTY_BODY;
10514                        req.set_body(req_body);
10515                        Ok(Response(this.client.send(&mut req).await?))
10516                    }
10517                })
10518            }
10519            fn url(&self) -> azure_core::Result<azure_core::Url> {
10520                let mut url = azure_core::Url::parse(&format!(
10521                    "{}/{}/{}/_apis/build/definitions/{}/yaml",
10522                    self.client.endpoint(),
10523                    &self.organization,
10524                    &self.project,
10525                    &self.definition_id
10526                ))?;
10527                let has_api_version_already = url
10528                    .query_pairs()
10529                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
10530                if !has_api_version_already {
10531                    url.query_pairs_mut()
10532                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
10533                }
10534                Ok(url)
10535            }
10536        }
10537        impl std::future::IntoFuture for RequestBuilder {
10538            type Output = azure_core::Result<models::YamlBuild>;
10539            type IntoFuture = BoxFuture<'static, azure_core::Result<models::YamlBuild>>;
10540            #[doc = "Returns a future that sends the request and returns the parsed response body."]
10541            #[doc = ""]
10542            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
10543            #[doc = ""]
10544            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
10545            fn into_future(self) -> Self::IntoFuture {
10546                Box::pin(async move { self.send().await?.into_raw_body().await })
10547            }
10548        }
10549    }
10550}
10551pub mod templates {
10552    use super::models;
10553    #[cfg(not(target_arch = "wasm32"))]
10554    use futures::future::BoxFuture;
10555    #[cfg(target_arch = "wasm32")]
10556    use futures::future::LocalBoxFuture as BoxFuture;
10557    pub struct Client(pub(crate) super::Client);
10558    impl Client {
10559        #[doc = "Gets all definition templates."]
10560        #[doc = ""]
10561        #[doc = "Arguments:"]
10562        #[doc = "* `organization`: The name of the Azure DevOps organization."]
10563        #[doc = "* `project`: Project ID or project name"]
10564        pub fn list(
10565            &self,
10566            organization: impl Into<String>,
10567            project: impl Into<String>,
10568        ) -> list::RequestBuilder {
10569            list::RequestBuilder {
10570                client: self.0.clone(),
10571                organization: organization.into(),
10572                project: project.into(),
10573            }
10574        }
10575        #[doc = "Gets a specific build definition template."]
10576        #[doc = ""]
10577        #[doc = "Arguments:"]
10578        #[doc = "* `organization`: The name of the Azure DevOps organization."]
10579        #[doc = "* `project`: Project ID or project name"]
10580        #[doc = "* `template_id`: The ID of the requested template."]
10581        pub fn get(
10582            &self,
10583            organization: impl Into<String>,
10584            project: impl Into<String>,
10585            template_id: impl Into<String>,
10586        ) -> get::RequestBuilder {
10587            get::RequestBuilder {
10588                client: self.0.clone(),
10589                organization: organization.into(),
10590                project: project.into(),
10591                template_id: template_id.into(),
10592            }
10593        }
10594        #[doc = "Updates an existing build definition template."]
10595        #[doc = ""]
10596        #[doc = "Arguments:"]
10597        #[doc = "* `organization`: The name of the Azure DevOps organization."]
10598        #[doc = "* `body`: The new version of the template."]
10599        #[doc = "* `project`: Project ID or project name"]
10600        #[doc = "* `template_id`: The ID of the template."]
10601        pub fn save_template(
10602            &self,
10603            organization: impl Into<String>,
10604            body: impl Into<models::BuildDefinitionTemplate>,
10605            project: impl Into<String>,
10606            template_id: impl Into<String>,
10607        ) -> save_template::RequestBuilder {
10608            save_template::RequestBuilder {
10609                client: self.0.clone(),
10610                organization: organization.into(),
10611                body: body.into(),
10612                project: project.into(),
10613                template_id: template_id.into(),
10614            }
10615        }
10616        #[doc = "Deletes a build definition template."]
10617        #[doc = ""]
10618        #[doc = "Arguments:"]
10619        #[doc = "* `organization`: The name of the Azure DevOps organization."]
10620        #[doc = "* `project`: Project ID or project name"]
10621        #[doc = "* `template_id`: The ID of the template."]
10622        pub fn delete(
10623            &self,
10624            organization: impl Into<String>,
10625            project: impl Into<String>,
10626            template_id: impl Into<String>,
10627        ) -> delete::RequestBuilder {
10628            delete::RequestBuilder {
10629                client: self.0.clone(),
10630                organization: organization.into(),
10631                project: project.into(),
10632                template_id: template_id.into(),
10633            }
10634        }
10635    }
10636    pub mod list {
10637        use super::models;
10638        #[cfg(not(target_arch = "wasm32"))]
10639        use futures::future::BoxFuture;
10640        #[cfg(target_arch = "wasm32")]
10641        use futures::future::LocalBoxFuture as BoxFuture;
10642        #[derive(Debug)]
10643        pub struct Response(azure_core::Response);
10644        impl Response {
10645            pub async fn into_raw_body(
10646                self,
10647            ) -> azure_core::Result<models::BuildDefinitionTemplateList> {
10648                let bytes = self.0.into_raw_body().collect().await?;
10649                let body: models::BuildDefinitionTemplateList = serde_json::from_slice(&bytes)
10650                    .map_err(|e| {
10651                        azure_core::error::Error::full(
10652                            azure_core::error::ErrorKind::DataConversion,
10653                            e,
10654                            format!(
10655                                "Failed to deserialize response:\n{}",
10656                                String::from_utf8_lossy(&bytes)
10657                            ),
10658                        )
10659                    })?;
10660                Ok(body)
10661            }
10662            pub fn into_raw_response(self) -> azure_core::Response {
10663                self.0
10664            }
10665            pub fn as_raw_response(&self) -> &azure_core::Response {
10666                &self.0
10667            }
10668        }
10669        impl From<Response> for azure_core::Response {
10670            fn from(rsp: Response) -> Self {
10671                rsp.into_raw_response()
10672            }
10673        }
10674        impl AsRef<azure_core::Response> for Response {
10675            fn as_ref(&self) -> &azure_core::Response {
10676                self.as_raw_response()
10677            }
10678        }
10679        #[derive(Clone)]
10680        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
10681        #[doc = r""]
10682        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
10683        #[doc = r" parameters can be chained."]
10684        #[doc = r""]
10685        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
10686        #[doc = r" converts the [`RequestBuilder`] into a future,"]
10687        #[doc = r" executes the request and returns a `Result` with the parsed"]
10688        #[doc = r" response."]
10689        #[doc = r""]
10690        #[doc = r" If you need lower-level access to the raw response details"]
10691        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
10692        #[doc = r" can finalize the request using the"]
10693        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
10694        #[doc = r" that resolves to a lower-level [`Response`] value."]
10695        pub struct RequestBuilder {
10696            pub(crate) client: super::super::Client,
10697            pub(crate) organization: String,
10698            pub(crate) project: String,
10699        }
10700        impl RequestBuilder {
10701            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
10702            #[doc = ""]
10703            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
10704            #[doc = "However, this function can provide more flexibility when required."]
10705            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
10706                Box::pin({
10707                    let this = self.clone();
10708                    async move {
10709                        let url = this.url()?;
10710                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
10711                        if let Some(auth_header) = this
10712                            .client
10713                            .token_credential()
10714                            .http_authorization_header(&this.client.scopes())
10715                            .await?
10716                        {
10717                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
10718                        }
10719                        let req_body = azure_core::EMPTY_BODY;
10720                        req.set_body(req_body);
10721                        Ok(Response(this.client.send(&mut req).await?))
10722                    }
10723                })
10724            }
10725            fn url(&self) -> azure_core::Result<azure_core::Url> {
10726                let mut url = azure_core::Url::parse(&format!(
10727                    "{}/{}/{}/_apis/build/definitions/templates",
10728                    self.client.endpoint(),
10729                    &self.organization,
10730                    &self.project
10731                ))?;
10732                let has_api_version_already = url
10733                    .query_pairs()
10734                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
10735                if !has_api_version_already {
10736                    url.query_pairs_mut()
10737                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
10738                }
10739                Ok(url)
10740            }
10741        }
10742        impl std::future::IntoFuture for RequestBuilder {
10743            type Output = azure_core::Result<models::BuildDefinitionTemplateList>;
10744            type IntoFuture =
10745                BoxFuture<'static, azure_core::Result<models::BuildDefinitionTemplateList>>;
10746            #[doc = "Returns a future that sends the request and returns the parsed response body."]
10747            #[doc = ""]
10748            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
10749            #[doc = ""]
10750            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
10751            fn into_future(self) -> Self::IntoFuture {
10752                Box::pin(async move { self.send().await?.into_raw_body().await })
10753            }
10754        }
10755    }
10756    pub mod get {
10757        use super::models;
10758        #[cfg(not(target_arch = "wasm32"))]
10759        use futures::future::BoxFuture;
10760        #[cfg(target_arch = "wasm32")]
10761        use futures::future::LocalBoxFuture as BoxFuture;
10762        #[derive(Debug)]
10763        pub struct Response(azure_core::Response);
10764        impl Response {
10765            pub async fn into_raw_body(
10766                self,
10767            ) -> azure_core::Result<models::BuildDefinitionTemplate> {
10768                let bytes = self.0.into_raw_body().collect().await?;
10769                let body: models::BuildDefinitionTemplate = serde_json::from_slice(&bytes)
10770                    .map_err(|e| {
10771                        azure_core::error::Error::full(
10772                            azure_core::error::ErrorKind::DataConversion,
10773                            e,
10774                            format!(
10775                                "Failed to deserialize response:\n{}",
10776                                String::from_utf8_lossy(&bytes)
10777                            ),
10778                        )
10779                    })?;
10780                Ok(body)
10781            }
10782            pub fn into_raw_response(self) -> azure_core::Response {
10783                self.0
10784            }
10785            pub fn as_raw_response(&self) -> &azure_core::Response {
10786                &self.0
10787            }
10788        }
10789        impl From<Response> for azure_core::Response {
10790            fn from(rsp: Response) -> Self {
10791                rsp.into_raw_response()
10792            }
10793        }
10794        impl AsRef<azure_core::Response> for Response {
10795            fn as_ref(&self) -> &azure_core::Response {
10796                self.as_raw_response()
10797            }
10798        }
10799        #[derive(Clone)]
10800        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
10801        #[doc = r""]
10802        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
10803        #[doc = r" parameters can be chained."]
10804        #[doc = r""]
10805        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
10806        #[doc = r" converts the [`RequestBuilder`] into a future,"]
10807        #[doc = r" executes the request and returns a `Result` with the parsed"]
10808        #[doc = r" response."]
10809        #[doc = r""]
10810        #[doc = r" If you need lower-level access to the raw response details"]
10811        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
10812        #[doc = r" can finalize the request using the"]
10813        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
10814        #[doc = r" that resolves to a lower-level [`Response`] value."]
10815        pub struct RequestBuilder {
10816            pub(crate) client: super::super::Client,
10817            pub(crate) organization: String,
10818            pub(crate) project: String,
10819            pub(crate) template_id: String,
10820        }
10821        impl RequestBuilder {
10822            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
10823            #[doc = ""]
10824            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
10825            #[doc = "However, this function can provide more flexibility when required."]
10826            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
10827                Box::pin({
10828                    let this = self.clone();
10829                    async move {
10830                        let url = this.url()?;
10831                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
10832                        if let Some(auth_header) = this
10833                            .client
10834                            .token_credential()
10835                            .http_authorization_header(&this.client.scopes())
10836                            .await?
10837                        {
10838                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
10839                        }
10840                        let req_body = azure_core::EMPTY_BODY;
10841                        req.set_body(req_body);
10842                        Ok(Response(this.client.send(&mut req).await?))
10843                    }
10844                })
10845            }
10846            fn url(&self) -> azure_core::Result<azure_core::Url> {
10847                let mut url = azure_core::Url::parse(&format!(
10848                    "{}/{}/{}/_apis/build/definitions/templates/{}",
10849                    self.client.endpoint(),
10850                    &self.organization,
10851                    &self.project,
10852                    &self.template_id
10853                ))?;
10854                let has_api_version_already = url
10855                    .query_pairs()
10856                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
10857                if !has_api_version_already {
10858                    url.query_pairs_mut()
10859                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
10860                }
10861                Ok(url)
10862            }
10863        }
10864        impl std::future::IntoFuture for RequestBuilder {
10865            type Output = azure_core::Result<models::BuildDefinitionTemplate>;
10866            type IntoFuture =
10867                BoxFuture<'static, azure_core::Result<models::BuildDefinitionTemplate>>;
10868            #[doc = "Returns a future that sends the request and returns the parsed response body."]
10869            #[doc = ""]
10870            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
10871            #[doc = ""]
10872            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
10873            fn into_future(self) -> Self::IntoFuture {
10874                Box::pin(async move { self.send().await?.into_raw_body().await })
10875            }
10876        }
10877    }
10878    pub mod save_template {
10879        use super::models;
10880        #[cfg(not(target_arch = "wasm32"))]
10881        use futures::future::BoxFuture;
10882        #[cfg(target_arch = "wasm32")]
10883        use futures::future::LocalBoxFuture as BoxFuture;
10884        #[derive(Debug)]
10885        pub struct Response(azure_core::Response);
10886        impl Response {
10887            pub async fn into_raw_body(
10888                self,
10889            ) -> azure_core::Result<models::BuildDefinitionTemplate> {
10890                let bytes = self.0.into_raw_body().collect().await?;
10891                let body: models::BuildDefinitionTemplate = serde_json::from_slice(&bytes)
10892                    .map_err(|e| {
10893                        azure_core::error::Error::full(
10894                            azure_core::error::ErrorKind::DataConversion,
10895                            e,
10896                            format!(
10897                                "Failed to deserialize response:\n{}",
10898                                String::from_utf8_lossy(&bytes)
10899                            ),
10900                        )
10901                    })?;
10902                Ok(body)
10903            }
10904            pub fn into_raw_response(self) -> azure_core::Response {
10905                self.0
10906            }
10907            pub fn as_raw_response(&self) -> &azure_core::Response {
10908                &self.0
10909            }
10910        }
10911        impl From<Response> for azure_core::Response {
10912            fn from(rsp: Response) -> Self {
10913                rsp.into_raw_response()
10914            }
10915        }
10916        impl AsRef<azure_core::Response> for Response {
10917            fn as_ref(&self) -> &azure_core::Response {
10918                self.as_raw_response()
10919            }
10920        }
10921        #[derive(Clone)]
10922        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
10923        #[doc = r""]
10924        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
10925        #[doc = r" parameters can be chained."]
10926        #[doc = r""]
10927        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
10928        #[doc = r" converts the [`RequestBuilder`] into a future,"]
10929        #[doc = r" executes the request and returns a `Result` with the parsed"]
10930        #[doc = r" response."]
10931        #[doc = r""]
10932        #[doc = r" If you need lower-level access to the raw response details"]
10933        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
10934        #[doc = r" can finalize the request using the"]
10935        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
10936        #[doc = r" that resolves to a lower-level [`Response`] value."]
10937        pub struct RequestBuilder {
10938            pub(crate) client: super::super::Client,
10939            pub(crate) organization: String,
10940            pub(crate) body: models::BuildDefinitionTemplate,
10941            pub(crate) project: String,
10942            pub(crate) template_id: String,
10943        }
10944        impl RequestBuilder {
10945            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
10946            #[doc = ""]
10947            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
10948            #[doc = "However, this function can provide more flexibility when required."]
10949            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
10950                Box::pin({
10951                    let this = self.clone();
10952                    async move {
10953                        let url = this.url()?;
10954                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
10955                        if let Some(auth_header) = this
10956                            .client
10957                            .token_credential()
10958                            .http_authorization_header(&this.client.scopes())
10959                            .await?
10960                        {
10961                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
10962                        }
10963                        req.insert_header("content-type", "application/json");
10964                        let req_body = azure_core::json::to_json(&this.body)?;
10965                        req.set_body(req_body);
10966                        Ok(Response(this.client.send(&mut req).await?))
10967                    }
10968                })
10969            }
10970            fn url(&self) -> azure_core::Result<azure_core::Url> {
10971                let mut url = azure_core::Url::parse(&format!(
10972                    "{}/{}/{}/_apis/build/definitions/templates/{}",
10973                    self.client.endpoint(),
10974                    &self.organization,
10975                    &self.project,
10976                    &self.template_id
10977                ))?;
10978                let has_api_version_already = url
10979                    .query_pairs()
10980                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
10981                if !has_api_version_already {
10982                    url.query_pairs_mut()
10983                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
10984                }
10985                Ok(url)
10986            }
10987        }
10988        impl std::future::IntoFuture for RequestBuilder {
10989            type Output = azure_core::Result<models::BuildDefinitionTemplate>;
10990            type IntoFuture =
10991                BoxFuture<'static, azure_core::Result<models::BuildDefinitionTemplate>>;
10992            #[doc = "Returns a future that sends the request and returns the parsed response body."]
10993            #[doc = ""]
10994            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
10995            #[doc = ""]
10996            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
10997            fn into_future(self) -> Self::IntoFuture {
10998                Box::pin(async move { self.send().await?.into_raw_body().await })
10999            }
11000        }
11001    }
11002    pub mod delete {
11003        use super::models;
11004        #[cfg(not(target_arch = "wasm32"))]
11005        use futures::future::BoxFuture;
11006        #[cfg(target_arch = "wasm32")]
11007        use futures::future::LocalBoxFuture as BoxFuture;
11008        #[derive(Debug)]
11009        pub struct Response(azure_core::Response);
11010        impl Response {
11011            pub fn into_raw_response(self) -> azure_core::Response {
11012                self.0
11013            }
11014            pub fn as_raw_response(&self) -> &azure_core::Response {
11015                &self.0
11016            }
11017        }
11018        impl From<Response> for azure_core::Response {
11019            fn from(rsp: Response) -> Self {
11020                rsp.into_raw_response()
11021            }
11022        }
11023        impl AsRef<azure_core::Response> for Response {
11024            fn as_ref(&self) -> &azure_core::Response {
11025                self.as_raw_response()
11026            }
11027        }
11028        #[derive(Clone)]
11029        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
11030        #[doc = r""]
11031        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
11032        #[doc = r" parameters can be chained."]
11033        #[doc = r""]
11034        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
11035        #[doc = r" converts the [`RequestBuilder`] into a future,"]
11036        #[doc = r" executes the request and returns a `Result` with the parsed"]
11037        #[doc = r" response."]
11038        #[doc = r""]
11039        #[doc = r" If you need lower-level access to the raw response details"]
11040        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
11041        #[doc = r" can finalize the request using the"]
11042        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
11043        #[doc = r" that resolves to a lower-level [`Response`] value."]
11044        pub struct RequestBuilder {
11045            pub(crate) client: super::super::Client,
11046            pub(crate) organization: String,
11047            pub(crate) project: String,
11048            pub(crate) template_id: String,
11049        }
11050        impl RequestBuilder {
11051            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
11052            #[doc = ""]
11053            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
11054            #[doc = "However, this function can provide more flexibility when required."]
11055            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
11056                Box::pin({
11057                    let this = self.clone();
11058                    async move {
11059                        let url = this.url()?;
11060                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
11061                        if let Some(auth_header) = this
11062                            .client
11063                            .token_credential()
11064                            .http_authorization_header(&this.client.scopes())
11065                            .await?
11066                        {
11067                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
11068                        }
11069                        let req_body = azure_core::EMPTY_BODY;
11070                        req.set_body(req_body);
11071                        Ok(Response(this.client.send(&mut req).await?))
11072                    }
11073                })
11074            }
11075            fn url(&self) -> azure_core::Result<azure_core::Url> {
11076                let mut url = azure_core::Url::parse(&format!(
11077                    "{}/{}/{}/_apis/build/definitions/templates/{}",
11078                    self.client.endpoint(),
11079                    &self.organization,
11080                    &self.project,
11081                    &self.template_id
11082                ))?;
11083                let has_api_version_already = url
11084                    .query_pairs()
11085                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
11086                if !has_api_version_already {
11087                    url.query_pairs_mut()
11088                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
11089                }
11090                Ok(url)
11091            }
11092        }
11093        impl std::future::IntoFuture for RequestBuilder {
11094            type Output = azure_core::Result<()>;
11095            type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
11096            #[doc = "Returns a future that sends the request and waits for the response."]
11097            #[doc = ""]
11098            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
11099            #[doc = ""]
11100            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
11101            fn into_future(self) -> Self::IntoFuture {
11102                Box::pin(async move {
11103                    let _rsp = self.send().await?;
11104                    Ok(())
11105                })
11106            }
11107        }
11108    }
11109}
11110pub mod folders {
11111    use super::models;
11112    #[cfg(not(target_arch = "wasm32"))]
11113    use futures::future::BoxFuture;
11114    #[cfg(target_arch = "wasm32")]
11115    use futures::future::LocalBoxFuture as BoxFuture;
11116    pub struct Client(pub(crate) super::Client);
11117    impl Client {
11118        #[doc = "Updates an existing folder at given  existing path"]
11119        #[doc = ""]
11120        #[doc = "Arguments:"]
11121        #[doc = "* `organization`: The name of the Azure DevOps organization."]
11122        #[doc = "* `body`: The new version of the folder."]
11123        #[doc = "* `project`: Project ID or project name"]
11124        #[doc = "* `path`: The full path to the folder."]
11125        pub fn update(
11126            &self,
11127            organization: impl Into<String>,
11128            body: impl Into<models::Folder>,
11129            project: impl Into<String>,
11130            path: impl Into<String>,
11131        ) -> update::RequestBuilder {
11132            update::RequestBuilder {
11133                client: self.0.clone(),
11134                organization: organization.into(),
11135                body: body.into(),
11136                project: project.into(),
11137                path: path.into(),
11138            }
11139        }
11140        #[doc = "Creates a new folder."]
11141        #[doc = ""]
11142        #[doc = "Arguments:"]
11143        #[doc = "* `organization`: The name of the Azure DevOps organization."]
11144        #[doc = "* `body`: The folder."]
11145        #[doc = "* `project`: Project ID or project name"]
11146        #[doc = "* `path`: The full path of the folder."]
11147        pub fn create(
11148            &self,
11149            organization: impl Into<String>,
11150            body: impl Into<models::Folder>,
11151            project: impl Into<String>,
11152            path: impl Into<String>,
11153        ) -> create::RequestBuilder {
11154            create::RequestBuilder {
11155                client: self.0.clone(),
11156                organization: organization.into(),
11157                body: body.into(),
11158                project: project.into(),
11159                path: path.into(),
11160            }
11161        }
11162        #[doc = "Deletes a definition folder. Definitions and their corresponding builds will also be deleted."]
11163        #[doc = ""]
11164        #[doc = "Arguments:"]
11165        #[doc = "* `organization`: The name of the Azure DevOps organization."]
11166        #[doc = "* `project`: Project ID or project name"]
11167        #[doc = "* `path`: The full path to the folder."]
11168        pub fn delete(
11169            &self,
11170            organization: impl Into<String>,
11171            project: impl Into<String>,
11172            path: impl Into<String>,
11173        ) -> delete::RequestBuilder {
11174            delete::RequestBuilder {
11175                client: self.0.clone(),
11176                organization: organization.into(),
11177                project: project.into(),
11178                path: path.into(),
11179            }
11180        }
11181        #[doc = "Gets a list of build definition folders."]
11182        #[doc = ""]
11183        #[doc = "Arguments:"]
11184        #[doc = "* `organization`: The name of the Azure DevOps organization."]
11185        #[doc = "* `project`: Project ID or project name"]
11186        #[doc = "* `path`: The path to start with."]
11187        pub fn list(
11188            &self,
11189            organization: impl Into<String>,
11190            project: impl Into<String>,
11191            path: impl Into<String>,
11192        ) -> list::RequestBuilder {
11193            list::RequestBuilder {
11194                client: self.0.clone(),
11195                organization: organization.into(),
11196                project: project.into(),
11197                path: path.into(),
11198                query_order: None,
11199            }
11200        }
11201    }
11202    pub mod update {
11203        use super::models;
11204        #[cfg(not(target_arch = "wasm32"))]
11205        use futures::future::BoxFuture;
11206        #[cfg(target_arch = "wasm32")]
11207        use futures::future::LocalBoxFuture as BoxFuture;
11208        #[derive(Debug)]
11209        pub struct Response(azure_core::Response);
11210        impl Response {
11211            pub async fn into_raw_body(self) -> azure_core::Result<models::Folder> {
11212                let bytes = self.0.into_raw_body().collect().await?;
11213                let body: models::Folder = serde_json::from_slice(&bytes).map_err(|e| {
11214                    azure_core::error::Error::full(
11215                        azure_core::error::ErrorKind::DataConversion,
11216                        e,
11217                        format!(
11218                            "Failed to deserialize response:\n{}",
11219                            String::from_utf8_lossy(&bytes)
11220                        ),
11221                    )
11222                })?;
11223                Ok(body)
11224            }
11225            pub fn into_raw_response(self) -> azure_core::Response {
11226                self.0
11227            }
11228            pub fn as_raw_response(&self) -> &azure_core::Response {
11229                &self.0
11230            }
11231        }
11232        impl From<Response> for azure_core::Response {
11233            fn from(rsp: Response) -> Self {
11234                rsp.into_raw_response()
11235            }
11236        }
11237        impl AsRef<azure_core::Response> for Response {
11238            fn as_ref(&self) -> &azure_core::Response {
11239                self.as_raw_response()
11240            }
11241        }
11242        #[derive(Clone)]
11243        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
11244        #[doc = r""]
11245        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
11246        #[doc = r" parameters can be chained."]
11247        #[doc = r""]
11248        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
11249        #[doc = r" converts the [`RequestBuilder`] into a future,"]
11250        #[doc = r" executes the request and returns a `Result` with the parsed"]
11251        #[doc = r" response."]
11252        #[doc = r""]
11253        #[doc = r" If you need lower-level access to the raw response details"]
11254        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
11255        #[doc = r" can finalize the request using the"]
11256        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
11257        #[doc = r" that resolves to a lower-level [`Response`] value."]
11258        pub struct RequestBuilder {
11259            pub(crate) client: super::super::Client,
11260            pub(crate) organization: String,
11261            pub(crate) body: models::Folder,
11262            pub(crate) project: String,
11263            pub(crate) path: String,
11264        }
11265        impl RequestBuilder {
11266            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
11267            #[doc = ""]
11268            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
11269            #[doc = "However, this function can provide more flexibility when required."]
11270            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
11271                Box::pin({
11272                    let this = self.clone();
11273                    async move {
11274                        let url = this.url()?;
11275                        let mut req = azure_core::Request::new(url, azure_core::Method::Post);
11276                        if let Some(auth_header) = this
11277                            .client
11278                            .token_credential()
11279                            .http_authorization_header(&this.client.scopes())
11280                            .await?
11281                        {
11282                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
11283                        }
11284                        req.insert_header("content-type", "application/json");
11285                        let req_body = azure_core::json::to_json(&this.body)?;
11286                        let path = &this.path;
11287                        req.url_mut().query_pairs_mut().append_pair("path", path);
11288                        req.set_body(req_body);
11289                        Ok(Response(this.client.send(&mut req).await?))
11290                    }
11291                })
11292            }
11293            fn url(&self) -> azure_core::Result<azure_core::Url> {
11294                let mut url = azure_core::Url::parse(&format!(
11295                    "{}/{}/{}/_apis/build/folders",
11296                    self.client.endpoint(),
11297                    &self.organization,
11298                    &self.project
11299                ))?;
11300                let has_api_version_already = url
11301                    .query_pairs()
11302                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
11303                if !has_api_version_already {
11304                    url.query_pairs_mut()
11305                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
11306                }
11307                Ok(url)
11308            }
11309        }
11310        impl std::future::IntoFuture for RequestBuilder {
11311            type Output = azure_core::Result<models::Folder>;
11312            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Folder>>;
11313            #[doc = "Returns a future that sends the request and returns the parsed response body."]
11314            #[doc = ""]
11315            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
11316            #[doc = ""]
11317            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
11318            fn into_future(self) -> Self::IntoFuture {
11319                Box::pin(async move { self.send().await?.into_raw_body().await })
11320            }
11321        }
11322    }
11323    pub mod create {
11324        use super::models;
11325        #[cfg(not(target_arch = "wasm32"))]
11326        use futures::future::BoxFuture;
11327        #[cfg(target_arch = "wasm32")]
11328        use futures::future::LocalBoxFuture as BoxFuture;
11329        #[derive(Debug)]
11330        pub struct Response(azure_core::Response);
11331        impl Response {
11332            pub async fn into_raw_body(self) -> azure_core::Result<models::Folder> {
11333                let bytes = self.0.into_raw_body().collect().await?;
11334                let body: models::Folder = serde_json::from_slice(&bytes).map_err(|e| {
11335                    azure_core::error::Error::full(
11336                        azure_core::error::ErrorKind::DataConversion,
11337                        e,
11338                        format!(
11339                            "Failed to deserialize response:\n{}",
11340                            String::from_utf8_lossy(&bytes)
11341                        ),
11342                    )
11343                })?;
11344                Ok(body)
11345            }
11346            pub fn into_raw_response(self) -> azure_core::Response {
11347                self.0
11348            }
11349            pub fn as_raw_response(&self) -> &azure_core::Response {
11350                &self.0
11351            }
11352        }
11353        impl From<Response> for azure_core::Response {
11354            fn from(rsp: Response) -> Self {
11355                rsp.into_raw_response()
11356            }
11357        }
11358        impl AsRef<azure_core::Response> for Response {
11359            fn as_ref(&self) -> &azure_core::Response {
11360                self.as_raw_response()
11361            }
11362        }
11363        #[derive(Clone)]
11364        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
11365        #[doc = r""]
11366        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
11367        #[doc = r" parameters can be chained."]
11368        #[doc = r""]
11369        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
11370        #[doc = r" converts the [`RequestBuilder`] into a future,"]
11371        #[doc = r" executes the request and returns a `Result` with the parsed"]
11372        #[doc = r" response."]
11373        #[doc = r""]
11374        #[doc = r" If you need lower-level access to the raw response details"]
11375        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
11376        #[doc = r" can finalize the request using the"]
11377        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
11378        #[doc = r" that resolves to a lower-level [`Response`] value."]
11379        pub struct RequestBuilder {
11380            pub(crate) client: super::super::Client,
11381            pub(crate) organization: String,
11382            pub(crate) body: models::Folder,
11383            pub(crate) project: String,
11384            pub(crate) path: String,
11385        }
11386        impl RequestBuilder {
11387            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
11388            #[doc = ""]
11389            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
11390            #[doc = "However, this function can provide more flexibility when required."]
11391            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
11392                Box::pin({
11393                    let this = self.clone();
11394                    async move {
11395                        let url = this.url()?;
11396                        let mut req = azure_core::Request::new(url, azure_core::Method::Put);
11397                        if let Some(auth_header) = this
11398                            .client
11399                            .token_credential()
11400                            .http_authorization_header(&this.client.scopes())
11401                            .await?
11402                        {
11403                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
11404                        }
11405                        req.insert_header("content-type", "application/json");
11406                        let req_body = azure_core::json::to_json(&this.body)?;
11407                        let path = &this.path;
11408                        req.url_mut().query_pairs_mut().append_pair("path", path);
11409                        req.set_body(req_body);
11410                        Ok(Response(this.client.send(&mut req).await?))
11411                    }
11412                })
11413            }
11414            fn url(&self) -> azure_core::Result<azure_core::Url> {
11415                let mut url = azure_core::Url::parse(&format!(
11416                    "{}/{}/{}/_apis/build/folders",
11417                    self.client.endpoint(),
11418                    &self.organization,
11419                    &self.project
11420                ))?;
11421                let has_api_version_already = url
11422                    .query_pairs()
11423                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
11424                if !has_api_version_already {
11425                    url.query_pairs_mut()
11426                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
11427                }
11428                Ok(url)
11429            }
11430        }
11431        impl std::future::IntoFuture for RequestBuilder {
11432            type Output = azure_core::Result<models::Folder>;
11433            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Folder>>;
11434            #[doc = "Returns a future that sends the request and returns the parsed response body."]
11435            #[doc = ""]
11436            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
11437            #[doc = ""]
11438            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
11439            fn into_future(self) -> Self::IntoFuture {
11440                Box::pin(async move { self.send().await?.into_raw_body().await })
11441            }
11442        }
11443    }
11444    pub mod delete {
11445        use super::models;
11446        #[cfg(not(target_arch = "wasm32"))]
11447        use futures::future::BoxFuture;
11448        #[cfg(target_arch = "wasm32")]
11449        use futures::future::LocalBoxFuture as BoxFuture;
11450        #[derive(Debug)]
11451        pub struct Response(azure_core::Response);
11452        impl Response {
11453            pub fn into_raw_response(self) -> azure_core::Response {
11454                self.0
11455            }
11456            pub fn as_raw_response(&self) -> &azure_core::Response {
11457                &self.0
11458            }
11459        }
11460        impl From<Response> for azure_core::Response {
11461            fn from(rsp: Response) -> Self {
11462                rsp.into_raw_response()
11463            }
11464        }
11465        impl AsRef<azure_core::Response> for Response {
11466            fn as_ref(&self) -> &azure_core::Response {
11467                self.as_raw_response()
11468            }
11469        }
11470        #[derive(Clone)]
11471        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
11472        #[doc = r""]
11473        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
11474        #[doc = r" parameters can be chained."]
11475        #[doc = r""]
11476        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
11477        #[doc = r" converts the [`RequestBuilder`] into a future,"]
11478        #[doc = r" executes the request and returns a `Result` with the parsed"]
11479        #[doc = r" response."]
11480        #[doc = r""]
11481        #[doc = r" If you need lower-level access to the raw response details"]
11482        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
11483        #[doc = r" can finalize the request using the"]
11484        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
11485        #[doc = r" that resolves to a lower-level [`Response`] value."]
11486        pub struct RequestBuilder {
11487            pub(crate) client: super::super::Client,
11488            pub(crate) organization: String,
11489            pub(crate) project: String,
11490            pub(crate) path: String,
11491        }
11492        impl RequestBuilder {
11493            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
11494            #[doc = ""]
11495            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
11496            #[doc = "However, this function can provide more flexibility when required."]
11497            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
11498                Box::pin({
11499                    let this = self.clone();
11500                    async move {
11501                        let url = this.url()?;
11502                        let mut req = azure_core::Request::new(url, azure_core::Method::Delete);
11503                        if let Some(auth_header) = this
11504                            .client
11505                            .token_credential()
11506                            .http_authorization_header(&this.client.scopes())
11507                            .await?
11508                        {
11509                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
11510                        }
11511                        let path = &this.path;
11512                        req.url_mut().query_pairs_mut().append_pair("path", path);
11513                        let req_body = azure_core::EMPTY_BODY;
11514                        req.set_body(req_body);
11515                        Ok(Response(this.client.send(&mut req).await?))
11516                    }
11517                })
11518            }
11519            fn url(&self) -> azure_core::Result<azure_core::Url> {
11520                let mut url = azure_core::Url::parse(&format!(
11521                    "{}/{}/{}/_apis/build/folders",
11522                    self.client.endpoint(),
11523                    &self.organization,
11524                    &self.project
11525                ))?;
11526                let has_api_version_already = url
11527                    .query_pairs()
11528                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
11529                if !has_api_version_already {
11530                    url.query_pairs_mut()
11531                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
11532                }
11533                Ok(url)
11534            }
11535        }
11536        impl std::future::IntoFuture for RequestBuilder {
11537            type Output = azure_core::Result<()>;
11538            type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
11539            #[doc = "Returns a future that sends the request and waits for the response."]
11540            #[doc = ""]
11541            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
11542            #[doc = ""]
11543            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
11544            fn into_future(self) -> Self::IntoFuture {
11545                Box::pin(async move {
11546                    let _rsp = self.send().await?;
11547                    Ok(())
11548                })
11549            }
11550        }
11551    }
11552    pub mod list {
11553        use super::models;
11554        #[cfg(not(target_arch = "wasm32"))]
11555        use futures::future::BoxFuture;
11556        #[cfg(target_arch = "wasm32")]
11557        use futures::future::LocalBoxFuture as BoxFuture;
11558        #[derive(Debug)]
11559        pub struct Response(azure_core::Response);
11560        impl Response {
11561            pub async fn into_raw_body(self) -> azure_core::Result<models::FolderList> {
11562                let bytes = self.0.into_raw_body().collect().await?;
11563                let body: models::FolderList = serde_json::from_slice(&bytes).map_err(|e| {
11564                    azure_core::error::Error::full(
11565                        azure_core::error::ErrorKind::DataConversion,
11566                        e,
11567                        format!(
11568                            "Failed to deserialize response:\n{}",
11569                            String::from_utf8_lossy(&bytes)
11570                        ),
11571                    )
11572                })?;
11573                Ok(body)
11574            }
11575            pub fn into_raw_response(self) -> azure_core::Response {
11576                self.0
11577            }
11578            pub fn as_raw_response(&self) -> &azure_core::Response {
11579                &self.0
11580            }
11581        }
11582        impl From<Response> for azure_core::Response {
11583            fn from(rsp: Response) -> Self {
11584                rsp.into_raw_response()
11585            }
11586        }
11587        impl AsRef<azure_core::Response> for Response {
11588            fn as_ref(&self) -> &azure_core::Response {
11589                self.as_raw_response()
11590            }
11591        }
11592        #[derive(Clone)]
11593        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
11594        #[doc = r""]
11595        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
11596        #[doc = r" parameters can be chained."]
11597        #[doc = r""]
11598        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
11599        #[doc = r" converts the [`RequestBuilder`] into a future,"]
11600        #[doc = r" executes the request and returns a `Result` with the parsed"]
11601        #[doc = r" response."]
11602        #[doc = r""]
11603        #[doc = r" If you need lower-level access to the raw response details"]
11604        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
11605        #[doc = r" can finalize the request using the"]
11606        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
11607        #[doc = r" that resolves to a lower-level [`Response`] value."]
11608        pub struct RequestBuilder {
11609            pub(crate) client: super::super::Client,
11610            pub(crate) organization: String,
11611            pub(crate) project: String,
11612            pub(crate) path: String,
11613            pub(crate) query_order: Option<String>,
11614        }
11615        impl RequestBuilder {
11616            #[doc = "The order in which folders should be returned."]
11617            pub fn query_order(mut self, query_order: impl Into<String>) -> Self {
11618                self.query_order = Some(query_order.into());
11619                self
11620            }
11621            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
11622            #[doc = ""]
11623            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
11624            #[doc = "However, this function can provide more flexibility when required."]
11625            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
11626                Box::pin({
11627                    let this = self.clone();
11628                    async move {
11629                        let url = this.url()?;
11630                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
11631                        if let Some(auth_header) = this
11632                            .client
11633                            .token_credential()
11634                            .http_authorization_header(&this.client.scopes())
11635                            .await?
11636                        {
11637                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
11638                        }
11639                        if let Some(query_order) = &this.query_order {
11640                            req.url_mut()
11641                                .query_pairs_mut()
11642                                .append_pair("queryOrder", query_order);
11643                        }
11644                        let req_body = azure_core::EMPTY_BODY;
11645                        req.set_body(req_body);
11646                        Ok(Response(this.client.send(&mut req).await?))
11647                    }
11648                })
11649            }
11650            fn url(&self) -> azure_core::Result<azure_core::Url> {
11651                let mut url = azure_core::Url::parse(&format!(
11652                    "{}/{}/{}/_apis/build/folders/{}",
11653                    self.client.endpoint(),
11654                    &self.organization,
11655                    &self.project,
11656                    &self.path
11657                ))?;
11658                let has_api_version_already = url
11659                    .query_pairs()
11660                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
11661                if !has_api_version_already {
11662                    url.query_pairs_mut()
11663                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
11664                }
11665                Ok(url)
11666            }
11667        }
11668        impl std::future::IntoFuture for RequestBuilder {
11669            type Output = azure_core::Result<models::FolderList>;
11670            type IntoFuture = BoxFuture<'static, azure_core::Result<models::FolderList>>;
11671            #[doc = "Returns a future that sends the request and returns the parsed response body."]
11672            #[doc = ""]
11673            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
11674            #[doc = ""]
11675            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
11676            fn into_future(self) -> Self::IntoFuture {
11677                Box::pin(async move { self.send().await?.into_raw_body().await })
11678            }
11679        }
11680    }
11681}
11682pub mod general_settings {
11683    use super::models;
11684    #[cfg(not(target_arch = "wasm32"))]
11685    use futures::future::BoxFuture;
11686    #[cfg(target_arch = "wasm32")]
11687    use futures::future::LocalBoxFuture as BoxFuture;
11688    pub struct Client(pub(crate) super::Client);
11689    impl Client {
11690        #[doc = "Gets pipeline general settings."]
11691        #[doc = ""]
11692        #[doc = "Arguments:"]
11693        #[doc = "* `organization`: The name of the Azure DevOps organization."]
11694        #[doc = "* `project`: Project ID or project name"]
11695        pub fn get(
11696            &self,
11697            organization: impl Into<String>,
11698            project: impl Into<String>,
11699        ) -> get::RequestBuilder {
11700            get::RequestBuilder {
11701                client: self.0.clone(),
11702                organization: organization.into(),
11703                project: project.into(),
11704            }
11705        }
11706        #[doc = "Updates pipeline general settings."]
11707        #[doc = ""]
11708        #[doc = "Arguments:"]
11709        #[doc = "* `organization`: The name of the Azure DevOps organization."]
11710        #[doc = "* `project`: Project ID or project name"]
11711        pub fn update(
11712            &self,
11713            organization: impl Into<String>,
11714            body: impl Into<models::PipelineGeneralSettings>,
11715            project: impl Into<String>,
11716        ) -> update::RequestBuilder {
11717            update::RequestBuilder {
11718                client: self.0.clone(),
11719                organization: organization.into(),
11720                body: body.into(),
11721                project: project.into(),
11722            }
11723        }
11724    }
11725    pub mod get {
11726        use super::models;
11727        #[cfg(not(target_arch = "wasm32"))]
11728        use futures::future::BoxFuture;
11729        #[cfg(target_arch = "wasm32")]
11730        use futures::future::LocalBoxFuture as BoxFuture;
11731        #[derive(Debug)]
11732        pub struct Response(azure_core::Response);
11733        impl Response {
11734            pub async fn into_raw_body(
11735                self,
11736            ) -> azure_core::Result<models::PipelineGeneralSettings> {
11737                let bytes = self.0.into_raw_body().collect().await?;
11738                let body: models::PipelineGeneralSettings = serde_json::from_slice(&bytes)
11739                    .map_err(|e| {
11740                        azure_core::error::Error::full(
11741                            azure_core::error::ErrorKind::DataConversion,
11742                            e,
11743                            format!(
11744                                "Failed to deserialize response:\n{}",
11745                                String::from_utf8_lossy(&bytes)
11746                            ),
11747                        )
11748                    })?;
11749                Ok(body)
11750            }
11751            pub fn into_raw_response(self) -> azure_core::Response {
11752                self.0
11753            }
11754            pub fn as_raw_response(&self) -> &azure_core::Response {
11755                &self.0
11756            }
11757        }
11758        impl From<Response> for azure_core::Response {
11759            fn from(rsp: Response) -> Self {
11760                rsp.into_raw_response()
11761            }
11762        }
11763        impl AsRef<azure_core::Response> for Response {
11764            fn as_ref(&self) -> &azure_core::Response {
11765                self.as_raw_response()
11766            }
11767        }
11768        #[derive(Clone)]
11769        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
11770        #[doc = r""]
11771        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
11772        #[doc = r" parameters can be chained."]
11773        #[doc = r""]
11774        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
11775        #[doc = r" converts the [`RequestBuilder`] into a future,"]
11776        #[doc = r" executes the request and returns a `Result` with the parsed"]
11777        #[doc = r" response."]
11778        #[doc = r""]
11779        #[doc = r" If you need lower-level access to the raw response details"]
11780        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
11781        #[doc = r" can finalize the request using the"]
11782        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
11783        #[doc = r" that resolves to a lower-level [`Response`] value."]
11784        pub struct RequestBuilder {
11785            pub(crate) client: super::super::Client,
11786            pub(crate) organization: String,
11787            pub(crate) project: String,
11788        }
11789        impl RequestBuilder {
11790            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
11791            #[doc = ""]
11792            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
11793            #[doc = "However, this function can provide more flexibility when required."]
11794            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
11795                Box::pin({
11796                    let this = self.clone();
11797                    async move {
11798                        let url = this.url()?;
11799                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
11800                        if let Some(auth_header) = this
11801                            .client
11802                            .token_credential()
11803                            .http_authorization_header(&this.client.scopes())
11804                            .await?
11805                        {
11806                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
11807                        }
11808                        let req_body = azure_core::EMPTY_BODY;
11809                        req.set_body(req_body);
11810                        Ok(Response(this.client.send(&mut req).await?))
11811                    }
11812                })
11813            }
11814            fn url(&self) -> azure_core::Result<azure_core::Url> {
11815                let mut url = azure_core::Url::parse(&format!(
11816                    "{}/{}/{}/_apis/build/generalsettings",
11817                    self.client.endpoint(),
11818                    &self.organization,
11819                    &self.project
11820                ))?;
11821                let has_api_version_already = url
11822                    .query_pairs()
11823                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
11824                if !has_api_version_already {
11825                    url.query_pairs_mut()
11826                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
11827                }
11828                Ok(url)
11829            }
11830        }
11831        impl std::future::IntoFuture for RequestBuilder {
11832            type Output = azure_core::Result<models::PipelineGeneralSettings>;
11833            type IntoFuture =
11834                BoxFuture<'static, azure_core::Result<models::PipelineGeneralSettings>>;
11835            #[doc = "Returns a future that sends the request and returns the parsed response body."]
11836            #[doc = ""]
11837            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
11838            #[doc = ""]
11839            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
11840            fn into_future(self) -> Self::IntoFuture {
11841                Box::pin(async move { self.send().await?.into_raw_body().await })
11842            }
11843        }
11844    }
11845    pub mod update {
11846        use super::models;
11847        #[cfg(not(target_arch = "wasm32"))]
11848        use futures::future::BoxFuture;
11849        #[cfg(target_arch = "wasm32")]
11850        use futures::future::LocalBoxFuture as BoxFuture;
11851        #[derive(Debug)]
11852        pub struct Response(azure_core::Response);
11853        impl Response {
11854            pub async fn into_raw_body(
11855                self,
11856            ) -> azure_core::Result<models::PipelineGeneralSettings> {
11857                let bytes = self.0.into_raw_body().collect().await?;
11858                let body: models::PipelineGeneralSettings = serde_json::from_slice(&bytes)
11859                    .map_err(|e| {
11860                        azure_core::error::Error::full(
11861                            azure_core::error::ErrorKind::DataConversion,
11862                            e,
11863                            format!(
11864                                "Failed to deserialize response:\n{}",
11865                                String::from_utf8_lossy(&bytes)
11866                            ),
11867                        )
11868                    })?;
11869                Ok(body)
11870            }
11871            pub fn into_raw_response(self) -> azure_core::Response {
11872                self.0
11873            }
11874            pub fn as_raw_response(&self) -> &azure_core::Response {
11875                &self.0
11876            }
11877        }
11878        impl From<Response> for azure_core::Response {
11879            fn from(rsp: Response) -> Self {
11880                rsp.into_raw_response()
11881            }
11882        }
11883        impl AsRef<azure_core::Response> for Response {
11884            fn as_ref(&self) -> &azure_core::Response {
11885                self.as_raw_response()
11886            }
11887        }
11888        #[derive(Clone)]
11889        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
11890        #[doc = r""]
11891        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
11892        #[doc = r" parameters can be chained."]
11893        #[doc = r""]
11894        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
11895        #[doc = r" converts the [`RequestBuilder`] into a future,"]
11896        #[doc = r" executes the request and returns a `Result` with the parsed"]
11897        #[doc = r" response."]
11898        #[doc = r""]
11899        #[doc = r" If you need lower-level access to the raw response details"]
11900        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
11901        #[doc = r" can finalize the request using the"]
11902        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
11903        #[doc = r" that resolves to a lower-level [`Response`] value."]
11904        pub struct RequestBuilder {
11905            pub(crate) client: super::super::Client,
11906            pub(crate) organization: String,
11907            pub(crate) body: models::PipelineGeneralSettings,
11908            pub(crate) project: String,
11909        }
11910        impl RequestBuilder {
11911            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
11912            #[doc = ""]
11913            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
11914            #[doc = "However, this function can provide more flexibility when required."]
11915            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
11916                Box::pin({
11917                    let this = self.clone();
11918                    async move {
11919                        let url = this.url()?;
11920                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
11921                        if let Some(auth_header) = this
11922                            .client
11923                            .token_credential()
11924                            .http_authorization_header(&this.client.scopes())
11925                            .await?
11926                        {
11927                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
11928                        }
11929                        req.insert_header("content-type", "application/json");
11930                        let req_body = azure_core::json::to_json(&this.body)?;
11931                        req.set_body(req_body);
11932                        Ok(Response(this.client.send(&mut req).await?))
11933                    }
11934                })
11935            }
11936            fn url(&self) -> azure_core::Result<azure_core::Url> {
11937                let mut url = azure_core::Url::parse(&format!(
11938                    "{}/{}/{}/_apis/build/generalsettings",
11939                    self.client.endpoint(),
11940                    &self.organization,
11941                    &self.project
11942                ))?;
11943                let has_api_version_already = url
11944                    .query_pairs()
11945                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
11946                if !has_api_version_already {
11947                    url.query_pairs_mut()
11948                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
11949                }
11950                Ok(url)
11951            }
11952        }
11953        impl std::future::IntoFuture for RequestBuilder {
11954            type Output = azure_core::Result<models::PipelineGeneralSettings>;
11955            type IntoFuture =
11956                BoxFuture<'static, azure_core::Result<models::PipelineGeneralSettings>>;
11957            #[doc = "Returns a future that sends the request and returns the parsed response body."]
11958            #[doc = ""]
11959            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
11960            #[doc = ""]
11961            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
11962            fn into_future(self) -> Self::IntoFuture {
11963                Box::pin(async move { self.send().await?.into_raw_body().await })
11964            }
11965        }
11966    }
11967}
11968pub mod latest {
11969    use super::models;
11970    #[cfg(not(target_arch = "wasm32"))]
11971    use futures::future::BoxFuture;
11972    #[cfg(target_arch = "wasm32")]
11973    use futures::future::LocalBoxFuture as BoxFuture;
11974    pub struct Client(pub(crate) super::Client);
11975    impl Client {
11976        #[doc = "Gets the latest build for a definition, optionally scoped to a specific branch."]
11977        #[doc = ""]
11978        #[doc = "Arguments:"]
11979        #[doc = "* `organization`: The name of the Azure DevOps organization."]
11980        #[doc = "* `project`: Project ID or project name"]
11981        #[doc = "* `definition`: definition name with optional leading folder path, or the definition id"]
11982        pub fn get(
11983            &self,
11984            organization: impl Into<String>,
11985            project: impl Into<String>,
11986            definition: impl Into<String>,
11987        ) -> get::RequestBuilder {
11988            get::RequestBuilder {
11989                client: self.0.clone(),
11990                organization: organization.into(),
11991                project: project.into(),
11992                definition: definition.into(),
11993                branch_name: None,
11994            }
11995        }
11996    }
11997    pub mod get {
11998        use super::models;
11999        #[cfg(not(target_arch = "wasm32"))]
12000        use futures::future::BoxFuture;
12001        #[cfg(target_arch = "wasm32")]
12002        use futures::future::LocalBoxFuture as BoxFuture;
12003        #[derive(Debug)]
12004        pub struct Response(azure_core::Response);
12005        impl Response {
12006            pub async fn into_raw_body(self) -> azure_core::Result<models::Build> {
12007                let bytes = self.0.into_raw_body().collect().await?;
12008                let body: models::Build = serde_json::from_slice(&bytes).map_err(|e| {
12009                    azure_core::error::Error::full(
12010                        azure_core::error::ErrorKind::DataConversion,
12011                        e,
12012                        format!(
12013                            "Failed to deserialize response:\n{}",
12014                            String::from_utf8_lossy(&bytes)
12015                        ),
12016                    )
12017                })?;
12018                Ok(body)
12019            }
12020            pub fn into_raw_response(self) -> azure_core::Response {
12021                self.0
12022            }
12023            pub fn as_raw_response(&self) -> &azure_core::Response {
12024                &self.0
12025            }
12026        }
12027        impl From<Response> for azure_core::Response {
12028            fn from(rsp: Response) -> Self {
12029                rsp.into_raw_response()
12030            }
12031        }
12032        impl AsRef<azure_core::Response> for Response {
12033            fn as_ref(&self) -> &azure_core::Response {
12034                self.as_raw_response()
12035            }
12036        }
12037        #[derive(Clone)]
12038        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
12039        #[doc = r""]
12040        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
12041        #[doc = r" parameters can be chained."]
12042        #[doc = r""]
12043        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
12044        #[doc = r" converts the [`RequestBuilder`] into a future,"]
12045        #[doc = r" executes the request and returns a `Result` with the parsed"]
12046        #[doc = r" response."]
12047        #[doc = r""]
12048        #[doc = r" If you need lower-level access to the raw response details"]
12049        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
12050        #[doc = r" can finalize the request using the"]
12051        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
12052        #[doc = r" that resolves to a lower-level [`Response`] value."]
12053        pub struct RequestBuilder {
12054            pub(crate) client: super::super::Client,
12055            pub(crate) organization: String,
12056            pub(crate) project: String,
12057            pub(crate) definition: String,
12058            pub(crate) branch_name: Option<String>,
12059        }
12060        impl RequestBuilder {
12061            #[doc = "optional parameter that indicates the specific branch to use. If not specified, the default branch is used."]
12062            pub fn branch_name(mut self, branch_name: impl Into<String>) -> Self {
12063                self.branch_name = Some(branch_name.into());
12064                self
12065            }
12066            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
12067            #[doc = ""]
12068            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
12069            #[doc = "However, this function can provide more flexibility when required."]
12070            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
12071                Box::pin({
12072                    let this = self.clone();
12073                    async move {
12074                        let url = this.url()?;
12075                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
12076                        if let Some(auth_header) = this
12077                            .client
12078                            .token_credential()
12079                            .http_authorization_header(&this.client.scopes())
12080                            .await?
12081                        {
12082                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
12083                        }
12084                        if let Some(branch_name) = &this.branch_name {
12085                            req.url_mut()
12086                                .query_pairs_mut()
12087                                .append_pair("branchName", branch_name);
12088                        }
12089                        let req_body = azure_core::EMPTY_BODY;
12090                        req.set_body(req_body);
12091                        Ok(Response(this.client.send(&mut req).await?))
12092                    }
12093                })
12094            }
12095            fn url(&self) -> azure_core::Result<azure_core::Url> {
12096                let mut url = azure_core::Url::parse(&format!(
12097                    "{}/{}/{}/_apis/build/latest/{}",
12098                    self.client.endpoint(),
12099                    &self.organization,
12100                    &self.project,
12101                    &self.definition
12102                ))?;
12103                let has_api_version_already = url
12104                    .query_pairs()
12105                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
12106                if !has_api_version_already {
12107                    url.query_pairs_mut()
12108                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
12109                }
12110                Ok(url)
12111            }
12112        }
12113        impl std::future::IntoFuture for RequestBuilder {
12114            type Output = azure_core::Result<models::Build>;
12115            type IntoFuture = BoxFuture<'static, azure_core::Result<models::Build>>;
12116            #[doc = "Returns a future that sends the request and returns the parsed response body."]
12117            #[doc = ""]
12118            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
12119            #[doc = ""]
12120            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
12121            fn into_future(self) -> Self::IntoFuture {
12122                Box::pin(async move { self.send().await?.into_raw_body().await })
12123            }
12124        }
12125    }
12126}
12127pub mod options {
12128    use super::models;
12129    #[cfg(not(target_arch = "wasm32"))]
12130    use futures::future::BoxFuture;
12131    #[cfg(target_arch = "wasm32")]
12132    use futures::future::LocalBoxFuture as BoxFuture;
12133    pub struct Client(pub(crate) super::Client);
12134    impl Client {
12135        #[doc = "Gets all build definition options supported by the system."]
12136        #[doc = ""]
12137        #[doc = "Arguments:"]
12138        #[doc = "* `organization`: The name of the Azure DevOps organization."]
12139        #[doc = "* `project`: Project ID or project name"]
12140        pub fn list(
12141            &self,
12142            organization: impl Into<String>,
12143            project: impl Into<String>,
12144        ) -> list::RequestBuilder {
12145            list::RequestBuilder {
12146                client: self.0.clone(),
12147                organization: organization.into(),
12148                project: project.into(),
12149            }
12150        }
12151    }
12152    pub mod list {
12153        use super::models;
12154        #[cfg(not(target_arch = "wasm32"))]
12155        use futures::future::BoxFuture;
12156        #[cfg(target_arch = "wasm32")]
12157        use futures::future::LocalBoxFuture as BoxFuture;
12158        #[derive(Debug)]
12159        pub struct Response(azure_core::Response);
12160        impl Response {
12161            pub async fn into_raw_body(
12162                self,
12163            ) -> azure_core::Result<models::BuildOptionDefinitionList> {
12164                let bytes = self.0.into_raw_body().collect().await?;
12165                let body: models::BuildOptionDefinitionList = serde_json::from_slice(&bytes)
12166                    .map_err(|e| {
12167                        azure_core::error::Error::full(
12168                            azure_core::error::ErrorKind::DataConversion,
12169                            e,
12170                            format!(
12171                                "Failed to deserialize response:\n{}",
12172                                String::from_utf8_lossy(&bytes)
12173                            ),
12174                        )
12175                    })?;
12176                Ok(body)
12177            }
12178            pub fn into_raw_response(self) -> azure_core::Response {
12179                self.0
12180            }
12181            pub fn as_raw_response(&self) -> &azure_core::Response {
12182                &self.0
12183            }
12184        }
12185        impl From<Response> for azure_core::Response {
12186            fn from(rsp: Response) -> Self {
12187                rsp.into_raw_response()
12188            }
12189        }
12190        impl AsRef<azure_core::Response> for Response {
12191            fn as_ref(&self) -> &azure_core::Response {
12192                self.as_raw_response()
12193            }
12194        }
12195        #[derive(Clone)]
12196        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
12197        #[doc = r""]
12198        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
12199        #[doc = r" parameters can be chained."]
12200        #[doc = r""]
12201        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
12202        #[doc = r" converts the [`RequestBuilder`] into a future,"]
12203        #[doc = r" executes the request and returns a `Result` with the parsed"]
12204        #[doc = r" response."]
12205        #[doc = r""]
12206        #[doc = r" If you need lower-level access to the raw response details"]
12207        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
12208        #[doc = r" can finalize the request using the"]
12209        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
12210        #[doc = r" that resolves to a lower-level [`Response`] value."]
12211        pub struct RequestBuilder {
12212            pub(crate) client: super::super::Client,
12213            pub(crate) organization: String,
12214            pub(crate) project: String,
12215        }
12216        impl RequestBuilder {
12217            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
12218            #[doc = ""]
12219            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
12220            #[doc = "However, this function can provide more flexibility when required."]
12221            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
12222                Box::pin({
12223                    let this = self.clone();
12224                    async move {
12225                        let url = this.url()?;
12226                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
12227                        if let Some(auth_header) = this
12228                            .client
12229                            .token_credential()
12230                            .http_authorization_header(&this.client.scopes())
12231                            .await?
12232                        {
12233                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
12234                        }
12235                        let req_body = azure_core::EMPTY_BODY;
12236                        req.set_body(req_body);
12237                        Ok(Response(this.client.send(&mut req).await?))
12238                    }
12239                })
12240            }
12241            fn url(&self) -> azure_core::Result<azure_core::Url> {
12242                let mut url = azure_core::Url::parse(&format!(
12243                    "{}/{}/{}/_apis/build/options",
12244                    self.client.endpoint(),
12245                    &self.organization,
12246                    &self.project
12247                ))?;
12248                let has_api_version_already = url
12249                    .query_pairs()
12250                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
12251                if !has_api_version_already {
12252                    url.query_pairs_mut()
12253                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
12254                }
12255                Ok(url)
12256            }
12257        }
12258        impl std::future::IntoFuture for RequestBuilder {
12259            type Output = azure_core::Result<models::BuildOptionDefinitionList>;
12260            type IntoFuture =
12261                BoxFuture<'static, azure_core::Result<models::BuildOptionDefinitionList>>;
12262            #[doc = "Returns a future that sends the request and returns the parsed response body."]
12263            #[doc = ""]
12264            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
12265            #[doc = ""]
12266            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
12267            fn into_future(self) -> Self::IntoFuture {
12268                Box::pin(async move { self.send().await?.into_raw_body().await })
12269            }
12270        }
12271    }
12272}
12273pub mod retention {
12274    use super::models;
12275    #[cfg(not(target_arch = "wasm32"))]
12276    use futures::future::BoxFuture;
12277    #[cfg(target_arch = "wasm32")]
12278    use futures::future::LocalBoxFuture as BoxFuture;
12279    pub struct Client(pub(crate) super::Client);
12280    impl Client {
12281        #[doc = "Gets the project's retention settings."]
12282        #[doc = ""]
12283        #[doc = "Arguments:"]
12284        #[doc = "* `organization`: The name of the Azure DevOps organization."]
12285        #[doc = "* `project`: Project ID or project name"]
12286        pub fn get(
12287            &self,
12288            organization: impl Into<String>,
12289            project: impl Into<String>,
12290        ) -> get::RequestBuilder {
12291            get::RequestBuilder {
12292                client: self.0.clone(),
12293                organization: organization.into(),
12294                project: project.into(),
12295            }
12296        }
12297        #[doc = "Updates the project's retention settings."]
12298        #[doc = ""]
12299        #[doc = "Arguments:"]
12300        #[doc = "* `organization`: The name of the Azure DevOps organization."]
12301        #[doc = "* `project`: Project ID or project name"]
12302        pub fn update(
12303            &self,
12304            organization: impl Into<String>,
12305            body: impl Into<models::UpdateProjectRetentionSettingModel>,
12306            project: impl Into<String>,
12307        ) -> update::RequestBuilder {
12308            update::RequestBuilder {
12309                client: self.0.clone(),
12310                organization: organization.into(),
12311                body: body.into(),
12312                project: project.into(),
12313            }
12314        }
12315    }
12316    pub mod get {
12317        use super::models;
12318        #[cfg(not(target_arch = "wasm32"))]
12319        use futures::future::BoxFuture;
12320        #[cfg(target_arch = "wasm32")]
12321        use futures::future::LocalBoxFuture as BoxFuture;
12322        #[derive(Debug)]
12323        pub struct Response(azure_core::Response);
12324        impl Response {
12325            pub async fn into_raw_body(
12326                self,
12327            ) -> azure_core::Result<models::ProjectRetentionSetting> {
12328                let bytes = self.0.into_raw_body().collect().await?;
12329                let body: models::ProjectRetentionSetting = serde_json::from_slice(&bytes)
12330                    .map_err(|e| {
12331                        azure_core::error::Error::full(
12332                            azure_core::error::ErrorKind::DataConversion,
12333                            e,
12334                            format!(
12335                                "Failed to deserialize response:\n{}",
12336                                String::from_utf8_lossy(&bytes)
12337                            ),
12338                        )
12339                    })?;
12340                Ok(body)
12341            }
12342            pub fn into_raw_response(self) -> azure_core::Response {
12343                self.0
12344            }
12345            pub fn as_raw_response(&self) -> &azure_core::Response {
12346                &self.0
12347            }
12348        }
12349        impl From<Response> for azure_core::Response {
12350            fn from(rsp: Response) -> Self {
12351                rsp.into_raw_response()
12352            }
12353        }
12354        impl AsRef<azure_core::Response> for Response {
12355            fn as_ref(&self) -> &azure_core::Response {
12356                self.as_raw_response()
12357            }
12358        }
12359        #[derive(Clone)]
12360        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
12361        #[doc = r""]
12362        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
12363        #[doc = r" parameters can be chained."]
12364        #[doc = r""]
12365        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
12366        #[doc = r" converts the [`RequestBuilder`] into a future,"]
12367        #[doc = r" executes the request and returns a `Result` with the parsed"]
12368        #[doc = r" response."]
12369        #[doc = r""]
12370        #[doc = r" If you need lower-level access to the raw response details"]
12371        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
12372        #[doc = r" can finalize the request using the"]
12373        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
12374        #[doc = r" that resolves to a lower-level [`Response`] value."]
12375        pub struct RequestBuilder {
12376            pub(crate) client: super::super::Client,
12377            pub(crate) organization: String,
12378            pub(crate) project: String,
12379        }
12380        impl RequestBuilder {
12381            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
12382            #[doc = ""]
12383            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
12384            #[doc = "However, this function can provide more flexibility when required."]
12385            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
12386                Box::pin({
12387                    let this = self.clone();
12388                    async move {
12389                        let url = this.url()?;
12390                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
12391                        if let Some(auth_header) = this
12392                            .client
12393                            .token_credential()
12394                            .http_authorization_header(&this.client.scopes())
12395                            .await?
12396                        {
12397                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
12398                        }
12399                        let req_body = azure_core::EMPTY_BODY;
12400                        req.set_body(req_body);
12401                        Ok(Response(this.client.send(&mut req).await?))
12402                    }
12403                })
12404            }
12405            fn url(&self) -> azure_core::Result<azure_core::Url> {
12406                let mut url = azure_core::Url::parse(&format!(
12407                    "{}/{}/{}/_apis/build/retention",
12408                    self.client.endpoint(),
12409                    &self.organization,
12410                    &self.project
12411                ))?;
12412                let has_api_version_already = url
12413                    .query_pairs()
12414                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
12415                if !has_api_version_already {
12416                    url.query_pairs_mut()
12417                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
12418                }
12419                Ok(url)
12420            }
12421        }
12422        impl std::future::IntoFuture for RequestBuilder {
12423            type Output = azure_core::Result<models::ProjectRetentionSetting>;
12424            type IntoFuture =
12425                BoxFuture<'static, azure_core::Result<models::ProjectRetentionSetting>>;
12426            #[doc = "Returns a future that sends the request and returns the parsed response body."]
12427            #[doc = ""]
12428            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
12429            #[doc = ""]
12430            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
12431            fn into_future(self) -> Self::IntoFuture {
12432                Box::pin(async move { self.send().await?.into_raw_body().await })
12433            }
12434        }
12435    }
12436    pub mod update {
12437        use super::models;
12438        #[cfg(not(target_arch = "wasm32"))]
12439        use futures::future::BoxFuture;
12440        #[cfg(target_arch = "wasm32")]
12441        use futures::future::LocalBoxFuture as BoxFuture;
12442        #[derive(Debug)]
12443        pub struct Response(azure_core::Response);
12444        impl Response {
12445            pub async fn into_raw_body(
12446                self,
12447            ) -> azure_core::Result<models::ProjectRetentionSetting> {
12448                let bytes = self.0.into_raw_body().collect().await?;
12449                let body: models::ProjectRetentionSetting = serde_json::from_slice(&bytes)
12450                    .map_err(|e| {
12451                        azure_core::error::Error::full(
12452                            azure_core::error::ErrorKind::DataConversion,
12453                            e,
12454                            format!(
12455                                "Failed to deserialize response:\n{}",
12456                                String::from_utf8_lossy(&bytes)
12457                            ),
12458                        )
12459                    })?;
12460                Ok(body)
12461            }
12462            pub fn into_raw_response(self) -> azure_core::Response {
12463                self.0
12464            }
12465            pub fn as_raw_response(&self) -> &azure_core::Response {
12466                &self.0
12467            }
12468        }
12469        impl From<Response> for azure_core::Response {
12470            fn from(rsp: Response) -> Self {
12471                rsp.into_raw_response()
12472            }
12473        }
12474        impl AsRef<azure_core::Response> for Response {
12475            fn as_ref(&self) -> &azure_core::Response {
12476                self.as_raw_response()
12477            }
12478        }
12479        #[derive(Clone)]
12480        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
12481        #[doc = r""]
12482        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
12483        #[doc = r" parameters can be chained."]
12484        #[doc = r""]
12485        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
12486        #[doc = r" converts the [`RequestBuilder`] into a future,"]
12487        #[doc = r" executes the request and returns a `Result` with the parsed"]
12488        #[doc = r" response."]
12489        #[doc = r""]
12490        #[doc = r" If you need lower-level access to the raw response details"]
12491        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
12492        #[doc = r" can finalize the request using the"]
12493        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
12494        #[doc = r" that resolves to a lower-level [`Response`] value."]
12495        pub struct RequestBuilder {
12496            pub(crate) client: super::super::Client,
12497            pub(crate) organization: String,
12498            pub(crate) body: models::UpdateProjectRetentionSettingModel,
12499            pub(crate) project: String,
12500        }
12501        impl RequestBuilder {
12502            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
12503            #[doc = ""]
12504            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
12505            #[doc = "However, this function can provide more flexibility when required."]
12506            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
12507                Box::pin({
12508                    let this = self.clone();
12509                    async move {
12510                        let url = this.url()?;
12511                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
12512                        if let Some(auth_header) = this
12513                            .client
12514                            .token_credential()
12515                            .http_authorization_header(&this.client.scopes())
12516                            .await?
12517                        {
12518                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
12519                        }
12520                        req.insert_header("content-type", "application/json");
12521                        let req_body = azure_core::json::to_json(&this.body)?;
12522                        req.set_body(req_body);
12523                        Ok(Response(this.client.send(&mut req).await?))
12524                    }
12525                })
12526            }
12527            fn url(&self) -> azure_core::Result<azure_core::Url> {
12528                let mut url = azure_core::Url::parse(&format!(
12529                    "{}/{}/{}/_apis/build/retention",
12530                    self.client.endpoint(),
12531                    &self.organization,
12532                    &self.project
12533                ))?;
12534                let has_api_version_already = url
12535                    .query_pairs()
12536                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
12537                if !has_api_version_already {
12538                    url.query_pairs_mut()
12539                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
12540                }
12541                Ok(url)
12542            }
12543        }
12544        impl std::future::IntoFuture for RequestBuilder {
12545            type Output = azure_core::Result<models::ProjectRetentionSetting>;
12546            type IntoFuture =
12547                BoxFuture<'static, azure_core::Result<models::ProjectRetentionSetting>>;
12548            #[doc = "Returns a future that sends the request and returns the parsed response body."]
12549            #[doc = ""]
12550            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
12551            #[doc = ""]
12552            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
12553            fn into_future(self) -> Self::IntoFuture {
12554                Box::pin(async move { self.send().await?.into_raw_body().await })
12555            }
12556        }
12557    }
12558}
12559pub mod settings {
12560    use super::models;
12561    #[cfg(not(target_arch = "wasm32"))]
12562    use futures::future::BoxFuture;
12563    #[cfg(target_arch = "wasm32")]
12564    use futures::future::LocalBoxFuture as BoxFuture;
12565    pub struct Client(pub(crate) super::Client);
12566    impl Client {
12567        #[doc = "Gets the build settings."]
12568        #[doc = ""]
12569        #[doc = "Arguments:"]
12570        #[doc = "* `organization`: The name of the Azure DevOps organization."]
12571        #[doc = "* `project`: Project ID or project name"]
12572        pub fn get(
12573            &self,
12574            organization: impl Into<String>,
12575            project: impl Into<String>,
12576        ) -> get::RequestBuilder {
12577            get::RequestBuilder {
12578                client: self.0.clone(),
12579                organization: organization.into(),
12580                project: project.into(),
12581            }
12582        }
12583        #[doc = "Updates the build settings."]
12584        #[doc = ""]
12585        #[doc = "Arguments:"]
12586        #[doc = "* `organization`: The name of the Azure DevOps organization."]
12587        #[doc = "* `body`: The new settings."]
12588        #[doc = "* `project`: Project ID or project name"]
12589        pub fn update(
12590            &self,
12591            organization: impl Into<String>,
12592            body: impl Into<models::BuildSettings>,
12593            project: impl Into<String>,
12594        ) -> update::RequestBuilder {
12595            update::RequestBuilder {
12596                client: self.0.clone(),
12597                organization: organization.into(),
12598                body: body.into(),
12599                project: project.into(),
12600            }
12601        }
12602    }
12603    pub mod get {
12604        use super::models;
12605        #[cfg(not(target_arch = "wasm32"))]
12606        use futures::future::BoxFuture;
12607        #[cfg(target_arch = "wasm32")]
12608        use futures::future::LocalBoxFuture as BoxFuture;
12609        #[derive(Debug)]
12610        pub struct Response(azure_core::Response);
12611        impl Response {
12612            pub async fn into_raw_body(self) -> azure_core::Result<models::BuildSettings> {
12613                let bytes = self.0.into_raw_body().collect().await?;
12614                let body: models::BuildSettings = serde_json::from_slice(&bytes).map_err(|e| {
12615                    azure_core::error::Error::full(
12616                        azure_core::error::ErrorKind::DataConversion,
12617                        e,
12618                        format!(
12619                            "Failed to deserialize response:\n{}",
12620                            String::from_utf8_lossy(&bytes)
12621                        ),
12622                    )
12623                })?;
12624                Ok(body)
12625            }
12626            pub fn into_raw_response(self) -> azure_core::Response {
12627                self.0
12628            }
12629            pub fn as_raw_response(&self) -> &azure_core::Response {
12630                &self.0
12631            }
12632        }
12633        impl From<Response> for azure_core::Response {
12634            fn from(rsp: Response) -> Self {
12635                rsp.into_raw_response()
12636            }
12637        }
12638        impl AsRef<azure_core::Response> for Response {
12639            fn as_ref(&self) -> &azure_core::Response {
12640                self.as_raw_response()
12641            }
12642        }
12643        #[derive(Clone)]
12644        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
12645        #[doc = r""]
12646        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
12647        #[doc = r" parameters can be chained."]
12648        #[doc = r""]
12649        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
12650        #[doc = r" converts the [`RequestBuilder`] into a future,"]
12651        #[doc = r" executes the request and returns a `Result` with the parsed"]
12652        #[doc = r" response."]
12653        #[doc = r""]
12654        #[doc = r" If you need lower-level access to the raw response details"]
12655        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
12656        #[doc = r" can finalize the request using the"]
12657        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
12658        #[doc = r" that resolves to a lower-level [`Response`] value."]
12659        pub struct RequestBuilder {
12660            pub(crate) client: super::super::Client,
12661            pub(crate) organization: String,
12662            pub(crate) project: String,
12663        }
12664        impl RequestBuilder {
12665            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
12666            #[doc = ""]
12667            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
12668            #[doc = "However, this function can provide more flexibility when required."]
12669            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
12670                Box::pin({
12671                    let this = self.clone();
12672                    async move {
12673                        let url = this.url()?;
12674                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
12675                        if let Some(auth_header) = this
12676                            .client
12677                            .token_credential()
12678                            .http_authorization_header(&this.client.scopes())
12679                            .await?
12680                        {
12681                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
12682                        }
12683                        let req_body = azure_core::EMPTY_BODY;
12684                        req.set_body(req_body);
12685                        Ok(Response(this.client.send(&mut req).await?))
12686                    }
12687                })
12688            }
12689            fn url(&self) -> azure_core::Result<azure_core::Url> {
12690                let mut url = azure_core::Url::parse(&format!(
12691                    "{}/{}/{}/_apis/build/settings",
12692                    self.client.endpoint(),
12693                    &self.organization,
12694                    &self.project
12695                ))?;
12696                let has_api_version_already = url
12697                    .query_pairs()
12698                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
12699                if !has_api_version_already {
12700                    url.query_pairs_mut()
12701                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
12702                }
12703                Ok(url)
12704            }
12705        }
12706        impl std::future::IntoFuture for RequestBuilder {
12707            type Output = azure_core::Result<models::BuildSettings>;
12708            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildSettings>>;
12709            #[doc = "Returns a future that sends the request and returns the parsed response body."]
12710            #[doc = ""]
12711            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
12712            #[doc = ""]
12713            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
12714            fn into_future(self) -> Self::IntoFuture {
12715                Box::pin(async move { self.send().await?.into_raw_body().await })
12716            }
12717        }
12718    }
12719    pub mod update {
12720        use super::models;
12721        #[cfg(not(target_arch = "wasm32"))]
12722        use futures::future::BoxFuture;
12723        #[cfg(target_arch = "wasm32")]
12724        use futures::future::LocalBoxFuture as BoxFuture;
12725        #[derive(Debug)]
12726        pub struct Response(azure_core::Response);
12727        impl Response {
12728            pub async fn into_raw_body(self) -> azure_core::Result<models::BuildSettings> {
12729                let bytes = self.0.into_raw_body().collect().await?;
12730                let body: models::BuildSettings = serde_json::from_slice(&bytes).map_err(|e| {
12731                    azure_core::error::Error::full(
12732                        azure_core::error::ErrorKind::DataConversion,
12733                        e,
12734                        format!(
12735                            "Failed to deserialize response:\n{}",
12736                            String::from_utf8_lossy(&bytes)
12737                        ),
12738                    )
12739                })?;
12740                Ok(body)
12741            }
12742            pub fn into_raw_response(self) -> azure_core::Response {
12743                self.0
12744            }
12745            pub fn as_raw_response(&self) -> &azure_core::Response {
12746                &self.0
12747            }
12748        }
12749        impl From<Response> for azure_core::Response {
12750            fn from(rsp: Response) -> Self {
12751                rsp.into_raw_response()
12752            }
12753        }
12754        impl AsRef<azure_core::Response> for Response {
12755            fn as_ref(&self) -> &azure_core::Response {
12756                self.as_raw_response()
12757            }
12758        }
12759        #[derive(Clone)]
12760        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
12761        #[doc = r""]
12762        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
12763        #[doc = r" parameters can be chained."]
12764        #[doc = r""]
12765        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
12766        #[doc = r" converts the [`RequestBuilder`] into a future,"]
12767        #[doc = r" executes the request and returns a `Result` with the parsed"]
12768        #[doc = r" response."]
12769        #[doc = r""]
12770        #[doc = r" If you need lower-level access to the raw response details"]
12771        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
12772        #[doc = r" can finalize the request using the"]
12773        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
12774        #[doc = r" that resolves to a lower-level [`Response`] value."]
12775        pub struct RequestBuilder {
12776            pub(crate) client: super::super::Client,
12777            pub(crate) organization: String,
12778            pub(crate) body: models::BuildSettings,
12779            pub(crate) project: String,
12780        }
12781        impl RequestBuilder {
12782            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
12783            #[doc = ""]
12784            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
12785            #[doc = "However, this function can provide more flexibility when required."]
12786            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
12787                Box::pin({
12788                    let this = self.clone();
12789                    async move {
12790                        let url = this.url()?;
12791                        let mut req = azure_core::Request::new(url, azure_core::Method::Patch);
12792                        if let Some(auth_header) = this
12793                            .client
12794                            .token_credential()
12795                            .http_authorization_header(&this.client.scopes())
12796                            .await?
12797                        {
12798                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
12799                        }
12800                        req.insert_header("content-type", "application/json");
12801                        let req_body = azure_core::json::to_json(&this.body)?;
12802                        req.set_body(req_body);
12803                        Ok(Response(this.client.send(&mut req).await?))
12804                    }
12805                })
12806            }
12807            fn url(&self) -> azure_core::Result<azure_core::Url> {
12808                let mut url = azure_core::Url::parse(&format!(
12809                    "{}/{}/{}/_apis/build/settings",
12810                    self.client.endpoint(),
12811                    &self.organization,
12812                    &self.project
12813                ))?;
12814                let has_api_version_already = url
12815                    .query_pairs()
12816                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
12817                if !has_api_version_already {
12818                    url.query_pairs_mut()
12819                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
12820                }
12821                Ok(url)
12822            }
12823        }
12824        impl std::future::IntoFuture for RequestBuilder {
12825            type Output = azure_core::Result<models::BuildSettings>;
12826            type IntoFuture = BoxFuture<'static, azure_core::Result<models::BuildSettings>>;
12827            #[doc = "Returns a future that sends the request and returns the parsed response body."]
12828            #[doc = ""]
12829            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
12830            #[doc = ""]
12831            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
12832            fn into_future(self) -> Self::IntoFuture {
12833                Box::pin(async move { self.send().await?.into_raw_body().await })
12834            }
12835        }
12836    }
12837}
12838pub mod status {
12839    use super::models;
12840    #[cfg(not(target_arch = "wasm32"))]
12841    use futures::future::BoxFuture;
12842    #[cfg(target_arch = "wasm32")]
12843    use futures::future::LocalBoxFuture as BoxFuture;
12844    pub struct Client(pub(crate) super::Client);
12845    impl Client {
12846        #[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>"]
12847        #[doc = ""]
12848        #[doc = "Arguments:"]
12849        #[doc = "* `organization`: The name of the Azure DevOps organization."]
12850        #[doc = "* `project`: Project ID or project name"]
12851        #[doc = "* `definition`: Either the definition name with optional leading folder path, or the definition id."]
12852        pub fn get(
12853            &self,
12854            organization: impl Into<String>,
12855            project: impl Into<String>,
12856            definition: impl Into<String>,
12857        ) -> get::RequestBuilder {
12858            get::RequestBuilder {
12859                client: self.0.clone(),
12860                organization: organization.into(),
12861                project: project.into(),
12862                definition: definition.into(),
12863                branch_name: None,
12864                stage_name: None,
12865                job_name: None,
12866                configuration: None,
12867                label: None,
12868            }
12869        }
12870    }
12871    pub mod get {
12872        use super::models;
12873        #[cfg(not(target_arch = "wasm32"))]
12874        use futures::future::BoxFuture;
12875        #[cfg(target_arch = "wasm32")]
12876        use futures::future::LocalBoxFuture as BoxFuture;
12877        #[derive(Debug)]
12878        pub struct Response(azure_core::Response);
12879        impl Response {
12880            pub async fn into_raw_body(self) -> azure_core::Result<String> {
12881                let bytes = self.0.into_raw_body().collect().await?;
12882                let body: String = serde_json::from_slice(&bytes).map_err(|e| {
12883                    azure_core::error::Error::full(
12884                        azure_core::error::ErrorKind::DataConversion,
12885                        e,
12886                        format!(
12887                            "Failed to deserialize response:\n{}",
12888                            String::from_utf8_lossy(&bytes)
12889                        ),
12890                    )
12891                })?;
12892                Ok(body)
12893            }
12894            pub fn into_raw_response(self) -> azure_core::Response {
12895                self.0
12896            }
12897            pub fn as_raw_response(&self) -> &azure_core::Response {
12898                &self.0
12899            }
12900        }
12901        impl From<Response> for azure_core::Response {
12902            fn from(rsp: Response) -> Self {
12903                rsp.into_raw_response()
12904            }
12905        }
12906        impl AsRef<azure_core::Response> for Response {
12907            fn as_ref(&self) -> &azure_core::Response {
12908                self.as_raw_response()
12909            }
12910        }
12911        #[derive(Clone)]
12912        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
12913        #[doc = r""]
12914        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
12915        #[doc = r" parameters can be chained."]
12916        #[doc = r""]
12917        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
12918        #[doc = r" converts the [`RequestBuilder`] into a future,"]
12919        #[doc = r" executes the request and returns a `Result` with the parsed"]
12920        #[doc = r" response."]
12921        #[doc = r""]
12922        #[doc = r" If you need lower-level access to the raw response details"]
12923        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
12924        #[doc = r" can finalize the request using the"]
12925        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
12926        #[doc = r" that resolves to a lower-level [`Response`] value."]
12927        pub struct RequestBuilder {
12928            pub(crate) client: super::super::Client,
12929            pub(crate) organization: String,
12930            pub(crate) project: String,
12931            pub(crate) definition: String,
12932            pub(crate) branch_name: Option<String>,
12933            pub(crate) stage_name: Option<String>,
12934            pub(crate) job_name: Option<String>,
12935            pub(crate) configuration: Option<String>,
12936            pub(crate) label: Option<String>,
12937        }
12938        impl RequestBuilder {
12939            #[doc = "Only consider the most recent build for this branch. If not specified, the default branch is used."]
12940            pub fn branch_name(mut self, branch_name: impl Into<String>) -> Self {
12941                self.branch_name = Some(branch_name.into());
12942                self
12943            }
12944            #[doc = "Use this stage within the pipeline to render the status."]
12945            pub fn stage_name(mut self, stage_name: impl Into<String>) -> Self {
12946                self.stage_name = Some(stage_name.into());
12947                self
12948            }
12949            #[doc = "Use this job within a stage of the pipeline to render the status."]
12950            pub fn job_name(mut self, job_name: impl Into<String>) -> Self {
12951                self.job_name = Some(job_name.into());
12952                self
12953            }
12954            #[doc = "Use this job configuration to render the status"]
12955            pub fn configuration(mut self, configuration: impl Into<String>) -> Self {
12956                self.configuration = Some(configuration.into());
12957                self
12958            }
12959            #[doc = "Replaces the default text on the left side of the badge."]
12960            pub fn label(mut self, label: impl Into<String>) -> Self {
12961                self.label = Some(label.into());
12962                self
12963            }
12964            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
12965            #[doc = ""]
12966            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
12967            #[doc = "However, this function can provide more flexibility when required."]
12968            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
12969                Box::pin({
12970                    let this = self.clone();
12971                    async move {
12972                        let url = this.url()?;
12973                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
12974                        if let Some(auth_header) = this
12975                            .client
12976                            .token_credential()
12977                            .http_authorization_header(&this.client.scopes())
12978                            .await?
12979                        {
12980                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
12981                        }
12982                        if let Some(branch_name) = &this.branch_name {
12983                            req.url_mut()
12984                                .query_pairs_mut()
12985                                .append_pair("branchName", branch_name);
12986                        }
12987                        if let Some(stage_name) = &this.stage_name {
12988                            req.url_mut()
12989                                .query_pairs_mut()
12990                                .append_pair("stageName", stage_name);
12991                        }
12992                        if let Some(job_name) = &this.job_name {
12993                            req.url_mut()
12994                                .query_pairs_mut()
12995                                .append_pair("jobName", job_name);
12996                        }
12997                        if let Some(configuration) = &this.configuration {
12998                            req.url_mut()
12999                                .query_pairs_mut()
13000                                .append_pair("configuration", configuration);
13001                        }
13002                        if let Some(label) = &this.label {
13003                            req.url_mut().query_pairs_mut().append_pair("label", label);
13004                        }
13005                        let req_body = azure_core::EMPTY_BODY;
13006                        req.set_body(req_body);
13007                        Ok(Response(this.client.send(&mut req).await?))
13008                    }
13009                })
13010            }
13011            fn url(&self) -> azure_core::Result<azure_core::Url> {
13012                let mut url = azure_core::Url::parse(&format!(
13013                    "{}/{}/{}/_apis/build/status/{}",
13014                    self.client.endpoint(),
13015                    &self.organization,
13016                    &self.project,
13017                    &self.definition
13018                ))?;
13019                let has_api_version_already = url
13020                    .query_pairs()
13021                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
13022                if !has_api_version_already {
13023                    url.query_pairs_mut()
13024                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
13025                }
13026                Ok(url)
13027            }
13028        }
13029        impl std::future::IntoFuture for RequestBuilder {
13030            type Output = azure_core::Result<String>;
13031            type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
13032            #[doc = "Returns a future that sends the request and returns the parsed response body."]
13033            #[doc = ""]
13034            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
13035            #[doc = ""]
13036            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
13037            fn into_future(self) -> Self::IntoFuture {
13038                Box::pin(async move { self.send().await?.into_raw_body().await })
13039            }
13040        }
13041    }
13042}
13043pub mod source_providers {
13044    use super::models;
13045    #[cfg(not(target_arch = "wasm32"))]
13046    use futures::future::BoxFuture;
13047    #[cfg(target_arch = "wasm32")]
13048    use futures::future::LocalBoxFuture as BoxFuture;
13049    pub struct Client(pub(crate) super::Client);
13050    impl Client {
13051        #[doc = "Get a list of source providers and their capabilities."]
13052        #[doc = ""]
13053        #[doc = "Arguments:"]
13054        #[doc = "* `organization`: The name of the Azure DevOps organization."]
13055        #[doc = "* `project`: Project ID or project name"]
13056        pub fn list(
13057            &self,
13058            organization: impl Into<String>,
13059            project: impl Into<String>,
13060        ) -> list::RequestBuilder {
13061            list::RequestBuilder {
13062                client: self.0.clone(),
13063                organization: organization.into(),
13064                project: project.into(),
13065            }
13066        }
13067        #[doc = "Gets a list of branches for the given source code repository."]
13068        #[doc = ""]
13069        #[doc = "Arguments:"]
13070        #[doc = "* `organization`: The name of the Azure DevOps organization."]
13071        #[doc = "* `project`: Project ID or project name"]
13072        #[doc = "* `provider_name`: The name of the source provider."]
13073        pub fn list_branches(
13074            &self,
13075            organization: impl Into<String>,
13076            project: impl Into<String>,
13077            provider_name: impl Into<String>,
13078        ) -> list_branches::RequestBuilder {
13079            list_branches::RequestBuilder {
13080                client: self.0.clone(),
13081                organization: organization.into(),
13082                project: project.into(),
13083                provider_name: provider_name.into(),
13084                service_endpoint_id: None,
13085                repository: None,
13086                branch_name: None,
13087            }
13088        }
13089        #[doc = "Gets the contents of a file in the given source code repository."]
13090        #[doc = ""]
13091        #[doc = "Arguments:"]
13092        #[doc = "* `organization`: The name of the Azure DevOps organization."]
13093        #[doc = "* `project`: Project ID or project name"]
13094        #[doc = "* `provider_name`: The name of the source provider."]
13095        pub fn get_file_contents(
13096            &self,
13097            organization: impl Into<String>,
13098            project: impl Into<String>,
13099            provider_name: impl Into<String>,
13100        ) -> get_file_contents::RequestBuilder {
13101            get_file_contents::RequestBuilder {
13102                client: self.0.clone(),
13103                organization: organization.into(),
13104                project: project.into(),
13105                provider_name: provider_name.into(),
13106                service_endpoint_id: None,
13107                repository: None,
13108                commit_or_branch: None,
13109                path: None,
13110            }
13111        }
13112        #[doc = "Gets the contents of a directory in the given source code repository."]
13113        #[doc = ""]
13114        #[doc = "Arguments:"]
13115        #[doc = "* `organization`: The name of the Azure DevOps organization."]
13116        #[doc = "* `project`: Project ID or project name"]
13117        #[doc = "* `provider_name`: The name of the source provider."]
13118        pub fn get_path_contents(
13119            &self,
13120            organization: impl Into<String>,
13121            project: impl Into<String>,
13122            provider_name: impl Into<String>,
13123        ) -> get_path_contents::RequestBuilder {
13124            get_path_contents::RequestBuilder {
13125                client: self.0.clone(),
13126                organization: organization.into(),
13127                project: project.into(),
13128                provider_name: provider_name.into(),
13129                service_endpoint_id: None,
13130                repository: None,
13131                commit_or_branch: None,
13132                path: None,
13133            }
13134        }
13135        #[doc = "Gets a pull request object from source provider."]
13136        #[doc = ""]
13137        #[doc = "Arguments:"]
13138        #[doc = "* `organization`: The name of the Azure DevOps organization."]
13139        #[doc = "* `project`: Project ID or project name"]
13140        #[doc = "* `provider_name`: The name of the source provider."]
13141        #[doc = "* `pull_request_id`: Vendor-specific id of the pull request."]
13142        pub fn get_pull_request(
13143            &self,
13144            organization: impl Into<String>,
13145            project: impl Into<String>,
13146            provider_name: impl Into<String>,
13147            pull_request_id: impl Into<String>,
13148        ) -> get_pull_request::RequestBuilder {
13149            get_pull_request::RequestBuilder {
13150                client: self.0.clone(),
13151                organization: organization.into(),
13152                project: project.into(),
13153                provider_name: provider_name.into(),
13154                pull_request_id: pull_request_id.into(),
13155                repository_id: None,
13156                service_endpoint_id: None,
13157            }
13158        }
13159        #[doc = "Gets a list of source code repositories."]
13160        #[doc = ""]
13161        #[doc = "Arguments:"]
13162        #[doc = "* `organization`: The name of the Azure DevOps organization."]
13163        #[doc = "* `project`: Project ID or project name"]
13164        #[doc = "* `provider_name`: The name of the source provider."]
13165        pub fn list_repositories(
13166            &self,
13167            organization: impl Into<String>,
13168            project: impl Into<String>,
13169            provider_name: impl Into<String>,
13170        ) -> list_repositories::RequestBuilder {
13171            list_repositories::RequestBuilder {
13172                client: self.0.clone(),
13173                organization: organization.into(),
13174                project: project.into(),
13175                provider_name: provider_name.into(),
13176                service_endpoint_id: None,
13177                repository: None,
13178                result_set: None,
13179                page_results: None,
13180                continuation_token: None,
13181            }
13182        }
13183        #[doc = "Gets a list of webhooks installed in the given source code repository."]
13184        #[doc = ""]
13185        #[doc = "Arguments:"]
13186        #[doc = "* `organization`: The name of the Azure DevOps organization."]
13187        #[doc = "* `project`: Project ID or project name"]
13188        #[doc = "* `provider_name`: The name of the source provider."]
13189        pub fn list_webhooks(
13190            &self,
13191            organization: impl Into<String>,
13192            project: impl Into<String>,
13193            provider_name: impl Into<String>,
13194        ) -> list_webhooks::RequestBuilder {
13195            list_webhooks::RequestBuilder {
13196                client: self.0.clone(),
13197                organization: organization.into(),
13198                project: project.into(),
13199                provider_name: provider_name.into(),
13200                service_endpoint_id: None,
13201                repository: None,
13202            }
13203        }
13204        #[doc = "Recreates the webhooks for the specified triggers in the given source code repository."]
13205        #[doc = ""]
13206        #[doc = "Arguments:"]
13207        #[doc = "* `organization`: The name of the Azure DevOps organization."]
13208        #[doc = "* `body`: The types of triggers to restore webhooks for."]
13209        #[doc = "* `project`: Project ID or project name"]
13210        #[doc = "* `provider_name`: The name of the source provider."]
13211        pub fn restore_webhooks(
13212            &self,
13213            organization: impl Into<String>,
13214            body: Vec<String>,
13215            project: impl Into<String>,
13216            provider_name: impl Into<String>,
13217        ) -> restore_webhooks::RequestBuilder {
13218            restore_webhooks::RequestBuilder {
13219                client: self.0.clone(),
13220                organization: organization.into(),
13221                body,
13222                project: project.into(),
13223                provider_name: provider_name.into(),
13224                service_endpoint_id: None,
13225                repository: None,
13226            }
13227        }
13228    }
13229    pub mod list {
13230        use super::models;
13231        #[cfg(not(target_arch = "wasm32"))]
13232        use futures::future::BoxFuture;
13233        #[cfg(target_arch = "wasm32")]
13234        use futures::future::LocalBoxFuture as BoxFuture;
13235        #[derive(Debug)]
13236        pub struct Response(azure_core::Response);
13237        impl Response {
13238            pub async fn into_raw_body(
13239                self,
13240            ) -> azure_core::Result<models::SourceProviderAttributesList> {
13241                let bytes = self.0.into_raw_body().collect().await?;
13242                let body: models::SourceProviderAttributesList = serde_json::from_slice(&bytes)
13243                    .map_err(|e| {
13244                        azure_core::error::Error::full(
13245                            azure_core::error::ErrorKind::DataConversion,
13246                            e,
13247                            format!(
13248                                "Failed to deserialize response:\n{}",
13249                                String::from_utf8_lossy(&bytes)
13250                            ),
13251                        )
13252                    })?;
13253                Ok(body)
13254            }
13255            pub fn into_raw_response(self) -> azure_core::Response {
13256                self.0
13257            }
13258            pub fn as_raw_response(&self) -> &azure_core::Response {
13259                &self.0
13260            }
13261        }
13262        impl From<Response> for azure_core::Response {
13263            fn from(rsp: Response) -> Self {
13264                rsp.into_raw_response()
13265            }
13266        }
13267        impl AsRef<azure_core::Response> for Response {
13268            fn as_ref(&self) -> &azure_core::Response {
13269                self.as_raw_response()
13270            }
13271        }
13272        #[derive(Clone)]
13273        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
13274        #[doc = r""]
13275        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
13276        #[doc = r" parameters can be chained."]
13277        #[doc = r""]
13278        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
13279        #[doc = r" converts the [`RequestBuilder`] into a future,"]
13280        #[doc = r" executes the request and returns a `Result` with the parsed"]
13281        #[doc = r" response."]
13282        #[doc = r""]
13283        #[doc = r" If you need lower-level access to the raw response details"]
13284        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
13285        #[doc = r" can finalize the request using the"]
13286        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
13287        #[doc = r" that resolves to a lower-level [`Response`] value."]
13288        pub struct RequestBuilder {
13289            pub(crate) client: super::super::Client,
13290            pub(crate) organization: String,
13291            pub(crate) project: String,
13292        }
13293        impl RequestBuilder {
13294            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
13295            #[doc = ""]
13296            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
13297            #[doc = "However, this function can provide more flexibility when required."]
13298            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
13299                Box::pin({
13300                    let this = self.clone();
13301                    async move {
13302                        let url = this.url()?;
13303                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
13304                        if let Some(auth_header) = this
13305                            .client
13306                            .token_credential()
13307                            .http_authorization_header(&this.client.scopes())
13308                            .await?
13309                        {
13310                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
13311                        }
13312                        let req_body = azure_core::EMPTY_BODY;
13313                        req.set_body(req_body);
13314                        Ok(Response(this.client.send(&mut req).await?))
13315                    }
13316                })
13317            }
13318            fn url(&self) -> azure_core::Result<azure_core::Url> {
13319                let mut url = azure_core::Url::parse(&format!(
13320                    "{}/{}/{}/_apis/sourceproviders",
13321                    self.client.endpoint(),
13322                    &self.organization,
13323                    &self.project
13324                ))?;
13325                let has_api_version_already = url
13326                    .query_pairs()
13327                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
13328                if !has_api_version_already {
13329                    url.query_pairs_mut()
13330                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
13331                }
13332                Ok(url)
13333            }
13334        }
13335        impl std::future::IntoFuture for RequestBuilder {
13336            type Output = azure_core::Result<models::SourceProviderAttributesList>;
13337            type IntoFuture =
13338                BoxFuture<'static, azure_core::Result<models::SourceProviderAttributesList>>;
13339            #[doc = "Returns a future that sends the request and returns the parsed response body."]
13340            #[doc = ""]
13341            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
13342            #[doc = ""]
13343            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
13344            fn into_future(self) -> Self::IntoFuture {
13345                Box::pin(async move { self.send().await?.into_raw_body().await })
13346            }
13347        }
13348    }
13349    pub mod list_branches {
13350        use super::models;
13351        #[cfg(not(target_arch = "wasm32"))]
13352        use futures::future::BoxFuture;
13353        #[cfg(target_arch = "wasm32")]
13354        use futures::future::LocalBoxFuture as BoxFuture;
13355        #[derive(Debug)]
13356        pub struct Response(azure_core::Response);
13357        impl Response {
13358            pub async fn into_raw_body(self) -> azure_core::Result<Vec<String>> {
13359                let bytes = self.0.into_raw_body().collect().await?;
13360                let body: Vec<String> = serde_json::from_slice(&bytes).map_err(|e| {
13361                    azure_core::error::Error::full(
13362                        azure_core::error::ErrorKind::DataConversion,
13363                        e,
13364                        format!(
13365                            "Failed to deserialize response:\n{}",
13366                            String::from_utf8_lossy(&bytes)
13367                        ),
13368                    )
13369                })?;
13370                Ok(body)
13371            }
13372            pub fn into_raw_response(self) -> azure_core::Response {
13373                self.0
13374            }
13375            pub fn as_raw_response(&self) -> &azure_core::Response {
13376                &self.0
13377            }
13378        }
13379        impl From<Response> for azure_core::Response {
13380            fn from(rsp: Response) -> Self {
13381                rsp.into_raw_response()
13382            }
13383        }
13384        impl AsRef<azure_core::Response> for Response {
13385            fn as_ref(&self) -> &azure_core::Response {
13386                self.as_raw_response()
13387            }
13388        }
13389        #[derive(Clone)]
13390        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
13391        #[doc = r""]
13392        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
13393        #[doc = r" parameters can be chained."]
13394        #[doc = r""]
13395        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
13396        #[doc = r" converts the [`RequestBuilder`] into a future,"]
13397        #[doc = r" executes the request and returns a `Result` with the parsed"]
13398        #[doc = r" response."]
13399        #[doc = r""]
13400        #[doc = r" If you need lower-level access to the raw response details"]
13401        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
13402        #[doc = r" can finalize the request using the"]
13403        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
13404        #[doc = r" that resolves to a lower-level [`Response`] value."]
13405        pub struct RequestBuilder {
13406            pub(crate) client: super::super::Client,
13407            pub(crate) organization: String,
13408            pub(crate) project: String,
13409            pub(crate) provider_name: String,
13410            pub(crate) service_endpoint_id: Option<String>,
13411            pub(crate) repository: Option<String>,
13412            pub(crate) branch_name: Option<String>,
13413        }
13414        impl RequestBuilder {
13415            #[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."]
13416            pub fn service_endpoint_id(mut self, service_endpoint_id: impl Into<String>) -> Self {
13417                self.service_endpoint_id = Some(service_endpoint_id.into());
13418                self
13419            }
13420            #[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."]
13421            pub fn repository(mut self, repository: impl Into<String>) -> Self {
13422                self.repository = Some(repository.into());
13423                self
13424            }
13425            #[doc = "If supplied, the name of the branch to check for specifically."]
13426            pub fn branch_name(mut self, branch_name: impl Into<String>) -> Self {
13427                self.branch_name = Some(branch_name.into());
13428                self
13429            }
13430            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
13431            #[doc = ""]
13432            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
13433            #[doc = "However, this function can provide more flexibility when required."]
13434            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
13435                Box::pin({
13436                    let this = self.clone();
13437                    async move {
13438                        let url = this.url()?;
13439                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
13440                        if let Some(auth_header) = this
13441                            .client
13442                            .token_credential()
13443                            .http_authorization_header(&this.client.scopes())
13444                            .await?
13445                        {
13446                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
13447                        }
13448                        if let Some(service_endpoint_id) = &this.service_endpoint_id {
13449                            req.url_mut()
13450                                .query_pairs_mut()
13451                                .append_pair("serviceEndpointId", service_endpoint_id);
13452                        }
13453                        if let Some(repository) = &this.repository {
13454                            req.url_mut()
13455                                .query_pairs_mut()
13456                                .append_pair("repository", repository);
13457                        }
13458                        if let Some(branch_name) = &this.branch_name {
13459                            req.url_mut()
13460                                .query_pairs_mut()
13461                                .append_pair("branchName", branch_name);
13462                        }
13463                        let req_body = azure_core::EMPTY_BODY;
13464                        req.set_body(req_body);
13465                        Ok(Response(this.client.send(&mut req).await?))
13466                    }
13467                })
13468            }
13469            fn url(&self) -> azure_core::Result<azure_core::Url> {
13470                let mut url = azure_core::Url::parse(&format!(
13471                    "{}/{}/{}/_apis/sourceProviders/{}/branches",
13472                    self.client.endpoint(),
13473                    &self.organization,
13474                    &self.project,
13475                    &self.provider_name
13476                ))?;
13477                let has_api_version_already = url
13478                    .query_pairs()
13479                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
13480                if !has_api_version_already {
13481                    url.query_pairs_mut()
13482                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
13483                }
13484                Ok(url)
13485            }
13486        }
13487        impl std::future::IntoFuture for RequestBuilder {
13488            type Output = azure_core::Result<Vec<String>>;
13489            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
13490            #[doc = "Returns a future that sends the request and returns the parsed response body."]
13491            #[doc = ""]
13492            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
13493            #[doc = ""]
13494            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
13495            fn into_future(self) -> Self::IntoFuture {
13496                Box::pin(async move { self.send().await?.into_raw_body().await })
13497            }
13498        }
13499    }
13500    pub mod get_file_contents {
13501        use super::models;
13502        #[cfg(not(target_arch = "wasm32"))]
13503        use futures::future::BoxFuture;
13504        #[cfg(target_arch = "wasm32")]
13505        use futures::future::LocalBoxFuture as BoxFuture;
13506        #[derive(Debug)]
13507        pub struct Response(azure_core::Response);
13508        impl Response {
13509            pub async fn into_raw_body(self) -> azure_core::Result<String> {
13510                let bytes = self.0.into_raw_body().collect().await?;
13511                let body: String = serde_json::from_slice(&bytes).map_err(|e| {
13512                    azure_core::error::Error::full(
13513                        azure_core::error::ErrorKind::DataConversion,
13514                        e,
13515                        format!(
13516                            "Failed to deserialize response:\n{}",
13517                            String::from_utf8_lossy(&bytes)
13518                        ),
13519                    )
13520                })?;
13521                Ok(body)
13522            }
13523            pub fn into_raw_response(self) -> azure_core::Response {
13524                self.0
13525            }
13526            pub fn as_raw_response(&self) -> &azure_core::Response {
13527                &self.0
13528            }
13529        }
13530        impl From<Response> for azure_core::Response {
13531            fn from(rsp: Response) -> Self {
13532                rsp.into_raw_response()
13533            }
13534        }
13535        impl AsRef<azure_core::Response> for Response {
13536            fn as_ref(&self) -> &azure_core::Response {
13537                self.as_raw_response()
13538            }
13539        }
13540        #[derive(Clone)]
13541        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
13542        #[doc = r""]
13543        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
13544        #[doc = r" parameters can be chained."]
13545        #[doc = r""]
13546        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
13547        #[doc = r" converts the [`RequestBuilder`] into a future,"]
13548        #[doc = r" executes the request and returns a `Result` with the parsed"]
13549        #[doc = r" response."]
13550        #[doc = r""]
13551        #[doc = r" If you need lower-level access to the raw response details"]
13552        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
13553        #[doc = r" can finalize the request using the"]
13554        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
13555        #[doc = r" that resolves to a lower-level [`Response`] value."]
13556        pub struct RequestBuilder {
13557            pub(crate) client: super::super::Client,
13558            pub(crate) organization: String,
13559            pub(crate) project: String,
13560            pub(crate) provider_name: String,
13561            pub(crate) service_endpoint_id: Option<String>,
13562            pub(crate) repository: Option<String>,
13563            pub(crate) commit_or_branch: Option<String>,
13564            pub(crate) path: Option<String>,
13565        }
13566        impl RequestBuilder {
13567            #[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."]
13568            pub fn service_endpoint_id(mut self, service_endpoint_id: impl Into<String>) -> Self {
13569                self.service_endpoint_id = Some(service_endpoint_id.into());
13570                self
13571            }
13572            #[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."]
13573            pub fn repository(mut self, repository: impl Into<String>) -> Self {
13574                self.repository = Some(repository.into());
13575                self
13576            }
13577            #[doc = "The identifier of the commit or branch from which a file's contents are retrieved."]
13578            pub fn commit_or_branch(mut self, commit_or_branch: impl Into<String>) -> Self {
13579                self.commit_or_branch = Some(commit_or_branch.into());
13580                self
13581            }
13582            #[doc = "The path to the file to retrieve, relative to the root of the repository."]
13583            pub fn path(mut self, path: impl Into<String>) -> Self {
13584                self.path = Some(path.into());
13585                self
13586            }
13587            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
13588            #[doc = ""]
13589            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
13590            #[doc = "However, this function can provide more flexibility when required."]
13591            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
13592                Box::pin({
13593                    let this = self.clone();
13594                    async move {
13595                        let url = this.url()?;
13596                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
13597                        if let Some(auth_header) = this
13598                            .client
13599                            .token_credential()
13600                            .http_authorization_header(&this.client.scopes())
13601                            .await?
13602                        {
13603                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
13604                        }
13605                        if let Some(service_endpoint_id) = &this.service_endpoint_id {
13606                            req.url_mut()
13607                                .query_pairs_mut()
13608                                .append_pair("serviceEndpointId", service_endpoint_id);
13609                        }
13610                        if let Some(repository) = &this.repository {
13611                            req.url_mut()
13612                                .query_pairs_mut()
13613                                .append_pair("repository", repository);
13614                        }
13615                        if let Some(commit_or_branch) = &this.commit_or_branch {
13616                            req.url_mut()
13617                                .query_pairs_mut()
13618                                .append_pair("commitOrBranch", commit_or_branch);
13619                        }
13620                        if let Some(path) = &this.path {
13621                            req.url_mut().query_pairs_mut().append_pair("path", path);
13622                        }
13623                        let req_body = azure_core::EMPTY_BODY;
13624                        req.set_body(req_body);
13625                        Ok(Response(this.client.send(&mut req).await?))
13626                    }
13627                })
13628            }
13629            fn url(&self) -> azure_core::Result<azure_core::Url> {
13630                let mut url = azure_core::Url::parse(&format!(
13631                    "{}/{}/{}/_apis/sourceProviders/{}/filecontents",
13632                    self.client.endpoint(),
13633                    &self.organization,
13634                    &self.project,
13635                    &self.provider_name
13636                ))?;
13637                let has_api_version_already = url
13638                    .query_pairs()
13639                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
13640                if !has_api_version_already {
13641                    url.query_pairs_mut()
13642                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
13643                }
13644                Ok(url)
13645            }
13646        }
13647        impl std::future::IntoFuture for RequestBuilder {
13648            type Output = azure_core::Result<String>;
13649            type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
13650            #[doc = "Returns a future that sends the request and returns the parsed response body."]
13651            #[doc = ""]
13652            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
13653            #[doc = ""]
13654            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
13655            fn into_future(self) -> Self::IntoFuture {
13656                Box::pin(async move { self.send().await?.into_raw_body().await })
13657            }
13658        }
13659    }
13660    pub mod get_path_contents {
13661        use super::models;
13662        #[cfg(not(target_arch = "wasm32"))]
13663        use futures::future::BoxFuture;
13664        #[cfg(target_arch = "wasm32")]
13665        use futures::future::LocalBoxFuture as BoxFuture;
13666        #[derive(Debug)]
13667        pub struct Response(azure_core::Response);
13668        impl Response {
13669            pub async fn into_raw_body(
13670                self,
13671            ) -> azure_core::Result<models::SourceRepositoryItemList> {
13672                let bytes = self.0.into_raw_body().collect().await?;
13673                let body: models::SourceRepositoryItemList = serde_json::from_slice(&bytes)
13674                    .map_err(|e| {
13675                        azure_core::error::Error::full(
13676                            azure_core::error::ErrorKind::DataConversion,
13677                            e,
13678                            format!(
13679                                "Failed to deserialize response:\n{}",
13680                                String::from_utf8_lossy(&bytes)
13681                            ),
13682                        )
13683                    })?;
13684                Ok(body)
13685            }
13686            pub fn into_raw_response(self) -> azure_core::Response {
13687                self.0
13688            }
13689            pub fn as_raw_response(&self) -> &azure_core::Response {
13690                &self.0
13691            }
13692        }
13693        impl From<Response> for azure_core::Response {
13694            fn from(rsp: Response) -> Self {
13695                rsp.into_raw_response()
13696            }
13697        }
13698        impl AsRef<azure_core::Response> for Response {
13699            fn as_ref(&self) -> &azure_core::Response {
13700                self.as_raw_response()
13701            }
13702        }
13703        #[derive(Clone)]
13704        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
13705        #[doc = r""]
13706        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
13707        #[doc = r" parameters can be chained."]
13708        #[doc = r""]
13709        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
13710        #[doc = r" converts the [`RequestBuilder`] into a future,"]
13711        #[doc = r" executes the request and returns a `Result` with the parsed"]
13712        #[doc = r" response."]
13713        #[doc = r""]
13714        #[doc = r" If you need lower-level access to the raw response details"]
13715        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
13716        #[doc = r" can finalize the request using the"]
13717        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
13718        #[doc = r" that resolves to a lower-level [`Response`] value."]
13719        pub struct RequestBuilder {
13720            pub(crate) client: super::super::Client,
13721            pub(crate) organization: String,
13722            pub(crate) project: String,
13723            pub(crate) provider_name: String,
13724            pub(crate) service_endpoint_id: Option<String>,
13725            pub(crate) repository: Option<String>,
13726            pub(crate) commit_or_branch: Option<String>,
13727            pub(crate) path: Option<String>,
13728        }
13729        impl RequestBuilder {
13730            #[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."]
13731            pub fn service_endpoint_id(mut self, service_endpoint_id: impl Into<String>) -> Self {
13732                self.service_endpoint_id = Some(service_endpoint_id.into());
13733                self
13734            }
13735            #[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."]
13736            pub fn repository(mut self, repository: impl Into<String>) -> Self {
13737                self.repository = Some(repository.into());
13738                self
13739            }
13740            #[doc = "The identifier of the commit or branch from which a file's contents are retrieved."]
13741            pub fn commit_or_branch(mut self, commit_or_branch: impl Into<String>) -> Self {
13742                self.commit_or_branch = Some(commit_or_branch.into());
13743                self
13744            }
13745            #[doc = "The path contents to list, relative to the root of the repository."]
13746            pub fn path(mut self, path: impl Into<String>) -> Self {
13747                self.path = Some(path.into());
13748                self
13749            }
13750            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
13751            #[doc = ""]
13752            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
13753            #[doc = "However, this function can provide more flexibility when required."]
13754            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
13755                Box::pin({
13756                    let this = self.clone();
13757                    async move {
13758                        let url = this.url()?;
13759                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
13760                        if let Some(auth_header) = this
13761                            .client
13762                            .token_credential()
13763                            .http_authorization_header(&this.client.scopes())
13764                            .await?
13765                        {
13766                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
13767                        }
13768                        if let Some(service_endpoint_id) = &this.service_endpoint_id {
13769                            req.url_mut()
13770                                .query_pairs_mut()
13771                                .append_pair("serviceEndpointId", service_endpoint_id);
13772                        }
13773                        if let Some(repository) = &this.repository {
13774                            req.url_mut()
13775                                .query_pairs_mut()
13776                                .append_pair("repository", repository);
13777                        }
13778                        if let Some(commit_or_branch) = &this.commit_or_branch {
13779                            req.url_mut()
13780                                .query_pairs_mut()
13781                                .append_pair("commitOrBranch", commit_or_branch);
13782                        }
13783                        if let Some(path) = &this.path {
13784                            req.url_mut().query_pairs_mut().append_pair("path", path);
13785                        }
13786                        let req_body = azure_core::EMPTY_BODY;
13787                        req.set_body(req_body);
13788                        Ok(Response(this.client.send(&mut req).await?))
13789                    }
13790                })
13791            }
13792            fn url(&self) -> azure_core::Result<azure_core::Url> {
13793                let mut url = azure_core::Url::parse(&format!(
13794                    "{}/{}/{}/_apis/sourceProviders/{}/pathcontents",
13795                    self.client.endpoint(),
13796                    &self.organization,
13797                    &self.project,
13798                    &self.provider_name
13799                ))?;
13800                let has_api_version_already = url
13801                    .query_pairs()
13802                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
13803                if !has_api_version_already {
13804                    url.query_pairs_mut()
13805                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
13806                }
13807                Ok(url)
13808            }
13809        }
13810        impl std::future::IntoFuture for RequestBuilder {
13811            type Output = azure_core::Result<models::SourceRepositoryItemList>;
13812            type IntoFuture =
13813                BoxFuture<'static, azure_core::Result<models::SourceRepositoryItemList>>;
13814            #[doc = "Returns a future that sends the request and returns the parsed response body."]
13815            #[doc = ""]
13816            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
13817            #[doc = ""]
13818            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
13819            fn into_future(self) -> Self::IntoFuture {
13820                Box::pin(async move { self.send().await?.into_raw_body().await })
13821            }
13822        }
13823    }
13824    pub mod get_pull_request {
13825        use super::models;
13826        #[cfg(not(target_arch = "wasm32"))]
13827        use futures::future::BoxFuture;
13828        #[cfg(target_arch = "wasm32")]
13829        use futures::future::LocalBoxFuture as BoxFuture;
13830        #[derive(Debug)]
13831        pub struct Response(azure_core::Response);
13832        impl Response {
13833            pub async fn into_raw_body(self) -> azure_core::Result<models::PullRequest> {
13834                let bytes = self.0.into_raw_body().collect().await?;
13835                let body: models::PullRequest = serde_json::from_slice(&bytes).map_err(|e| {
13836                    azure_core::error::Error::full(
13837                        azure_core::error::ErrorKind::DataConversion,
13838                        e,
13839                        format!(
13840                            "Failed to deserialize response:\n{}",
13841                            String::from_utf8_lossy(&bytes)
13842                        ),
13843                    )
13844                })?;
13845                Ok(body)
13846            }
13847            pub fn into_raw_response(self) -> azure_core::Response {
13848                self.0
13849            }
13850            pub fn as_raw_response(&self) -> &azure_core::Response {
13851                &self.0
13852            }
13853        }
13854        impl From<Response> for azure_core::Response {
13855            fn from(rsp: Response) -> Self {
13856                rsp.into_raw_response()
13857            }
13858        }
13859        impl AsRef<azure_core::Response> for Response {
13860            fn as_ref(&self) -> &azure_core::Response {
13861                self.as_raw_response()
13862            }
13863        }
13864        #[derive(Clone)]
13865        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
13866        #[doc = r""]
13867        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
13868        #[doc = r" parameters can be chained."]
13869        #[doc = r""]
13870        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
13871        #[doc = r" converts the [`RequestBuilder`] into a future,"]
13872        #[doc = r" executes the request and returns a `Result` with the parsed"]
13873        #[doc = r" response."]
13874        #[doc = r""]
13875        #[doc = r" If you need lower-level access to the raw response details"]
13876        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
13877        #[doc = r" can finalize the request using the"]
13878        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
13879        #[doc = r" that resolves to a lower-level [`Response`] value."]
13880        pub struct RequestBuilder {
13881            pub(crate) client: super::super::Client,
13882            pub(crate) organization: String,
13883            pub(crate) project: String,
13884            pub(crate) provider_name: String,
13885            pub(crate) pull_request_id: String,
13886            pub(crate) repository_id: Option<String>,
13887            pub(crate) service_endpoint_id: Option<String>,
13888        }
13889        impl RequestBuilder {
13890            #[doc = "Vendor-specific identifier or the name of the repository that contains the pull request."]
13891            pub fn repository_id(mut self, repository_id: impl Into<String>) -> Self {
13892                self.repository_id = Some(repository_id.into());
13893                self
13894            }
13895            #[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."]
13896            pub fn service_endpoint_id(mut self, service_endpoint_id: impl Into<String>) -> Self {
13897                self.service_endpoint_id = Some(service_endpoint_id.into());
13898                self
13899            }
13900            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
13901            #[doc = ""]
13902            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
13903            #[doc = "However, this function can provide more flexibility when required."]
13904            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
13905                Box::pin({
13906                    let this = self.clone();
13907                    async move {
13908                        let url = this.url()?;
13909                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
13910                        if let Some(auth_header) = this
13911                            .client
13912                            .token_credential()
13913                            .http_authorization_header(&this.client.scopes())
13914                            .await?
13915                        {
13916                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
13917                        }
13918                        if let Some(repository_id) = &this.repository_id {
13919                            req.url_mut()
13920                                .query_pairs_mut()
13921                                .append_pair("repositoryId", repository_id);
13922                        }
13923                        if let Some(service_endpoint_id) = &this.service_endpoint_id {
13924                            req.url_mut()
13925                                .query_pairs_mut()
13926                                .append_pair("serviceEndpointId", service_endpoint_id);
13927                        }
13928                        let req_body = azure_core::EMPTY_BODY;
13929                        req.set_body(req_body);
13930                        Ok(Response(this.client.send(&mut req).await?))
13931                    }
13932                })
13933            }
13934            fn url(&self) -> azure_core::Result<azure_core::Url> {
13935                let mut url = azure_core::Url::parse(&format!(
13936                    "{}/{}/{}/_apis/sourceProviders/{}/pullrequests/{}",
13937                    self.client.endpoint(),
13938                    &self.organization,
13939                    &self.project,
13940                    &self.provider_name,
13941                    &self.pull_request_id
13942                ))?;
13943                let has_api_version_already = url
13944                    .query_pairs()
13945                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
13946                if !has_api_version_already {
13947                    url.query_pairs_mut()
13948                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
13949                }
13950                Ok(url)
13951            }
13952        }
13953        impl std::future::IntoFuture for RequestBuilder {
13954            type Output = azure_core::Result<models::PullRequest>;
13955            type IntoFuture = BoxFuture<'static, azure_core::Result<models::PullRequest>>;
13956            #[doc = "Returns a future that sends the request and returns the parsed response body."]
13957            #[doc = ""]
13958            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
13959            #[doc = ""]
13960            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
13961            fn into_future(self) -> Self::IntoFuture {
13962                Box::pin(async move { self.send().await?.into_raw_body().await })
13963            }
13964        }
13965    }
13966    pub mod list_repositories {
13967        use super::models;
13968        #[cfg(not(target_arch = "wasm32"))]
13969        use futures::future::BoxFuture;
13970        #[cfg(target_arch = "wasm32")]
13971        use futures::future::LocalBoxFuture as BoxFuture;
13972        #[derive(Debug)]
13973        pub struct Response(azure_core::Response);
13974        impl Response {
13975            pub async fn into_raw_body(self) -> azure_core::Result<models::SourceRepositories> {
13976                let bytes = self.0.into_raw_body().collect().await?;
13977                let body: models::SourceRepositories =
13978                    serde_json::from_slice(&bytes).map_err(|e| {
13979                        azure_core::error::Error::full(
13980                            azure_core::error::ErrorKind::DataConversion,
13981                            e,
13982                            format!(
13983                                "Failed to deserialize response:\n{}",
13984                                String::from_utf8_lossy(&bytes)
13985                            ),
13986                        )
13987                    })?;
13988                Ok(body)
13989            }
13990            pub fn into_raw_response(self) -> azure_core::Response {
13991                self.0
13992            }
13993            pub fn as_raw_response(&self) -> &azure_core::Response {
13994                &self.0
13995            }
13996        }
13997        impl From<Response> for azure_core::Response {
13998            fn from(rsp: Response) -> Self {
13999                rsp.into_raw_response()
14000            }
14001        }
14002        impl AsRef<azure_core::Response> for Response {
14003            fn as_ref(&self) -> &azure_core::Response {
14004                self.as_raw_response()
14005            }
14006        }
14007        #[derive(Clone)]
14008        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
14009        #[doc = r""]
14010        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
14011        #[doc = r" parameters can be chained."]
14012        #[doc = r""]
14013        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
14014        #[doc = r" converts the [`RequestBuilder`] into a future,"]
14015        #[doc = r" executes the request and returns a `Result` with the parsed"]
14016        #[doc = r" response."]
14017        #[doc = r""]
14018        #[doc = r" If you need lower-level access to the raw response details"]
14019        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
14020        #[doc = r" can finalize the request using the"]
14021        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
14022        #[doc = r" that resolves to a lower-level [`Response`] value."]
14023        pub struct RequestBuilder {
14024            pub(crate) client: super::super::Client,
14025            pub(crate) organization: String,
14026            pub(crate) project: String,
14027            pub(crate) provider_name: String,
14028            pub(crate) service_endpoint_id: Option<String>,
14029            pub(crate) repository: Option<String>,
14030            pub(crate) result_set: Option<String>,
14031            pub(crate) page_results: Option<bool>,
14032            pub(crate) continuation_token: Option<String>,
14033        }
14034        impl RequestBuilder {
14035            #[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."]
14036            pub fn service_endpoint_id(mut self, service_endpoint_id: impl Into<String>) -> Self {
14037                self.service_endpoint_id = Some(service_endpoint_id.into());
14038                self
14039            }
14040            #[doc = "If specified, the vendor-specific identifier or the name of a single repository to get."]
14041            pub fn repository(mut self, repository: impl Into<String>) -> Self {
14042                self.repository = Some(repository.into());
14043                self
14044            }
14045            #[doc = "'top' for the repositories most relevant for the endpoint. If not set, all repositories are returned. Ignored if 'repository' is set."]
14046            pub fn result_set(mut self, result_set: impl Into<String>) -> Self {
14047                self.result_set = Some(result_set.into());
14048                self
14049            }
14050            #[doc = "If set to true, this will limit the set of results and will return a continuation token to continue the query."]
14051            pub fn page_results(mut self, page_results: bool) -> Self {
14052                self.page_results = Some(page_results);
14053                self
14054            }
14055            #[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."]
14056            pub fn continuation_token(mut self, continuation_token: impl Into<String>) -> Self {
14057                self.continuation_token = Some(continuation_token.into());
14058                self
14059            }
14060            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
14061            #[doc = ""]
14062            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
14063            #[doc = "However, this function can provide more flexibility when required."]
14064            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
14065                Box::pin({
14066                    let this = self.clone();
14067                    async move {
14068                        let url = this.url()?;
14069                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
14070                        if let Some(auth_header) = this
14071                            .client
14072                            .token_credential()
14073                            .http_authorization_header(&this.client.scopes())
14074                            .await?
14075                        {
14076                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
14077                        }
14078                        if let Some(service_endpoint_id) = &this.service_endpoint_id {
14079                            req.url_mut()
14080                                .query_pairs_mut()
14081                                .append_pair("serviceEndpointId", service_endpoint_id);
14082                        }
14083                        if let Some(repository) = &this.repository {
14084                            req.url_mut()
14085                                .query_pairs_mut()
14086                                .append_pair("repository", repository);
14087                        }
14088                        if let Some(result_set) = &this.result_set {
14089                            req.url_mut()
14090                                .query_pairs_mut()
14091                                .append_pair("resultSet", result_set);
14092                        }
14093                        if let Some(page_results) = &this.page_results {
14094                            req.url_mut()
14095                                .query_pairs_mut()
14096                                .append_pair("pageResults", &page_results.to_string());
14097                        }
14098                        if let Some(continuation_token) = &this.continuation_token {
14099                            req.url_mut()
14100                                .query_pairs_mut()
14101                                .append_pair("continuationToken", continuation_token);
14102                        }
14103                        let req_body = azure_core::EMPTY_BODY;
14104                        req.set_body(req_body);
14105                        Ok(Response(this.client.send(&mut req).await?))
14106                    }
14107                })
14108            }
14109            fn url(&self) -> azure_core::Result<azure_core::Url> {
14110                let mut url = azure_core::Url::parse(&format!(
14111                    "{}/{}/{}/_apis/sourceProviders/{}/repositories",
14112                    self.client.endpoint(),
14113                    &self.organization,
14114                    &self.project,
14115                    &self.provider_name
14116                ))?;
14117                let has_api_version_already = url
14118                    .query_pairs()
14119                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
14120                if !has_api_version_already {
14121                    url.query_pairs_mut()
14122                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
14123                }
14124                Ok(url)
14125            }
14126        }
14127        impl std::future::IntoFuture for RequestBuilder {
14128            type Output = azure_core::Result<models::SourceRepositories>;
14129            type IntoFuture = BoxFuture<'static, azure_core::Result<models::SourceRepositories>>;
14130            #[doc = "Returns a future that sends the request and returns the parsed response body."]
14131            #[doc = ""]
14132            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
14133            #[doc = ""]
14134            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
14135            fn into_future(self) -> Self::IntoFuture {
14136                Box::pin(async move { self.send().await?.into_raw_body().await })
14137            }
14138        }
14139    }
14140    pub mod list_webhooks {
14141        use super::models;
14142        #[cfg(not(target_arch = "wasm32"))]
14143        use futures::future::BoxFuture;
14144        #[cfg(target_arch = "wasm32")]
14145        use futures::future::LocalBoxFuture as BoxFuture;
14146        #[derive(Debug)]
14147        pub struct Response(azure_core::Response);
14148        impl Response {
14149            pub async fn into_raw_body(self) -> azure_core::Result<models::RepositoryWebhookList> {
14150                let bytes = self.0.into_raw_body().collect().await?;
14151                let body: models::RepositoryWebhookList =
14152                    serde_json::from_slice(&bytes).map_err(|e| {
14153                        azure_core::error::Error::full(
14154                            azure_core::error::ErrorKind::DataConversion,
14155                            e,
14156                            format!(
14157                                "Failed to deserialize response:\n{}",
14158                                String::from_utf8_lossy(&bytes)
14159                            ),
14160                        )
14161                    })?;
14162                Ok(body)
14163            }
14164            pub fn into_raw_response(self) -> azure_core::Response {
14165                self.0
14166            }
14167            pub fn as_raw_response(&self) -> &azure_core::Response {
14168                &self.0
14169            }
14170        }
14171        impl From<Response> for azure_core::Response {
14172            fn from(rsp: Response) -> Self {
14173                rsp.into_raw_response()
14174            }
14175        }
14176        impl AsRef<azure_core::Response> for Response {
14177            fn as_ref(&self) -> &azure_core::Response {
14178                self.as_raw_response()
14179            }
14180        }
14181        #[derive(Clone)]
14182        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
14183        #[doc = r""]
14184        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
14185        #[doc = r" parameters can be chained."]
14186        #[doc = r""]
14187        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
14188        #[doc = r" converts the [`RequestBuilder`] into a future,"]
14189        #[doc = r" executes the request and returns a `Result` with the parsed"]
14190        #[doc = r" response."]
14191        #[doc = r""]
14192        #[doc = r" If you need lower-level access to the raw response details"]
14193        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
14194        #[doc = r" can finalize the request using the"]
14195        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
14196        #[doc = r" that resolves to a lower-level [`Response`] value."]
14197        pub struct RequestBuilder {
14198            pub(crate) client: super::super::Client,
14199            pub(crate) organization: String,
14200            pub(crate) project: String,
14201            pub(crate) provider_name: String,
14202            pub(crate) service_endpoint_id: Option<String>,
14203            pub(crate) repository: Option<String>,
14204        }
14205        impl RequestBuilder {
14206            #[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."]
14207            pub fn service_endpoint_id(mut self, service_endpoint_id: impl Into<String>) -> Self {
14208                self.service_endpoint_id = Some(service_endpoint_id.into());
14209                self
14210            }
14211            #[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."]
14212            pub fn repository(mut self, repository: impl Into<String>) -> Self {
14213                self.repository = Some(repository.into());
14214                self
14215            }
14216            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
14217            #[doc = ""]
14218            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
14219            #[doc = "However, this function can provide more flexibility when required."]
14220            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
14221                Box::pin({
14222                    let this = self.clone();
14223                    async move {
14224                        let url = this.url()?;
14225                        let mut req = azure_core::Request::new(url, azure_core::Method::Get);
14226                        if let Some(auth_header) = this
14227                            .client
14228                            .token_credential()
14229                            .http_authorization_header(&this.client.scopes())
14230                            .await?
14231                        {
14232                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
14233                        }
14234                        if let Some(service_endpoint_id) = &this.service_endpoint_id {
14235                            req.url_mut()
14236                                .query_pairs_mut()
14237                                .append_pair("serviceEndpointId", service_endpoint_id);
14238                        }
14239                        if let Some(repository) = &this.repository {
14240                            req.url_mut()
14241                                .query_pairs_mut()
14242                                .append_pair("repository", repository);
14243                        }
14244                        let req_body = azure_core::EMPTY_BODY;
14245                        req.set_body(req_body);
14246                        Ok(Response(this.client.send(&mut req).await?))
14247                    }
14248                })
14249            }
14250            fn url(&self) -> azure_core::Result<azure_core::Url> {
14251                let mut url = azure_core::Url::parse(&format!(
14252                    "{}/{}/{}/_apis/sourceProviders/{}/webhooks",
14253                    self.client.endpoint(),
14254                    &self.organization,
14255                    &self.project,
14256                    &self.provider_name
14257                ))?;
14258                let has_api_version_already = url
14259                    .query_pairs()
14260                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
14261                if !has_api_version_already {
14262                    url.query_pairs_mut()
14263                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
14264                }
14265                Ok(url)
14266            }
14267        }
14268        impl std::future::IntoFuture for RequestBuilder {
14269            type Output = azure_core::Result<models::RepositoryWebhookList>;
14270            type IntoFuture = BoxFuture<'static, azure_core::Result<models::RepositoryWebhookList>>;
14271            #[doc = "Returns a future that sends the request and returns the parsed response body."]
14272            #[doc = ""]
14273            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
14274            #[doc = ""]
14275            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
14276            fn into_future(self) -> Self::IntoFuture {
14277                Box::pin(async move { self.send().await?.into_raw_body().await })
14278            }
14279        }
14280    }
14281    pub mod restore_webhooks {
14282        use super::models;
14283        #[cfg(not(target_arch = "wasm32"))]
14284        use futures::future::BoxFuture;
14285        #[cfg(target_arch = "wasm32")]
14286        use futures::future::LocalBoxFuture as BoxFuture;
14287        #[derive(Debug)]
14288        pub struct Response(azure_core::Response);
14289        impl Response {
14290            pub fn into_raw_response(self) -> azure_core::Response {
14291                self.0
14292            }
14293            pub fn as_raw_response(&self) -> &azure_core::Response {
14294                &self.0
14295            }
14296        }
14297        impl From<Response> for azure_core::Response {
14298            fn from(rsp: Response) -> Self {
14299                rsp.into_raw_response()
14300            }
14301        }
14302        impl AsRef<azure_core::Response> for Response {
14303            fn as_ref(&self) -> &azure_core::Response {
14304                self.as_raw_response()
14305            }
14306        }
14307        #[derive(Clone)]
14308        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
14309        #[doc = r""]
14310        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
14311        #[doc = r" parameters can be chained."]
14312        #[doc = r""]
14313        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
14314        #[doc = r" converts the [`RequestBuilder`] into a future,"]
14315        #[doc = r" executes the request and returns a `Result` with the parsed"]
14316        #[doc = r" response."]
14317        #[doc = r""]
14318        #[doc = r" If you need lower-level access to the raw response details"]
14319        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
14320        #[doc = r" can finalize the request using the"]
14321        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
14322        #[doc = r" that resolves to a lower-level [`Response`] value."]
14323        pub struct RequestBuilder {
14324            pub(crate) client: super::super::Client,
14325            pub(crate) organization: String,
14326            pub(crate) body: Vec<String>,
14327            pub(crate) project: String,
14328            pub(crate) provider_name: String,
14329            pub(crate) service_endpoint_id: Option<String>,
14330            pub(crate) repository: Option<String>,
14331        }
14332        impl RequestBuilder {
14333            #[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."]
14334            pub fn service_endpoint_id(mut self, service_endpoint_id: impl Into<String>) -> Self {
14335                self.service_endpoint_id = Some(service_endpoint_id.into());
14336                self
14337            }
14338            #[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."]
14339            pub fn repository(mut self, repository: impl Into<String>) -> Self {
14340                self.repository = Some(repository.into());
14341                self
14342            }
14343            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
14344            #[doc = ""]
14345            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
14346            #[doc = "However, this function can provide more flexibility when required."]
14347            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
14348                Box::pin({
14349                    let this = self.clone();
14350                    async move {
14351                        let url = this.url()?;
14352                        let mut req = azure_core::Request::new(url, azure_core::Method::Post);
14353                        if let Some(auth_header) = this
14354                            .client
14355                            .token_credential()
14356                            .http_authorization_header(&this.client.scopes())
14357                            .await?
14358                        {
14359                            req.insert_header(azure_core::headers::AUTHORIZATION, auth_header);
14360                        }
14361                        req.insert_header("content-type", "application/json");
14362                        let req_body = azure_core::json::to_json(&this.body)?;
14363                        if let Some(service_endpoint_id) = &this.service_endpoint_id {
14364                            req.url_mut()
14365                                .query_pairs_mut()
14366                                .append_pair("serviceEndpointId", service_endpoint_id);
14367                        }
14368                        if let Some(repository) = &this.repository {
14369                            req.url_mut()
14370                                .query_pairs_mut()
14371                                .append_pair("repository", repository);
14372                        }
14373                        req.set_body(req_body);
14374                        Ok(Response(this.client.send(&mut req).await?))
14375                    }
14376                })
14377            }
14378            fn url(&self) -> azure_core::Result<azure_core::Url> {
14379                let mut url = azure_core::Url::parse(&format!(
14380                    "{}/{}/{}/_apis/sourceProviders/{}/webhooks",
14381                    self.client.endpoint(),
14382                    &self.organization,
14383                    &self.project,
14384                    &self.provider_name
14385                ))?;
14386                let has_api_version_already = url
14387                    .query_pairs()
14388                    .any(|(k, _)| k == azure_core::query_param::API_VERSION);
14389                if !has_api_version_already {
14390                    url.query_pairs_mut()
14391                        .append_pair(azure_core::query_param::API_VERSION, "7.1-preview");
14392                }
14393                Ok(url)
14394            }
14395        }
14396        impl std::future::IntoFuture for RequestBuilder {
14397            type Output = azure_core::Result<()>;
14398            type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
14399            #[doc = "Returns a future that sends the request and waits for the response."]
14400            #[doc = ""]
14401            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
14402            #[doc = ""]
14403            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
14404            fn into_future(self) -> Self::IntoFuture {
14405                Box::pin(async move {
14406                    let _rsp = self.send().await?;
14407                    Ok(())
14408                })
14409            }
14410        }
14411    }
14412}