Skip to main content

azure_devops_rust_api/service_endpoint/
mod.rs

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3#![allow(unused_mut)]
4#![allow(unused_variables)]
5#![allow(unused_imports)]
6#![allow(clippy::redundant_clone)]
7#![allow(clippy::too_many_arguments)]
8#![allow(clippy::module_inception)]
9pub mod models;
10#[derive(Clone)]
11pub struct Client {
12    endpoint: azure_core::http::Url,
13    credential: crate::Credential,
14    scopes: Vec<String>,
15    pipeline: azure_core::http::Pipeline,
16}
17#[derive(Clone)]
18pub struct ClientBuilder {
19    credential: crate::Credential,
20    endpoint: Option<azure_core::http::Url>,
21    scopes: Option<Vec<String>>,
22    options: azure_core::http::ClientOptions,
23}
24azure_core::static_url!(DEFAULT_ENDPOINT, "https://dev.azure.com");
25impl ClientBuilder {
26    #[doc = "Create a new instance of `ClientBuilder`."]
27    #[must_use]
28    pub fn new(credential: crate::Credential) -> Self {
29        Self {
30            credential,
31            endpoint: None,
32            scopes: None,
33            options: azure_core::http::ClientOptions::default(),
34        }
35    }
36    #[doc = "Set the endpoint."]
37    #[must_use]
38    pub fn endpoint(mut self, endpoint: impl Into<azure_core::http::Url>) -> Self {
39        self.endpoint = Some(endpoint.into());
40        self
41    }
42    #[doc = "Set the scopes."]
43    #[must_use]
44    pub fn scopes(mut self, scopes: &[&str]) -> Self {
45        self.scopes = Some(scopes.iter().map(|scope| (*scope).to_owned()).collect());
46        self
47    }
48    #[doc = "Set the retry options."]
49    #[must_use]
50    pub fn retry(mut self, retry: impl Into<azure_core::http::RetryOptions>) -> Self {
51        self.options.retry = 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::Transport>) -> 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::RawResponse> {
101        let context = azure_core::http::Context::default();
102        self.pipeline.send(&context, request, None).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 endpointproxy_client(&self) -> endpointproxy::Client {
134        endpointproxy::Client(self.clone())
135    }
136    pub fn endpoints_client(&self) -> endpoints::Client {
137        endpoints::Client(self.clone())
138    }
139    pub fn executionhistory_client(&self) -> executionhistory::Client {
140        executionhistory::Client(self.clone())
141    }
142    pub fn types_client(&self) -> types::Client {
143        types::Client(self.clone())
144    }
145}
146pub mod endpointproxy {
147    use super::models;
148    #[cfg(not(target_arch = "wasm32"))]
149    use futures::future::BoxFuture;
150    #[cfg(target_arch = "wasm32")]
151    use futures::future::LocalBoxFuture as BoxFuture;
152    pub struct Client(pub(crate) super::Client);
153    impl Client {
154        #[doc = "Proxy for a GET request defined by a service endpoint."]
155        #[doc = ""]
156        #[doc = "Arguments:"]
157        #[doc = "* `organization`: The name of the Azure DevOps organization."]
158        #[doc = "* `body`: Service endpoint request."]
159        #[doc = "* `project`: Project ID or project name"]
160        #[doc = "* `endpoint_id`: Id of the service endpoint."]
161        pub fn execute_service_endpoint_request(
162            &self,
163            organization: impl Into<String>,
164            body: impl Into<models::ServiceEndpointRequest>,
165            project: impl Into<String>,
166            endpoint_id: impl Into<String>,
167        ) -> execute_service_endpoint_request::RequestBuilder {
168            execute_service_endpoint_request::RequestBuilder {
169                client: self.0.clone(),
170                organization: organization.into(),
171                body: body.into(),
172                project: project.into(),
173                endpoint_id: endpoint_id.into(),
174            }
175        }
176        #[doc = "Use ExecuteServiceEndpointRequest API Instead"]
177        #[doc = ""]
178        #[doc = "Arguments:"]
179        #[doc = "* `organization`: The name of the Azure DevOps organization."]
180        #[doc = "* `body`: Describes the data source to fetch."]
181        #[doc = "* `project`: Project ID or project name"]
182        pub fn query(
183            &self,
184            organization: impl Into<String>,
185            body: impl Into<models::DataSourceBinding>,
186            project: impl Into<String>,
187        ) -> query::RequestBuilder {
188            query::RequestBuilder {
189                client: self.0.clone(),
190                organization: organization.into(),
191                body: body.into(),
192                project: project.into(),
193            }
194        }
195    }
196    pub mod execute_service_endpoint_request {
197        use super::models;
198        #[cfg(not(target_arch = "wasm32"))]
199        use futures::future::BoxFuture;
200        #[cfg(target_arch = "wasm32")]
201        use futures::future::LocalBoxFuture as BoxFuture;
202        #[derive(Debug)]
203        pub struct Response(
204            azure_core::http::Response<
205                models::ServiceEndpointRequestResult,
206                azure_core::http::JsonFormat,
207            >,
208        );
209        impl Response {
210            pub fn into_body(self) -> azure_core::Result<models::ServiceEndpointRequestResult> {
211                self.0.into_model()
212            }
213            pub fn into_raw_response(self) -> azure_core::http::RawResponse {
214                self.0.into()
215            }
216        }
217        #[derive(Clone)]
218        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
219        #[doc = r""]
220        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
221        #[doc = r" parameters can be chained."]
222        #[doc = r""]
223        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
224        #[doc = r" converts the [`RequestBuilder`] into a future,"]
225        #[doc = r" executes the request and returns a `Result` with the parsed"]
226        #[doc = r" response."]
227        #[doc = r""]
228        #[doc = r" If you need lower-level access to the raw response details"]
229        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
230        #[doc = r" can finalize the request using the"]
231        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
232        #[doc = r" that resolves to a lower-level [`Response`] value."]
233        pub struct RequestBuilder {
234            pub(crate) client: super::super::Client,
235            pub(crate) organization: String,
236            pub(crate) body: models::ServiceEndpointRequest,
237            pub(crate) project: String,
238            pub(crate) endpoint_id: String,
239        }
240        impl RequestBuilder {
241            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
242            #[doc = ""]
243            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
244            #[doc = "However, this function can provide more flexibility when required."]
245            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
246                Box::pin({
247                    let this = self.clone();
248                    async move {
249                        let url = this.url()?;
250                        let mut req =
251                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
252                        if let Some(auth_header) = this
253                            .client
254                            .token_credential()
255                            .http_authorization_header(&this.client.scopes())
256                            .await?
257                        {
258                            req.insert_header(
259                                azure_core::http::headers::AUTHORIZATION,
260                                auth_header,
261                            );
262                        }
263                        req.insert_header("content-type", "application/json");
264                        let req_body = azure_core::json::to_json(&this.body)?;
265                        let endpoint_id = &this.endpoint_id;
266                        req.url_mut()
267                            .query_pairs_mut()
268                            .append_pair("endpointId", endpoint_id);
269                        req.set_body(req_body);
270                        Ok(Response(this.client.send(&mut req).await?.into()))
271                    }
272                })
273            }
274            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
275                let mut url = azure_core::http::Url::parse(&format!(
276                    "{}/{}/{}/_apis/serviceendpoint/endpointproxy?endpointId={}",
277                    self.client.endpoint(),
278                    &self.organization,
279                    &self.project,
280                    &self.endpoint_id
281                ))?;
282                let has_api_version_already = url.query_pairs().any(|(k, _)| k == "api-version");
283                if !has_api_version_already {
284                    url.query_pairs_mut()
285                        .append_pair("api-version", "7.1-preview");
286                }
287                Ok(url)
288            }
289        }
290        impl std::future::IntoFuture for RequestBuilder {
291            type Output = azure_core::Result<models::ServiceEndpointRequestResult>;
292            type IntoFuture =
293                BoxFuture<'static, azure_core::Result<models::ServiceEndpointRequestResult>>;
294            #[doc = "Returns a future that sends the request and returns the parsed response body."]
295            #[doc = ""]
296            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
297            #[doc = ""]
298            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
299            fn into_future(self) -> Self::IntoFuture {
300                Box::pin(async move { self.send().await?.into_body() })
301            }
302        }
303    }
304    pub mod query {
305        use super::models;
306        #[cfg(not(target_arch = "wasm32"))]
307        use futures::future::BoxFuture;
308        #[cfg(target_arch = "wasm32")]
309        use futures::future::LocalBoxFuture as BoxFuture;
310        #[derive(Debug)]
311        pub struct Response(azure_core::http::Response<Vec<String>, azure_core::http::JsonFormat>);
312        impl Response {
313            pub fn into_body(self) -> azure_core::Result<Vec<String>> {
314                self.0.into_model()
315            }
316            pub fn into_raw_response(self) -> azure_core::http::RawResponse {
317                self.0.into()
318            }
319        }
320        #[derive(Clone)]
321        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
322        #[doc = r""]
323        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
324        #[doc = r" parameters can be chained."]
325        #[doc = r""]
326        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
327        #[doc = r" converts the [`RequestBuilder`] into a future,"]
328        #[doc = r" executes the request and returns a `Result` with the parsed"]
329        #[doc = r" response."]
330        #[doc = r""]
331        #[doc = r" If you need lower-level access to the raw response details"]
332        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
333        #[doc = r" can finalize the request using the"]
334        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
335        #[doc = r" that resolves to a lower-level [`Response`] value."]
336        pub struct RequestBuilder {
337            pub(crate) client: super::super::Client,
338            pub(crate) organization: String,
339            pub(crate) body: models::DataSourceBinding,
340            pub(crate) project: String,
341        }
342        impl RequestBuilder {
343            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
344            #[doc = ""]
345            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
346            #[doc = "However, this function can provide more flexibility when required."]
347            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
348                Box::pin({
349                    let this = self.clone();
350                    async move {
351                        let url = this.url()?;
352                        let mut req =
353                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
354                        if let Some(auth_header) = this
355                            .client
356                            .token_credential()
357                            .http_authorization_header(&this.client.scopes())
358                            .await?
359                        {
360                            req.insert_header(
361                                azure_core::http::headers::AUTHORIZATION,
362                                auth_header,
363                            );
364                        }
365                        req.insert_header("content-type", "application/json");
366                        let req_body = azure_core::json::to_json(&this.body)?;
367                        req.set_body(req_body);
368                        Ok(Response(this.client.send(&mut req).await?.into()))
369                    }
370                })
371            }
372            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
373                let mut url = azure_core::http::Url::parse(&format!(
374                    "{}/{}/{}/_apis/serviceendpoint/endpointproxy",
375                    self.client.endpoint(),
376                    &self.organization,
377                    &self.project
378                ))?;
379                let has_api_version_already = url.query_pairs().any(|(k, _)| k == "api-version");
380                if !has_api_version_already {
381                    url.query_pairs_mut()
382                        .append_pair("api-version", "7.1-preview");
383                }
384                Ok(url)
385            }
386        }
387        impl std::future::IntoFuture for RequestBuilder {
388            type Output = azure_core::Result<Vec<String>>;
389            type IntoFuture = BoxFuture<'static, azure_core::Result<Vec<String>>>;
390            #[doc = "Returns a future that sends the request and returns the parsed response body."]
391            #[doc = ""]
392            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
393            #[doc = ""]
394            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
395            fn into_future(self) -> Self::IntoFuture {
396                Box::pin(async move { self.send().await?.into_body() })
397            }
398        }
399    }
400}
401pub mod endpoints {
402    use super::models;
403    #[cfg(not(target_arch = "wasm32"))]
404    use futures::future::BoxFuture;
405    #[cfg(target_arch = "wasm32")]
406    use futures::future::LocalBoxFuture as BoxFuture;
407    pub struct Client(pub(crate) super::Client);
408    impl Client {
409        #[doc = "Get the service endpoints."]
410        #[doc = ""]
411        #[doc = "Arguments:"]
412        #[doc = "* `organization`: The name of the Azure DevOps organization."]
413        #[doc = "* `project`: Project ID or project name"]
414        pub fn get_service_endpoints(
415            &self,
416            organization: impl Into<String>,
417            project: impl Into<String>,
418        ) -> get_service_endpoints::RequestBuilder {
419            get_service_endpoints::RequestBuilder {
420                client: self.0.clone(),
421                organization: organization.into(),
422                project: project.into(),
423                type_: None,
424                auth_schemes: None,
425                endpoint_ids: None,
426                owner: None,
427                include_failed: None,
428                include_details: None,
429                action_filter: None,
430            }
431        }
432        #[doc = "Creates a new service endpoint"]
433        #[doc = ""]
434        #[doc = "Arguments:"]
435        #[doc = "* `organization`: The name of the Azure DevOps organization."]
436        #[doc = "* `body`: Service endpoint to create"]
437        pub fn create(
438            &self,
439            organization: impl Into<String>,
440            body: impl Into<models::ServiceEndpoint>,
441        ) -> create::RequestBuilder {
442            create::RequestBuilder {
443                client: self.0.clone(),
444                organization: organization.into(),
445                body: body.into(),
446            }
447        }
448        #[doc = "Update the service endpoints."]
449        #[doc = ""]
450        #[doc = "Arguments:"]
451        #[doc = "* `organization`: The name of the Azure DevOps organization."]
452        #[doc = "* `body`: Names of the service endpoints to update."]
453        pub fn update_service_endpoints(
454            &self,
455            organization: impl Into<String>,
456            body: Vec<models::ServiceEndpoint>,
457        ) -> update_service_endpoints::RequestBuilder {
458            update_service_endpoints::RequestBuilder {
459                client: self.0.clone(),
460                organization: organization.into(),
461                body,
462            }
463        }
464        #[doc = "Update the service endpoint"]
465        #[doc = ""]
466        #[doc = "Arguments:"]
467        #[doc = "* `organization`: The name of the Azure DevOps organization."]
468        #[doc = "* `body`: Updated data for the endpoint"]
469        #[doc = "* `endpoint_id`: Endpoint Id of the endpoint to update"]
470        pub fn update_service_endpoint(
471            &self,
472            organization: impl Into<String>,
473            body: impl Into<models::ServiceEndpoint>,
474            endpoint_id: impl Into<String>,
475        ) -> update_service_endpoint::RequestBuilder {
476            update_service_endpoint::RequestBuilder {
477                client: self.0.clone(),
478                organization: organization.into(),
479                body: body.into(),
480                endpoint_id: endpoint_id.into(),
481                operation: None,
482            }
483        }
484        #[doc = "Share service endpoint across projects"]
485        #[doc = ""]
486        #[doc = "Arguments:"]
487        #[doc = "* `organization`: The name of the Azure DevOps organization."]
488        #[doc = "* `body`: Project reference details of the target project"]
489        #[doc = "* `endpoint_id`: Endpoint Id of the endpoint to share"]
490        pub fn share_service_endpoint(
491            &self,
492            organization: impl Into<String>,
493            body: Vec<models::ServiceEndpointProjectReference>,
494            endpoint_id: impl Into<String>,
495        ) -> share_service_endpoint::RequestBuilder {
496            share_service_endpoint::RequestBuilder {
497                client: self.0.clone(),
498                organization: organization.into(),
499                body,
500                endpoint_id: endpoint_id.into(),
501            }
502        }
503        #[doc = "Delete a service endpoint"]
504        #[doc = ""]
505        #[doc = "Arguments:"]
506        #[doc = "* `organization`: The name of the Azure DevOps organization."]
507        #[doc = "* `endpoint_id`: Endpoint Id of endpoint to delete"]
508        #[doc = "* `project_ids`: project Ids from which endpoint needs to be deleted"]
509        pub fn delete(
510            &self,
511            organization: impl Into<String>,
512            endpoint_id: impl Into<String>,
513            project_ids: impl Into<String>,
514        ) -> delete::RequestBuilder {
515            delete::RequestBuilder {
516                client: self.0.clone(),
517                organization: organization.into(),
518                endpoint_id: endpoint_id.into(),
519                project_ids: project_ids.into(),
520                deep: None,
521            }
522        }
523        #[doc = "Get the service endpoints by name."]
524        #[doc = ""]
525        #[doc = "Arguments:"]
526        #[doc = "* `organization`: The name of the Azure DevOps organization."]
527        #[doc = "* `project`: Project ID or project name"]
528        #[doc = "* `endpoint_names`: Names of the service endpoints."]
529        pub fn get_service_endpoints_by_names(
530            &self,
531            organization: impl Into<String>,
532            project: impl Into<String>,
533            endpoint_names: impl Into<String>,
534        ) -> get_service_endpoints_by_names::RequestBuilder {
535            get_service_endpoints_by_names::RequestBuilder {
536                client: self.0.clone(),
537                organization: organization.into(),
538                project: project.into(),
539                endpoint_names: endpoint_names.into(),
540                type_: None,
541                auth_schemes: None,
542                owner: None,
543                include_failed: None,
544                include_details: None,
545            }
546        }
547        #[doc = "Gets the service endpoints and patch new authorization parameters"]
548        #[doc = ""]
549        #[doc = "Arguments:"]
550        #[doc = "* `organization`: The name of the Azure DevOps organization."]
551        #[doc = "* `body`: Scope, Validity of Token requested."]
552        #[doc = "* `project`: Project ID or project name"]
553        #[doc = "* `endpoint_ids`: Ids of the service endpoints."]
554        pub fn get_service_endpoints_with_refreshed_authentication(
555            &self,
556            organization: impl Into<String>,
557            body: Vec<models::RefreshAuthenticationParameters>,
558            project: impl Into<String>,
559            endpoint_ids: impl Into<String>,
560        ) -> get_service_endpoints_with_refreshed_authentication::RequestBuilder {
561            get_service_endpoints_with_refreshed_authentication::RequestBuilder {
562                client: self.0.clone(),
563                organization: organization.into(),
564                body,
565                project: project.into(),
566                endpoint_ids: endpoint_ids.into(),
567            }
568        }
569        #[doc = "Get the service endpoint details."]
570        #[doc = ""]
571        #[doc = "Arguments:"]
572        #[doc = "* `organization`: The name of the Azure DevOps organization."]
573        #[doc = "* `project`: Project ID or project name"]
574        #[doc = "* `endpoint_id`: Id of the service endpoint."]
575        pub fn get(
576            &self,
577            organization: impl Into<String>,
578            project: impl Into<String>,
579            endpoint_id: impl Into<String>,
580        ) -> get::RequestBuilder {
581            get::RequestBuilder {
582                client: self.0.clone(),
583                organization: organization.into(),
584                project: project.into(),
585                endpoint_id: endpoint_id.into(),
586                action_filter: None,
587            }
588        }
589    }
590    pub mod get_service_endpoints {
591        use super::models;
592        #[cfg(not(target_arch = "wasm32"))]
593        use futures::future::BoxFuture;
594        #[cfg(target_arch = "wasm32")]
595        use futures::future::LocalBoxFuture as BoxFuture;
596        #[derive(Debug)]
597        pub struct Response(
598            azure_core::http::Response<models::ServiceEndpointList, azure_core::http::JsonFormat>,
599        );
600        impl Response {
601            pub fn into_body(self) -> azure_core::Result<models::ServiceEndpointList> {
602                self.0.into_model()
603            }
604            pub fn into_raw_response(self) -> azure_core::http::RawResponse {
605                self.0.into()
606            }
607        }
608        #[derive(Clone)]
609        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
610        #[doc = r""]
611        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
612        #[doc = r" parameters can be chained."]
613        #[doc = r""]
614        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
615        #[doc = r" converts the [`RequestBuilder`] into a future,"]
616        #[doc = r" executes the request and returns a `Result` with the parsed"]
617        #[doc = r" response."]
618        #[doc = r""]
619        #[doc = r" If you need lower-level access to the raw response details"]
620        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
621        #[doc = r" can finalize the request using the"]
622        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
623        #[doc = r" that resolves to a lower-level [`Response`] value."]
624        pub struct RequestBuilder {
625            pub(crate) client: super::super::Client,
626            pub(crate) organization: String,
627            pub(crate) project: String,
628            pub(crate) type_: Option<String>,
629            pub(crate) auth_schemes: Option<String>,
630            pub(crate) endpoint_ids: Option<String>,
631            pub(crate) owner: Option<String>,
632            pub(crate) include_failed: Option<bool>,
633            pub(crate) include_details: Option<bool>,
634            pub(crate) action_filter: Option<String>,
635        }
636        impl RequestBuilder {
637            #[doc = "Type of the service endpoints."]
638            pub fn type_(mut self, type_: impl Into<String>) -> Self {
639                self.type_ = Some(type_.into());
640                self
641            }
642            #[doc = "Authorization schemes used for service endpoints."]
643            pub fn auth_schemes(mut self, auth_schemes: impl Into<String>) -> Self {
644                self.auth_schemes = Some(auth_schemes.into());
645                self
646            }
647            #[doc = "Ids of the service endpoints."]
648            pub fn endpoint_ids(mut self, endpoint_ids: impl Into<String>) -> Self {
649                self.endpoint_ids = Some(endpoint_ids.into());
650                self
651            }
652            #[doc = "Owner for service endpoints."]
653            pub fn owner(mut self, owner: impl Into<String>) -> Self {
654                self.owner = Some(owner.into());
655                self
656            }
657            #[doc = "Failed flag for service endpoints."]
658            pub fn include_failed(mut self, include_failed: bool) -> Self {
659                self.include_failed = Some(include_failed);
660                self
661            }
662            #[doc = "Flag to include more details for service endpoints. This is for internal use only and the flag will be treated as false for all other requests"]
663            pub fn include_details(mut self, include_details: bool) -> Self {
664                self.include_details = Some(include_details);
665                self
666            }
667            #[doc = "The \"actionFilter\" parameter allows users to evaluate requestor permissions and retrieve a list of endpoints that match the specified conditions, ensuring that only relevant endpoints are returned based on their permissions"]
668            pub fn action_filter(mut self, action_filter: impl Into<String>) -> Self {
669                self.action_filter = Some(action_filter.into());
670                self
671            }
672            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
673            #[doc = ""]
674            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
675            #[doc = "However, this function can provide more flexibility when required."]
676            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
677                Box::pin({
678                    let this = self.clone();
679                    async move {
680                        let url = this.url()?;
681                        let mut req =
682                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
683                        if let Some(auth_header) = this
684                            .client
685                            .token_credential()
686                            .http_authorization_header(&this.client.scopes())
687                            .await?
688                        {
689                            req.insert_header(
690                                azure_core::http::headers::AUTHORIZATION,
691                                auth_header,
692                            );
693                        }
694                        if let Some(type_) = &this.type_ {
695                            req.url_mut().query_pairs_mut().append_pair("type", type_);
696                        }
697                        if let Some(auth_schemes) = &this.auth_schemes {
698                            req.url_mut()
699                                .query_pairs_mut()
700                                .append_pair("authSchemes", auth_schemes);
701                        }
702                        if let Some(endpoint_ids) = &this.endpoint_ids {
703                            req.url_mut()
704                                .query_pairs_mut()
705                                .append_pair("endpointIds", endpoint_ids);
706                        }
707                        if let Some(owner) = &this.owner {
708                            req.url_mut().query_pairs_mut().append_pair("owner", owner);
709                        }
710                        if let Some(include_failed) = &this.include_failed {
711                            req.url_mut()
712                                .query_pairs_mut()
713                                .append_pair("includeFailed", &include_failed.to_string());
714                        }
715                        if let Some(include_details) = &this.include_details {
716                            req.url_mut()
717                                .query_pairs_mut()
718                                .append_pair("includeDetails", &include_details.to_string());
719                        }
720                        if let Some(action_filter) = &this.action_filter {
721                            req.url_mut()
722                                .query_pairs_mut()
723                                .append_pair("actionFilter", action_filter);
724                        }
725                        let req_body = azure_core::Bytes::new();
726                        req.set_body(req_body);
727                        Ok(Response(this.client.send(&mut req).await?.into()))
728                    }
729                })
730            }
731            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
732                let mut url = azure_core::http::Url::parse(&format!(
733                    "{}/{}/{}/_apis/serviceendpoint/endpoints?",
734                    self.client.endpoint(),
735                    &self.organization,
736                    &self.project
737                ))?;
738                let has_api_version_already = url.query_pairs().any(|(k, _)| k == "api-version");
739                if !has_api_version_already {
740                    url.query_pairs_mut()
741                        .append_pair("api-version", "7.1-preview");
742                }
743                Ok(url)
744            }
745        }
746        impl std::future::IntoFuture for RequestBuilder {
747            type Output = azure_core::Result<models::ServiceEndpointList>;
748            type IntoFuture = BoxFuture<'static, azure_core::Result<models::ServiceEndpointList>>;
749            #[doc = "Returns a future that sends the request and returns the parsed response body."]
750            #[doc = ""]
751            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
752            #[doc = ""]
753            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
754            fn into_future(self) -> Self::IntoFuture {
755                Box::pin(async move { self.send().await?.into_body() })
756            }
757        }
758    }
759    pub mod create {
760        use super::models;
761        #[cfg(not(target_arch = "wasm32"))]
762        use futures::future::BoxFuture;
763        #[cfg(target_arch = "wasm32")]
764        use futures::future::LocalBoxFuture as BoxFuture;
765        #[derive(Debug)]
766        pub struct Response(
767            azure_core::http::Response<models::ServiceEndpoint, azure_core::http::JsonFormat>,
768        );
769        impl Response {
770            pub fn into_body(self) -> azure_core::Result<models::ServiceEndpoint> {
771                self.0.into_model()
772            }
773            pub fn into_raw_response(self) -> azure_core::http::RawResponse {
774                self.0.into()
775            }
776        }
777        #[derive(Clone)]
778        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
779        #[doc = r""]
780        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
781        #[doc = r" parameters can be chained."]
782        #[doc = r""]
783        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
784        #[doc = r" converts the [`RequestBuilder`] into a future,"]
785        #[doc = r" executes the request and returns a `Result` with the parsed"]
786        #[doc = r" response."]
787        #[doc = r""]
788        #[doc = r" If you need lower-level access to the raw response details"]
789        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
790        #[doc = r" can finalize the request using the"]
791        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
792        #[doc = r" that resolves to a lower-level [`Response`] value."]
793        pub struct RequestBuilder {
794            pub(crate) client: super::super::Client,
795            pub(crate) organization: String,
796            pub(crate) body: models::ServiceEndpoint,
797        }
798        impl RequestBuilder {
799            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
800            #[doc = ""]
801            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
802            #[doc = "However, this function can provide more flexibility when required."]
803            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
804                Box::pin({
805                    let this = self.clone();
806                    async move {
807                        let url = this.url()?;
808                        let mut req =
809                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
810                        if let Some(auth_header) = this
811                            .client
812                            .token_credential()
813                            .http_authorization_header(&this.client.scopes())
814                            .await?
815                        {
816                            req.insert_header(
817                                azure_core::http::headers::AUTHORIZATION,
818                                auth_header,
819                            );
820                        }
821                        req.insert_header("content-type", "application/json");
822                        let req_body = azure_core::json::to_json(&this.body)?;
823                        req.set_body(req_body);
824                        Ok(Response(this.client.send(&mut req).await?.into()))
825                    }
826                })
827            }
828            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
829                let mut url = azure_core::http::Url::parse(&format!(
830                    "{}/{}/_apis/serviceendpoint/endpoints",
831                    self.client.endpoint(),
832                    &self.organization
833                ))?;
834                let has_api_version_already = url.query_pairs().any(|(k, _)| k == "api-version");
835                if !has_api_version_already {
836                    url.query_pairs_mut()
837                        .append_pair("api-version", "7.1-preview");
838                }
839                Ok(url)
840            }
841        }
842        impl std::future::IntoFuture for RequestBuilder {
843            type Output = azure_core::Result<models::ServiceEndpoint>;
844            type IntoFuture = BoxFuture<'static, azure_core::Result<models::ServiceEndpoint>>;
845            #[doc = "Returns a future that sends the request and returns the parsed response body."]
846            #[doc = ""]
847            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
848            #[doc = ""]
849            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
850            fn into_future(self) -> Self::IntoFuture {
851                Box::pin(async move { self.send().await?.into_body() })
852            }
853        }
854    }
855    pub mod update_service_endpoints {
856        use super::models;
857        #[cfg(not(target_arch = "wasm32"))]
858        use futures::future::BoxFuture;
859        #[cfg(target_arch = "wasm32")]
860        use futures::future::LocalBoxFuture as BoxFuture;
861        #[derive(Debug)]
862        pub struct Response(
863            azure_core::http::Response<models::ServiceEndpointList, azure_core::http::JsonFormat>,
864        );
865        impl Response {
866            pub fn into_body(self) -> azure_core::Result<models::ServiceEndpointList> {
867                self.0.into_model()
868            }
869            pub fn into_raw_response(self) -> azure_core::http::RawResponse {
870                self.0.into()
871            }
872        }
873        #[derive(Clone)]
874        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
875        #[doc = r""]
876        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
877        #[doc = r" parameters can be chained."]
878        #[doc = r""]
879        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
880        #[doc = r" converts the [`RequestBuilder`] into a future,"]
881        #[doc = r" executes the request and returns a `Result` with the parsed"]
882        #[doc = r" response."]
883        #[doc = r""]
884        #[doc = r" If you need lower-level access to the raw response details"]
885        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
886        #[doc = r" can finalize the request using the"]
887        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
888        #[doc = r" that resolves to a lower-level [`Response`] value."]
889        pub struct RequestBuilder {
890            pub(crate) client: super::super::Client,
891            pub(crate) organization: String,
892            pub(crate) body: Vec<models::ServiceEndpoint>,
893        }
894        impl RequestBuilder {
895            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
896            #[doc = ""]
897            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
898            #[doc = "However, this function can provide more flexibility when required."]
899            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
900                Box::pin({
901                    let this = self.clone();
902                    async move {
903                        let url = this.url()?;
904                        let mut req =
905                            azure_core::http::Request::new(url, azure_core::http::Method::Put);
906                        if let Some(auth_header) = this
907                            .client
908                            .token_credential()
909                            .http_authorization_header(&this.client.scopes())
910                            .await?
911                        {
912                            req.insert_header(
913                                azure_core::http::headers::AUTHORIZATION,
914                                auth_header,
915                            );
916                        }
917                        req.insert_header("content-type", "application/json");
918                        let req_body = azure_core::json::to_json(&this.body)?;
919                        req.set_body(req_body);
920                        Ok(Response(this.client.send(&mut req).await?.into()))
921                    }
922                })
923            }
924            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
925                let mut url = azure_core::http::Url::parse(&format!(
926                    "{}/{}/_apis/serviceendpoint/endpoints",
927                    self.client.endpoint(),
928                    &self.organization
929                ))?;
930                let has_api_version_already = url.query_pairs().any(|(k, _)| k == "api-version");
931                if !has_api_version_already {
932                    url.query_pairs_mut()
933                        .append_pair("api-version", "7.1-preview");
934                }
935                Ok(url)
936            }
937        }
938        impl std::future::IntoFuture for RequestBuilder {
939            type Output = azure_core::Result<models::ServiceEndpointList>;
940            type IntoFuture = BoxFuture<'static, azure_core::Result<models::ServiceEndpointList>>;
941            #[doc = "Returns a future that sends the request and returns the parsed response body."]
942            #[doc = ""]
943            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
944            #[doc = ""]
945            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
946            fn into_future(self) -> Self::IntoFuture {
947                Box::pin(async move { self.send().await?.into_body() })
948            }
949        }
950    }
951    pub mod update_service_endpoint {
952        use super::models;
953        #[cfg(not(target_arch = "wasm32"))]
954        use futures::future::BoxFuture;
955        #[cfg(target_arch = "wasm32")]
956        use futures::future::LocalBoxFuture as BoxFuture;
957        #[derive(Debug)]
958        pub struct Response(
959            azure_core::http::Response<models::ServiceEndpoint, azure_core::http::JsonFormat>,
960        );
961        impl Response {
962            pub fn into_body(self) -> azure_core::Result<models::ServiceEndpoint> {
963                self.0.into_model()
964            }
965            pub fn into_raw_response(self) -> azure_core::http::RawResponse {
966                self.0.into()
967            }
968        }
969        #[derive(Clone)]
970        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
971        #[doc = r""]
972        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
973        #[doc = r" parameters can be chained."]
974        #[doc = r""]
975        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
976        #[doc = r" converts the [`RequestBuilder`] into a future,"]
977        #[doc = r" executes the request and returns a `Result` with the parsed"]
978        #[doc = r" response."]
979        #[doc = r""]
980        #[doc = r" If you need lower-level access to the raw response details"]
981        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
982        #[doc = r" can finalize the request using the"]
983        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
984        #[doc = r" that resolves to a lower-level [`Response`] value."]
985        pub struct RequestBuilder {
986            pub(crate) client: super::super::Client,
987            pub(crate) organization: String,
988            pub(crate) body: models::ServiceEndpoint,
989            pub(crate) endpoint_id: String,
990            pub(crate) operation: Option<String>,
991        }
992        impl RequestBuilder {
993            #[doc = "operation type"]
994            pub fn operation(mut self, operation: impl Into<String>) -> Self {
995                self.operation = Some(operation.into());
996                self
997            }
998            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
999            #[doc = ""]
1000            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1001            #[doc = "However, this function can provide more flexibility when required."]
1002            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1003                Box::pin({
1004                    let this = self.clone();
1005                    async move {
1006                        let url = this.url()?;
1007                        let mut req =
1008                            azure_core::http::Request::new(url, azure_core::http::Method::Put);
1009                        if let Some(auth_header) = this
1010                            .client
1011                            .token_credential()
1012                            .http_authorization_header(&this.client.scopes())
1013                            .await?
1014                        {
1015                            req.insert_header(
1016                                azure_core::http::headers::AUTHORIZATION,
1017                                auth_header,
1018                            );
1019                        }
1020                        req.insert_header("content-type", "application/json");
1021                        let req_body = azure_core::json::to_json(&this.body)?;
1022                        if let Some(operation) = &this.operation {
1023                            req.url_mut()
1024                                .query_pairs_mut()
1025                                .append_pair("operation", operation);
1026                        }
1027                        req.set_body(req_body);
1028                        Ok(Response(this.client.send(&mut req).await?.into()))
1029                    }
1030                })
1031            }
1032            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1033                let mut url = azure_core::http::Url::parse(&format!(
1034                    "{}/{}/_apis/serviceendpoint/endpoints/{}",
1035                    self.client.endpoint(),
1036                    &self.organization,
1037                    &self.endpoint_id
1038                ))?;
1039                let has_api_version_already = url.query_pairs().any(|(k, _)| k == "api-version");
1040                if !has_api_version_already {
1041                    url.query_pairs_mut()
1042                        .append_pair("api-version", "7.1-preview");
1043                }
1044                Ok(url)
1045            }
1046        }
1047        impl std::future::IntoFuture for RequestBuilder {
1048            type Output = azure_core::Result<models::ServiceEndpoint>;
1049            type IntoFuture = BoxFuture<'static, azure_core::Result<models::ServiceEndpoint>>;
1050            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1051            #[doc = ""]
1052            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1053            #[doc = ""]
1054            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1055            fn into_future(self) -> Self::IntoFuture {
1056                Box::pin(async move { self.send().await?.into_body() })
1057            }
1058        }
1059    }
1060    pub mod share_service_endpoint {
1061        use super::models;
1062        #[cfg(not(target_arch = "wasm32"))]
1063        use futures::future::BoxFuture;
1064        #[cfg(target_arch = "wasm32")]
1065        use futures::future::LocalBoxFuture as BoxFuture;
1066        #[derive(Debug)]
1067        pub struct Response(azure_core::http::Response<(), azure_core::http::NoFormat>);
1068        impl Response {
1069            pub fn into_raw_response(self) -> azure_core::http::RawResponse {
1070                self.0.into()
1071            }
1072        }
1073        #[derive(Clone)]
1074        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1075        #[doc = r""]
1076        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1077        #[doc = r" parameters can be chained."]
1078        #[doc = r""]
1079        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1080        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1081        #[doc = r" executes the request and returns a `Result` with the parsed"]
1082        #[doc = r" response."]
1083        #[doc = r""]
1084        #[doc = r" If you need lower-level access to the raw response details"]
1085        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1086        #[doc = r" can finalize the request using the"]
1087        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1088        #[doc = r" that resolves to a lower-level [`Response`] value."]
1089        pub struct RequestBuilder {
1090            pub(crate) client: super::super::Client,
1091            pub(crate) organization: String,
1092            pub(crate) body: Vec<models::ServiceEndpointProjectReference>,
1093            pub(crate) endpoint_id: String,
1094        }
1095        impl RequestBuilder {
1096            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1097            #[doc = ""]
1098            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1099            #[doc = "However, this function can provide more flexibility when required."]
1100            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1101                Box::pin({
1102                    let this = self.clone();
1103                    async move {
1104                        let url = this.url()?;
1105                        let mut req =
1106                            azure_core::http::Request::new(url, azure_core::http::Method::Patch);
1107                        if let Some(auth_header) = this
1108                            .client
1109                            .token_credential()
1110                            .http_authorization_header(&this.client.scopes())
1111                            .await?
1112                        {
1113                            req.insert_header(
1114                                azure_core::http::headers::AUTHORIZATION,
1115                                auth_header,
1116                            );
1117                        }
1118                        req.insert_header("content-type", "application/json");
1119                        let req_body = azure_core::json::to_json(&this.body)?;
1120                        req.set_body(req_body);
1121                        Ok(Response(this.client.send(&mut req).await?.into()))
1122                    }
1123                })
1124            }
1125            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1126                let mut url = azure_core::http::Url::parse(&format!(
1127                    "{}/{}/_apis/serviceendpoint/endpoints/{}",
1128                    self.client.endpoint(),
1129                    &self.organization,
1130                    &self.endpoint_id
1131                ))?;
1132                let has_api_version_already = url.query_pairs().any(|(k, _)| k == "api-version");
1133                if !has_api_version_already {
1134                    url.query_pairs_mut()
1135                        .append_pair("api-version", "7.1-preview");
1136                }
1137                Ok(url)
1138            }
1139        }
1140        impl std::future::IntoFuture for RequestBuilder {
1141            type Output = azure_core::Result<()>;
1142            type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
1143            #[doc = "Returns a future that sends the request and waits for the response."]
1144            #[doc = ""]
1145            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1146            #[doc = ""]
1147            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1148            fn into_future(self) -> Self::IntoFuture {
1149                Box::pin(async move {
1150                    let _rsp = self.send().await?;
1151                    Ok(())
1152                })
1153            }
1154        }
1155    }
1156    pub mod delete {
1157        use super::models;
1158        #[cfg(not(target_arch = "wasm32"))]
1159        use futures::future::BoxFuture;
1160        #[cfg(target_arch = "wasm32")]
1161        use futures::future::LocalBoxFuture as BoxFuture;
1162        #[derive(Debug)]
1163        pub struct Response(azure_core::http::Response<(), azure_core::http::NoFormat>);
1164        impl Response {
1165            pub fn into_raw_response(self) -> azure_core::http::RawResponse {
1166                self.0.into()
1167            }
1168        }
1169        #[derive(Clone)]
1170        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1171        #[doc = r""]
1172        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1173        #[doc = r" parameters can be chained."]
1174        #[doc = r""]
1175        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1176        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1177        #[doc = r" executes the request and returns a `Result` with the parsed"]
1178        #[doc = r" response."]
1179        #[doc = r""]
1180        #[doc = r" If you need lower-level access to the raw response details"]
1181        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1182        #[doc = r" can finalize the request using the"]
1183        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1184        #[doc = r" that resolves to a lower-level [`Response`] value."]
1185        pub struct RequestBuilder {
1186            pub(crate) client: super::super::Client,
1187            pub(crate) organization: String,
1188            pub(crate) endpoint_id: String,
1189            pub(crate) project_ids: String,
1190            pub(crate) deep: Option<bool>,
1191        }
1192        impl RequestBuilder {
1193            #[doc = "delete the spn created by endpoint"]
1194            pub fn deep(mut self, deep: bool) -> Self {
1195                self.deep = Some(deep);
1196                self
1197            }
1198            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1199            #[doc = ""]
1200            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1201            #[doc = "However, this function can provide more flexibility when required."]
1202            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1203                Box::pin({
1204                    let this = self.clone();
1205                    async move {
1206                        let url = this.url()?;
1207                        let mut req =
1208                            azure_core::http::Request::new(url, azure_core::http::Method::Delete);
1209                        if let Some(auth_header) = this
1210                            .client
1211                            .token_credential()
1212                            .http_authorization_header(&this.client.scopes())
1213                            .await?
1214                        {
1215                            req.insert_header(
1216                                azure_core::http::headers::AUTHORIZATION,
1217                                auth_header,
1218                            );
1219                        }
1220                        let project_ids = &this.project_ids;
1221                        req.url_mut()
1222                            .query_pairs_mut()
1223                            .append_pair("projectIds", project_ids);
1224                        if let Some(deep) = &this.deep {
1225                            req.url_mut()
1226                                .query_pairs_mut()
1227                                .append_pair("deep", &deep.to_string());
1228                        }
1229                        let req_body = azure_core::Bytes::new();
1230                        req.set_body(req_body);
1231                        Ok(Response(this.client.send(&mut req).await?.into()))
1232                    }
1233                })
1234            }
1235            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1236                let mut url = azure_core::http::Url::parse(&format!(
1237                    "{}/{}/_apis/serviceendpoint/endpoints/{}",
1238                    self.client.endpoint(),
1239                    &self.organization,
1240                    &self.endpoint_id
1241                ))?;
1242                let has_api_version_already = url.query_pairs().any(|(k, _)| k == "api-version");
1243                if !has_api_version_already {
1244                    url.query_pairs_mut()
1245                        .append_pair("api-version", "7.1-preview");
1246                }
1247                Ok(url)
1248            }
1249        }
1250        impl std::future::IntoFuture for RequestBuilder {
1251            type Output = azure_core::Result<()>;
1252            type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
1253            #[doc = "Returns a future that sends the request and waits for the response."]
1254            #[doc = ""]
1255            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1256            #[doc = ""]
1257            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1258            fn into_future(self) -> Self::IntoFuture {
1259                Box::pin(async move {
1260                    let _rsp = self.send().await?;
1261                    Ok(())
1262                })
1263            }
1264        }
1265    }
1266    pub mod get_service_endpoints_by_names {
1267        use super::models;
1268        #[cfg(not(target_arch = "wasm32"))]
1269        use futures::future::BoxFuture;
1270        #[cfg(target_arch = "wasm32")]
1271        use futures::future::LocalBoxFuture as BoxFuture;
1272        #[derive(Debug)]
1273        pub struct Response(
1274            azure_core::http::Response<models::ServiceEndpointList, azure_core::http::JsonFormat>,
1275        );
1276        impl Response {
1277            pub fn into_body(self) -> azure_core::Result<models::ServiceEndpointList> {
1278                self.0.into_model()
1279            }
1280            pub fn into_raw_response(self) -> azure_core::http::RawResponse {
1281                self.0.into()
1282            }
1283        }
1284        #[derive(Clone)]
1285        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1286        #[doc = r""]
1287        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1288        #[doc = r" parameters can be chained."]
1289        #[doc = r""]
1290        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1291        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1292        #[doc = r" executes the request and returns a `Result` with the parsed"]
1293        #[doc = r" response."]
1294        #[doc = r""]
1295        #[doc = r" If you need lower-level access to the raw response details"]
1296        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1297        #[doc = r" can finalize the request using the"]
1298        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1299        #[doc = r" that resolves to a lower-level [`Response`] value."]
1300        pub struct RequestBuilder {
1301            pub(crate) client: super::super::Client,
1302            pub(crate) organization: String,
1303            pub(crate) project: String,
1304            pub(crate) endpoint_names: String,
1305            pub(crate) type_: Option<String>,
1306            pub(crate) auth_schemes: Option<String>,
1307            pub(crate) owner: Option<String>,
1308            pub(crate) include_failed: Option<bool>,
1309            pub(crate) include_details: Option<bool>,
1310        }
1311        impl RequestBuilder {
1312            #[doc = "Type of the service endpoints."]
1313            pub fn type_(mut self, type_: impl Into<String>) -> Self {
1314                self.type_ = Some(type_.into());
1315                self
1316            }
1317            #[doc = "Authorization schemes used for service endpoints."]
1318            pub fn auth_schemes(mut self, auth_schemes: impl Into<String>) -> Self {
1319                self.auth_schemes = Some(auth_schemes.into());
1320                self
1321            }
1322            #[doc = "Owner for service endpoints."]
1323            pub fn owner(mut self, owner: impl Into<String>) -> Self {
1324                self.owner = Some(owner.into());
1325                self
1326            }
1327            #[doc = "Failed flag for service endpoints."]
1328            pub fn include_failed(mut self, include_failed: bool) -> Self {
1329                self.include_failed = Some(include_failed);
1330                self
1331            }
1332            #[doc = "Flag to include more details for service endpoints. This is for internal use only and the flag will be treated as false for all other requests"]
1333            pub fn include_details(mut self, include_details: bool) -> Self {
1334                self.include_details = Some(include_details);
1335                self
1336            }
1337            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1338            #[doc = ""]
1339            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1340            #[doc = "However, this function can provide more flexibility when required."]
1341            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1342                Box::pin({
1343                    let this = self.clone();
1344                    async move {
1345                        let url = this.url()?;
1346                        let mut req =
1347                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
1348                        if let Some(auth_header) = this
1349                            .client
1350                            .token_credential()
1351                            .http_authorization_header(&this.client.scopes())
1352                            .await?
1353                        {
1354                            req.insert_header(
1355                                azure_core::http::headers::AUTHORIZATION,
1356                                auth_header,
1357                            );
1358                        }
1359                        let endpoint_names = &this.endpoint_names;
1360                        req.url_mut()
1361                            .query_pairs_mut()
1362                            .append_pair("endpointNames", endpoint_names);
1363                        if let Some(type_) = &this.type_ {
1364                            req.url_mut().query_pairs_mut().append_pair("type", type_);
1365                        }
1366                        if let Some(auth_schemes) = &this.auth_schemes {
1367                            req.url_mut()
1368                                .query_pairs_mut()
1369                                .append_pair("authSchemes", auth_schemes);
1370                        }
1371                        if let Some(owner) = &this.owner {
1372                            req.url_mut().query_pairs_mut().append_pair("owner", owner);
1373                        }
1374                        if let Some(include_failed) = &this.include_failed {
1375                            req.url_mut()
1376                                .query_pairs_mut()
1377                                .append_pair("includeFailed", &include_failed.to_string());
1378                        }
1379                        if let Some(include_details) = &this.include_details {
1380                            req.url_mut()
1381                                .query_pairs_mut()
1382                                .append_pair("includeDetails", &include_details.to_string());
1383                        }
1384                        let req_body = azure_core::Bytes::new();
1385                        req.set_body(req_body);
1386                        Ok(Response(this.client.send(&mut req).await?.into()))
1387                    }
1388                })
1389            }
1390            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1391                let mut url = azure_core::http::Url::parse(&format!(
1392                    "{}/{}/{}/_apis/serviceendpoint/endpoints",
1393                    self.client.endpoint(),
1394                    &self.organization,
1395                    &self.project
1396                ))?;
1397                let has_api_version_already = url.query_pairs().any(|(k, _)| k == "api-version");
1398                if !has_api_version_already {
1399                    url.query_pairs_mut()
1400                        .append_pair("api-version", "7.1-preview");
1401                }
1402                Ok(url)
1403            }
1404        }
1405        impl std::future::IntoFuture for RequestBuilder {
1406            type Output = azure_core::Result<models::ServiceEndpointList>;
1407            type IntoFuture = BoxFuture<'static, azure_core::Result<models::ServiceEndpointList>>;
1408            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1409            #[doc = ""]
1410            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1411            #[doc = ""]
1412            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1413            fn into_future(self) -> Self::IntoFuture {
1414                Box::pin(async move { self.send().await?.into_body() })
1415            }
1416        }
1417    }
1418    pub mod get_service_endpoints_with_refreshed_authentication {
1419        use super::models;
1420        #[cfg(not(target_arch = "wasm32"))]
1421        use futures::future::BoxFuture;
1422        #[cfg(target_arch = "wasm32")]
1423        use futures::future::LocalBoxFuture as BoxFuture;
1424        #[derive(Debug)]
1425        pub struct Response(
1426            azure_core::http::Response<models::ServiceEndpointList, azure_core::http::JsonFormat>,
1427        );
1428        impl Response {
1429            pub fn into_body(self) -> azure_core::Result<models::ServiceEndpointList> {
1430                self.0.into_model()
1431            }
1432            pub fn into_raw_response(self) -> azure_core::http::RawResponse {
1433                self.0.into()
1434            }
1435        }
1436        #[derive(Clone)]
1437        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1438        #[doc = r""]
1439        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1440        #[doc = r" parameters can be chained."]
1441        #[doc = r""]
1442        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1443        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1444        #[doc = r" executes the request and returns a `Result` with the parsed"]
1445        #[doc = r" response."]
1446        #[doc = r""]
1447        #[doc = r" If you need lower-level access to the raw response details"]
1448        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1449        #[doc = r" can finalize the request using the"]
1450        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1451        #[doc = r" that resolves to a lower-level [`Response`] value."]
1452        pub struct RequestBuilder {
1453            pub(crate) client: super::super::Client,
1454            pub(crate) organization: String,
1455            pub(crate) body: Vec<models::RefreshAuthenticationParameters>,
1456            pub(crate) project: String,
1457            pub(crate) endpoint_ids: String,
1458        }
1459        impl RequestBuilder {
1460            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1461            #[doc = ""]
1462            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1463            #[doc = "However, this function can provide more flexibility when required."]
1464            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1465                Box::pin({
1466                    let this = self.clone();
1467                    async move {
1468                        let url = this.url()?;
1469                        let mut req =
1470                            azure_core::http::Request::new(url, azure_core::http::Method::Post);
1471                        if let Some(auth_header) = this
1472                            .client
1473                            .token_credential()
1474                            .http_authorization_header(&this.client.scopes())
1475                            .await?
1476                        {
1477                            req.insert_header(
1478                                azure_core::http::headers::AUTHORIZATION,
1479                                auth_header,
1480                            );
1481                        }
1482                        req.insert_header("content-type", "application/json");
1483                        let req_body = azure_core::json::to_json(&this.body)?;
1484                        let endpoint_ids = &this.endpoint_ids;
1485                        req.url_mut()
1486                            .query_pairs_mut()
1487                            .append_pair("endpointIds", endpoint_ids);
1488                        req.set_body(req_body);
1489                        Ok(Response(this.client.send(&mut req).await?.into()))
1490                    }
1491                })
1492            }
1493            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1494                let mut url = azure_core::http::Url::parse(&format!(
1495                    "{}/{}/{}/_apis/serviceendpoint/endpoints",
1496                    self.client.endpoint(),
1497                    &self.organization,
1498                    &self.project
1499                ))?;
1500                let has_api_version_already = url.query_pairs().any(|(k, _)| k == "api-version");
1501                if !has_api_version_already {
1502                    url.query_pairs_mut()
1503                        .append_pair("api-version", "7.1-preview");
1504                }
1505                Ok(url)
1506            }
1507        }
1508        impl std::future::IntoFuture for RequestBuilder {
1509            type Output = azure_core::Result<models::ServiceEndpointList>;
1510            type IntoFuture = BoxFuture<'static, azure_core::Result<models::ServiceEndpointList>>;
1511            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1512            #[doc = ""]
1513            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1514            #[doc = ""]
1515            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1516            fn into_future(self) -> Self::IntoFuture {
1517                Box::pin(async move { self.send().await?.into_body() })
1518            }
1519        }
1520    }
1521    pub mod get {
1522        use super::models;
1523        #[cfg(not(target_arch = "wasm32"))]
1524        use futures::future::BoxFuture;
1525        #[cfg(target_arch = "wasm32")]
1526        use futures::future::LocalBoxFuture as BoxFuture;
1527        #[derive(Debug)]
1528        pub struct Response(
1529            azure_core::http::Response<models::ServiceEndpoint, azure_core::http::JsonFormat>,
1530        );
1531        impl Response {
1532            pub fn into_body(self) -> azure_core::Result<models::ServiceEndpoint> {
1533                self.0.into_model()
1534            }
1535            pub fn into_raw_response(self) -> azure_core::http::RawResponse {
1536                self.0.into()
1537            }
1538        }
1539        #[derive(Clone)]
1540        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1541        #[doc = r""]
1542        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1543        #[doc = r" parameters can be chained."]
1544        #[doc = r""]
1545        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1546        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1547        #[doc = r" executes the request and returns a `Result` with the parsed"]
1548        #[doc = r" response."]
1549        #[doc = r""]
1550        #[doc = r" If you need lower-level access to the raw response details"]
1551        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1552        #[doc = r" can finalize the request using the"]
1553        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1554        #[doc = r" that resolves to a lower-level [`Response`] value."]
1555        pub struct RequestBuilder {
1556            pub(crate) client: super::super::Client,
1557            pub(crate) organization: String,
1558            pub(crate) project: String,
1559            pub(crate) endpoint_id: String,
1560            pub(crate) action_filter: Option<String>,
1561        }
1562        impl RequestBuilder {
1563            #[doc = "Action filter for the service connection. It specifies the action which can be performed on the service connection."]
1564            pub fn action_filter(mut self, action_filter: impl Into<String>) -> Self {
1565                self.action_filter = Some(action_filter.into());
1566                self
1567            }
1568            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1569            #[doc = ""]
1570            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1571            #[doc = "However, this function can provide more flexibility when required."]
1572            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1573                Box::pin({
1574                    let this = self.clone();
1575                    async move {
1576                        let url = this.url()?;
1577                        let mut req =
1578                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
1579                        if let Some(auth_header) = this
1580                            .client
1581                            .token_credential()
1582                            .http_authorization_header(&this.client.scopes())
1583                            .await?
1584                        {
1585                            req.insert_header(
1586                                azure_core::http::headers::AUTHORIZATION,
1587                                auth_header,
1588                            );
1589                        }
1590                        if let Some(action_filter) = &this.action_filter {
1591                            req.url_mut()
1592                                .query_pairs_mut()
1593                                .append_pair("actionFilter", action_filter);
1594                        }
1595                        let req_body = azure_core::Bytes::new();
1596                        req.set_body(req_body);
1597                        Ok(Response(this.client.send(&mut req).await?.into()))
1598                    }
1599                })
1600            }
1601            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1602                let mut url = azure_core::http::Url::parse(&format!(
1603                    "{}/{}/{}/_apis/serviceendpoint/endpoints/{}",
1604                    self.client.endpoint(),
1605                    &self.organization,
1606                    &self.project,
1607                    &self.endpoint_id
1608                ))?;
1609                let has_api_version_already = url.query_pairs().any(|(k, _)| k == "api-version");
1610                if !has_api_version_already {
1611                    url.query_pairs_mut()
1612                        .append_pair("api-version", "7.1-preview");
1613                }
1614                Ok(url)
1615            }
1616        }
1617        impl std::future::IntoFuture for RequestBuilder {
1618            type Output = azure_core::Result<models::ServiceEndpoint>;
1619            type IntoFuture = BoxFuture<'static, azure_core::Result<models::ServiceEndpoint>>;
1620            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1621            #[doc = ""]
1622            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1623            #[doc = ""]
1624            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1625            fn into_future(self) -> Self::IntoFuture {
1626                Box::pin(async move { self.send().await?.into_body() })
1627            }
1628        }
1629    }
1630}
1631pub mod types {
1632    use super::models;
1633    #[cfg(not(target_arch = "wasm32"))]
1634    use futures::future::BoxFuture;
1635    #[cfg(target_arch = "wasm32")]
1636    use futures::future::LocalBoxFuture as BoxFuture;
1637    pub struct Client(pub(crate) super::Client);
1638    impl Client {
1639        #[doc = "Get service endpoint types."]
1640        #[doc = ""]
1641        #[doc = "Arguments:"]
1642        #[doc = "* `organization`: The name of the Azure DevOps organization."]
1643        pub fn list(&self, organization: impl Into<String>) -> list::RequestBuilder {
1644            list::RequestBuilder {
1645                client: self.0.clone(),
1646                organization: organization.into(),
1647                type_: None,
1648                scheme: None,
1649            }
1650        }
1651    }
1652    pub mod list {
1653        use super::models;
1654        #[cfg(not(target_arch = "wasm32"))]
1655        use futures::future::BoxFuture;
1656        #[cfg(target_arch = "wasm32")]
1657        use futures::future::LocalBoxFuture as BoxFuture;
1658        #[derive(Debug)]
1659        pub struct Response(
1660            azure_core::http::Response<
1661                models::ServiceEndpointTypeList,
1662                azure_core::http::JsonFormat,
1663            >,
1664        );
1665        impl Response {
1666            pub fn into_body(self) -> azure_core::Result<models::ServiceEndpointTypeList> {
1667                self.0.into_model()
1668            }
1669            pub fn into_raw_response(self) -> azure_core::http::RawResponse {
1670                self.0.into()
1671            }
1672        }
1673        #[derive(Clone)]
1674        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1675        #[doc = r""]
1676        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1677        #[doc = r" parameters can be chained."]
1678        #[doc = r""]
1679        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1680        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1681        #[doc = r" executes the request and returns a `Result` with the parsed"]
1682        #[doc = r" response."]
1683        #[doc = r""]
1684        #[doc = r" If you need lower-level access to the raw response details"]
1685        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1686        #[doc = r" can finalize the request using the"]
1687        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1688        #[doc = r" that resolves to a lower-level [`Response`] value."]
1689        pub struct RequestBuilder {
1690            pub(crate) client: super::super::Client,
1691            pub(crate) organization: String,
1692            pub(crate) type_: Option<String>,
1693            pub(crate) scheme: Option<String>,
1694        }
1695        impl RequestBuilder {
1696            #[doc = "Type of service endpoint."]
1697            pub fn type_(mut self, type_: impl Into<String>) -> Self {
1698                self.type_ = Some(type_.into());
1699                self
1700            }
1701            #[doc = "Scheme of service endpoint."]
1702            pub fn scheme(mut self, scheme: impl Into<String>) -> Self {
1703                self.scheme = Some(scheme.into());
1704                self
1705            }
1706            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1707            #[doc = ""]
1708            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1709            #[doc = "However, this function can provide more flexibility when required."]
1710            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1711                Box::pin({
1712                    let this = self.clone();
1713                    async move {
1714                        let url = this.url()?;
1715                        let mut req =
1716                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
1717                        if let Some(auth_header) = this
1718                            .client
1719                            .token_credential()
1720                            .http_authorization_header(&this.client.scopes())
1721                            .await?
1722                        {
1723                            req.insert_header(
1724                                azure_core::http::headers::AUTHORIZATION,
1725                                auth_header,
1726                            );
1727                        }
1728                        if let Some(type_) = &this.type_ {
1729                            req.url_mut().query_pairs_mut().append_pair("type", type_);
1730                        }
1731                        if let Some(scheme) = &this.scheme {
1732                            req.url_mut()
1733                                .query_pairs_mut()
1734                                .append_pair("scheme", scheme);
1735                        }
1736                        let req_body = azure_core::Bytes::new();
1737                        req.set_body(req_body);
1738                        Ok(Response(this.client.send(&mut req).await?.into()))
1739                    }
1740                })
1741            }
1742            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1743                let mut url = azure_core::http::Url::parse(&format!(
1744                    "{}/{}/_apis/serviceendpoint/types",
1745                    self.client.endpoint(),
1746                    &self.organization
1747                ))?;
1748                let has_api_version_already = url.query_pairs().any(|(k, _)| k == "api-version");
1749                if !has_api_version_already {
1750                    url.query_pairs_mut()
1751                        .append_pair("api-version", "7.1-preview");
1752                }
1753                Ok(url)
1754            }
1755        }
1756        impl std::future::IntoFuture for RequestBuilder {
1757            type Output = azure_core::Result<models::ServiceEndpointTypeList>;
1758            type IntoFuture =
1759                BoxFuture<'static, azure_core::Result<models::ServiceEndpointTypeList>>;
1760            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1761            #[doc = ""]
1762            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1763            #[doc = ""]
1764            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1765            fn into_future(self) -> Self::IntoFuture {
1766                Box::pin(async move { self.send().await?.into_body() })
1767            }
1768        }
1769    }
1770}
1771pub mod executionhistory {
1772    use super::models;
1773    #[cfg(not(target_arch = "wasm32"))]
1774    use futures::future::BoxFuture;
1775    #[cfg(target_arch = "wasm32")]
1776    use futures::future::LocalBoxFuture as BoxFuture;
1777    pub struct Client(pub(crate) super::Client);
1778    impl Client {
1779        #[doc = "Get service endpoint execution records."]
1780        #[doc = ""]
1781        #[doc = "Arguments:"]
1782        #[doc = "* `organization`: The name of the Azure DevOps organization."]
1783        #[doc = "* `project`: Project ID or project name"]
1784        #[doc = "* `endpoint_id`: Id of the service endpoint."]
1785        pub fn list(
1786            &self,
1787            organization: impl Into<String>,
1788            project: impl Into<String>,
1789            endpoint_id: impl Into<String>,
1790        ) -> list::RequestBuilder {
1791            list::RequestBuilder {
1792                client: self.0.clone(),
1793                organization: organization.into(),
1794                project: project.into(),
1795                endpoint_id: endpoint_id.into(),
1796                top: None,
1797                continuation_token: None,
1798            }
1799        }
1800    }
1801    pub mod list {
1802        use super::models;
1803        #[cfg(not(target_arch = "wasm32"))]
1804        use futures::future::BoxFuture;
1805        #[cfg(target_arch = "wasm32")]
1806        use futures::future::LocalBoxFuture as BoxFuture;
1807        #[derive(Debug)]
1808        pub struct Response(
1809            azure_core::http::Response<
1810                models::ServiceEndpointExecutionRecordList,
1811                azure_core::http::JsonFormat,
1812            >,
1813        );
1814        impl Response {
1815            pub fn into_body(
1816                self,
1817            ) -> azure_core::Result<models::ServiceEndpointExecutionRecordList> {
1818                self.0.into_model()
1819            }
1820            pub fn into_raw_response(self) -> azure_core::http::RawResponse {
1821                self.0.into()
1822            }
1823        }
1824        #[derive(Clone)]
1825        #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1826        #[doc = r""]
1827        #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1828        #[doc = r" parameters can be chained."]
1829        #[doc = r""]
1830        #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1831        #[doc = r" converts the [`RequestBuilder`] into a future,"]
1832        #[doc = r" executes the request and returns a `Result` with the parsed"]
1833        #[doc = r" response."]
1834        #[doc = r""]
1835        #[doc = r" If you need lower-level access to the raw response details"]
1836        #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1837        #[doc = r" can finalize the request using the"]
1838        #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1839        #[doc = r" that resolves to a lower-level [`Response`] value."]
1840        pub struct RequestBuilder {
1841            pub(crate) client: super::super::Client,
1842            pub(crate) organization: String,
1843            pub(crate) project: String,
1844            pub(crate) endpoint_id: String,
1845            pub(crate) top: Option<i32>,
1846            pub(crate) continuation_token: Option<i64>,
1847        }
1848        impl RequestBuilder {
1849            #[doc = "Number of service endpoint execution records to get."]
1850            pub fn top(mut self, top: i32) -> Self {
1851                self.top = Some(top);
1852                self
1853            }
1854            #[doc = "A continuation token, returned by a previous call to this method, that can be used to return the next set of records"]
1855            pub fn continuation_token(mut self, continuation_token: i64) -> Self {
1856                self.continuation_token = Some(continuation_token);
1857                self
1858            }
1859            #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1860            #[doc = ""]
1861            #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1862            #[doc = "However, this function can provide more flexibility when required."]
1863            pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1864                Box::pin({
1865                    let this = self.clone();
1866                    async move {
1867                        let url = this.url()?;
1868                        let mut req =
1869                            azure_core::http::Request::new(url, azure_core::http::Method::Get);
1870                        if let Some(auth_header) = this
1871                            .client
1872                            .token_credential()
1873                            .http_authorization_header(&this.client.scopes())
1874                            .await?
1875                        {
1876                            req.insert_header(
1877                                azure_core::http::headers::AUTHORIZATION,
1878                                auth_header,
1879                            );
1880                        }
1881                        if let Some(top) = &this.top {
1882                            req.url_mut()
1883                                .query_pairs_mut()
1884                                .append_pair("top", &top.to_string());
1885                        }
1886                        if let Some(continuation_token) = &this.continuation_token {
1887                            req.url_mut()
1888                                .query_pairs_mut()
1889                                .append_pair("continuationToken", &continuation_token.to_string());
1890                        }
1891                        let req_body = azure_core::Bytes::new();
1892                        req.set_body(req_body);
1893                        Ok(Response(this.client.send(&mut req).await?.into()))
1894                    }
1895                })
1896            }
1897            fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1898                let mut url = azure_core::http::Url::parse(&format!(
1899                    "{}/{}/{}/_apis/serviceendpoint/{}/executionhistory",
1900                    self.client.endpoint(),
1901                    &self.organization,
1902                    &self.project,
1903                    &self.endpoint_id
1904                ))?;
1905                let has_api_version_already = url.query_pairs().any(|(k, _)| k == "api-version");
1906                if !has_api_version_already {
1907                    url.query_pairs_mut()
1908                        .append_pair("api-version", "7.1-preview");
1909                }
1910                Ok(url)
1911            }
1912        }
1913        impl std::future::IntoFuture for RequestBuilder {
1914            type Output = azure_core::Result<models::ServiceEndpointExecutionRecordList>;
1915            type IntoFuture =
1916                BoxFuture<'static, azure_core::Result<models::ServiceEndpointExecutionRecordList>>;
1917            #[doc = "Returns a future that sends the request and returns the parsed response body."]
1918            #[doc = ""]
1919            #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1920            #[doc = ""]
1921            #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1922            fn into_future(self) -> Self::IntoFuture {
1923                Box::pin(async move { self.send().await?.into_body() })
1924            }
1925        }
1926    }
1927}