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