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