azure_devops_rust_api/member_entitlement_management/
mod.rs

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3#![allow(unused_mut)]
4#![allow(unused_variables)]
5#![allow(unused_imports)]
6#![allow(clippy::redundant_clone)]
7#![allow(clippy::too_many_arguments)]
8#![allow(clippy::module_inception)]
9pub mod models;
10#[derive(Clone)]
11pub struct Client {
12    endpoint: azure_core::http::Url,
13    credential: crate::Credential,
14    scopes: Vec<String>,
15    pipeline: azure_core::http::Pipeline,
16}
17#[derive(Clone)]
18pub struct ClientBuilder {
19    credential: crate::Credential,
20    endpoint: Option<azure_core::http::Url>,
21    scopes: Option<Vec<String>>,
22    options: azure_core::http::ClientOptions,
23}
24azure_core::static_url!(DEFAULT_ENDPOINT, "https://vsaex.dev.azure.com");
25impl ClientBuilder {
26    #[doc = "Create a new instance of `ClientBuilder`."]
27    #[must_use]
28    pub fn new(credential: crate::Credential) -> Self {
29        Self {
30            credential,
31            endpoint: None,
32            scopes: None,
33            options: azure_core::http::ClientOptions::default(),
34        }
35    }
36    #[doc = "Set the endpoint."]
37    #[must_use]
38    pub fn endpoint(mut self, endpoint: impl Into<azure_core::http::Url>) -> Self {
39        self.endpoint = Some(endpoint.into());
40        self
41    }
42    #[doc = "Set the scopes."]
43    #[must_use]
44    pub fn scopes(mut self, scopes: &[&str]) -> Self {
45        self.scopes = Some(scopes.iter().map(|scope| (*scope).to_owned()).collect());
46        self
47    }
48    #[doc = "Set the retry options."]
49    #[must_use]
50    pub fn retry(mut self, retry: impl Into<azure_core::http::RetryOptions>) -> Self {
51        self.options.retry = Some(retry.into());
52        self
53    }
54    #[doc = "Set the transport options."]
55    #[must_use]
56    pub fn transport(mut self, transport: impl Into<azure_core::http::TransportOptions>) -> Self {
57        self.options.transport = Some(transport.into());
58        self
59    }
60    #[doc = "Set per-call policies."]
61    #[must_use]
62    pub fn per_call_policies(
63        mut self,
64        policies: impl Into<Vec<std::sync::Arc<dyn azure_core::http::policies::Policy>>>,
65    ) -> Self {
66        self.options.per_call_policies = policies.into();
67        self
68    }
69    #[doc = "Set per-try policies."]
70    #[must_use]
71    pub fn per_try_policies(
72        mut self,
73        policies: impl Into<Vec<std::sync::Arc<dyn azure_core::http::policies::Policy>>>,
74    ) -> Self {
75        self.options.per_try_policies = policies.into();
76        self
77    }
78    #[doc = "Convert the builder into a `Client` instance."]
79    pub fn build(self) -> Client {
80        let endpoint = self.endpoint.unwrap_or_else(|| DEFAULT_ENDPOINT.to_owned());
81        let scopes = self
82            .scopes
83            .unwrap_or_else(|| vec![crate::ADO_SCOPE.to_string()]);
84        Client::new(endpoint, self.credential, scopes, self.options)
85    }
86}
87impl Client {
88    pub(crate) fn endpoint(&self) -> &azure_core::http::Url {
89        &self.endpoint
90    }
91    pub(crate) fn token_credential(&self) -> &crate::Credential {
92        &self.credential
93    }
94    pub(crate) fn scopes(&self) -> Vec<&str> {
95        self.scopes.iter().map(String::as_str).collect()
96    }
97    pub(crate) async fn send(
98        &self,
99        request: &mut azure_core::http::Request,
100    ) -> azure_core::Result<azure_core::http::BufResponse> {
101        let context = azure_core::http::Context::default();
102        self.pipeline.send(&context, request).await
103    }
104    #[doc = "Create a new `ClientBuilder`."]
105    #[must_use]
106    pub fn builder(credential: crate::Credential) -> ClientBuilder {
107        ClientBuilder::new(credential)
108    }
109    #[doc = "Create a new `Client`."]
110    #[must_use]
111    pub fn new(
112        endpoint: impl Into<azure_core::http::Url>,
113        credential: crate::Credential,
114        scopes: Vec<String>,
115        options: azure_core::http::ClientOptions,
116    ) -> Self {
117        let endpoint = endpoint.into();
118        let pipeline = azure_core::http::Pipeline::new(
119            option_env!("CARGO_PKG_NAME"),
120            option_env!("CARGO_PKG_VERSION"),
121            options,
122            Vec::new(),
123            Vec::new(),
124            None,
125        );
126        Self {
127            endpoint,
128            credential,
129            scopes,
130            pipeline,
131        }
132    }
133    pub fn group_entitlements_client(&self) -> group_entitlements::Client {
134        group_entitlements::Client(self.clone())
135    }
136    pub fn member_entitlements_client(&self) -> member_entitlements::Client {
137        member_entitlements::Client(self.clone())
138    }
139    pub fn members_client(&self) -> members::Client {
140        members::Client(self.clone())
141    }
142    pub fn service_principal_entitlements_client(&self) -> service_principal_entitlements::Client {
143        service_principal_entitlements::Client(self.clone())
144    }
145    pub fn user_entitlement_summary_client(&self) -> user_entitlement_summary::Client {
146        user_entitlement_summary::Client(self.clone())
147    }
148    pub fn user_entitlements_client(&self) -> user_entitlements::Client {
149        user_entitlements::Client(self.clone())
150    }
151}
152pub mod group_entitlements {
153    use super::models;
154    #[cfg(not(target_arch = "wasm32"))]
155    use futures::future::BoxFuture;
156    #[cfg(target_arch = "wasm32")]
157    use futures::future::LocalBoxFuture as BoxFuture;
158    pub struct Client(pub(crate) super::Client);
159    impl Client {
160        #[doc = "Get the group entitlements for an account."]
161        #[doc = ""]
162        #[doc = "Arguments:"]
163        #[doc = "* `organization`: The name of the Azure DevOps organization."]
164        pub fn list(&self, organization: impl Into<String>) -> list::RequestBuilder {
165            list::RequestBuilder {
166                client: self.0.clone(),
167                organization: organization.into(),
168            }
169        }
170        #[doc = "Create a group entitlement with license rule, extension rule."]
171        #[doc = ""]
172        #[doc = "Arguments:"]
173        #[doc = "* `organization`: The name of the Azure DevOps organization."]
174        #[doc = "* `body`: GroupEntitlement object specifying License Rule, Extensions Rule for the group. Based on the rules the members of the group will be given licenses and extensions. The Group Entitlement can be used to add the group to another project level groups"]
175        pub fn add(
176            &self,
177            organization: impl Into<String>,
178            body: impl Into<models::GroupEntitlement>,
179        ) -> add::RequestBuilder {
180            add::RequestBuilder {
181                client: self.0.clone(),
182                organization: organization.into(),
183                body: body.into(),
184                rule_option: None,
185            }
186        }
187        #[doc = "Get a group entitlement.\n\nIf the group entitlement does not exist, returns null."]
188        #[doc = ""]
189        #[doc = "Arguments:"]
190        #[doc = "* `organization`: The name of the Azure DevOps organization."]
191        #[doc = "* `group_id`: ID of the group."]
192        pub fn get(
193            &self,
194            organization: impl Into<String>,
195            group_id: impl Into<String>,
196        ) -> get::RequestBuilder {
197            get::RequestBuilder {
198                client: self.0.clone(),
199                organization: organization.into(),
200                group_id: group_id.into(),
201            }
202        }
203        #[doc = "Update entitlements (License Rule, Extensions Rule, Project memberships etc.) for a group."]
204        #[doc = ""]
205        #[doc = "Arguments:"]
206        #[doc = "* `organization`: The name of the Azure DevOps organization."]
207        #[doc = "* `body`: JsonPatchDocument containing the operations to perform on the group."]
208        #[doc = "* `group_id`: ID of the group."]
209        pub fn update(
210            &self,
211            organization: impl Into<String>,
212            body: impl Into<models::JsonPatchDocument>,
213            group_id: impl Into<String>,
214        ) -> update::RequestBuilder {
215            update::RequestBuilder {
216                client: self.0.clone(),
217                organization: organization.into(),
218                body: body.into(),
219                group_id: group_id.into(),
220                rule_option: None,
221            }
222        }
223        #[doc = "Delete a group entitlement."]
224        #[doc = ""]
225        #[doc = "Arguments:"]
226        #[doc = "* `organization`: The name of the Azure DevOps organization."]
227        #[doc = "* `group_id`: ID of the group to delete."]
228        pub fn delete(
229            &self,
230            organization: impl Into<String>,
231            group_id: impl Into<String>,
232        ) -> delete::RequestBuilder {
233            delete::RequestBuilder {
234                client: self.0.clone(),
235                organization: organization.into(),
236                group_id: group_id.into(),
237                rule_option: None,
238                remove_group_membership: None,
239            }
240        }
241    }
242    pub mod list {
243        use super::models;
244        #[cfg(not(target_arch = "wasm32"))]
245        use futures::future::BoxFuture;
246        #[cfg(target_arch = "wasm32")]
247        use futures::future::LocalBoxFuture as BoxFuture;
248        #[derive(Debug)]
249        pub struct Response(
250            azure_core::http::Response<models::GroupEntitlementList, azure_core::http::JsonFormat>,
251        );
252        impl Response {
253            pub async fn into_body(self) -> azure_core::Result<models::GroupEntitlementList> {
254                self.0.into_body().await
255            }
256            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
257                self.0.into()
258            }
259        }
260        #[derive(Clone)]
261        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
262        #[doc = r""]
263        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
264        #[doc = r" parameters can be chained."]
265        #[doc = r""]
266        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
267        #[doc = r" converts the [`RequestBuilder`] into a future,"]
268        #[doc = r" executes the request and returns a `Result` with the parsed"]
269        #[doc = r" response."]
270        #[doc = r""]
271        #[doc = r" If you need lower-level access to the raw response details"]
272        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
273        #[doc = r" can finalize the request using the"]
274        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
275        #[doc = r" that resolves to a lower-level [`Response`] value."]
276        pub struct RequestBuilder {
277            pub(crate) client: super::super::Client,
278            pub(crate) organization: String,
279        }
280        impl RequestBuilder {
281            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
282            #[doc = ""]
283            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
284            #[doc = "However, this function can provide more flexibility when required."]
285            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
286                Box::pin({
287                    let this = self.clone();
288                    async move {
289                        let url = this.url()?;
290                        let mut req =
291                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
292                        if let Some(auth_header) = this
293                            .client
294                            .token_credential()
295                            .http_authorization_header(&this.client.scopes())
296                            .await?
297                        {
298                            req.insert_header(
299                                azure_core::http::headers::AUTHORIZATION,
300                                auth_header,
301                            );
302                        }
303                        let req_body = azure_core::Bytes::new();
304                        req.set_body(req_body);
305                        Ok(Response(this.client.send(&mut req).await?.into()))
306                    }
307                })
308            }
309            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
310                let mut url = azure_core::http::Url::parse(&format!(
311                    "{}/{}/_apis/groupentitlements",
312                    self.client.endpoint(),
313                    &self.organization
314                ))?;
315                let has_api_version_already = url
316                    .query_pairs()
317                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
318                if !has_api_version_already {
319                    url.query_pairs_mut().append_pair(
320                        azure_core::http::headers::query_param::API_VERSION,
321                        "7.1-preview",
322                    );
323                }
324                Ok(url)
325            }
326        }
327        impl std::future::IntoFuture for RequestBuilder {
328            type Output = azure_core::Result<models::GroupEntitlementList>;
329            type IntoFuture = BoxFuture<'static, azure_core::Result<models::GroupEntitlementList>>;
330            #[doc = "Returns a future that sends the request and returns the parsed response body."]
331            #[doc = ""]
332            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
333            #[doc = ""]
334            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
335            fn into_future(self) -> Self::IntoFuture {
336                Box::pin(async move { self.send().await?.into_body().await })
337            }
338        }
339    }
340    pub mod add {
341        use super::models;
342        #[cfg(not(target_arch = "wasm32"))]
343        use futures::future::BoxFuture;
344        #[cfg(target_arch = "wasm32")]
345        use futures::future::LocalBoxFuture as BoxFuture;
346        #[derive(Debug)]
347        pub struct Response(
348            azure_core::http::Response<
349                models::GroupEntitlementOperationReference,
350                azure_core::http::JsonFormat,
351            >,
352        );
353        impl Response {
354            pub async fn into_body(
355                self,
356            ) -> azure_core::Result<models::GroupEntitlementOperationReference> {
357                self.0.into_body().await
358            }
359            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
360                self.0.into()
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: models::GroupEntitlement,
383            pub(crate) rule_option: Option<String>,
384        }
385        impl RequestBuilder {
386            #[doc = "RuleOption [ApplyGroupRule/TestApplyGroupRule] - specifies if the rules defined in group entitlement should be created and applied to it’s members (default option) or just be tested"]
387            pub fn rule_option(mut self, rule_option: impl Into<String>) -> Self {
388                self.rule_option = Some(rule_option.into());
389                self
390            }
391            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
392            #[doc = ""]
393            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
394            #[doc = "However, this function can provide more flexibility when required."]
395            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
396                Box::pin({
397                    let this = self.clone();
398                    async move {
399                        let url = this.url()?;
400                        let mut req =
401                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
402                        if let Some(auth_header) = this
403                            .client
404                            .token_credential()
405                            .http_authorization_header(&this.client.scopes())
406                            .await?
407                        {
408                            req.insert_header(
409                                azure_core::http::headers::AUTHORIZATION,
410                                auth_header,
411                            );
412                        }
413                        req.insert_header("content-type", "application/json");
414                        let req_body = azure_core::json::to_json(&this.body)?;
415                        if let Some(rule_option) = &this.rule_option {
416                            req.url_mut()
417                                .query_pairs_mut()
418                                .append_pair("ruleOption", rule_option);
419                        }
420                        req.set_body(req_body);
421                        Ok(Response(this.client.send(&mut req).await?.into()))
422                    }
423                })
424            }
425            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
426                let mut url = azure_core::http::Url::parse(&format!(
427                    "{}/{}/_apis/groupentitlements",
428                    self.client.endpoint(),
429                    &self.organization
430                ))?;
431                let has_api_version_already = url
432                    .query_pairs()
433                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
434                if !has_api_version_already {
435                    url.query_pairs_mut().append_pair(
436                        azure_core::http::headers::query_param::API_VERSION,
437                        "7.1-preview",
438                    );
439                }
440                Ok(url)
441            }
442        }
443        impl std::future::IntoFuture for RequestBuilder {
444            type Output = azure_core::Result<models::GroupEntitlementOperationReference>;
445            type IntoFuture =
446                BoxFuture<'static, azure_core::Result<models::GroupEntitlementOperationReference>>;
447            #[doc = "Returns a future that sends the request and returns the parsed response body."]
448            #[doc = ""]
449            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
450            #[doc = ""]
451            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
452            fn into_future(self) -> Self::IntoFuture {
453                Box::pin(async move { self.send().await?.into_body().await })
454            }
455        }
456    }
457    pub mod get {
458        use super::models;
459        #[cfg(not(target_arch = "wasm32"))]
460        use futures::future::BoxFuture;
461        #[cfg(target_arch = "wasm32")]
462        use futures::future::LocalBoxFuture as BoxFuture;
463        #[derive(Debug)]
464        pub struct Response(
465            azure_core::http::Response<models::GroupEntitlement, azure_core::http::JsonFormat>,
466        );
467        impl Response {
468            pub async fn into_body(self) -> azure_core::Result<models::GroupEntitlement> {
469                self.0.into_body().await
470            }
471            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
472                self.0.into()
473            }
474        }
475        #[derive(Clone)]
476        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
477        #[doc = r""]
478        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
479        #[doc = r" parameters can be chained."]
480        #[doc = r""]
481        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
482        #[doc = r" converts the [`RequestBuilder`] into a future,"]
483        #[doc = r" executes the request and returns a `Result` with the parsed"]
484        #[doc = r" response."]
485        #[doc = r""]
486        #[doc = r" If you need lower-level access to the raw response details"]
487        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
488        #[doc = r" can finalize the request using the"]
489        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
490        #[doc = r" that resolves to a lower-level [`Response`] value."]
491        pub struct RequestBuilder {
492            pub(crate) client: super::super::Client,
493            pub(crate) organization: String,
494            pub(crate) group_id: String,
495        }
496        impl RequestBuilder {
497            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
498            #[doc = ""]
499            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
500            #[doc = "However, this function can provide more flexibility when required."]
501            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
502                Box::pin({
503                    let this = self.clone();
504                    async move {
505                        let url = this.url()?;
506                        let mut req =
507                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
508                        if let Some(auth_header) = this
509                            .client
510                            .token_credential()
511                            .http_authorization_header(&this.client.scopes())
512                            .await?
513                        {
514                            req.insert_header(
515                                azure_core::http::headers::AUTHORIZATION,
516                                auth_header,
517                            );
518                        }
519                        let req_body = azure_core::Bytes::new();
520                        req.set_body(req_body);
521                        Ok(Response(this.client.send(&mut req).await?.into()))
522                    }
523                })
524            }
525            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
526                let mut url = azure_core::http::Url::parse(&format!(
527                    "{}/{}/_apis/groupentitlements/{}",
528                    self.client.endpoint(),
529                    &self.organization,
530                    &self.group_id
531                ))?;
532                let has_api_version_already = url
533                    .query_pairs()
534                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
535                if !has_api_version_already {
536                    url.query_pairs_mut().append_pair(
537                        azure_core::http::headers::query_param::API_VERSION,
538                        "7.1-preview",
539                    );
540                }
541                Ok(url)
542            }
543        }
544        impl std::future::IntoFuture for RequestBuilder {
545            type Output = azure_core::Result<models::GroupEntitlement>;
546            type IntoFuture = BoxFuture<'static, azure_core::Result<models::GroupEntitlement>>;
547            #[doc = "Returns a future that sends the request and returns the parsed response body."]
548            #[doc = ""]
549            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
550            #[doc = ""]
551            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
552            fn into_future(self) -> Self::IntoFuture {
553                Box::pin(async move { self.send().await?.into_body().await })
554            }
555        }
556    }
557    pub mod update {
558        use super::models;
559        #[cfg(not(target_arch = "wasm32"))]
560        use futures::future::BoxFuture;
561        #[cfg(target_arch = "wasm32")]
562        use futures::future::LocalBoxFuture as BoxFuture;
563        #[derive(Debug)]
564        pub struct Response(
565            azure_core::http::Response<
566                models::GroupEntitlementOperationReference,
567                azure_core::http::JsonFormat,
568            >,
569        );
570        impl Response {
571            pub async fn into_body(
572                self,
573            ) -> azure_core::Result<models::GroupEntitlementOperationReference> {
574                self.0.into_body().await
575            }
576            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
577                self.0.into()
578            }
579        }
580        #[derive(Clone)]
581        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
582        #[doc = r""]
583        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
584        #[doc = r" parameters can be chained."]
585        #[doc = r""]
586        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
587        #[doc = r" converts the [`RequestBuilder`] into a future,"]
588        #[doc = r" executes the request and returns a `Result` with the parsed"]
589        #[doc = r" response."]
590        #[doc = r""]
591        #[doc = r" If you need lower-level access to the raw response details"]
592        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
593        #[doc = r" can finalize the request using the"]
594        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
595        #[doc = r" that resolves to a lower-level [`Response`] value."]
596        pub struct RequestBuilder {
597            pub(crate) client: super::super::Client,
598            pub(crate) organization: String,
599            pub(crate) body: models::JsonPatchDocument,
600            pub(crate) group_id: String,
601            pub(crate) rule_option: Option<String>,
602        }
603        impl RequestBuilder {
604            #[doc = "RuleOption [ApplyGroupRule/TestApplyGroupRule] - specifies if the rules defined in group entitlement should be updated and the changes are applied to it’s members (default option) or just be tested"]
605            pub fn rule_option(mut self, rule_option: impl Into<String>) -> Self {
606                self.rule_option = Some(rule_option.into());
607                self
608            }
609            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
610            #[doc = ""]
611            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
612            #[doc = "However, this function can provide more flexibility when required."]
613            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
614                Box::pin({
615                    let this = self.clone();
616                    async move {
617                        let url = this.url()?;
618                        let mut req =
619                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
620                        if let Some(auth_header) = this
621                            .client
622                            .token_credential()
623                            .http_authorization_header(&this.client.scopes())
624                            .await?
625                        {
626                            req.insert_header(
627                                azure_core::http::headers::AUTHORIZATION,
628                                auth_header,
629                            );
630                        }
631                        req.insert_header("content-type", "application/json-patch+json");
632                        let req_body = azure_core::json::to_json(&this.body)?;
633                        if let Some(rule_option) = &this.rule_option {
634                            req.url_mut()
635                                .query_pairs_mut()
636                                .append_pair("ruleOption", rule_option);
637                        }
638                        req.set_body(req_body);
639                        Ok(Response(this.client.send(&mut req).await?.into()))
640                    }
641                })
642            }
643            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
644                let mut url = azure_core::http::Url::parse(&format!(
645                    "{}/{}/_apis/groupentitlements/{}",
646                    self.client.endpoint(),
647                    &self.organization,
648                    &self.group_id
649                ))?;
650                let has_api_version_already = url
651                    .query_pairs()
652                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
653                if !has_api_version_already {
654                    url.query_pairs_mut().append_pair(
655                        azure_core::http::headers::query_param::API_VERSION,
656                        "7.1-preview",
657                    );
658                }
659                Ok(url)
660            }
661        }
662        impl std::future::IntoFuture for RequestBuilder {
663            type Output = azure_core::Result<models::GroupEntitlementOperationReference>;
664            type IntoFuture =
665                BoxFuture<'static, azure_core::Result<models::GroupEntitlementOperationReference>>;
666            #[doc = "Returns a future that sends the request and returns the parsed response body."]
667            #[doc = ""]
668            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
669            #[doc = ""]
670            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
671            fn into_future(self) -> Self::IntoFuture {
672                Box::pin(async move { self.send().await?.into_body().await })
673            }
674        }
675    }
676    pub mod delete {
677        use super::models;
678        #[cfg(not(target_arch = "wasm32"))]
679        use futures::future::BoxFuture;
680        #[cfg(target_arch = "wasm32")]
681        use futures::future::LocalBoxFuture as BoxFuture;
682        #[derive(Debug)]
683        pub struct Response(
684            azure_core::http::Response<
685                models::GroupEntitlementOperationReference,
686                azure_core::http::JsonFormat,
687            >,
688        );
689        impl Response {
690            pub async fn into_body(
691                self,
692            ) -> azure_core::Result<models::GroupEntitlementOperationReference> {
693                self.0.into_body().await
694            }
695            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
696                self.0.into()
697            }
698        }
699        #[derive(Clone)]
700        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
701        #[doc = r""]
702        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
703        #[doc = r" parameters can be chained."]
704        #[doc = r""]
705        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
706        #[doc = r" converts the [`RequestBuilder`] into a future,"]
707        #[doc = r" executes the request and returns a `Result` with the parsed"]
708        #[doc = r" response."]
709        #[doc = r""]
710        #[doc = r" If you need lower-level access to the raw response details"]
711        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
712        #[doc = r" can finalize the request using the"]
713        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
714        #[doc = r" that resolves to a lower-level [`Response`] value."]
715        pub struct RequestBuilder {
716            pub(crate) client: super::super::Client,
717            pub(crate) organization: String,
718            pub(crate) group_id: String,
719            pub(crate) rule_option: Option<String>,
720            pub(crate) remove_group_membership: Option<bool>,
721        }
722        impl RequestBuilder {
723            #[doc = "RuleOption [ApplyGroupRule/TestApplyGroupRule] - specifies if the rules defined in group entitlement should be deleted and the changes are applied to it’s members (default option) or just be tested"]
724            pub fn rule_option(mut self, rule_option: impl Into<String>) -> Self {
725                self.rule_option = Some(rule_option.into());
726                self
727            }
728            #[doc = "Optional parameter that specifies whether the group with the given ID should be removed from all other groups"]
729            pub fn remove_group_membership(mut self, remove_group_membership: bool) -> Self {
730                self.remove_group_membership = Some(remove_group_membership);
731                self
732            }
733            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
734            #[doc = ""]
735            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
736            #[doc = "However, this function can provide more flexibility when required."]
737            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
738                Box::pin({
739                    let this = self.clone();
740                    async move {
741                        let url = this.url()?;
742                        let mut req =
743                            azure_core::http::Request::new(url, azure_core::http::Method::Delete);
744                        if let Some(auth_header) = this
745                            .client
746                            .token_credential()
747                            .http_authorization_header(&this.client.scopes())
748                            .await?
749                        {
750                            req.insert_header(
751                                azure_core::http::headers::AUTHORIZATION,
752                                auth_header,
753                            );
754                        }
755                        if let Some(rule_option) = &this.rule_option {
756                            req.url_mut()
757                                .query_pairs_mut()
758                                .append_pair("ruleOption", rule_option);
759                        }
760                        if let Some(remove_group_membership) = &this.remove_group_membership {
761                            req.url_mut().query_pairs_mut().append_pair(
762                                "removeGroupMembership",
763                                &remove_group_membership.to_string(),
764                            );
765                        }
766                        let req_body = azure_core::Bytes::new();
767                        req.set_body(req_body);
768                        Ok(Response(this.client.send(&mut req).await?.into()))
769                    }
770                })
771            }
772            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
773                let mut url = azure_core::http::Url::parse(&format!(
774                    "{}/{}/_apis/groupentitlements/{}",
775                    self.client.endpoint(),
776                    &self.organization,
777                    &self.group_id
778                ))?;
779                let has_api_version_already = url
780                    .query_pairs()
781                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
782                if !has_api_version_already {
783                    url.query_pairs_mut().append_pair(
784                        azure_core::http::headers::query_param::API_VERSION,
785                        "7.1-preview",
786                    );
787                }
788                Ok(url)
789            }
790        }
791        impl std::future::IntoFuture for RequestBuilder {
792            type Output = azure_core::Result<models::GroupEntitlementOperationReference>;
793            type IntoFuture =
794                BoxFuture<'static, azure_core::Result<models::GroupEntitlementOperationReference>>;
795            #[doc = "Returns a future that sends the request and returns the parsed response body."]
796            #[doc = ""]
797            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
798            #[doc = ""]
799            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
800            fn into_future(self) -> Self::IntoFuture {
801                Box::pin(async move { self.send().await?.into_body().await })
802            }
803        }
804    }
805}
806pub mod members {
807    use super::models;
808    #[cfg(not(target_arch = "wasm32"))]
809    use futures::future::BoxFuture;
810    #[cfg(target_arch = "wasm32")]
811    use futures::future::LocalBoxFuture as BoxFuture;
812    pub struct Client(pub(crate) super::Client);
813    impl Client {
814        #[doc = "Get direct members of a Group."]
815        #[doc = ""]
816        #[doc = "Arguments:"]
817        #[doc = "* `organization`: The name of the Azure DevOps organization."]
818        #[doc = "* `group_id`: Id of the Group."]
819        pub fn get(
820            &self,
821            organization: impl Into<String>,
822            group_id: impl Into<String>,
823        ) -> get::RequestBuilder {
824            get::RequestBuilder {
825                client: self.0.clone(),
826                organization: organization.into(),
827                group_id: group_id.into(),
828                max_results: None,
829                paging_token: None,
830            }
831        }
832        #[doc = "Add a member to a Group."]
833        #[doc = ""]
834        #[doc = "Arguments:"]
835        #[doc = "* `organization`: The name of the Azure DevOps organization."]
836        #[doc = "* `group_id`: Id of the Group."]
837        #[doc = "* `member_id`: Id of the member to add."]
838        pub fn add(
839            &self,
840            organization: impl Into<String>,
841            group_id: impl Into<String>,
842            member_id: impl Into<String>,
843        ) -> add::RequestBuilder {
844            add::RequestBuilder {
845                client: self.0.clone(),
846                organization: organization.into(),
847                group_id: group_id.into(),
848                member_id: member_id.into(),
849            }
850        }
851        #[doc = "Remove a member from a Group."]
852        #[doc = ""]
853        #[doc = "Arguments:"]
854        #[doc = "* `organization`: The name of the Azure DevOps organization."]
855        #[doc = "* `group_id`: Id of the group."]
856        #[doc = "* `member_id`: Id of the member to remove."]
857        pub fn remove_member_from_group(
858            &self,
859            organization: impl Into<String>,
860            group_id: impl Into<String>,
861            member_id: impl Into<String>,
862        ) -> remove_member_from_group::RequestBuilder {
863            remove_member_from_group::RequestBuilder {
864                client: self.0.clone(),
865                organization: organization.into(),
866                group_id: group_id.into(),
867                member_id: member_id.into(),
868            }
869        }
870    }
871    pub mod get {
872        use super::models;
873        #[cfg(not(target_arch = "wasm32"))]
874        use futures::future::BoxFuture;
875        #[cfg(target_arch = "wasm32")]
876        use futures::future::LocalBoxFuture as BoxFuture;
877        #[derive(Debug)]
878        pub struct Response(
879            azure_core::http::Response<models::PagedGraphMemberList, azure_core::http::JsonFormat>,
880        );
881        impl Response {
882            pub async fn into_body(self) -> azure_core::Result<models::PagedGraphMemberList> {
883                self.0.into_body().await
884            }
885            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
886                self.0.into()
887            }
888        }
889        #[derive(Clone)]
890        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
891        #[doc = r""]
892        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
893        #[doc = r" parameters can be chained."]
894        #[doc = r""]
895        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
896        #[doc = r" converts the [`RequestBuilder`] into a future,"]
897        #[doc = r" executes the request and returns a `Result` with the parsed"]
898        #[doc = r" response."]
899        #[doc = r""]
900        #[doc = r" If you need lower-level access to the raw response details"]
901        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
902        #[doc = r" can finalize the request using the"]
903        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
904        #[doc = r" that resolves to a lower-level [`Response`] value."]
905        pub struct RequestBuilder {
906            pub(crate) client: super::super::Client,
907            pub(crate) organization: String,
908            pub(crate) group_id: String,
909            pub(crate) max_results: Option<i32>,
910            pub(crate) paging_token: Option<String>,
911        }
912        impl RequestBuilder {
913            #[doc = "Maximum number of results to retrieve."]
914            pub fn max_results(mut self, max_results: i32) -> Self {
915                self.max_results = Some(max_results);
916                self
917            }
918            #[doc = "Paging Token from the previous page fetched. If the 'pagingToken' is null, the results would be fetched from the beginning of the Members List."]
919            pub fn paging_token(mut self, paging_token: impl Into<String>) -> Self {
920                self.paging_token = Some(paging_token.into());
921                self
922            }
923            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
924            #[doc = ""]
925            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
926            #[doc = "However, this function can provide more flexibility when required."]
927            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
928                Box::pin({
929                    let this = self.clone();
930                    async move {
931                        let url = this.url()?;
932                        let mut req =
933                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
934                        if let Some(auth_header) = this
935                            .client
936                            .token_credential()
937                            .http_authorization_header(&this.client.scopes())
938                            .await?
939                        {
940                            req.insert_header(
941                                azure_core::http::headers::AUTHORIZATION,
942                                auth_header,
943                            );
944                        }
945                        if let Some(max_results) = &this.max_results {
946                            req.url_mut()
947                                .query_pairs_mut()
948                                .append_pair("maxResults", &max_results.to_string());
949                        }
950                        if let Some(paging_token) = &this.paging_token {
951                            req.url_mut()
952                                .query_pairs_mut()
953                                .append_pair("pagingToken", paging_token);
954                        }
955                        let req_body = azure_core::Bytes::new();
956                        req.set_body(req_body);
957                        Ok(Response(this.client.send(&mut req).await?.into()))
958                    }
959                })
960            }
961            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
962                let mut url = azure_core::http::Url::parse(&format!(
963                    "{}/{}/_apis/GroupEntitlements/{}/members",
964                    self.client.endpoint(),
965                    &self.organization,
966                    &self.group_id
967                ))?;
968                let has_api_version_already = url
969                    .query_pairs()
970                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
971                if !has_api_version_already {
972                    url.query_pairs_mut().append_pair(
973                        azure_core::http::headers::query_param::API_VERSION,
974                        "7.1-preview",
975                    );
976                }
977                Ok(url)
978            }
979        }
980        impl std::future::IntoFuture for RequestBuilder {
981            type Output = azure_core::Result<models::PagedGraphMemberList>;
982            type IntoFuture = BoxFuture<'static, azure_core::Result<models::PagedGraphMemberList>>;
983            #[doc = "Returns a future that sends the request and returns the parsed response body."]
984            #[doc = ""]
985            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
986            #[doc = ""]
987            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
988            fn into_future(self) -> Self::IntoFuture {
989                Box::pin(async move { self.send().await?.into_body().await })
990            }
991        }
992    }
993    pub mod add {
994        use super::models;
995        #[cfg(not(target_arch = "wasm32"))]
996        use futures::future::BoxFuture;
997        #[cfg(target_arch = "wasm32")]
998        use futures::future::LocalBoxFuture as BoxFuture;
999        #[derive(Debug)]
1000        pub struct Response(azure_core::http::Response<(), azure_core::http::NoFormat>);
1001        impl Response {
1002            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1003                self.0.into()
1004            }
1005        }
1006        #[derive(Clone)]
1007        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1008        #[doc = r""]
1009        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1010        #[doc = r" parameters can be chained."]
1011        #[doc = r""]
1012        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1013        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1014        #[doc = r" executes the request and returns a `Result` with the parsed"]
1015        #[doc = r" response."]
1016        #[doc = r""]
1017        #[doc = r" If you need lower-level access to the raw response details"]
1018        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1019        #[doc = r" can finalize the request using the"]
1020        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1021        #[doc = r" that resolves to a lower-level [`Response`] value."]
1022        pub struct RequestBuilder {
1023            pub(crate) client: super::super::Client,
1024            pub(crate) organization: String,
1025            pub(crate) group_id: String,
1026            pub(crate) member_id: String,
1027        }
1028        impl RequestBuilder {
1029            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1030            #[doc = ""]
1031            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1032            #[doc = "However, this function can provide more flexibility when required."]
1033            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1034                Box::pin({
1035                    let this = self.clone();
1036                    async move {
1037                        let url = this.url()?;
1038                        let mut req =
1039                            azure_core::http::Request::new(url, azure_core::http::Method::Put);
1040                        if let Some(auth_header) = this
1041                            .client
1042                            .token_credential()
1043                            .http_authorization_header(&this.client.scopes())
1044                            .await?
1045                        {
1046                            req.insert_header(
1047                                azure_core::http::headers::AUTHORIZATION,
1048                                auth_header,
1049                            );
1050                        }
1051                        let req_body = azure_core::Bytes::new();
1052                        req.set_body(req_body);
1053                        Ok(Response(this.client.send(&mut req).await?.into()))
1054                    }
1055                })
1056            }
1057            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1058                let mut url = azure_core::http::Url::parse(&format!(
1059                    "{}/{}/_apis/GroupEntitlements/{}/members/{}",
1060                    self.client.endpoint(),
1061                    &self.organization,
1062                    &self.group_id,
1063                    &self.member_id
1064                ))?;
1065                let has_api_version_already = url
1066                    .query_pairs()
1067                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1068                if !has_api_version_already {
1069                    url.query_pairs_mut().append_pair(
1070                        azure_core::http::headers::query_param::API_VERSION,
1071                        "7.1-preview",
1072                    );
1073                }
1074                Ok(url)
1075            }
1076        }
1077        impl std::future::IntoFuture for RequestBuilder {
1078            type Output = azure_core::Result<()>;
1079            type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
1080            #[doc = "Returns a future that sends the request and waits for the response."]
1081            #[doc = ""]
1082            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1083            #[doc = ""]
1084            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1085            fn into_future(self) -> Self::IntoFuture {
1086                Box::pin(async move {
1087                    let _rsp = self.send().await?;
1088                    Ok(())
1089                })
1090            }
1091        }
1092    }
1093    pub mod remove_member_from_group {
1094        use super::models;
1095        #[cfg(not(target_arch = "wasm32"))]
1096        use futures::future::BoxFuture;
1097        #[cfg(target_arch = "wasm32")]
1098        use futures::future::LocalBoxFuture as BoxFuture;
1099        #[derive(Debug)]
1100        pub struct Response(azure_core::http::Response<(), azure_core::http::NoFormat>);
1101        impl Response {
1102            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1103                self.0.into()
1104            }
1105        }
1106        #[derive(Clone)]
1107        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1108        #[doc = r""]
1109        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1110        #[doc = r" parameters can be chained."]
1111        #[doc = r""]
1112        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1113        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1114        #[doc = r" executes the request and returns a `Result` with the parsed"]
1115        #[doc = r" response."]
1116        #[doc = r""]
1117        #[doc = r" If you need lower-level access to the raw response details"]
1118        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1119        #[doc = r" can finalize the request using the"]
1120        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1121        #[doc = r" that resolves to a lower-level [`Response`] value."]
1122        pub struct RequestBuilder {
1123            pub(crate) client: super::super::Client,
1124            pub(crate) organization: String,
1125            pub(crate) group_id: String,
1126            pub(crate) member_id: String,
1127        }
1128        impl RequestBuilder {
1129            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1130            #[doc = ""]
1131            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1132            #[doc = "However, this function can provide more flexibility when required."]
1133            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1134                Box::pin({
1135                    let this = self.clone();
1136                    async move {
1137                        let url = this.url()?;
1138                        let mut req =
1139                            azure_core::http::Request::new(url, azure_core::http::Method::Delete);
1140                        if let Some(auth_header) = this
1141                            .client
1142                            .token_credential()
1143                            .http_authorization_header(&this.client.scopes())
1144                            .await?
1145                        {
1146                            req.insert_header(
1147                                azure_core::http::headers::AUTHORIZATION,
1148                                auth_header,
1149                            );
1150                        }
1151                        let req_body = azure_core::Bytes::new();
1152                        req.set_body(req_body);
1153                        Ok(Response(this.client.send(&mut req).await?.into()))
1154                    }
1155                })
1156            }
1157            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1158                let mut url = azure_core::http::Url::parse(&format!(
1159                    "{}/{}/_apis/GroupEntitlements/{}/members/{}",
1160                    self.client.endpoint(),
1161                    &self.organization,
1162                    &self.group_id,
1163                    &self.member_id
1164                ))?;
1165                let has_api_version_already = url
1166                    .query_pairs()
1167                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1168                if !has_api_version_already {
1169                    url.query_pairs_mut().append_pair(
1170                        azure_core::http::headers::query_param::API_VERSION,
1171                        "7.1-preview",
1172                    );
1173                }
1174                Ok(url)
1175            }
1176        }
1177        impl std::future::IntoFuture for RequestBuilder {
1178            type Output = azure_core::Result<()>;
1179            type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
1180            #[doc = "Returns a future that sends the request and waits for the response."]
1181            #[doc = ""]
1182            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1183            #[doc = ""]
1184            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1185            fn into_future(self) -> Self::IntoFuture {
1186                Box::pin(async move {
1187                    let _rsp = self.send().await?;
1188                    Ok(())
1189                })
1190            }
1191        }
1192    }
1193}
1194pub mod member_entitlements {
1195    use super::models;
1196    #[cfg(not(target_arch = "wasm32"))]
1197    use futures::future::BoxFuture;
1198    #[cfg(target_arch = "wasm32")]
1199    use futures::future::LocalBoxFuture as BoxFuture;
1200    pub struct Client(pub(crate) super::Client);
1201    impl Client {
1202        #[doc = "Arguments:"]
1203        #[doc = "* `organization`: The name of the Azure DevOps organization."]
1204        pub fn search_member_entitlements(
1205            &self,
1206            organization: impl Into<String>,
1207        ) -> search_member_entitlements::RequestBuilder {
1208            search_member_entitlements::RequestBuilder {
1209                client: self.0.clone(),
1210                organization: organization.into(),
1211                continuation_token: None,
1212                select: None,
1213                filter: None,
1214                order_by: None,
1215            }
1216        }
1217    }
1218    pub mod search_member_entitlements {
1219        use super::models;
1220        #[cfg(not(target_arch = "wasm32"))]
1221        use futures::future::BoxFuture;
1222        #[cfg(target_arch = "wasm32")]
1223        use futures::future::LocalBoxFuture as BoxFuture;
1224        #[derive(Debug)]
1225        pub struct Response(
1226            azure_core::http::Response<Vec<serde_json::Value>, azure_core::http::JsonFormat>,
1227        );
1228        impl Response {
1229            pub async fn into_body(self) -> azure_core::Result<Vec<serde_json::Value>> {
1230                self.0.into_body().await
1231            }
1232            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1233                self.0.into()
1234            }
1235        }
1236        #[derive(Clone)]
1237        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1238        #[doc = r""]
1239        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1240        #[doc = r" parameters can be chained."]
1241        #[doc = r""]
1242        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1243        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1244        #[doc = r" executes the request and returns a `Result` with the parsed"]
1245        #[doc = r" response."]
1246        #[doc = r""]
1247        #[doc = r" If you need lower-level access to the raw response details"]
1248        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1249        #[doc = r" can finalize the request using the"]
1250        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1251        #[doc = r" that resolves to a lower-level [`Response`] value."]
1252        pub struct RequestBuilder {
1253            pub(crate) client: super::super::Client,
1254            pub(crate) organization: String,
1255            pub(crate) continuation_token: Option<String>,
1256            pub(crate) select: Option<String>,
1257            pub(crate) filter: Option<String>,
1258            pub(crate) order_by: Option<String>,
1259        }
1260        impl RequestBuilder {
1261            pub fn continuation_token(mut self, continuation_token: impl Into<String>) -> Self {
1262                self.continuation_token = Some(continuation_token.into());
1263                self
1264            }
1265            pub fn select(mut self, select: impl Into<String>) -> Self {
1266                self.select = Some(select.into());
1267                self
1268            }
1269            pub fn filter(mut self, filter: impl Into<String>) -> Self {
1270                self.filter = Some(filter.into());
1271                self
1272            }
1273            pub fn order_by(mut self, order_by: impl Into<String>) -> Self {
1274                self.order_by = Some(order_by.into());
1275                self
1276            }
1277            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1278            #[doc = ""]
1279            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1280            #[doc = "However, this function can provide more flexibility when required."]
1281            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1282                Box::pin({
1283                    let this = self.clone();
1284                    async move {
1285                        let url = this.url()?;
1286                        let mut req =
1287                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
1288                        if let Some(auth_header) = this
1289                            .client
1290                            .token_credential()
1291                            .http_authorization_header(&this.client.scopes())
1292                            .await?
1293                        {
1294                            req.insert_header(
1295                                azure_core::http::headers::AUTHORIZATION,
1296                                auth_header,
1297                            );
1298                        }
1299                        if let Some(continuation_token) = &this.continuation_token {
1300                            req.url_mut()
1301                                .query_pairs_mut()
1302                                .append_pair("continuationToken", continuation_token);
1303                        }
1304                        if let Some(select) = &this.select {
1305                            req.url_mut()
1306                                .query_pairs_mut()
1307                                .append_pair("select", select);
1308                        }
1309                        if let Some(filter) = &this.filter {
1310                            req.url_mut()
1311                                .query_pairs_mut()
1312                                .append_pair("$filter", filter);
1313                        }
1314                        if let Some(order_by) = &this.order_by {
1315                            req.url_mut()
1316                                .query_pairs_mut()
1317                                .append_pair("$orderBy", order_by);
1318                        }
1319                        let req_body = azure_core::Bytes::new();
1320                        req.set_body(req_body);
1321                        Ok(Response(this.client.send(&mut req).await?.into()))
1322                    }
1323                })
1324            }
1325            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1326                let mut url = azure_core::http::Url::parse(&format!(
1327                    "{}/{}/_apis/memberentitlements",
1328                    self.client.endpoint(),
1329                    &self.organization
1330                ))?;
1331                let has_api_version_already = url
1332                    .query_pairs()
1333                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1334                if !has_api_version_already {
1335                    url.query_pairs_mut().append_pair(
1336                        azure_core::http::headers::query_param::API_VERSION,
1337                        "7.1-preview",
1338                    );
1339                }
1340                Ok(url)
1341            }
1342        }
1343        impl std::future::IntoFuture for RequestBuilder {
1344            type Output = azure_core::Result<Vec<serde_json::Value>>;
1345            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<serde_json::Value>>>;
1346            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1347            #[doc = ""]
1348            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1349            #[doc = ""]
1350            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1351            fn into_future(self) -> Self::IntoFuture {
1352                Box::pin(async move { self.send().await?.into_body().await })
1353            }
1354        }
1355    }
1356}
1357pub mod service_principal_entitlements {
1358    use super::models;
1359    #[cfg(not(target_arch = "wasm32"))]
1360    use futures::future::BoxFuture;
1361    #[cfg(target_arch = "wasm32")]
1362    use futures::future::LocalBoxFuture as BoxFuture;
1363    pub struct Client(pub(crate) super::Client);
1364    impl Client {
1365        #[doc = "Add a service principal, assign license and extensions and make them a member of a project group in an account.\n\nNOTE: If you are working with AAD app registration, you can find service principal of your app\nin enterprise applications, and make sure to use service principal's object id as originId parameter\nin the request body"]
1366        #[doc = ""]
1367        #[doc = "Arguments:"]
1368        #[doc = "* `organization`: The name of the Azure DevOps organization."]
1369        #[doc = "* `body`: ServicePrincipalEntitlement object specifying License, Extensions and Project/Team groups the service principal should be added to."]
1370        pub fn add(
1371            &self,
1372            organization: impl Into<String>,
1373            body: impl Into<models::ServicePrincipalEntitlement>,
1374        ) -> add::RequestBuilder {
1375            add::RequestBuilder {
1376                client: self.0.clone(),
1377                organization: organization.into(),
1378                body: body.into(),
1379            }
1380        }
1381        #[doc = "Edit the entitlements (License, Extensions, Projects, Teams etc) for one or more service principals."]
1382        #[doc = ""]
1383        #[doc = "Arguments:"]
1384        #[doc = "* `organization`: The name of the Azure DevOps organization."]
1385        #[doc = "* `body`: JsonPatchDocument containing the operations to perform."]
1386        pub fn update_service_principal_entitlements(
1387            &self,
1388            organization: impl Into<String>,
1389            body: impl Into<models::JsonPatchDocument>,
1390        ) -> update_service_principal_entitlements::RequestBuilder {
1391            update_service_principal_entitlements::RequestBuilder {
1392                client: self.0.clone(),
1393                organization: organization.into(),
1394                body: body.into(),
1395            }
1396        }
1397        #[doc = "Get Service principal Entitlement for a service principal."]
1398        #[doc = ""]
1399        #[doc = "Arguments:"]
1400        #[doc = "* `organization`: The name of the Azure DevOps organization."]
1401        #[doc = "* `service_principal_id`: ID of the service principal."]
1402        pub fn get(
1403            &self,
1404            organization: impl Into<String>,
1405            service_principal_id: impl Into<String>,
1406        ) -> get::RequestBuilder {
1407            get::RequestBuilder {
1408                client: self.0.clone(),
1409                organization: organization.into(),
1410                service_principal_id: service_principal_id.into(),
1411            }
1412        }
1413        #[doc = "Edit the entitlements (License, Extensions, Projects, Teams etc) for a service principal."]
1414        #[doc = ""]
1415        #[doc = "Arguments:"]
1416        #[doc = "* `organization`: The name of the Azure DevOps organization."]
1417        #[doc = "* `body`: JsonPatchDocument containing the operations to perform on the service principal."]
1418        #[doc = "* `service_principal_id`: ID of the service principal."]
1419        pub fn update_service_principal_entitlement(
1420            &self,
1421            organization: impl Into<String>,
1422            body: impl Into<models::JsonPatchDocument>,
1423            service_principal_id: impl Into<String>,
1424        ) -> update_service_principal_entitlement::RequestBuilder {
1425            update_service_principal_entitlement::RequestBuilder {
1426                client: self.0.clone(),
1427                organization: organization.into(),
1428                body: body.into(),
1429                service_principal_id: service_principal_id.into(),
1430            }
1431        }
1432        #[doc = "Delete a service principal from the account.\n\nThe delete operation includes unassigning Extensions and Licenses and removing the service principal from all project memberships.\nThe service principal would continue to have access to the account if it is member of an AAD group, that is added directly to the account."]
1433        #[doc = ""]
1434        #[doc = "Arguments:"]
1435        #[doc = "* `organization`: The name of the Azure DevOps organization."]
1436        #[doc = "* `service_principal_id`: ID of the service principal."]
1437        pub fn delete(
1438            &self,
1439            organization: impl Into<String>,
1440            service_principal_id: impl Into<String>,
1441        ) -> delete::RequestBuilder {
1442            delete::RequestBuilder {
1443                client: self.0.clone(),
1444                organization: organization.into(),
1445                service_principal_id: service_principal_id.into(),
1446            }
1447        }
1448    }
1449    pub mod add {
1450        use super::models;
1451        #[cfg(not(target_arch = "wasm32"))]
1452        use futures::future::BoxFuture;
1453        #[cfg(target_arch = "wasm32")]
1454        use futures::future::LocalBoxFuture as BoxFuture;
1455        #[derive(Debug)]
1456        pub struct Response(
1457            azure_core::http::Response<
1458                models::ServicePrincipalEntitlementsPostResponse,
1459                azure_core::http::JsonFormat,
1460            >,
1461        );
1462        impl Response {
1463            pub async fn into_body(
1464                self,
1465            ) -> azure_core::Result<models::ServicePrincipalEntitlementsPostResponse> {
1466                self.0.into_body().await
1467            }
1468            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1469                self.0.into()
1470            }
1471        }
1472        #[derive(Clone)]
1473        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1474        #[doc = r""]
1475        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1476        #[doc = r" parameters can be chained."]
1477        #[doc = r""]
1478        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1479        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1480        #[doc = r" executes the request and returns a `Result` with the parsed"]
1481        #[doc = r" response."]
1482        #[doc = r""]
1483        #[doc = r" If you need lower-level access to the raw response details"]
1484        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1485        #[doc = r" can finalize the request using the"]
1486        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1487        #[doc = r" that resolves to a lower-level [`Response`] value."]
1488        pub struct RequestBuilder {
1489            pub(crate) client: super::super::Client,
1490            pub(crate) organization: String,
1491            pub(crate) body: models::ServicePrincipalEntitlement,
1492        }
1493        impl RequestBuilder {
1494            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1495            #[doc = ""]
1496            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1497            #[doc = "However, this function can provide more flexibility when required."]
1498            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1499                Box::pin({
1500                    let this = self.clone();
1501                    async move {
1502                        let url = this.url()?;
1503                        let mut req =
1504                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
1505                        if let Some(auth_header) = this
1506                            .client
1507                            .token_credential()
1508                            .http_authorization_header(&this.client.scopes())
1509                            .await?
1510                        {
1511                            req.insert_header(
1512                                azure_core::http::headers::AUTHORIZATION,
1513                                auth_header,
1514                            );
1515                        }
1516                        req.insert_header("content-type", "application/json");
1517                        let req_body = azure_core::json::to_json(&this.body)?;
1518                        req.set_body(req_body);
1519                        Ok(Response(this.client.send(&mut req).await?.into()))
1520                    }
1521                })
1522            }
1523            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1524                let mut url = azure_core::http::Url::parse(&format!(
1525                    "{}/{}/_apis/serviceprincipalentitlements",
1526                    self.client.endpoint(),
1527                    &self.organization
1528                ))?;
1529                let has_api_version_already = url
1530                    .query_pairs()
1531                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1532                if !has_api_version_already {
1533                    url.query_pairs_mut().append_pair(
1534                        azure_core::http::headers::query_param::API_VERSION,
1535                        "7.1-preview",
1536                    );
1537                }
1538                Ok(url)
1539            }
1540        }
1541        impl std::future::IntoFuture for RequestBuilder {
1542            type Output = azure_core::Result<models::ServicePrincipalEntitlementsPostResponse>;
1543            type IntoFuture = BoxFuture<
1544                'static,
1545                azure_core::Result<models::ServicePrincipalEntitlementsPostResponse>,
1546            >;
1547            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1548            #[doc = ""]
1549            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1550            #[doc = ""]
1551            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1552            fn into_future(self) -> Self::IntoFuture {
1553                Box::pin(async move { self.send().await?.into_body().await })
1554            }
1555        }
1556    }
1557    pub mod update_service_principal_entitlements {
1558        use super::models;
1559        #[cfg(not(target_arch = "wasm32"))]
1560        use futures::future::BoxFuture;
1561        #[cfg(target_arch = "wasm32")]
1562        use futures::future::LocalBoxFuture as BoxFuture;
1563        #[derive(Debug)]
1564        pub struct Response(
1565            azure_core::http::Response<
1566                models::ServicePrincipalEntitlementOperationReference,
1567                azure_core::http::JsonFormat,
1568            >,
1569        );
1570        impl Response {
1571            pub async fn into_body(
1572                self,
1573            ) -> azure_core::Result<models::ServicePrincipalEntitlementOperationReference>
1574            {
1575                self.0.into_body().await
1576            }
1577            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1578                self.0.into()
1579            }
1580        }
1581        #[derive(Clone)]
1582        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1583        #[doc = r""]
1584        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1585        #[doc = r" parameters can be chained."]
1586        #[doc = r""]
1587        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1588        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1589        #[doc = r" executes the request and returns a `Result` with the parsed"]
1590        #[doc = r" response."]
1591        #[doc = r""]
1592        #[doc = r" If you need lower-level access to the raw response details"]
1593        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1594        #[doc = r" can finalize the request using the"]
1595        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1596        #[doc = r" that resolves to a lower-level [`Response`] value."]
1597        pub struct RequestBuilder {
1598            pub(crate) client: super::super::Client,
1599            pub(crate) organization: String,
1600            pub(crate) body: models::JsonPatchDocument,
1601        }
1602        impl RequestBuilder {
1603            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1604            #[doc = ""]
1605            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1606            #[doc = "However, this function can provide more flexibility when required."]
1607            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1608                Box::pin({
1609                    let this = self.clone();
1610                    async move {
1611                        let url = this.url()?;
1612                        let mut req =
1613                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
1614                        if let Some(auth_header) = this
1615                            .client
1616                            .token_credential()
1617                            .http_authorization_header(&this.client.scopes())
1618                            .await?
1619                        {
1620                            req.insert_header(
1621                                azure_core::http::headers::AUTHORIZATION,
1622                                auth_header,
1623                            );
1624                        }
1625                        req.insert_header("content-type", "application/json-patch+json");
1626                        let req_body = azure_core::json::to_json(&this.body)?;
1627                        req.set_body(req_body);
1628                        Ok(Response(this.client.send(&mut req).await?.into()))
1629                    }
1630                })
1631            }
1632            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1633                let mut url = azure_core::http::Url::parse(&format!(
1634                    "{}/{}/_apis/serviceprincipalentitlements",
1635                    self.client.endpoint(),
1636                    &self.organization
1637                ))?;
1638                let has_api_version_already = url
1639                    .query_pairs()
1640                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1641                if !has_api_version_already {
1642                    url.query_pairs_mut().append_pair(
1643                        azure_core::http::headers::query_param::API_VERSION,
1644                        "7.1-preview",
1645                    );
1646                }
1647                Ok(url)
1648            }
1649        }
1650        impl std::future::IntoFuture for RequestBuilder {
1651            type Output = azure_core::Result<models::ServicePrincipalEntitlementOperationReference>;
1652            type IntoFuture = BoxFuture<
1653                'static,
1654                azure_core::Result<models::ServicePrincipalEntitlementOperationReference>,
1655            >;
1656            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1657            #[doc = ""]
1658            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1659            #[doc = ""]
1660            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1661            fn into_future(self) -> Self::IntoFuture {
1662                Box::pin(async move { self.send().await?.into_body().await })
1663            }
1664        }
1665    }
1666    pub mod get {
1667        use super::models;
1668        #[cfg(not(target_arch = "wasm32"))]
1669        use futures::future::BoxFuture;
1670        #[cfg(target_arch = "wasm32")]
1671        use futures::future::LocalBoxFuture as BoxFuture;
1672        #[derive(Debug)]
1673        pub struct Response(
1674            azure_core::http::Response<
1675                models::ServicePrincipalEntitlement,
1676                azure_core::http::JsonFormat,
1677            >,
1678        );
1679        impl Response {
1680            pub async fn into_body(
1681                self,
1682            ) -> azure_core::Result<models::ServicePrincipalEntitlement> {
1683                self.0.into_body().await
1684            }
1685            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1686                self.0.into()
1687            }
1688        }
1689        #[derive(Clone)]
1690        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1691        #[doc = r""]
1692        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1693        #[doc = r" parameters can be chained."]
1694        #[doc = r""]
1695        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1696        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1697        #[doc = r" executes the request and returns a `Result` with the parsed"]
1698        #[doc = r" response."]
1699        #[doc = r""]
1700        #[doc = r" If you need lower-level access to the raw response details"]
1701        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1702        #[doc = r" can finalize the request using the"]
1703        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1704        #[doc = r" that resolves to a lower-level [`Response`] value."]
1705        pub struct RequestBuilder {
1706            pub(crate) client: super::super::Client,
1707            pub(crate) organization: String,
1708            pub(crate) service_principal_id: String,
1709        }
1710        impl RequestBuilder {
1711            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1712            #[doc = ""]
1713            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1714            #[doc = "However, this function can provide more flexibility when required."]
1715            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1716                Box::pin({
1717                    let this = self.clone();
1718                    async move {
1719                        let url = this.url()?;
1720                        let mut req =
1721                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
1722                        if let Some(auth_header) = this
1723                            .client
1724                            .token_credential()
1725                            .http_authorization_header(&this.client.scopes())
1726                            .await?
1727                        {
1728                            req.insert_header(
1729                                azure_core::http::headers::AUTHORIZATION,
1730                                auth_header,
1731                            );
1732                        }
1733                        let req_body = azure_core::Bytes::new();
1734                        req.set_body(req_body);
1735                        Ok(Response(this.client.send(&mut req).await?.into()))
1736                    }
1737                })
1738            }
1739            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1740                let mut url = azure_core::http::Url::parse(&format!(
1741                    "{}/{}/_apis/serviceprincipalentitlements/{}",
1742                    self.client.endpoint(),
1743                    &self.organization,
1744                    &self.service_principal_id
1745                ))?;
1746                let has_api_version_already = url
1747                    .query_pairs()
1748                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1749                if !has_api_version_already {
1750                    url.query_pairs_mut().append_pair(
1751                        azure_core::http::headers::query_param::API_VERSION,
1752                        "7.1-preview",
1753                    );
1754                }
1755                Ok(url)
1756            }
1757        }
1758        impl std::future::IntoFuture for RequestBuilder {
1759            type Output = azure_core::Result<models::ServicePrincipalEntitlement>;
1760            type IntoFuture =
1761                BoxFuture<'static, azure_core::Result<models::ServicePrincipalEntitlement>>;
1762            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1763            #[doc = ""]
1764            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1765            #[doc = ""]
1766            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1767            fn into_future(self) -> Self::IntoFuture {
1768                Box::pin(async move { self.send().await?.into_body().await })
1769            }
1770        }
1771    }
1772    pub mod update_service_principal_entitlement {
1773        use super::models;
1774        #[cfg(not(target_arch = "wasm32"))]
1775        use futures::future::BoxFuture;
1776        #[cfg(target_arch = "wasm32")]
1777        use futures::future::LocalBoxFuture as BoxFuture;
1778        #[derive(Debug)]
1779        pub struct Response(
1780            azure_core::http::Response<
1781                models::ServicePrincipalEntitlementsPatchResponse,
1782                azure_core::http::JsonFormat,
1783            >,
1784        );
1785        impl Response {
1786            pub async fn into_body(
1787                self,
1788            ) -> azure_core::Result<models::ServicePrincipalEntitlementsPatchResponse> {
1789                self.0.into_body().await
1790            }
1791            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1792                self.0.into()
1793            }
1794        }
1795        #[derive(Clone)]
1796        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1797        #[doc = r""]
1798        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1799        #[doc = r" parameters can be chained."]
1800        #[doc = r""]
1801        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1802        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1803        #[doc = r" executes the request and returns a `Result` with the parsed"]
1804        #[doc = r" response."]
1805        #[doc = r""]
1806        #[doc = r" If you need lower-level access to the raw response details"]
1807        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1808        #[doc = r" can finalize the request using the"]
1809        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1810        #[doc = r" that resolves to a lower-level [`Response`] value."]
1811        pub struct RequestBuilder {
1812            pub(crate) client: super::super::Client,
1813            pub(crate) organization: String,
1814            pub(crate) body: models::JsonPatchDocument,
1815            pub(crate) service_principal_id: String,
1816        }
1817        impl RequestBuilder {
1818            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1819            #[doc = ""]
1820            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1821            #[doc = "However, this function can provide more flexibility when required."]
1822            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1823                Box::pin({
1824                    let this = self.clone();
1825                    async move {
1826                        let url = this.url()?;
1827                        let mut req =
1828                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
1829                        if let Some(auth_header) = this
1830                            .client
1831                            .token_credential()
1832                            .http_authorization_header(&this.client.scopes())
1833                            .await?
1834                        {
1835                            req.insert_header(
1836                                azure_core::http::headers::AUTHORIZATION,
1837                                auth_header,
1838                            );
1839                        }
1840                        req.insert_header("content-type", "application/json-patch+json");
1841                        let req_body = azure_core::json::to_json(&this.body)?;
1842                        req.set_body(req_body);
1843                        Ok(Response(this.client.send(&mut req).await?.into()))
1844                    }
1845                })
1846            }
1847            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1848                let mut url = azure_core::http::Url::parse(&format!(
1849                    "{}/{}/_apis/serviceprincipalentitlements/{}",
1850                    self.client.endpoint(),
1851                    &self.organization,
1852                    &self.service_principal_id
1853                ))?;
1854                let has_api_version_already = url
1855                    .query_pairs()
1856                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1857                if !has_api_version_already {
1858                    url.query_pairs_mut().append_pair(
1859                        azure_core::http::headers::query_param::API_VERSION,
1860                        "7.1-preview",
1861                    );
1862                }
1863                Ok(url)
1864            }
1865        }
1866        impl std::future::IntoFuture for RequestBuilder {
1867            type Output = azure_core::Result<models::ServicePrincipalEntitlementsPatchResponse>;
1868            type IntoFuture = BoxFuture<
1869                'static,
1870                azure_core::Result<models::ServicePrincipalEntitlementsPatchResponse>,
1871            >;
1872            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1873            #[doc = ""]
1874            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1875            #[doc = ""]
1876            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1877            fn into_future(self) -> Self::IntoFuture {
1878                Box::pin(async move { self.send().await?.into_body().await })
1879            }
1880        }
1881    }
1882    pub mod delete {
1883        use super::models;
1884        #[cfg(not(target_arch = "wasm32"))]
1885        use futures::future::BoxFuture;
1886        #[cfg(target_arch = "wasm32")]
1887        use futures::future::LocalBoxFuture as BoxFuture;
1888        #[derive(Debug)]
1889        pub struct Response(azure_core::http::Response<(), azure_core::http::NoFormat>);
1890        impl Response {
1891            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1892                self.0.into()
1893            }
1894        }
1895        #[derive(Clone)]
1896        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1897        #[doc = r""]
1898        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1899        #[doc = r" parameters can be chained."]
1900        #[doc = r""]
1901        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1902        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1903        #[doc = r" executes the request and returns a `Result` with the parsed"]
1904        #[doc = r" response."]
1905        #[doc = r""]
1906        #[doc = r" If you need lower-level access to the raw response details"]
1907        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1908        #[doc = r" can finalize the request using the"]
1909        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1910        #[doc = r" that resolves to a lower-level [`Response`] value."]
1911        pub struct RequestBuilder {
1912            pub(crate) client: super::super::Client,
1913            pub(crate) organization: String,
1914            pub(crate) service_principal_id: String,
1915        }
1916        impl RequestBuilder {
1917            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1918            #[doc = ""]
1919            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1920            #[doc = "However, this function can provide more flexibility when required."]
1921            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1922                Box::pin({
1923                    let this = self.clone();
1924                    async move {
1925                        let url = this.url()?;
1926                        let mut req =
1927                            azure_core::http::Request::new(url, azure_core::http::Method::Delete);
1928                        if let Some(auth_header) = this
1929                            .client
1930                            .token_credential()
1931                            .http_authorization_header(&this.client.scopes())
1932                            .await?
1933                        {
1934                            req.insert_header(
1935                                azure_core::http::headers::AUTHORIZATION,
1936                                auth_header,
1937                            );
1938                        }
1939                        let req_body = azure_core::Bytes::new();
1940                        req.set_body(req_body);
1941                        Ok(Response(this.client.send(&mut req).await?.into()))
1942                    }
1943                })
1944            }
1945            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1946                let mut url = azure_core::http::Url::parse(&format!(
1947                    "{}/{}/_apis/serviceprincipalentitlements/{}",
1948                    self.client.endpoint(),
1949                    &self.organization,
1950                    &self.service_principal_id
1951                ))?;
1952                let has_api_version_already = url
1953                    .query_pairs()
1954                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1955                if !has_api_version_already {
1956                    url.query_pairs_mut().append_pair(
1957                        azure_core::http::headers::query_param::API_VERSION,
1958                        "7.1-preview",
1959                    );
1960                }
1961                Ok(url)
1962            }
1963        }
1964        impl std::future::IntoFuture for RequestBuilder {
1965            type Output = azure_core::Result<()>;
1966            type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
1967            #[doc = "Returns a future that sends the request and waits for the response."]
1968            #[doc = ""]
1969            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1970            #[doc = ""]
1971            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1972            fn into_future(self) -> Self::IntoFuture {
1973                Box::pin(async move {
1974                    let _rsp = self.send().await?;
1975                    Ok(())
1976                })
1977            }
1978        }
1979    }
1980}
1981pub mod user_entitlements {
1982    use super::models;
1983    #[cfg(not(target_arch = "wasm32"))]
1984    use futures::future::BoxFuture;
1985    #[cfg(target_arch = "wasm32")]
1986    use futures::future::LocalBoxFuture as BoxFuture;
1987    pub struct Client(pub(crate) super::Client);
1988    impl Client {
1989        #[doc = "Get a paged set of user entitlements matching the filter and sort criteria built with properties that match the select input."]
1990        #[doc = ""]
1991        #[doc = "Arguments:"]
1992        #[doc = "* `organization`: The name of the Azure DevOps organization."]
1993        pub fn search_user_entitlements(
1994            &self,
1995            organization: impl Into<String>,
1996        ) -> search_user_entitlements::RequestBuilder {
1997            search_user_entitlements::RequestBuilder {
1998                client: self.0.clone(),
1999                organization: organization.into(),
2000                continuation_token: None,
2001                select: None,
2002                filter: None,
2003                order_by: None,
2004            }
2005        }
2006        #[doc = "Add a user, assign license and extensions and make them a member of a project group in an account."]
2007        #[doc = ""]
2008        #[doc = "Arguments:"]
2009        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2010        #[doc = "* `body`: UserEntitlement object specifying License, Extensions and Project/Team groups the user should be added to."]
2011        pub fn add(
2012            &self,
2013            organization: impl Into<String>,
2014            body: impl Into<models::UserEntitlement>,
2015        ) -> add::RequestBuilder {
2016            add::RequestBuilder {
2017                client: self.0.clone(),
2018                organization: organization.into(),
2019                body: body.into(),
2020            }
2021        }
2022        #[doc = "Edit the entitlements (License, Extensions, Projects, Teams etc) for one or more users."]
2023        #[doc = ""]
2024        #[doc = "Arguments:"]
2025        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2026        #[doc = "* `body`: JsonPatchDocument containing the operations to perform."]
2027        pub fn update_user_entitlements(
2028            &self,
2029            organization: impl Into<String>,
2030            body: impl Into<models::JsonPatchDocument>,
2031        ) -> update_user_entitlements::RequestBuilder {
2032            update_user_entitlements::RequestBuilder {
2033                client: self.0.clone(),
2034                organization: organization.into(),
2035                body: body.into(),
2036                do_not_send_invite_for_new_users: None,
2037            }
2038        }
2039        #[doc = "Get User Entitlement for a user."]
2040        #[doc = ""]
2041        #[doc = "Arguments:"]
2042        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2043        #[doc = "* `user_id`: ID of the user."]
2044        pub fn get(
2045            &self,
2046            organization: impl Into<String>,
2047            user_id: impl Into<String>,
2048        ) -> get::RequestBuilder {
2049            get::RequestBuilder {
2050                client: self.0.clone(),
2051                organization: organization.into(),
2052                user_id: user_id.into(),
2053            }
2054        }
2055        #[doc = "Edit the entitlements (License, Extensions, Projects, Teams etc) for a user."]
2056        #[doc = ""]
2057        #[doc = "Arguments:"]
2058        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2059        #[doc = "* `body`: JsonPatchDocument containing the operations to perform on the user."]
2060        #[doc = "* `user_id`: ID of the user."]
2061        pub fn update_user_entitlement(
2062            &self,
2063            organization: impl Into<String>,
2064            body: impl Into<models::JsonPatchDocument>,
2065            user_id: impl Into<String>,
2066        ) -> update_user_entitlement::RequestBuilder {
2067            update_user_entitlement::RequestBuilder {
2068                client: self.0.clone(),
2069                organization: organization.into(),
2070                body: body.into(),
2071                user_id: user_id.into(),
2072            }
2073        }
2074        #[doc = "Delete a user from the account.\n\nThe delete operation includes unassigning Extensions and Licenses and removing the user from all project memberships.\nThe user would continue to have access to the account if she is member of an AAD group, that is added directly to the account."]
2075        #[doc = ""]
2076        #[doc = "Arguments:"]
2077        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2078        #[doc = "* `user_id`: ID of the user."]
2079        pub fn delete(
2080            &self,
2081            organization: impl Into<String>,
2082            user_id: impl Into<String>,
2083        ) -> delete::RequestBuilder {
2084            delete::RequestBuilder {
2085                client: self.0.clone(),
2086                organization: organization.into(),
2087                user_id: user_id.into(),
2088            }
2089        }
2090    }
2091    pub mod search_user_entitlements {
2092        use super::models;
2093        #[cfg(not(target_arch = "wasm32"))]
2094        use futures::future::BoxFuture;
2095        #[cfg(target_arch = "wasm32")]
2096        use futures::future::LocalBoxFuture as BoxFuture;
2097        #[derive(Debug)]
2098        pub struct Response(
2099            azure_core::http::Response<
2100                models::PagedUserEntitlementsList,
2101                azure_core::http::JsonFormat,
2102            >,
2103        );
2104        impl Response {
2105            pub async fn into_body(self) -> azure_core::Result<models::PagedUserEntitlementsList> {
2106                self.0.into_body().await
2107            }
2108            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2109                self.0.into()
2110            }
2111        }
2112        #[derive(Clone)]
2113        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2114        #[doc = r""]
2115        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2116        #[doc = r" parameters can be chained."]
2117        #[doc = r""]
2118        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2119        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2120        #[doc = r" executes the request and returns a `Result` with the parsed"]
2121        #[doc = r" response."]
2122        #[doc = r""]
2123        #[doc = r" If you need lower-level access to the raw response details"]
2124        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2125        #[doc = r" can finalize the request using the"]
2126        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2127        #[doc = r" that resolves to a lower-level [`Response`] value."]
2128        pub struct RequestBuilder {
2129            pub(crate) client: super::super::Client,
2130            pub(crate) organization: String,
2131            pub(crate) continuation_token: Option<String>,
2132            pub(crate) select: Option<String>,
2133            pub(crate) filter: Option<String>,
2134            pub(crate) order_by: Option<String>,
2135        }
2136        impl RequestBuilder {
2137            #[doc = "Continuation token for getting the next page of data set. If null is passed, gets the first page."]
2138            pub fn continuation_token(mut self, continuation_token: impl Into<String>) -> Self {
2139                self.continuation_token = Some(continuation_token.into());
2140                self
2141            }
2142            #[doc = "Comma (\",\") separated list of properties to select in the result entitlements. names of the properties are - 'Projects, 'Extensions' and 'Grouprules'."]
2143            pub fn select(mut self, select: impl Into<String>) -> Self {
2144                self.select = Some(select.into());
2145                self
2146            }
2147            #[doc = "Equality operators relating to searching user entitlements separated by and clauses. Valid filters include: licenseId, licenseStatus, userType, and name. licenseId: filters based on license assignment using license names. i.e. licenseId eq 'Account-Stakeholder' or licenseId eq 'Account-Express'. licenseStatus: filters based on license status. currently only supports disabled. i.e. licenseStatus eq 'Disabled'. To get disabled basic licenses, you would pass (licenseId eq 'Account-Express' and licenseStatus eq 'Disabled'). userType: filters off identity type. Supported types are member or guest i.e. userType eq 'member'. name: filters on if the user's display name or email contains given input. i.e. get all users with \"test\" in email or displayname is \"name eq 'test'\". A valid query could be: (licenseId eq 'Account-Stakeholder' or (licenseId eq 'Account-Express' and licenseStatus eq 'Disabled')) and name eq 'test' and userType eq 'guest'."]
2148            pub fn filter(mut self, filter: impl Into<String>) -> Self {
2149                self.filter = Some(filter.into());
2150                self
2151            }
2152            #[doc = "PropertyName and Order (separated by a space ( )) to sort on (e.g. lastAccessed desc). Order defaults to ascending. valid properties to order by are dateCreated, lastAccessed, and name"]
2153            pub fn order_by(mut self, order_by: impl Into<String>) -> Self {
2154                self.order_by = Some(order_by.into());
2155                self
2156            }
2157            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2158            #[doc = ""]
2159            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2160            #[doc = "However, this function can provide more flexibility when required."]
2161            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2162                Box::pin({
2163                    let this = self.clone();
2164                    async move {
2165                        let url = this.url()?;
2166                        let mut req =
2167                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
2168                        if let Some(auth_header) = this
2169                            .client
2170                            .token_credential()
2171                            .http_authorization_header(&this.client.scopes())
2172                            .await?
2173                        {
2174                            req.insert_header(
2175                                azure_core::http::headers::AUTHORIZATION,
2176                                auth_header,
2177                            );
2178                        }
2179                        if let Some(continuation_token) = &this.continuation_token {
2180                            req.url_mut()
2181                                .query_pairs_mut()
2182                                .append_pair("continuationToken", continuation_token);
2183                        }
2184                        if let Some(select) = &this.select {
2185                            req.url_mut()
2186                                .query_pairs_mut()
2187                                .append_pair("select", select);
2188                        }
2189                        if let Some(filter) = &this.filter {
2190                            req.url_mut()
2191                                .query_pairs_mut()
2192                                .append_pair("$filter", filter);
2193                        }
2194                        if let Some(order_by) = &this.order_by {
2195                            req.url_mut()
2196                                .query_pairs_mut()
2197                                .append_pair("$orderBy", order_by);
2198                        }
2199                        let req_body = azure_core::Bytes::new();
2200                        req.set_body(req_body);
2201                        Ok(Response(this.client.send(&mut req).await?.into()))
2202                    }
2203                })
2204            }
2205            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2206                let mut url = azure_core::http::Url::parse(&format!(
2207                    "{}/{}/_apis/userentitlements",
2208                    self.client.endpoint(),
2209                    &self.organization
2210                ))?;
2211                let has_api_version_already = url
2212                    .query_pairs()
2213                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2214                if !has_api_version_already {
2215                    url.query_pairs_mut().append_pair(
2216                        azure_core::http::headers::query_param::API_VERSION,
2217                        "7.1-preview",
2218                    );
2219                }
2220                Ok(url)
2221            }
2222        }
2223        impl std::future::IntoFuture for RequestBuilder {
2224            type Output = azure_core::Result<models::PagedUserEntitlementsList>;
2225            type IntoFuture =
2226                BoxFuture<'static, azure_core::Result<models::PagedUserEntitlementsList>>;
2227            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2228            #[doc = ""]
2229            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2230            #[doc = ""]
2231            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2232            fn into_future(self) -> Self::IntoFuture {
2233                Box::pin(async move { self.send().await?.into_body().await })
2234            }
2235        }
2236    }
2237    pub mod add {
2238        use super::models;
2239        #[cfg(not(target_arch = "wasm32"))]
2240        use futures::future::BoxFuture;
2241        #[cfg(target_arch = "wasm32")]
2242        use futures::future::LocalBoxFuture as BoxFuture;
2243        #[derive(Debug)]
2244        pub struct Response(
2245            azure_core::http::Response<
2246                models::UserEntitlementsPostResponse,
2247                azure_core::http::JsonFormat,
2248            >,
2249        );
2250        impl Response {
2251            pub async fn into_body(
2252                self,
2253            ) -> azure_core::Result<models::UserEntitlementsPostResponse> {
2254                self.0.into_body().await
2255            }
2256            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2257                self.0.into()
2258            }
2259        }
2260        #[derive(Clone)]
2261        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2262        #[doc = r""]
2263        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2264        #[doc = r" parameters can be chained."]
2265        #[doc = r""]
2266        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2267        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2268        #[doc = r" executes the request and returns a `Result` with the parsed"]
2269        #[doc = r" response."]
2270        #[doc = r""]
2271        #[doc = r" If you need lower-level access to the raw response details"]
2272        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2273        #[doc = r" can finalize the request using the"]
2274        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2275        #[doc = r" that resolves to a lower-level [`Response`] value."]
2276        pub struct RequestBuilder {
2277            pub(crate) client: super::super::Client,
2278            pub(crate) organization: String,
2279            pub(crate) body: models::UserEntitlement,
2280        }
2281        impl RequestBuilder {
2282            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2283            #[doc = ""]
2284            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2285            #[doc = "However, this function can provide more flexibility when required."]
2286            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2287                Box::pin({
2288                    let this = self.clone();
2289                    async move {
2290                        let url = this.url()?;
2291                        let mut req =
2292                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
2293                        if let Some(auth_header) = this
2294                            .client
2295                            .token_credential()
2296                            .http_authorization_header(&this.client.scopes())
2297                            .await?
2298                        {
2299                            req.insert_header(
2300                                azure_core::http::headers::AUTHORIZATION,
2301                                auth_header,
2302                            );
2303                        }
2304                        req.insert_header("content-type", "application/json");
2305                        let req_body = azure_core::json::to_json(&this.body)?;
2306                        req.set_body(req_body);
2307                        Ok(Response(this.client.send(&mut req).await?.into()))
2308                    }
2309                })
2310            }
2311            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2312                let mut url = azure_core::http::Url::parse(&format!(
2313                    "{}/{}/_apis/userentitlements",
2314                    self.client.endpoint(),
2315                    &self.organization
2316                ))?;
2317                let has_api_version_already = url
2318                    .query_pairs()
2319                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2320                if !has_api_version_already {
2321                    url.query_pairs_mut().append_pair(
2322                        azure_core::http::headers::query_param::API_VERSION,
2323                        "7.1-preview",
2324                    );
2325                }
2326                Ok(url)
2327            }
2328        }
2329        impl std::future::IntoFuture for RequestBuilder {
2330            type Output = azure_core::Result<models::UserEntitlementsPostResponse>;
2331            type IntoFuture =
2332                BoxFuture<'static, azure_core::Result<models::UserEntitlementsPostResponse>>;
2333            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2334            #[doc = ""]
2335            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2336            #[doc = ""]
2337            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2338            fn into_future(self) -> Self::IntoFuture {
2339                Box::pin(async move { self.send().await?.into_body().await })
2340            }
2341        }
2342    }
2343    pub mod update_user_entitlements {
2344        use super::models;
2345        #[cfg(not(target_arch = "wasm32"))]
2346        use futures::future::BoxFuture;
2347        #[cfg(target_arch = "wasm32")]
2348        use futures::future::LocalBoxFuture as BoxFuture;
2349        #[derive(Debug)]
2350        pub struct Response(
2351            azure_core::http::Response<
2352                models::UserEntitlementOperationReference,
2353                azure_core::http::JsonFormat,
2354            >,
2355        );
2356        impl Response {
2357            pub async fn into_body(
2358                self,
2359            ) -> azure_core::Result<models::UserEntitlementOperationReference> {
2360                self.0.into_body().await
2361            }
2362            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2363                self.0.into()
2364            }
2365        }
2366        #[derive(Clone)]
2367        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2368        #[doc = r""]
2369        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2370        #[doc = r" parameters can be chained."]
2371        #[doc = r""]
2372        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2373        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2374        #[doc = r" executes the request and returns a `Result` with the parsed"]
2375        #[doc = r" response."]
2376        #[doc = r""]
2377        #[doc = r" If you need lower-level access to the raw response details"]
2378        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2379        #[doc = r" can finalize the request using the"]
2380        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2381        #[doc = r" that resolves to a lower-level [`Response`] value."]
2382        pub struct RequestBuilder {
2383            pub(crate) client: super::super::Client,
2384            pub(crate) organization: String,
2385            pub(crate) body: models::JsonPatchDocument,
2386            pub(crate) do_not_send_invite_for_new_users: Option<bool>,
2387        }
2388        impl RequestBuilder {
2389            #[doc = "Whether to send email invites to new users or not"]
2390            pub fn do_not_send_invite_for_new_users(
2391                mut self,
2392                do_not_send_invite_for_new_users: bool,
2393            ) -> Self {
2394                self.do_not_send_invite_for_new_users = Some(do_not_send_invite_for_new_users);
2395                self
2396            }
2397            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2398            #[doc = ""]
2399            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2400            #[doc = "However, this function can provide more flexibility when required."]
2401            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2402                Box::pin({
2403                    let this = self.clone();
2404                    async move {
2405                        let url = this.url()?;
2406                        let mut req =
2407                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
2408                        if let Some(auth_header) = this
2409                            .client
2410                            .token_credential()
2411                            .http_authorization_header(&this.client.scopes())
2412                            .await?
2413                        {
2414                            req.insert_header(
2415                                azure_core::http::headers::AUTHORIZATION,
2416                                auth_header,
2417                            );
2418                        }
2419                        req.insert_header("content-type", "application/json-patch+json");
2420                        let req_body = azure_core::json::to_json(&this.body)?;
2421                        if let Some(do_not_send_invite_for_new_users) =
2422                            &this.do_not_send_invite_for_new_users
2423                        {
2424                            req.url_mut().query_pairs_mut().append_pair(
2425                                "doNotSendInviteForNewUsers",
2426                                &do_not_send_invite_for_new_users.to_string(),
2427                            );
2428                        }
2429                        req.set_body(req_body);
2430                        Ok(Response(this.client.send(&mut req).await?.into()))
2431                    }
2432                })
2433            }
2434            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2435                let mut url = azure_core::http::Url::parse(&format!(
2436                    "{}/{}/_apis/userentitlements",
2437                    self.client.endpoint(),
2438                    &self.organization
2439                ))?;
2440                let has_api_version_already = url
2441                    .query_pairs()
2442                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2443                if !has_api_version_already {
2444                    url.query_pairs_mut().append_pair(
2445                        azure_core::http::headers::query_param::API_VERSION,
2446                        "7.1-preview",
2447                    );
2448                }
2449                Ok(url)
2450            }
2451        }
2452        impl std::future::IntoFuture for RequestBuilder {
2453            type Output = azure_core::Result<models::UserEntitlementOperationReference>;
2454            type IntoFuture =
2455                BoxFuture<'static, azure_core::Result<models::UserEntitlementOperationReference>>;
2456            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2457            #[doc = ""]
2458            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2459            #[doc = ""]
2460            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2461            fn into_future(self) -> Self::IntoFuture {
2462                Box::pin(async move { self.send().await?.into_body().await })
2463            }
2464        }
2465    }
2466    pub mod get {
2467        use super::models;
2468        #[cfg(not(target_arch = "wasm32"))]
2469        use futures::future::BoxFuture;
2470        #[cfg(target_arch = "wasm32")]
2471        use futures::future::LocalBoxFuture as BoxFuture;
2472        #[derive(Debug)]
2473        pub struct Response(
2474            azure_core::http::Response<models::UserEntitlement, azure_core::http::JsonFormat>,
2475        );
2476        impl Response {
2477            pub async fn into_body(self) -> azure_core::Result<models::UserEntitlement> {
2478                self.0.into_body().await
2479            }
2480            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2481                self.0.into()
2482            }
2483        }
2484        #[derive(Clone)]
2485        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2486        #[doc = r""]
2487        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2488        #[doc = r" parameters can be chained."]
2489        #[doc = r""]
2490        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2491        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2492        #[doc = r" executes the request and returns a `Result` with the parsed"]
2493        #[doc = r" response."]
2494        #[doc = r""]
2495        #[doc = r" If you need lower-level access to the raw response details"]
2496        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2497        #[doc = r" can finalize the request using the"]
2498        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2499        #[doc = r" that resolves to a lower-level [`Response`] value."]
2500        pub struct RequestBuilder {
2501            pub(crate) client: super::super::Client,
2502            pub(crate) organization: String,
2503            pub(crate) user_id: String,
2504        }
2505        impl RequestBuilder {
2506            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2507            #[doc = ""]
2508            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2509            #[doc = "However, this function can provide more flexibility when required."]
2510            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2511                Box::pin({
2512                    let this = self.clone();
2513                    async move {
2514                        let url = this.url()?;
2515                        let mut req =
2516                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
2517                        if let Some(auth_header) = this
2518                            .client
2519                            .token_credential()
2520                            .http_authorization_header(&this.client.scopes())
2521                            .await?
2522                        {
2523                            req.insert_header(
2524                                azure_core::http::headers::AUTHORIZATION,
2525                                auth_header,
2526                            );
2527                        }
2528                        let req_body = azure_core::Bytes::new();
2529                        req.set_body(req_body);
2530                        Ok(Response(this.client.send(&mut req).await?.into()))
2531                    }
2532                })
2533            }
2534            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2535                let mut url = azure_core::http::Url::parse(&format!(
2536                    "{}/{}/_apis/userentitlements/{}",
2537                    self.client.endpoint(),
2538                    &self.organization,
2539                    &self.user_id
2540                ))?;
2541                let has_api_version_already = url
2542                    .query_pairs()
2543                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2544                if !has_api_version_already {
2545                    url.query_pairs_mut().append_pair(
2546                        azure_core::http::headers::query_param::API_VERSION,
2547                        "7.1-preview",
2548                    );
2549                }
2550                Ok(url)
2551            }
2552        }
2553        impl std::future::IntoFuture for RequestBuilder {
2554            type Output = azure_core::Result<models::UserEntitlement>;
2555            type IntoFuture = BoxFuture<'static, azure_core::Result<models::UserEntitlement>>;
2556            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2557            #[doc = ""]
2558            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2559            #[doc = ""]
2560            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2561            fn into_future(self) -> Self::IntoFuture {
2562                Box::pin(async move { self.send().await?.into_body().await })
2563            }
2564        }
2565    }
2566    pub mod update_user_entitlement {
2567        use super::models;
2568        #[cfg(not(target_arch = "wasm32"))]
2569        use futures::future::BoxFuture;
2570        #[cfg(target_arch = "wasm32")]
2571        use futures::future::LocalBoxFuture as BoxFuture;
2572        #[derive(Debug)]
2573        pub struct Response(
2574            azure_core::http::Response<
2575                models::UserEntitlementsPatchResponse,
2576                azure_core::http::JsonFormat,
2577            >,
2578        );
2579        impl Response {
2580            pub async fn into_body(
2581                self,
2582            ) -> azure_core::Result<models::UserEntitlementsPatchResponse> {
2583                self.0.into_body().await
2584            }
2585            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2586                self.0.into()
2587            }
2588        }
2589        #[derive(Clone)]
2590        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2591        #[doc = r""]
2592        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2593        #[doc = r" parameters can be chained."]
2594        #[doc = r""]
2595        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2596        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2597        #[doc = r" executes the request and returns a `Result` with the parsed"]
2598        #[doc = r" response."]
2599        #[doc = r""]
2600        #[doc = r" If you need lower-level access to the raw response details"]
2601        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2602        #[doc = r" can finalize the request using the"]
2603        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2604        #[doc = r" that resolves to a lower-level [`Response`] value."]
2605        pub struct RequestBuilder {
2606            pub(crate) client: super::super::Client,
2607            pub(crate) organization: String,
2608            pub(crate) body: models::JsonPatchDocument,
2609            pub(crate) user_id: String,
2610        }
2611        impl RequestBuilder {
2612            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2613            #[doc = ""]
2614            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2615            #[doc = "However, this function can provide more flexibility when required."]
2616            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2617                Box::pin({
2618                    let this = self.clone();
2619                    async move {
2620                        let url = this.url()?;
2621                        let mut req =
2622                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
2623                        if let Some(auth_header) = this
2624                            .client
2625                            .token_credential()
2626                            .http_authorization_header(&this.client.scopes())
2627                            .await?
2628                        {
2629                            req.insert_header(
2630                                azure_core::http::headers::AUTHORIZATION,
2631                                auth_header,
2632                            );
2633                        }
2634                        req.insert_header("content-type", "application/json-patch+json");
2635                        let req_body = azure_core::json::to_json(&this.body)?;
2636                        req.set_body(req_body);
2637                        Ok(Response(this.client.send(&mut req).await?.into()))
2638                    }
2639                })
2640            }
2641            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2642                let mut url = azure_core::http::Url::parse(&format!(
2643                    "{}/{}/_apis/userentitlements/{}",
2644                    self.client.endpoint(),
2645                    &self.organization,
2646                    &self.user_id
2647                ))?;
2648                let has_api_version_already = url
2649                    .query_pairs()
2650                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2651                if !has_api_version_already {
2652                    url.query_pairs_mut().append_pair(
2653                        azure_core::http::headers::query_param::API_VERSION,
2654                        "7.1-preview",
2655                    );
2656                }
2657                Ok(url)
2658            }
2659        }
2660        impl std::future::IntoFuture for RequestBuilder {
2661            type Output = azure_core::Result<models::UserEntitlementsPatchResponse>;
2662            type IntoFuture =
2663                BoxFuture<'static, azure_core::Result<models::UserEntitlementsPatchResponse>>;
2664            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2665            #[doc = ""]
2666            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2667            #[doc = ""]
2668            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2669            fn into_future(self) -> Self::IntoFuture {
2670                Box::pin(async move { self.send().await?.into_body().await })
2671            }
2672        }
2673    }
2674    pub mod delete {
2675        use super::models;
2676        #[cfg(not(target_arch = "wasm32"))]
2677        use futures::future::BoxFuture;
2678        #[cfg(target_arch = "wasm32")]
2679        use futures::future::LocalBoxFuture as BoxFuture;
2680        #[derive(Debug)]
2681        pub struct Response(azure_core::http::Response<(), azure_core::http::NoFormat>);
2682        impl Response {
2683            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2684                self.0.into()
2685            }
2686        }
2687        #[derive(Clone)]
2688        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2689        #[doc = r""]
2690        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2691        #[doc = r" parameters can be chained."]
2692        #[doc = r""]
2693        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2694        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2695        #[doc = r" executes the request and returns a `Result` with the parsed"]
2696        #[doc = r" response."]
2697        #[doc = r""]
2698        #[doc = r" If you need lower-level access to the raw response details"]
2699        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2700        #[doc = r" can finalize the request using the"]
2701        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2702        #[doc = r" that resolves to a lower-level [`Response`] value."]
2703        pub struct RequestBuilder {
2704            pub(crate) client: super::super::Client,
2705            pub(crate) organization: String,
2706            pub(crate) user_id: String,
2707        }
2708        impl RequestBuilder {
2709            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2710            #[doc = ""]
2711            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2712            #[doc = "However, this function can provide more flexibility when required."]
2713            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2714                Box::pin({
2715                    let this = self.clone();
2716                    async move {
2717                        let url = this.url()?;
2718                        let mut req =
2719                            azure_core::http::Request::new(url, azure_core::http::Method::Delete);
2720                        if let Some(auth_header) = this
2721                            .client
2722                            .token_credential()
2723                            .http_authorization_header(&this.client.scopes())
2724                            .await?
2725                        {
2726                            req.insert_header(
2727                                azure_core::http::headers::AUTHORIZATION,
2728                                auth_header,
2729                            );
2730                        }
2731                        let req_body = azure_core::Bytes::new();
2732                        req.set_body(req_body);
2733                        Ok(Response(this.client.send(&mut req).await?.into()))
2734                    }
2735                })
2736            }
2737            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2738                let mut url = azure_core::http::Url::parse(&format!(
2739                    "{}/{}/_apis/userentitlements/{}",
2740                    self.client.endpoint(),
2741                    &self.organization,
2742                    &self.user_id
2743                ))?;
2744                let has_api_version_already = url
2745                    .query_pairs()
2746                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2747                if !has_api_version_already {
2748                    url.query_pairs_mut().append_pair(
2749                        azure_core::http::headers::query_param::API_VERSION,
2750                        "7.1-preview",
2751                    );
2752                }
2753                Ok(url)
2754            }
2755        }
2756        impl std::future::IntoFuture for RequestBuilder {
2757            type Output = azure_core::Result<()>;
2758            type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
2759            #[doc = "Returns a future that sends the request and waits for the response."]
2760            #[doc = ""]
2761            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2762            #[doc = ""]
2763            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2764            fn into_future(self) -> Self::IntoFuture {
2765                Box::pin(async move {
2766                    let _rsp = self.send().await?;
2767                    Ok(())
2768                })
2769            }
2770        }
2771    }
2772}
2773pub mod user_entitlement_summary {
2774    use super::models;
2775    #[cfg(not(target_arch = "wasm32"))]
2776    use futures::future::BoxFuture;
2777    #[cfg(target_arch = "wasm32")]
2778    use futures::future::LocalBoxFuture as BoxFuture;
2779    pub struct Client(pub(crate) super::Client);
2780    impl Client {
2781        #[doc = "Get summary of Licenses, Extension, Projects, Groups and their assignments in the collection."]
2782        #[doc = ""]
2783        #[doc = "Arguments:"]
2784        #[doc = "* `organization`: The name of the Azure DevOps organization."]
2785        pub fn get(&self, organization: impl Into<String>) -> get::RequestBuilder {
2786            get::RequestBuilder {
2787                client: self.0.clone(),
2788                organization: organization.into(),
2789                select: None,
2790            }
2791        }
2792    }
2793    pub mod get {
2794        use super::models;
2795        #[cfg(not(target_arch = "wasm32"))]
2796        use futures::future::BoxFuture;
2797        #[cfg(target_arch = "wasm32")]
2798        use futures::future::LocalBoxFuture as BoxFuture;
2799        #[derive(Debug)]
2800        pub struct Response(
2801            azure_core::http::Response<models::UsersSummary, azure_core::http::JsonFormat>,
2802        );
2803        impl Response {
2804            pub async fn into_body(self) -> azure_core::Result<models::UsersSummary> {
2805                self.0.into_body().await
2806            }
2807            pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2808                self.0.into()
2809            }
2810        }
2811        #[derive(Clone)]
2812        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2813        #[doc = r""]
2814        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2815        #[doc = r" parameters can be chained."]
2816        #[doc = r""]
2817        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2818        #[doc = r" converts the [`RequestBuilder`] into a future,"]
2819        #[doc = r" executes the request and returns a `Result` with the parsed"]
2820        #[doc = r" response."]
2821        #[doc = r""]
2822        #[doc = r" If you need lower-level access to the raw response details"]
2823        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2824        #[doc = r" can finalize the request using the"]
2825        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2826        #[doc = r" that resolves to a lower-level [`Response`] value."]
2827        pub struct RequestBuilder {
2828            pub(crate) client: super::super::Client,
2829            pub(crate) organization: String,
2830            pub(crate) select: Option<String>,
2831        }
2832        impl RequestBuilder {
2833            #[doc = "Comma (\",\") separated list of properties to select. Supported property names are {AccessLevels, Licenses, Projects, Groups}."]
2834            pub fn select(mut self, select: impl Into<String>) -> Self {
2835                self.select = Some(select.into());
2836                self
2837            }
2838            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2839            #[doc = ""]
2840            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2841            #[doc = "However, this function can provide more flexibility when required."]
2842            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2843                Box::pin({
2844                    let this = self.clone();
2845                    async move {
2846                        let url = this.url()?;
2847                        let mut req =
2848                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
2849                        if let Some(auth_header) = this
2850                            .client
2851                            .token_credential()
2852                            .http_authorization_header(&this.client.scopes())
2853                            .await?
2854                        {
2855                            req.insert_header(
2856                                azure_core::http::headers::AUTHORIZATION,
2857                                auth_header,
2858                            );
2859                        }
2860                        if let Some(select) = &this.select {
2861                            req.url_mut()
2862                                .query_pairs_mut()
2863                                .append_pair("select", select);
2864                        }
2865                        let req_body = azure_core::Bytes::new();
2866                        req.set_body(req_body);
2867                        Ok(Response(this.client.send(&mut req).await?.into()))
2868                    }
2869                })
2870            }
2871            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2872                let mut url = azure_core::http::Url::parse(&format!(
2873                    "{}/{}/_apis/userentitlementsummary",
2874                    self.client.endpoint(),
2875                    &self.organization
2876                ))?;
2877                let has_api_version_already = url
2878                    .query_pairs()
2879                    .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2880                if !has_api_version_already {
2881                    url.query_pairs_mut().append_pair(
2882                        azure_core::http::headers::query_param::API_VERSION,
2883                        "7.1-preview",
2884                    );
2885                }
2886                Ok(url)
2887            }
2888        }
2889        impl std::future::IntoFuture for RequestBuilder {
2890            type Output = azure_core::Result<models::UsersSummary>;
2891            type IntoFuture = BoxFuture<'static, azure_core::Result<models::UsersSummary>>;
2892            #[doc = "Returns a future that sends the request and returns the parsed response body."]
2893            #[doc = ""]
2894            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2895            #[doc = ""]
2896            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2897            fn into_future(self) -> Self::IntoFuture {
2898                Box::pin(async move { self.send().await?.into_body().await })
2899            }
2900        }
2901    }
2902}