1#![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 = Some(retry.into());
52 self
53 }
54 #[doc = "Set the transport options."]
55 #[must_use]
56 pub fn transport(mut self, transport: impl Into<azure_core::http::TransportOptions>) -> Self {
57 self.options.transport = Some(transport.into());
58 self
59 }
60 #[doc = "Set per-call policies."]
61 #[must_use]
62 pub fn per_call_policies(
63 mut self,
64 policies: impl Into<Vec<std::sync::Arc<dyn azure_core::http::policies::Policy>>>,
65 ) -> Self {
66 self.options.per_call_policies = policies.into();
67 self
68 }
69 #[doc = "Set per-try policies."]
70 #[must_use]
71 pub fn per_try_policies(
72 mut self,
73 policies: impl Into<Vec<std::sync::Arc<dyn azure_core::http::policies::Policy>>>,
74 ) -> Self {
75 self.options.per_try_policies = policies.into();
76 self
77 }
78 #[doc = "Convert the builder into a `Client` instance."]
79 pub fn build(self) -> Client {
80 let endpoint = self.endpoint.unwrap_or_else(|| DEFAULT_ENDPOINT.to_owned());
81 let scopes = self
82 .scopes
83 .unwrap_or_else(|| vec![crate::ADO_SCOPE.to_string()]);
84 Client::new(endpoint, self.credential, scopes, self.options)
85 }
86}
87impl Client {
88 pub(crate) fn endpoint(&self) -> &azure_core::http::Url {
89 &self.endpoint
90 }
91 pub(crate) fn token_credential(&self) -> &crate::Credential {
92 &self.credential
93 }
94 pub(crate) fn scopes(&self) -> Vec<&str> {
95 self.scopes.iter().map(String::as_str).collect()
96 }
97 pub(crate) async fn send(
98 &self,
99 request: &mut azure_core::http::Request,
100 ) -> azure_core::Result<azure_core::http::BufResponse> {
101 let context = azure_core::http::Context::default();
102 self.pipeline.send(&context, request).await
103 }
104 #[doc = "Create a new `ClientBuilder`."]
105 #[must_use]
106 pub fn builder(credential: crate::Credential) -> ClientBuilder {
107 ClientBuilder::new(credential)
108 }
109 #[doc = "Create a new `Client`."]
110 #[must_use]
111 pub fn new(
112 endpoint: impl Into<azure_core::http::Url>,
113 credential: crate::Credential,
114 scopes: Vec<String>,
115 options: azure_core::http::ClientOptions,
116 ) -> Self {
117 let endpoint = endpoint.into();
118 let pipeline = azure_core::http::Pipeline::new(
119 option_env!("CARGO_PKG_NAME"),
120 option_env!("CARGO_PKG_VERSION"),
121 options,
122 Vec::new(),
123 Vec::new(),
124 None,
125 );
126 Self {
127 endpoint,
128 credential,
129 scopes,
130 pipeline,
131 }
132 }
133 pub fn backlogconfiguration_client(&self) -> backlogconfiguration::Client {
134 backlogconfiguration::Client(self.clone())
135 }
136 pub fn backlogs_client(&self) -> backlogs::Client {
137 backlogs::Client(self.clone())
138 }
139 pub fn boardcolumns_client(&self) -> boardcolumns::Client {
140 boardcolumns::Client(self.clone())
141 }
142 pub fn boardparents_client(&self) -> boardparents::Client {
143 boardparents::Client(self.clone())
144 }
145 pub fn boardrows_client(&self) -> boardrows::Client {
146 boardrows::Client(self.clone())
147 }
148 pub fn boards_client(&self) -> boards::Client {
149 boards::Client(self.clone())
150 }
151 pub fn boardusersettings_client(&self) -> boardusersettings::Client {
152 boardusersettings::Client(self.clone())
153 }
154 pub fn capacities_client(&self) -> capacities::Client {
155 capacities::Client(self.clone())
156 }
157 pub fn cardrulesettings_client(&self) -> cardrulesettings::Client {
158 cardrulesettings::Client(self.clone())
159 }
160 pub fn cardsettings_client(&self) -> cardsettings::Client {
161 cardsettings::Client(self.clone())
162 }
163 pub fn chartimages_client(&self) -> chartimages::Client {
164 chartimages::Client(self.clone())
165 }
166 pub fn charts_client(&self) -> charts::Client {
167 charts::Client(self.clone())
168 }
169 pub fn columns_client(&self) -> columns::Client {
170 columns::Client(self.clone())
171 }
172 pub fn deliverytimeline_client(&self) -> deliverytimeline::Client {
173 deliverytimeline::Client(self.clone())
174 }
175 pub fn iterationcapacities_client(&self) -> iterationcapacities::Client {
176 iterationcapacities::Client(self.clone())
177 }
178 pub fn iterations_client(&self) -> iterations::Client {
179 iterations::Client(self.clone())
180 }
181 pub fn plans_client(&self) -> plans::Client {
182 plans::Client(self.clone())
183 }
184 pub fn processconfiguration_client(&self) -> processconfiguration::Client {
185 processconfiguration::Client(self.clone())
186 }
187 pub fn rows_client(&self) -> rows::Client {
188 rows::Client(self.clone())
189 }
190 pub fn taskboard_columns_client(&self) -> taskboard_columns::Client {
191 taskboard_columns::Client(self.clone())
192 }
193 pub fn taskboard_work_items_client(&self) -> taskboard_work_items::Client {
194 taskboard_work_items::Client(self.clone())
195 }
196 pub fn teamdaysoff_client(&self) -> teamdaysoff::Client {
197 teamdaysoff::Client(self.clone())
198 }
199 pub fn teamfieldvalues_client(&self) -> teamfieldvalues::Client {
200 teamfieldvalues::Client(self.clone())
201 }
202 pub fn teamsettings_client(&self) -> teamsettings::Client {
203 teamsettings::Client(self.clone())
204 }
205 pub fn workitemsorder_client(&self) -> workitemsorder::Client {
206 workitemsorder::Client(self.clone())
207 }
208}
209pub mod boardcolumns {
210 use super::models;
211 #[cfg(not(target_arch = "wasm32"))]
212 use futures::future::BoxFuture;
213 #[cfg(target_arch = "wasm32")]
214 use futures::future::LocalBoxFuture as BoxFuture;
215 pub struct Client(pub(crate) super::Client);
216 impl Client {
217 #[doc = "Get available board columns in a project"]
218 #[doc = ""]
219 #[doc = "Arguments:"]
220 #[doc = "* `organization`: The name of the Azure DevOps organization."]
221 #[doc = "* `project`: Project ID or project name"]
222 pub fn list(
223 &self,
224 organization: impl Into<String>,
225 project: impl Into<String>,
226 ) -> list::RequestBuilder {
227 list::RequestBuilder {
228 client: self.0.clone(),
229 organization: organization.into(),
230 project: project.into(),
231 }
232 }
233 }
234 pub mod list {
235 use super::models;
236 #[cfg(not(target_arch = "wasm32"))]
237 use futures::future::BoxFuture;
238 #[cfg(target_arch = "wasm32")]
239 use futures::future::LocalBoxFuture as BoxFuture;
240 #[derive(Debug)]
241 pub struct Response(
242 azure_core::http::Response<
243 models::BoardSuggestedValueList,
244 azure_core::http::JsonFormat,
245 >,
246 );
247 impl Response {
248 pub async fn into_body(self) -> azure_core::Result<models::BoardSuggestedValueList> {
249 self.0.into_body().await
250 }
251 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
252 self.0.into()
253 }
254 }
255 #[derive(Clone)]
256 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
257 #[doc = r""]
258 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
259 #[doc = r" parameters can be chained."]
260 #[doc = r""]
261 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
262 #[doc = r" converts the [`RequestBuilder`] into a future,"]
263 #[doc = r" executes the request and returns a `Result` with the parsed"]
264 #[doc = r" response."]
265 #[doc = r""]
266 #[doc = r" If you need lower-level access to the raw response details"]
267 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
268 #[doc = r" can finalize the request using the"]
269 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
270 #[doc = r" that resolves to a lower-level [`Response`] value."]
271 pub struct RequestBuilder {
272 pub(crate) client: super::super::Client,
273 pub(crate) organization: String,
274 pub(crate) project: String,
275 }
276 impl RequestBuilder {
277 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
278 #[doc = ""]
279 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
280 #[doc = "However, this function can provide more flexibility when required."]
281 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
282 Box::pin({
283 let this = self.clone();
284 async move {
285 let url = this.url()?;
286 let mut req =
287 azure_core::http::Request::new(url, azure_core::http::Method::Get);
288 if let Some(auth_header) = this
289 .client
290 .token_credential()
291 .http_authorization_header(&this.client.scopes())
292 .await?
293 {
294 req.insert_header(
295 azure_core::http::headers::AUTHORIZATION,
296 auth_header,
297 );
298 }
299 let req_body = azure_core::Bytes::new();
300 req.set_body(req_body);
301 Ok(Response(this.client.send(&mut req).await?.into()))
302 }
303 })
304 }
305 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
306 let mut url = azure_core::http::Url::parse(&format!(
307 "{}/{}/{}/_apis/work/boardcolumns",
308 self.client.endpoint(),
309 &self.organization,
310 &self.project
311 ))?;
312 let has_api_version_already = url
313 .query_pairs()
314 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
315 if !has_api_version_already {
316 url.query_pairs_mut().append_pair(
317 azure_core::http::headers::query_param::API_VERSION,
318 "7.1-preview",
319 );
320 }
321 Ok(url)
322 }
323 }
324 impl std::future::IntoFuture for RequestBuilder {
325 type Output = azure_core::Result<models::BoardSuggestedValueList>;
326 type IntoFuture =
327 BoxFuture<'static, azure_core::Result<models::BoardSuggestedValueList>>;
328 #[doc = "Returns a future that sends the request and returns the parsed response body."]
329 #[doc = ""]
330 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
331 #[doc = ""]
332 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
333 fn into_future(self) -> Self::IntoFuture {
334 Box::pin(async move { self.send().await?.into_body().await })
335 }
336 }
337 }
338}
339pub mod boardrows {
340 use super::models;
341 #[cfg(not(target_arch = "wasm32"))]
342 use futures::future::BoxFuture;
343 #[cfg(target_arch = "wasm32")]
344 use futures::future::LocalBoxFuture as BoxFuture;
345 pub struct Client(pub(crate) super::Client);
346 impl Client {
347 #[doc = "Get available board rows in a project"]
348 #[doc = ""]
349 #[doc = "Arguments:"]
350 #[doc = "* `organization`: The name of the Azure DevOps organization."]
351 #[doc = "* `project`: Project ID or project name"]
352 pub fn list(
353 &self,
354 organization: impl Into<String>,
355 project: impl Into<String>,
356 ) -> list::RequestBuilder {
357 list::RequestBuilder {
358 client: self.0.clone(),
359 organization: organization.into(),
360 project: project.into(),
361 }
362 }
363 }
364 pub mod list {
365 use super::models;
366 #[cfg(not(target_arch = "wasm32"))]
367 use futures::future::BoxFuture;
368 #[cfg(target_arch = "wasm32")]
369 use futures::future::LocalBoxFuture as BoxFuture;
370 #[derive(Debug)]
371 pub struct Response(
372 azure_core::http::Response<
373 models::BoardSuggestedValueList,
374 azure_core::http::JsonFormat,
375 >,
376 );
377 impl Response {
378 pub async fn into_body(self) -> azure_core::Result<models::BoardSuggestedValueList> {
379 self.0.into_body().await
380 }
381 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
382 self.0.into()
383 }
384 }
385 #[derive(Clone)]
386 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
387 #[doc = r""]
388 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
389 #[doc = r" parameters can be chained."]
390 #[doc = r""]
391 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
392 #[doc = r" converts the [`RequestBuilder`] into a future,"]
393 #[doc = r" executes the request and returns a `Result` with the parsed"]
394 #[doc = r" response."]
395 #[doc = r""]
396 #[doc = r" If you need lower-level access to the raw response details"]
397 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
398 #[doc = r" can finalize the request using the"]
399 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
400 #[doc = r" that resolves to a lower-level [`Response`] value."]
401 pub struct RequestBuilder {
402 pub(crate) client: super::super::Client,
403 pub(crate) organization: String,
404 pub(crate) project: String,
405 }
406 impl RequestBuilder {
407 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
408 #[doc = ""]
409 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
410 #[doc = "However, this function can provide more flexibility when required."]
411 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
412 Box::pin({
413 let this = self.clone();
414 async move {
415 let url = this.url()?;
416 let mut req =
417 azure_core::http::Request::new(url, azure_core::http::Method::Get);
418 if let Some(auth_header) = this
419 .client
420 .token_credential()
421 .http_authorization_header(&this.client.scopes())
422 .await?
423 {
424 req.insert_header(
425 azure_core::http::headers::AUTHORIZATION,
426 auth_header,
427 );
428 }
429 let req_body = azure_core::Bytes::new();
430 req.set_body(req_body);
431 Ok(Response(this.client.send(&mut req).await?.into()))
432 }
433 })
434 }
435 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
436 let mut url = azure_core::http::Url::parse(&format!(
437 "{}/{}/{}/_apis/work/boardrows",
438 self.client.endpoint(),
439 &self.organization,
440 &self.project
441 ))?;
442 let has_api_version_already = url
443 .query_pairs()
444 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
445 if !has_api_version_already {
446 url.query_pairs_mut().append_pair(
447 azure_core::http::headers::query_param::API_VERSION,
448 "7.1-preview",
449 );
450 }
451 Ok(url)
452 }
453 }
454 impl std::future::IntoFuture for RequestBuilder {
455 type Output = azure_core::Result<models::BoardSuggestedValueList>;
456 type IntoFuture =
457 BoxFuture<'static, azure_core::Result<models::BoardSuggestedValueList>>;
458 #[doc = "Returns a future that sends the request and returns the parsed response body."]
459 #[doc = ""]
460 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
461 #[doc = ""]
462 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
463 fn into_future(self) -> Self::IntoFuture {
464 Box::pin(async move { self.send().await?.into_body().await })
465 }
466 }
467 }
468}
469pub mod iterationcapacities {
470 use super::models;
471 #[cfg(not(target_arch = "wasm32"))]
472 use futures::future::BoxFuture;
473 #[cfg(target_arch = "wasm32")]
474 use futures::future::LocalBoxFuture as BoxFuture;
475 pub struct Client(pub(crate) super::Client);
476 impl Client {
477 #[doc = "Get an iteration's capacity for all teams in iteration"]
478 #[doc = ""]
479 #[doc = "Arguments:"]
480 #[doc = "* `organization`: The name of the Azure DevOps organization."]
481 #[doc = "* `project`: Project ID or project name"]
482 #[doc = "* `iteration_id`: ID of the iteration"]
483 pub fn get(
484 &self,
485 organization: impl Into<String>,
486 project: impl Into<String>,
487 iteration_id: impl Into<String>,
488 ) -> get::RequestBuilder {
489 get::RequestBuilder {
490 client: self.0.clone(),
491 organization: organization.into(),
492 project: project.into(),
493 iteration_id: iteration_id.into(),
494 }
495 }
496 }
497 pub mod get {
498 use super::models;
499 #[cfg(not(target_arch = "wasm32"))]
500 use futures::future::BoxFuture;
501 #[cfg(target_arch = "wasm32")]
502 use futures::future::LocalBoxFuture as BoxFuture;
503 #[derive(Debug)]
504 pub struct Response(
505 azure_core::http::Response<models::IterationCapacity, azure_core::http::JsonFormat>,
506 );
507 impl Response {
508 pub async fn into_body(self) -> azure_core::Result<models::IterationCapacity> {
509 self.0.into_body().await
510 }
511 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
512 self.0.into()
513 }
514 }
515 #[derive(Clone)]
516 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
517 #[doc = r""]
518 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
519 #[doc = r" parameters can be chained."]
520 #[doc = r""]
521 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
522 #[doc = r" converts the [`RequestBuilder`] into a future,"]
523 #[doc = r" executes the request and returns a `Result` with the parsed"]
524 #[doc = r" response."]
525 #[doc = r""]
526 #[doc = r" If you need lower-level access to the raw response details"]
527 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
528 #[doc = r" can finalize the request using the"]
529 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
530 #[doc = r" that resolves to a lower-level [`Response`] value."]
531 pub struct RequestBuilder {
532 pub(crate) client: super::super::Client,
533 pub(crate) organization: String,
534 pub(crate) project: String,
535 pub(crate) iteration_id: String,
536 }
537 impl RequestBuilder {
538 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
539 #[doc = ""]
540 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
541 #[doc = "However, this function can provide more flexibility when required."]
542 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
543 Box::pin({
544 let this = self.clone();
545 async move {
546 let url = this.url()?;
547 let mut req =
548 azure_core::http::Request::new(url, azure_core::http::Method::Get);
549 if let Some(auth_header) = this
550 .client
551 .token_credential()
552 .http_authorization_header(&this.client.scopes())
553 .await?
554 {
555 req.insert_header(
556 azure_core::http::headers::AUTHORIZATION,
557 auth_header,
558 );
559 }
560 let req_body = azure_core::Bytes::new();
561 req.set_body(req_body);
562 Ok(Response(this.client.send(&mut req).await?.into()))
563 }
564 })
565 }
566 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
567 let mut url = azure_core::http::Url::parse(&format!(
568 "{}/{}/{}/_apis/work/iterations/{}/iterationcapacities",
569 self.client.endpoint(),
570 &self.organization,
571 &self.project,
572 &self.iteration_id
573 ))?;
574 let has_api_version_already = url
575 .query_pairs()
576 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
577 if !has_api_version_already {
578 url.query_pairs_mut().append_pair(
579 azure_core::http::headers::query_param::API_VERSION,
580 "7.1-preview",
581 );
582 }
583 Ok(url)
584 }
585 }
586 impl std::future::IntoFuture for RequestBuilder {
587 type Output = azure_core::Result<models::IterationCapacity>;
588 type IntoFuture = BoxFuture<'static, azure_core::Result<models::IterationCapacity>>;
589 #[doc = "Returns a future that sends the request and returns the parsed response body."]
590 #[doc = ""]
591 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
592 #[doc = ""]
593 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
594 fn into_future(self) -> Self::IntoFuture {
595 Box::pin(async move { self.send().await?.into_body().await })
596 }
597 }
598 }
599}
600pub mod plans {
601 use super::models;
602 #[cfg(not(target_arch = "wasm32"))]
603 use futures::future::BoxFuture;
604 #[cfg(target_arch = "wasm32")]
605 use futures::future::LocalBoxFuture as BoxFuture;
606 pub struct Client(pub(crate) super::Client);
607 impl Client {
608 #[doc = "Get the information for all the plans configured for the given team"]
609 #[doc = ""]
610 #[doc = "Arguments:"]
611 #[doc = "* `organization`: The name of the Azure DevOps organization."]
612 #[doc = "* `project`: Project ID or project name"]
613 pub fn list(
614 &self,
615 organization: impl Into<String>,
616 project: impl Into<String>,
617 ) -> list::RequestBuilder {
618 list::RequestBuilder {
619 client: self.0.clone(),
620 organization: organization.into(),
621 project: project.into(),
622 }
623 }
624 #[doc = "Add a new plan for the team"]
625 #[doc = ""]
626 #[doc = "Arguments:"]
627 #[doc = "* `organization`: The name of the Azure DevOps organization."]
628 #[doc = "* `body`: Plan definition"]
629 #[doc = "* `project`: Project ID or project name"]
630 pub fn create(
631 &self,
632 organization: impl Into<String>,
633 body: impl Into<models::CreatePlan>,
634 project: impl Into<String>,
635 ) -> create::RequestBuilder {
636 create::RequestBuilder {
637 client: self.0.clone(),
638 organization: organization.into(),
639 body: body.into(),
640 project: project.into(),
641 }
642 }
643 #[doc = "Get the information for the specified plan"]
644 #[doc = ""]
645 #[doc = "Arguments:"]
646 #[doc = "* `organization`: The name of the Azure DevOps organization."]
647 #[doc = "* `project`: Project ID or project name"]
648 #[doc = "* `id`: Identifier of the plan"]
649 pub fn get(
650 &self,
651 organization: impl Into<String>,
652 project: impl Into<String>,
653 id: impl Into<String>,
654 ) -> get::RequestBuilder {
655 get::RequestBuilder {
656 client: self.0.clone(),
657 organization: organization.into(),
658 project: project.into(),
659 id: id.into(),
660 }
661 }
662 #[doc = "Update the information for the specified plan"]
663 #[doc = ""]
664 #[doc = "Arguments:"]
665 #[doc = "* `organization`: The name of the Azure DevOps organization."]
666 #[doc = "* `body`: Plan definition to be updated"]
667 #[doc = "* `project`: Project ID or project name"]
668 #[doc = "* `id`: Identifier of the plan"]
669 pub fn update(
670 &self,
671 organization: impl Into<String>,
672 body: impl Into<models::UpdatePlan>,
673 project: impl Into<String>,
674 id: impl Into<String>,
675 ) -> update::RequestBuilder {
676 update::RequestBuilder {
677 client: self.0.clone(),
678 organization: organization.into(),
679 body: body.into(),
680 project: project.into(),
681 id: id.into(),
682 }
683 }
684 #[doc = "Delete the specified plan"]
685 #[doc = ""]
686 #[doc = "Arguments:"]
687 #[doc = "* `organization`: The name of the Azure DevOps organization."]
688 #[doc = "* `project`: Project ID or project name"]
689 #[doc = "* `id`: Identifier of the plan"]
690 pub fn delete(
691 &self,
692 organization: impl Into<String>,
693 project: impl Into<String>,
694 id: impl Into<String>,
695 ) -> delete::RequestBuilder {
696 delete::RequestBuilder {
697 client: self.0.clone(),
698 organization: organization.into(),
699 project: project.into(),
700 id: id.into(),
701 }
702 }
703 }
704 pub mod list {
705 use super::models;
706 #[cfg(not(target_arch = "wasm32"))]
707 use futures::future::BoxFuture;
708 #[cfg(target_arch = "wasm32")]
709 use futures::future::LocalBoxFuture as BoxFuture;
710 #[derive(Debug)]
711 pub struct Response(
712 azure_core::http::Response<models::PlanList, azure_core::http::JsonFormat>,
713 );
714 impl Response {
715 pub async fn into_body(self) -> azure_core::Result<models::PlanList> {
716 self.0.into_body().await
717 }
718 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
719 self.0.into()
720 }
721 }
722 #[derive(Clone)]
723 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
724 #[doc = r""]
725 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
726 #[doc = r" parameters can be chained."]
727 #[doc = r""]
728 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
729 #[doc = r" converts the [`RequestBuilder`] into a future,"]
730 #[doc = r" executes the request and returns a `Result` with the parsed"]
731 #[doc = r" response."]
732 #[doc = r""]
733 #[doc = r" If you need lower-level access to the raw response details"]
734 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
735 #[doc = r" can finalize the request using the"]
736 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
737 #[doc = r" that resolves to a lower-level [`Response`] value."]
738 pub struct RequestBuilder {
739 pub(crate) client: super::super::Client,
740 pub(crate) organization: String,
741 pub(crate) project: String,
742 }
743 impl RequestBuilder {
744 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
745 #[doc = ""]
746 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
747 #[doc = "However, this function can provide more flexibility when required."]
748 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
749 Box::pin({
750 let this = self.clone();
751 async move {
752 let url = this.url()?;
753 let mut req =
754 azure_core::http::Request::new(url, azure_core::http::Method::Get);
755 if let Some(auth_header) = this
756 .client
757 .token_credential()
758 .http_authorization_header(&this.client.scopes())
759 .await?
760 {
761 req.insert_header(
762 azure_core::http::headers::AUTHORIZATION,
763 auth_header,
764 );
765 }
766 let req_body = azure_core::Bytes::new();
767 req.set_body(req_body);
768 Ok(Response(this.client.send(&mut req).await?.into()))
769 }
770 })
771 }
772 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
773 let mut url = azure_core::http::Url::parse(&format!(
774 "{}/{}/{}/_apis/work/plans",
775 self.client.endpoint(),
776 &self.organization,
777 &self.project
778 ))?;
779 let has_api_version_already = url
780 .query_pairs()
781 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
782 if !has_api_version_already {
783 url.query_pairs_mut().append_pair(
784 azure_core::http::headers::query_param::API_VERSION,
785 "7.1-preview",
786 );
787 }
788 Ok(url)
789 }
790 }
791 impl std::future::IntoFuture for RequestBuilder {
792 type Output = azure_core::Result<models::PlanList>;
793 type IntoFuture = BoxFuture<'static, azure_core::Result<models::PlanList>>;
794 #[doc = "Returns a future that sends the request and returns the parsed response body."]
795 #[doc = ""]
796 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
797 #[doc = ""]
798 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
799 fn into_future(self) -> Self::IntoFuture {
800 Box::pin(async move { self.send().await?.into_body().await })
801 }
802 }
803 }
804 pub mod create {
805 use super::models;
806 #[cfg(not(target_arch = "wasm32"))]
807 use futures::future::BoxFuture;
808 #[cfg(target_arch = "wasm32")]
809 use futures::future::LocalBoxFuture as BoxFuture;
810 #[derive(Debug)]
811 pub struct Response(azure_core::http::Response<models::Plan, azure_core::http::JsonFormat>);
812 impl Response {
813 pub async fn into_body(self) -> azure_core::Result<models::Plan> {
814 self.0.into_body().await
815 }
816 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
817 self.0.into()
818 }
819 }
820 #[derive(Clone)]
821 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
822 #[doc = r""]
823 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
824 #[doc = r" parameters can be chained."]
825 #[doc = r""]
826 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
827 #[doc = r" converts the [`RequestBuilder`] into a future,"]
828 #[doc = r" executes the request and returns a `Result` with the parsed"]
829 #[doc = r" response."]
830 #[doc = r""]
831 #[doc = r" If you need lower-level access to the raw response details"]
832 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
833 #[doc = r" can finalize the request using the"]
834 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
835 #[doc = r" that resolves to a lower-level [`Response`] value."]
836 pub struct RequestBuilder {
837 pub(crate) client: super::super::Client,
838 pub(crate) organization: String,
839 pub(crate) body: models::CreatePlan,
840 pub(crate) project: String,
841 }
842 impl RequestBuilder {
843 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
844 #[doc = ""]
845 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
846 #[doc = "However, this function can provide more flexibility when required."]
847 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
848 Box::pin({
849 let this = self.clone();
850 async move {
851 let url = this.url()?;
852 let mut req =
853 azure_core::http::Request::new(url, azure_core::http::Method::Post);
854 if let Some(auth_header) = this
855 .client
856 .token_credential()
857 .http_authorization_header(&this.client.scopes())
858 .await?
859 {
860 req.insert_header(
861 azure_core::http::headers::AUTHORIZATION,
862 auth_header,
863 );
864 }
865 req.insert_header("content-type", "application/json");
866 let req_body = azure_core::json::to_json(&this.body)?;
867 req.set_body(req_body);
868 Ok(Response(this.client.send(&mut req).await?.into()))
869 }
870 })
871 }
872 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
873 let mut url = azure_core::http::Url::parse(&format!(
874 "{}/{}/{}/_apis/work/plans",
875 self.client.endpoint(),
876 &self.organization,
877 &self.project
878 ))?;
879 let has_api_version_already = url
880 .query_pairs()
881 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
882 if !has_api_version_already {
883 url.query_pairs_mut().append_pair(
884 azure_core::http::headers::query_param::API_VERSION,
885 "7.1-preview",
886 );
887 }
888 Ok(url)
889 }
890 }
891 impl std::future::IntoFuture for RequestBuilder {
892 type Output = azure_core::Result<models::Plan>;
893 type IntoFuture = BoxFuture<'static, azure_core::Result<models::Plan>>;
894 #[doc = "Returns a future that sends the request and returns the parsed response body."]
895 #[doc = ""]
896 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
897 #[doc = ""]
898 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
899 fn into_future(self) -> Self::IntoFuture {
900 Box::pin(async move { self.send().await?.into_body().await })
901 }
902 }
903 }
904 pub mod get {
905 use super::models;
906 #[cfg(not(target_arch = "wasm32"))]
907 use futures::future::BoxFuture;
908 #[cfg(target_arch = "wasm32")]
909 use futures::future::LocalBoxFuture as BoxFuture;
910 #[derive(Debug)]
911 pub struct Response(azure_core::http::Response<models::Plan, azure_core::http::JsonFormat>);
912 impl Response {
913 pub async fn into_body(self) -> azure_core::Result<models::Plan> {
914 self.0.into_body().await
915 }
916 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
917 self.0.into()
918 }
919 }
920 #[derive(Clone)]
921 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
922 #[doc = r""]
923 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
924 #[doc = r" parameters can be chained."]
925 #[doc = r""]
926 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
927 #[doc = r" converts the [`RequestBuilder`] into a future,"]
928 #[doc = r" executes the request and returns a `Result` with the parsed"]
929 #[doc = r" response."]
930 #[doc = r""]
931 #[doc = r" If you need lower-level access to the raw response details"]
932 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
933 #[doc = r" can finalize the request using the"]
934 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
935 #[doc = r" that resolves to a lower-level [`Response`] value."]
936 pub struct RequestBuilder {
937 pub(crate) client: super::super::Client,
938 pub(crate) organization: String,
939 pub(crate) project: String,
940 pub(crate) id: String,
941 }
942 impl RequestBuilder {
943 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
944 #[doc = ""]
945 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
946 #[doc = "However, this function can provide more flexibility when required."]
947 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
948 Box::pin({
949 let this = self.clone();
950 async move {
951 let url = this.url()?;
952 let mut req =
953 azure_core::http::Request::new(url, azure_core::http::Method::Get);
954 if let Some(auth_header) = this
955 .client
956 .token_credential()
957 .http_authorization_header(&this.client.scopes())
958 .await?
959 {
960 req.insert_header(
961 azure_core::http::headers::AUTHORIZATION,
962 auth_header,
963 );
964 }
965 let req_body = azure_core::Bytes::new();
966 req.set_body(req_body);
967 Ok(Response(this.client.send(&mut req).await?.into()))
968 }
969 })
970 }
971 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
972 let mut url = azure_core::http::Url::parse(&format!(
973 "{}/{}/{}/_apis/work/plans/{}",
974 self.client.endpoint(),
975 &self.organization,
976 &self.project,
977 &self.id
978 ))?;
979 let has_api_version_already = url
980 .query_pairs()
981 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
982 if !has_api_version_already {
983 url.query_pairs_mut().append_pair(
984 azure_core::http::headers::query_param::API_VERSION,
985 "7.1-preview",
986 );
987 }
988 Ok(url)
989 }
990 }
991 impl std::future::IntoFuture for RequestBuilder {
992 type Output = azure_core::Result<models::Plan>;
993 type IntoFuture = BoxFuture<'static, azure_core::Result<models::Plan>>;
994 #[doc = "Returns a future that sends the request and returns the parsed response body."]
995 #[doc = ""]
996 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
997 #[doc = ""]
998 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
999 fn into_future(self) -> Self::IntoFuture {
1000 Box::pin(async move { self.send().await?.into_body().await })
1001 }
1002 }
1003 }
1004 pub mod update {
1005 use super::models;
1006 #[cfg(not(target_arch = "wasm32"))]
1007 use futures::future::BoxFuture;
1008 #[cfg(target_arch = "wasm32")]
1009 use futures::future::LocalBoxFuture as BoxFuture;
1010 #[derive(Debug)]
1011 pub struct Response(azure_core::http::Response<models::Plan, azure_core::http::JsonFormat>);
1012 impl Response {
1013 pub async fn into_body(self) -> azure_core::Result<models::Plan> {
1014 self.0.into_body().await
1015 }
1016 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1017 self.0.into()
1018 }
1019 }
1020 #[derive(Clone)]
1021 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1022 #[doc = r""]
1023 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1024 #[doc = r" parameters can be chained."]
1025 #[doc = r""]
1026 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1027 #[doc = r" converts the [`RequestBuilder`] into a future,"]
1028 #[doc = r" executes the request and returns a `Result` with the parsed"]
1029 #[doc = r" response."]
1030 #[doc = r""]
1031 #[doc = r" If you need lower-level access to the raw response details"]
1032 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1033 #[doc = r" can finalize the request using the"]
1034 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1035 #[doc = r" that resolves to a lower-level [`Response`] value."]
1036 pub struct RequestBuilder {
1037 pub(crate) client: super::super::Client,
1038 pub(crate) organization: String,
1039 pub(crate) body: models::UpdatePlan,
1040 pub(crate) project: String,
1041 pub(crate) id: String,
1042 }
1043 impl RequestBuilder {
1044 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1045 #[doc = ""]
1046 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1047 #[doc = "However, this function can provide more flexibility when required."]
1048 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1049 Box::pin({
1050 let this = self.clone();
1051 async move {
1052 let url = this.url()?;
1053 let mut req =
1054 azure_core::http::Request::new(url, azure_core::http::Method::Put);
1055 if let Some(auth_header) = this
1056 .client
1057 .token_credential()
1058 .http_authorization_header(&this.client.scopes())
1059 .await?
1060 {
1061 req.insert_header(
1062 azure_core::http::headers::AUTHORIZATION,
1063 auth_header,
1064 );
1065 }
1066 req.insert_header("content-type", "application/json");
1067 let req_body = azure_core::json::to_json(&this.body)?;
1068 req.set_body(req_body);
1069 Ok(Response(this.client.send(&mut req).await?.into()))
1070 }
1071 })
1072 }
1073 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1074 let mut url = azure_core::http::Url::parse(&format!(
1075 "{}/{}/{}/_apis/work/plans/{}",
1076 self.client.endpoint(),
1077 &self.organization,
1078 &self.project,
1079 &self.id
1080 ))?;
1081 let has_api_version_already = url
1082 .query_pairs()
1083 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1084 if !has_api_version_already {
1085 url.query_pairs_mut().append_pair(
1086 azure_core::http::headers::query_param::API_VERSION,
1087 "7.1-preview",
1088 );
1089 }
1090 Ok(url)
1091 }
1092 }
1093 impl std::future::IntoFuture for RequestBuilder {
1094 type Output = azure_core::Result<models::Plan>;
1095 type IntoFuture = BoxFuture<'static, azure_core::Result<models::Plan>>;
1096 #[doc = "Returns a future that sends the request and returns the parsed response body."]
1097 #[doc = ""]
1098 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1099 #[doc = ""]
1100 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1101 fn into_future(self) -> Self::IntoFuture {
1102 Box::pin(async move { self.send().await?.into_body().await })
1103 }
1104 }
1105 }
1106 pub mod delete {
1107 use super::models;
1108 #[cfg(not(target_arch = "wasm32"))]
1109 use futures::future::BoxFuture;
1110 #[cfg(target_arch = "wasm32")]
1111 use futures::future::LocalBoxFuture as BoxFuture;
1112 #[derive(Debug)]
1113 pub struct Response(azure_core::http::Response<(), azure_core::http::NoFormat>);
1114 impl Response {
1115 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1116 self.0.into()
1117 }
1118 }
1119 #[derive(Clone)]
1120 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1121 #[doc = r""]
1122 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1123 #[doc = r" parameters can be chained."]
1124 #[doc = r""]
1125 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1126 #[doc = r" converts the [`RequestBuilder`] into a future,"]
1127 #[doc = r" executes the request and returns a `Result` with the parsed"]
1128 #[doc = r" response."]
1129 #[doc = r""]
1130 #[doc = r" If you need lower-level access to the raw response details"]
1131 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1132 #[doc = r" can finalize the request using the"]
1133 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1134 #[doc = r" that resolves to a lower-level [`Response`] value."]
1135 pub struct RequestBuilder {
1136 pub(crate) client: super::super::Client,
1137 pub(crate) organization: String,
1138 pub(crate) project: String,
1139 pub(crate) id: String,
1140 }
1141 impl RequestBuilder {
1142 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1143 #[doc = ""]
1144 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1145 #[doc = "However, this function can provide more flexibility when required."]
1146 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1147 Box::pin({
1148 let this = self.clone();
1149 async move {
1150 let url = this.url()?;
1151 let mut req =
1152 azure_core::http::Request::new(url, azure_core::http::Method::Delete);
1153 if let Some(auth_header) = this
1154 .client
1155 .token_credential()
1156 .http_authorization_header(&this.client.scopes())
1157 .await?
1158 {
1159 req.insert_header(
1160 azure_core::http::headers::AUTHORIZATION,
1161 auth_header,
1162 );
1163 }
1164 let req_body = azure_core::Bytes::new();
1165 req.set_body(req_body);
1166 Ok(Response(this.client.send(&mut req).await?.into()))
1167 }
1168 })
1169 }
1170 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1171 let mut url = azure_core::http::Url::parse(&format!(
1172 "{}/{}/{}/_apis/work/plans/{}",
1173 self.client.endpoint(),
1174 &self.organization,
1175 &self.project,
1176 &self.id
1177 ))?;
1178 let has_api_version_already = url
1179 .query_pairs()
1180 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1181 if !has_api_version_already {
1182 url.query_pairs_mut().append_pair(
1183 azure_core::http::headers::query_param::API_VERSION,
1184 "7.1-preview",
1185 );
1186 }
1187 Ok(url)
1188 }
1189 }
1190 impl std::future::IntoFuture for RequestBuilder {
1191 type Output = azure_core::Result<()>;
1192 type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
1193 #[doc = "Returns a future that sends the request and waits for the response."]
1194 #[doc = ""]
1195 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1196 #[doc = ""]
1197 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1198 fn into_future(self) -> Self::IntoFuture {
1199 Box::pin(async move {
1200 let _rsp = self.send().await?;
1201 Ok(())
1202 })
1203 }
1204 }
1205 }
1206}
1207pub mod deliverytimeline {
1208 use super::models;
1209 #[cfg(not(target_arch = "wasm32"))]
1210 use futures::future::BoxFuture;
1211 #[cfg(target_arch = "wasm32")]
1212 use futures::future::LocalBoxFuture as BoxFuture;
1213 pub struct Client(pub(crate) super::Client);
1214 impl Client {
1215 #[doc = "Get Delivery View Data"]
1216 #[doc = ""]
1217 #[doc = "Arguments:"]
1218 #[doc = "* `organization`: The name of the Azure DevOps organization."]
1219 #[doc = "* `project`: Project ID or project name"]
1220 #[doc = "* `id`: Identifier for delivery view"]
1221 pub fn get(
1222 &self,
1223 organization: impl Into<String>,
1224 project: impl Into<String>,
1225 id: impl Into<String>,
1226 ) -> get::RequestBuilder {
1227 get::RequestBuilder {
1228 client: self.0.clone(),
1229 organization: organization.into(),
1230 project: project.into(),
1231 id: id.into(),
1232 revision: None,
1233 start_date: None,
1234 end_date: None,
1235 }
1236 }
1237 }
1238 pub mod get {
1239 use super::models;
1240 #[cfg(not(target_arch = "wasm32"))]
1241 use futures::future::BoxFuture;
1242 #[cfg(target_arch = "wasm32")]
1243 use futures::future::LocalBoxFuture as BoxFuture;
1244 #[derive(Debug)]
1245 pub struct Response(
1246 azure_core::http::Response<models::DeliveryViewData, azure_core::http::JsonFormat>,
1247 );
1248 impl Response {
1249 pub async fn into_body(self) -> azure_core::Result<models::DeliveryViewData> {
1250 self.0.into_body().await
1251 }
1252 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1253 self.0.into()
1254 }
1255 }
1256 #[derive(Clone)]
1257 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1258 #[doc = r""]
1259 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1260 #[doc = r" parameters can be chained."]
1261 #[doc = r""]
1262 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1263 #[doc = r" converts the [`RequestBuilder`] into a future,"]
1264 #[doc = r" executes the request and returns a `Result` with the parsed"]
1265 #[doc = r" response."]
1266 #[doc = r""]
1267 #[doc = r" If you need lower-level access to the raw response details"]
1268 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1269 #[doc = r" can finalize the request using the"]
1270 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1271 #[doc = r" that resolves to a lower-level [`Response`] value."]
1272 pub struct RequestBuilder {
1273 pub(crate) client: super::super::Client,
1274 pub(crate) organization: String,
1275 pub(crate) project: String,
1276 pub(crate) id: String,
1277 pub(crate) revision: Option<i32>,
1278 pub(crate) start_date: Option<time::OffsetDateTime>,
1279 pub(crate) end_date: Option<time::OffsetDateTime>,
1280 }
1281 impl RequestBuilder {
1282 #[doc = "Revision of the plan for which you want data. If the current plan is a different revision you will get an ViewRevisionMismatchException exception. If you do not supply a revision you will get data for the latest revision."]
1283 pub fn revision(mut self, revision: i32) -> Self {
1284 self.revision = Some(revision);
1285 self
1286 }
1287 #[doc = "The start date of timeline"]
1288 pub fn start_date(mut self, start_date: impl Into<time::OffsetDateTime>) -> Self {
1289 self.start_date = Some(start_date.into());
1290 self
1291 }
1292 #[doc = "The end date of timeline"]
1293 pub fn end_date(mut self, end_date: impl Into<time::OffsetDateTime>) -> Self {
1294 self.end_date = Some(end_date.into());
1295 self
1296 }
1297 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1298 #[doc = ""]
1299 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1300 #[doc = "However, this function can provide more flexibility when required."]
1301 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1302 Box::pin({
1303 let this = self.clone();
1304 async move {
1305 let url = this.url()?;
1306 let mut req =
1307 azure_core::http::Request::new(url, azure_core::http::Method::Get);
1308 if let Some(auth_header) = this
1309 .client
1310 .token_credential()
1311 .http_authorization_header(&this.client.scopes())
1312 .await?
1313 {
1314 req.insert_header(
1315 azure_core::http::headers::AUTHORIZATION,
1316 auth_header,
1317 );
1318 }
1319 if let Some(revision) = &this.revision {
1320 req.url_mut()
1321 .query_pairs_mut()
1322 .append_pair("revision", &revision.to_string());
1323 }
1324 if let Some(start_date) = &this.start_date {
1325 let formatted_date_time =
1326 crate::date_time::format_date_time(start_date)?;
1327 req.url_mut()
1328 .query_pairs_mut()
1329 .append_pair("startDate", &formatted_date_time);
1330 }
1331 if let Some(end_date) = &this.end_date {
1332 let formatted_date_time = crate::date_time::format_date_time(end_date)?;
1333 req.url_mut()
1334 .query_pairs_mut()
1335 .append_pair("endDate", &formatted_date_time);
1336 }
1337 let req_body = azure_core::Bytes::new();
1338 req.set_body(req_body);
1339 Ok(Response(this.client.send(&mut req).await?.into()))
1340 }
1341 })
1342 }
1343 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1344 let mut url = azure_core::http::Url::parse(&format!(
1345 "{}/{}/{}/_apis/work/plans/{}/deliverytimeline",
1346 self.client.endpoint(),
1347 &self.organization,
1348 &self.project,
1349 &self.id
1350 ))?;
1351 let has_api_version_already = url
1352 .query_pairs()
1353 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1354 if !has_api_version_already {
1355 url.query_pairs_mut().append_pair(
1356 azure_core::http::headers::query_param::API_VERSION,
1357 "7.1-preview",
1358 );
1359 }
1360 Ok(url)
1361 }
1362 }
1363 impl std::future::IntoFuture for RequestBuilder {
1364 type Output = azure_core::Result<models::DeliveryViewData>;
1365 type IntoFuture = BoxFuture<'static, azure_core::Result<models::DeliveryViewData>>;
1366 #[doc = "Returns a future that sends the request and returns the parsed response body."]
1367 #[doc = ""]
1368 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1369 #[doc = ""]
1370 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1371 fn into_future(self) -> Self::IntoFuture {
1372 Box::pin(async move { self.send().await?.into_body().await })
1373 }
1374 }
1375 }
1376}
1377pub mod processconfiguration {
1378 use super::models;
1379 #[cfg(not(target_arch = "wasm32"))]
1380 use futures::future::BoxFuture;
1381 #[cfg(target_arch = "wasm32")]
1382 use futures::future::LocalBoxFuture as BoxFuture;
1383 pub struct Client(pub(crate) super::Client);
1384 impl Client {
1385 #[doc = "Get process configuration"]
1386 #[doc = ""]
1387 #[doc = "Arguments:"]
1388 #[doc = "* `organization`: The name of the Azure DevOps organization."]
1389 #[doc = "* `project`: Project ID or project name"]
1390 pub fn get(
1391 &self,
1392 organization: impl Into<String>,
1393 project: impl Into<String>,
1394 ) -> get::RequestBuilder {
1395 get::RequestBuilder {
1396 client: self.0.clone(),
1397 organization: organization.into(),
1398 project: project.into(),
1399 }
1400 }
1401 }
1402 pub mod get {
1403 use super::models;
1404 #[cfg(not(target_arch = "wasm32"))]
1405 use futures::future::BoxFuture;
1406 #[cfg(target_arch = "wasm32")]
1407 use futures::future::LocalBoxFuture as BoxFuture;
1408 #[derive(Debug)]
1409 pub struct Response(
1410 azure_core::http::Response<models::ProcessConfiguration, azure_core::http::JsonFormat>,
1411 );
1412 impl Response {
1413 pub async fn into_body(self) -> azure_core::Result<models::ProcessConfiguration> {
1414 self.0.into_body().await
1415 }
1416 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1417 self.0.into()
1418 }
1419 }
1420 #[derive(Clone)]
1421 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1422 #[doc = r""]
1423 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1424 #[doc = r" parameters can be chained."]
1425 #[doc = r""]
1426 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1427 #[doc = r" converts the [`RequestBuilder`] into a future,"]
1428 #[doc = r" executes the request and returns a `Result` with the parsed"]
1429 #[doc = r" response."]
1430 #[doc = r""]
1431 #[doc = r" If you need lower-level access to the raw response details"]
1432 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1433 #[doc = r" can finalize the request using the"]
1434 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1435 #[doc = r" that resolves to a lower-level [`Response`] value."]
1436 pub struct RequestBuilder {
1437 pub(crate) client: super::super::Client,
1438 pub(crate) organization: String,
1439 pub(crate) project: String,
1440 }
1441 impl RequestBuilder {
1442 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1443 #[doc = ""]
1444 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1445 #[doc = "However, this function can provide more flexibility when required."]
1446 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1447 Box::pin({
1448 let this = self.clone();
1449 async move {
1450 let url = this.url()?;
1451 let mut req =
1452 azure_core::http::Request::new(url, azure_core::http::Method::Get);
1453 if let Some(auth_header) = this
1454 .client
1455 .token_credential()
1456 .http_authorization_header(&this.client.scopes())
1457 .await?
1458 {
1459 req.insert_header(
1460 azure_core::http::headers::AUTHORIZATION,
1461 auth_header,
1462 );
1463 }
1464 let req_body = azure_core::Bytes::new();
1465 req.set_body(req_body);
1466 Ok(Response(this.client.send(&mut req).await?.into()))
1467 }
1468 })
1469 }
1470 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1471 let mut url = azure_core::http::Url::parse(&format!(
1472 "{}/{}/{}/_apis/work/processconfiguration",
1473 self.client.endpoint(),
1474 &self.organization,
1475 &self.project
1476 ))?;
1477 let has_api_version_already = url
1478 .query_pairs()
1479 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1480 if !has_api_version_already {
1481 url.query_pairs_mut().append_pair(
1482 azure_core::http::headers::query_param::API_VERSION,
1483 "7.1-preview",
1484 );
1485 }
1486 Ok(url)
1487 }
1488 }
1489 impl std::future::IntoFuture for RequestBuilder {
1490 type Output = azure_core::Result<models::ProcessConfiguration>;
1491 type IntoFuture = BoxFuture<'static, azure_core::Result<models::ProcessConfiguration>>;
1492 #[doc = "Returns a future that sends the request and returns the parsed response body."]
1493 #[doc = ""]
1494 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1495 #[doc = ""]
1496 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1497 fn into_future(self) -> Self::IntoFuture {
1498 Box::pin(async move { self.send().await?.into_body().await })
1499 }
1500 }
1501 }
1502}
1503pub mod backlogconfiguration {
1504 use super::models;
1505 #[cfg(not(target_arch = "wasm32"))]
1506 use futures::future::BoxFuture;
1507 #[cfg(target_arch = "wasm32")]
1508 use futures::future::LocalBoxFuture as BoxFuture;
1509 pub struct Client(pub(crate) super::Client);
1510 impl Client {
1511 #[doc = "Gets backlog configuration for a team"]
1512 #[doc = ""]
1513 #[doc = "Arguments:"]
1514 #[doc = "* `organization`: The name of the Azure DevOps organization."]
1515 #[doc = "* `project`: Project ID or project name"]
1516 #[doc = "* `team`: Team ID or team name"]
1517 pub fn get(
1518 &self,
1519 organization: impl Into<String>,
1520 project: impl Into<String>,
1521 team: impl Into<String>,
1522 ) -> get::RequestBuilder {
1523 get::RequestBuilder {
1524 client: self.0.clone(),
1525 organization: organization.into(),
1526 project: project.into(),
1527 team: team.into(),
1528 }
1529 }
1530 }
1531 pub mod get {
1532 use super::models;
1533 #[cfg(not(target_arch = "wasm32"))]
1534 use futures::future::BoxFuture;
1535 #[cfg(target_arch = "wasm32")]
1536 use futures::future::LocalBoxFuture as BoxFuture;
1537 #[derive(Debug)]
1538 pub struct Response(
1539 azure_core::http::Response<models::BacklogConfiguration, azure_core::http::JsonFormat>,
1540 );
1541 impl Response {
1542 pub async fn into_body(self) -> azure_core::Result<models::BacklogConfiguration> {
1543 self.0.into_body().await
1544 }
1545 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1546 self.0.into()
1547 }
1548 }
1549 #[derive(Clone)]
1550 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1551 #[doc = r""]
1552 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1553 #[doc = r" parameters can be chained."]
1554 #[doc = r""]
1555 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1556 #[doc = r" converts the [`RequestBuilder`] into a future,"]
1557 #[doc = r" executes the request and returns a `Result` with the parsed"]
1558 #[doc = r" response."]
1559 #[doc = r""]
1560 #[doc = r" If you need lower-level access to the raw response details"]
1561 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1562 #[doc = r" can finalize the request using the"]
1563 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1564 #[doc = r" that resolves to a lower-level [`Response`] value."]
1565 pub struct RequestBuilder {
1566 pub(crate) client: super::super::Client,
1567 pub(crate) organization: String,
1568 pub(crate) project: String,
1569 pub(crate) team: String,
1570 }
1571 impl RequestBuilder {
1572 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1573 #[doc = ""]
1574 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1575 #[doc = "However, this function can provide more flexibility when required."]
1576 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1577 Box::pin({
1578 let this = self.clone();
1579 async move {
1580 let url = this.url()?;
1581 let mut req =
1582 azure_core::http::Request::new(url, azure_core::http::Method::Get);
1583 if let Some(auth_header) = this
1584 .client
1585 .token_credential()
1586 .http_authorization_header(&this.client.scopes())
1587 .await?
1588 {
1589 req.insert_header(
1590 azure_core::http::headers::AUTHORIZATION,
1591 auth_header,
1592 );
1593 }
1594 let req_body = azure_core::Bytes::new();
1595 req.set_body(req_body);
1596 Ok(Response(this.client.send(&mut req).await?.into()))
1597 }
1598 })
1599 }
1600 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1601 let mut url = azure_core::http::Url::parse(&format!(
1602 "{}/{}/{}/{}/_apis/work/backlogconfiguration",
1603 self.client.endpoint(),
1604 &self.organization,
1605 &self.project,
1606 &self.team
1607 ))?;
1608 let has_api_version_already = url
1609 .query_pairs()
1610 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1611 if !has_api_version_already {
1612 url.query_pairs_mut().append_pair(
1613 azure_core::http::headers::query_param::API_VERSION,
1614 "7.1-preview",
1615 );
1616 }
1617 Ok(url)
1618 }
1619 }
1620 impl std::future::IntoFuture for RequestBuilder {
1621 type Output = azure_core::Result<models::BacklogConfiguration>;
1622 type IntoFuture = BoxFuture<'static, azure_core::Result<models::BacklogConfiguration>>;
1623 #[doc = "Returns a future that sends the request and returns the parsed response body."]
1624 #[doc = ""]
1625 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1626 #[doc = ""]
1627 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1628 fn into_future(self) -> Self::IntoFuture {
1629 Box::pin(async move { self.send().await?.into_body().await })
1630 }
1631 }
1632 }
1633}
1634pub mod backlogs {
1635 use super::models;
1636 #[cfg(not(target_arch = "wasm32"))]
1637 use futures::future::BoxFuture;
1638 #[cfg(target_arch = "wasm32")]
1639 use futures::future::LocalBoxFuture as BoxFuture;
1640 pub struct Client(pub(crate) super::Client);
1641 impl Client {
1642 #[doc = "List all backlog levels"]
1643 #[doc = ""]
1644 #[doc = "Arguments:"]
1645 #[doc = "* `organization`: The name of the Azure DevOps organization."]
1646 #[doc = "* `project`: Project ID or project name"]
1647 #[doc = "* `team`: Team ID or team name"]
1648 pub fn list(
1649 &self,
1650 organization: impl Into<String>,
1651 project: impl Into<String>,
1652 team: impl Into<String>,
1653 ) -> list::RequestBuilder {
1654 list::RequestBuilder {
1655 client: self.0.clone(),
1656 organization: organization.into(),
1657 project: project.into(),
1658 team: team.into(),
1659 }
1660 }
1661 #[doc = "Get a list of work items within a backlog level"]
1662 #[doc = ""]
1663 #[doc = "Arguments:"]
1664 #[doc = "* `organization`: The name of the Azure DevOps organization."]
1665 #[doc = "* `project`: Project ID or project name"]
1666 #[doc = "* `team`: Team ID or team name"]
1667 pub fn get_backlog_level_work_items(
1668 &self,
1669 organization: impl Into<String>,
1670 project: impl Into<String>,
1671 team: impl Into<String>,
1672 backlog_id: impl Into<String>,
1673 ) -> get_backlog_level_work_items::RequestBuilder {
1674 get_backlog_level_work_items::RequestBuilder {
1675 client: self.0.clone(),
1676 organization: organization.into(),
1677 project: project.into(),
1678 team: team.into(),
1679 backlog_id: backlog_id.into(),
1680 }
1681 }
1682 #[doc = "Get a backlog level"]
1683 #[doc = ""]
1684 #[doc = "Arguments:"]
1685 #[doc = "* `organization`: The name of the Azure DevOps organization."]
1686 #[doc = "* `project`: Project ID or project name"]
1687 #[doc = "* `team`: Team ID or team name"]
1688 #[doc = "* `id`: The id of the backlog level"]
1689 pub fn get_backlog(
1690 &self,
1691 organization: impl Into<String>,
1692 project: impl Into<String>,
1693 team: impl Into<String>,
1694 id: impl Into<String>,
1695 ) -> get_backlog::RequestBuilder {
1696 get_backlog::RequestBuilder {
1697 client: self.0.clone(),
1698 organization: organization.into(),
1699 project: project.into(),
1700 team: team.into(),
1701 id: id.into(),
1702 }
1703 }
1704 }
1705 pub mod list {
1706 use super::models;
1707 #[cfg(not(target_arch = "wasm32"))]
1708 use futures::future::BoxFuture;
1709 #[cfg(target_arch = "wasm32")]
1710 use futures::future::LocalBoxFuture as BoxFuture;
1711 #[derive(Debug)]
1712 pub struct Response(
1713 azure_core::http::Response<
1714 models::BacklogLevelConfigurationList,
1715 azure_core::http::JsonFormat,
1716 >,
1717 );
1718 impl Response {
1719 pub async fn into_body(
1720 self,
1721 ) -> azure_core::Result<models::BacklogLevelConfigurationList> {
1722 self.0.into_body().await
1723 }
1724 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1725 self.0.into()
1726 }
1727 }
1728 #[derive(Clone)]
1729 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1730 #[doc = r""]
1731 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1732 #[doc = r" parameters can be chained."]
1733 #[doc = r""]
1734 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1735 #[doc = r" converts the [`RequestBuilder`] into a future,"]
1736 #[doc = r" executes the request and returns a `Result` with the parsed"]
1737 #[doc = r" response."]
1738 #[doc = r""]
1739 #[doc = r" If you need lower-level access to the raw response details"]
1740 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1741 #[doc = r" can finalize the request using the"]
1742 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1743 #[doc = r" that resolves to a lower-level [`Response`] value."]
1744 pub struct RequestBuilder {
1745 pub(crate) client: super::super::Client,
1746 pub(crate) organization: String,
1747 pub(crate) project: String,
1748 pub(crate) team: String,
1749 }
1750 impl RequestBuilder {
1751 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1752 #[doc = ""]
1753 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1754 #[doc = "However, this function can provide more flexibility when required."]
1755 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1756 Box::pin({
1757 let this = self.clone();
1758 async move {
1759 let url = this.url()?;
1760 let mut req =
1761 azure_core::http::Request::new(url, azure_core::http::Method::Get);
1762 if let Some(auth_header) = this
1763 .client
1764 .token_credential()
1765 .http_authorization_header(&this.client.scopes())
1766 .await?
1767 {
1768 req.insert_header(
1769 azure_core::http::headers::AUTHORIZATION,
1770 auth_header,
1771 );
1772 }
1773 let req_body = azure_core::Bytes::new();
1774 req.set_body(req_body);
1775 Ok(Response(this.client.send(&mut req).await?.into()))
1776 }
1777 })
1778 }
1779 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1780 let mut url = azure_core::http::Url::parse(&format!(
1781 "{}/{}/{}/{}/_apis/work/backlogs",
1782 self.client.endpoint(),
1783 &self.organization,
1784 &self.project,
1785 &self.team
1786 ))?;
1787 let has_api_version_already = url
1788 .query_pairs()
1789 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1790 if !has_api_version_already {
1791 url.query_pairs_mut().append_pair(
1792 azure_core::http::headers::query_param::API_VERSION,
1793 "7.1-preview",
1794 );
1795 }
1796 Ok(url)
1797 }
1798 }
1799 impl std::future::IntoFuture for RequestBuilder {
1800 type Output = azure_core::Result<models::BacklogLevelConfigurationList>;
1801 type IntoFuture =
1802 BoxFuture<'static, azure_core::Result<models::BacklogLevelConfigurationList>>;
1803 #[doc = "Returns a future that sends the request and returns the parsed response body."]
1804 #[doc = ""]
1805 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1806 #[doc = ""]
1807 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1808 fn into_future(self) -> Self::IntoFuture {
1809 Box::pin(async move { self.send().await?.into_body().await })
1810 }
1811 }
1812 }
1813 pub mod get_backlog_level_work_items {
1814 use super::models;
1815 #[cfg(not(target_arch = "wasm32"))]
1816 use futures::future::BoxFuture;
1817 #[cfg(target_arch = "wasm32")]
1818 use futures::future::LocalBoxFuture as BoxFuture;
1819 #[derive(Debug)]
1820 pub struct Response(
1821 azure_core::http::Response<models::BacklogLevelWorkItems, azure_core::http::JsonFormat>,
1822 );
1823 impl Response {
1824 pub async fn into_body(self) -> azure_core::Result<models::BacklogLevelWorkItems> {
1825 self.0.into_body().await
1826 }
1827 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1828 self.0.into()
1829 }
1830 }
1831 #[derive(Clone)]
1832 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1833 #[doc = r""]
1834 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1835 #[doc = r" parameters can be chained."]
1836 #[doc = r""]
1837 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1838 #[doc = r" converts the [`RequestBuilder`] into a future,"]
1839 #[doc = r" executes the request and returns a `Result` with the parsed"]
1840 #[doc = r" response."]
1841 #[doc = r""]
1842 #[doc = r" If you need lower-level access to the raw response details"]
1843 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1844 #[doc = r" can finalize the request using the"]
1845 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1846 #[doc = r" that resolves to a lower-level [`Response`] value."]
1847 pub struct RequestBuilder {
1848 pub(crate) client: super::super::Client,
1849 pub(crate) organization: String,
1850 pub(crate) project: String,
1851 pub(crate) team: String,
1852 pub(crate) backlog_id: String,
1853 }
1854 impl RequestBuilder {
1855 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1856 #[doc = ""]
1857 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1858 #[doc = "However, this function can provide more flexibility when required."]
1859 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1860 Box::pin({
1861 let this = self.clone();
1862 async move {
1863 let url = this.url()?;
1864 let mut req =
1865 azure_core::http::Request::new(url, azure_core::http::Method::Get);
1866 if let Some(auth_header) = this
1867 .client
1868 .token_credential()
1869 .http_authorization_header(&this.client.scopes())
1870 .await?
1871 {
1872 req.insert_header(
1873 azure_core::http::headers::AUTHORIZATION,
1874 auth_header,
1875 );
1876 }
1877 let req_body = azure_core::Bytes::new();
1878 req.set_body(req_body);
1879 Ok(Response(this.client.send(&mut req).await?.into()))
1880 }
1881 })
1882 }
1883 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1884 let mut url = azure_core::http::Url::parse(&format!(
1885 "{}/{}/{}/{}/_apis/work/backlogs/{}/workItems",
1886 self.client.endpoint(),
1887 &self.organization,
1888 &self.project,
1889 &self.team,
1890 &self.backlog_id
1891 ))?;
1892 let has_api_version_already = url
1893 .query_pairs()
1894 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
1895 if !has_api_version_already {
1896 url.query_pairs_mut().append_pair(
1897 azure_core::http::headers::query_param::API_VERSION,
1898 "7.1-preview",
1899 );
1900 }
1901 Ok(url)
1902 }
1903 }
1904 impl std::future::IntoFuture for RequestBuilder {
1905 type Output = azure_core::Result<models::BacklogLevelWorkItems>;
1906 type IntoFuture = BoxFuture<'static, azure_core::Result<models::BacklogLevelWorkItems>>;
1907 #[doc = "Returns a future that sends the request and returns the parsed response body."]
1908 #[doc = ""]
1909 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
1910 #[doc = ""]
1911 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
1912 fn into_future(self) -> Self::IntoFuture {
1913 Box::pin(async move { self.send().await?.into_body().await })
1914 }
1915 }
1916 }
1917 pub mod get_backlog {
1918 use super::models;
1919 #[cfg(not(target_arch = "wasm32"))]
1920 use futures::future::BoxFuture;
1921 #[cfg(target_arch = "wasm32")]
1922 use futures::future::LocalBoxFuture as BoxFuture;
1923 #[derive(Debug)]
1924 pub struct Response(
1925 azure_core::http::Response<
1926 models::BacklogLevelConfiguration,
1927 azure_core::http::JsonFormat,
1928 >,
1929 );
1930 impl Response {
1931 pub async fn into_body(self) -> azure_core::Result<models::BacklogLevelConfiguration> {
1932 self.0.into_body().await
1933 }
1934 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
1935 self.0.into()
1936 }
1937 }
1938 #[derive(Clone)]
1939 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
1940 #[doc = r""]
1941 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
1942 #[doc = r" parameters can be chained."]
1943 #[doc = r""]
1944 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
1945 #[doc = r" converts the [`RequestBuilder`] into a future,"]
1946 #[doc = r" executes the request and returns a `Result` with the parsed"]
1947 #[doc = r" response."]
1948 #[doc = r""]
1949 #[doc = r" If you need lower-level access to the raw response details"]
1950 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
1951 #[doc = r" can finalize the request using the"]
1952 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
1953 #[doc = r" that resolves to a lower-level [`Response`] value."]
1954 pub struct RequestBuilder {
1955 pub(crate) client: super::super::Client,
1956 pub(crate) organization: String,
1957 pub(crate) project: String,
1958 pub(crate) team: String,
1959 pub(crate) id: String,
1960 }
1961 impl RequestBuilder {
1962 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
1963 #[doc = ""]
1964 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
1965 #[doc = "However, this function can provide more flexibility when required."]
1966 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
1967 Box::pin({
1968 let this = self.clone();
1969 async move {
1970 let url = this.url()?;
1971 let mut req =
1972 azure_core::http::Request::new(url, azure_core::http::Method::Get);
1973 if let Some(auth_header) = this
1974 .client
1975 .token_credential()
1976 .http_authorization_header(&this.client.scopes())
1977 .await?
1978 {
1979 req.insert_header(
1980 azure_core::http::headers::AUTHORIZATION,
1981 auth_header,
1982 );
1983 }
1984 let req_body = azure_core::Bytes::new();
1985 req.set_body(req_body);
1986 Ok(Response(this.client.send(&mut req).await?.into()))
1987 }
1988 })
1989 }
1990 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
1991 let mut url = azure_core::http::Url::parse(&format!(
1992 "{}/{}/{}/{}/_apis/work/backlogs/{}",
1993 self.client.endpoint(),
1994 &self.organization,
1995 &self.project,
1996 &self.team,
1997 &self.id
1998 ))?;
1999 let has_api_version_already = url
2000 .query_pairs()
2001 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2002 if !has_api_version_already {
2003 url.query_pairs_mut().append_pair(
2004 azure_core::http::headers::query_param::API_VERSION,
2005 "7.1-preview",
2006 );
2007 }
2008 Ok(url)
2009 }
2010 }
2011 impl std::future::IntoFuture for RequestBuilder {
2012 type Output = azure_core::Result<models::BacklogLevelConfiguration>;
2013 type IntoFuture =
2014 BoxFuture<'static, azure_core::Result<models::BacklogLevelConfiguration>>;
2015 #[doc = "Returns a future that sends the request and returns the parsed response body."]
2016 #[doc = ""]
2017 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2018 #[doc = ""]
2019 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2020 fn into_future(self) -> Self::IntoFuture {
2021 Box::pin(async move { self.send().await?.into_body().await })
2022 }
2023 }
2024 }
2025}
2026pub mod boards {
2027 use super::models;
2028 #[cfg(not(target_arch = "wasm32"))]
2029 use futures::future::BoxFuture;
2030 #[cfg(target_arch = "wasm32")]
2031 use futures::future::LocalBoxFuture as BoxFuture;
2032 pub struct Client(pub(crate) super::Client);
2033 impl Client {
2034 #[doc = "Get boards"]
2035 #[doc = ""]
2036 #[doc = "Arguments:"]
2037 #[doc = "* `organization`: The name of the Azure DevOps organization."]
2038 #[doc = "* `project`: Project ID or project name"]
2039 #[doc = "* `team`: Team ID or team name"]
2040 pub fn list(
2041 &self,
2042 organization: impl Into<String>,
2043 project: impl Into<String>,
2044 team: impl Into<String>,
2045 ) -> list::RequestBuilder {
2046 list::RequestBuilder {
2047 client: self.0.clone(),
2048 organization: organization.into(),
2049 project: project.into(),
2050 team: team.into(),
2051 }
2052 }
2053 #[doc = "Get board"]
2054 #[doc = ""]
2055 #[doc = "Arguments:"]
2056 #[doc = "* `organization`: The name of the Azure DevOps organization."]
2057 #[doc = "* `project`: Project ID or project name"]
2058 #[doc = "* `id`: identifier for board, either board's backlog level name (Eg:\"Stories\") or Id"]
2059 #[doc = "* `team`: Team ID or team name"]
2060 pub fn get(
2061 &self,
2062 organization: impl Into<String>,
2063 project: impl Into<String>,
2064 id: impl Into<String>,
2065 team: impl Into<String>,
2066 ) -> get::RequestBuilder {
2067 get::RequestBuilder {
2068 client: self.0.clone(),
2069 organization: organization.into(),
2070 project: project.into(),
2071 id: id.into(),
2072 team: team.into(),
2073 }
2074 }
2075 #[doc = "Update board options"]
2076 #[doc = ""]
2077 #[doc = "Arguments:"]
2078 #[doc = "* `organization`: The name of the Azure DevOps organization."]
2079 #[doc = "* `body`: options to updated"]
2080 #[doc = "* `project`: Project ID or project name"]
2081 #[doc = "* `id`: identifier for board, either category plural name (Eg:\"Stories\") or guid"]
2082 #[doc = "* `team`: Team ID or team name"]
2083 pub fn set_board_options(
2084 &self,
2085 organization: impl Into<String>,
2086 body: impl Into<serde_json::Value>,
2087 project: impl Into<String>,
2088 id: impl Into<String>,
2089 team: impl Into<String>,
2090 ) -> set_board_options::RequestBuilder {
2091 set_board_options::RequestBuilder {
2092 client: self.0.clone(),
2093 organization: organization.into(),
2094 body: body.into(),
2095 project: project.into(),
2096 id: id.into(),
2097 team: team.into(),
2098 }
2099 }
2100 }
2101 pub mod list {
2102 use super::models;
2103 #[cfg(not(target_arch = "wasm32"))]
2104 use futures::future::BoxFuture;
2105 #[cfg(target_arch = "wasm32")]
2106 use futures::future::LocalBoxFuture as BoxFuture;
2107 #[derive(Debug)]
2108 pub struct Response(
2109 azure_core::http::Response<models::BoardReferenceList, azure_core::http::JsonFormat>,
2110 );
2111 impl Response {
2112 pub async fn into_body(self) -> azure_core::Result<models::BoardReferenceList> {
2113 self.0.into_body().await
2114 }
2115 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2116 self.0.into()
2117 }
2118 }
2119 #[derive(Clone)]
2120 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2121 #[doc = r""]
2122 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2123 #[doc = r" parameters can be chained."]
2124 #[doc = r""]
2125 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2126 #[doc = r" converts the [`RequestBuilder`] into a future,"]
2127 #[doc = r" executes the request and returns a `Result` with the parsed"]
2128 #[doc = r" response."]
2129 #[doc = r""]
2130 #[doc = r" If you need lower-level access to the raw response details"]
2131 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2132 #[doc = r" can finalize the request using the"]
2133 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2134 #[doc = r" that resolves to a lower-level [`Response`] value."]
2135 pub struct RequestBuilder {
2136 pub(crate) client: super::super::Client,
2137 pub(crate) organization: String,
2138 pub(crate) project: String,
2139 pub(crate) team: String,
2140 }
2141 impl RequestBuilder {
2142 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2143 #[doc = ""]
2144 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2145 #[doc = "However, this function can provide more flexibility when required."]
2146 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2147 Box::pin({
2148 let this = self.clone();
2149 async move {
2150 let url = this.url()?;
2151 let mut req =
2152 azure_core::http::Request::new(url, azure_core::http::Method::Get);
2153 if let Some(auth_header) = this
2154 .client
2155 .token_credential()
2156 .http_authorization_header(&this.client.scopes())
2157 .await?
2158 {
2159 req.insert_header(
2160 azure_core::http::headers::AUTHORIZATION,
2161 auth_header,
2162 );
2163 }
2164 let req_body = azure_core::Bytes::new();
2165 req.set_body(req_body);
2166 Ok(Response(this.client.send(&mut req).await?.into()))
2167 }
2168 })
2169 }
2170 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2171 let mut url = azure_core::http::Url::parse(&format!(
2172 "{}/{}/{}/{}/_apis/work/boards",
2173 self.client.endpoint(),
2174 &self.organization,
2175 &self.project,
2176 &self.team
2177 ))?;
2178 let has_api_version_already = url
2179 .query_pairs()
2180 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2181 if !has_api_version_already {
2182 url.query_pairs_mut().append_pair(
2183 azure_core::http::headers::query_param::API_VERSION,
2184 "7.1-preview",
2185 );
2186 }
2187 Ok(url)
2188 }
2189 }
2190 impl std::future::IntoFuture for RequestBuilder {
2191 type Output = azure_core::Result<models::BoardReferenceList>;
2192 type IntoFuture = BoxFuture<'static, azure_core::Result<models::BoardReferenceList>>;
2193 #[doc = "Returns a future that sends the request and returns the parsed response body."]
2194 #[doc = ""]
2195 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2196 #[doc = ""]
2197 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2198 fn into_future(self) -> Self::IntoFuture {
2199 Box::pin(async move { self.send().await?.into_body().await })
2200 }
2201 }
2202 }
2203 pub mod get {
2204 use super::models;
2205 #[cfg(not(target_arch = "wasm32"))]
2206 use futures::future::BoxFuture;
2207 #[cfg(target_arch = "wasm32")]
2208 use futures::future::LocalBoxFuture as BoxFuture;
2209 #[derive(Debug)]
2210 pub struct Response(
2211 azure_core::http::Response<models::Board, azure_core::http::JsonFormat>,
2212 );
2213 impl Response {
2214 pub async fn into_body(self) -> azure_core::Result<models::Board> {
2215 self.0.into_body().await
2216 }
2217 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2218 self.0.into()
2219 }
2220 }
2221 #[derive(Clone)]
2222 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2223 #[doc = r""]
2224 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2225 #[doc = r" parameters can be chained."]
2226 #[doc = r""]
2227 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2228 #[doc = r" converts the [`RequestBuilder`] into a future,"]
2229 #[doc = r" executes the request and returns a `Result` with the parsed"]
2230 #[doc = r" response."]
2231 #[doc = r""]
2232 #[doc = r" If you need lower-level access to the raw response details"]
2233 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2234 #[doc = r" can finalize the request using the"]
2235 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2236 #[doc = r" that resolves to a lower-level [`Response`] value."]
2237 pub struct RequestBuilder {
2238 pub(crate) client: super::super::Client,
2239 pub(crate) organization: String,
2240 pub(crate) project: String,
2241 pub(crate) id: String,
2242 pub(crate) team: String,
2243 }
2244 impl RequestBuilder {
2245 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2246 #[doc = ""]
2247 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2248 #[doc = "However, this function can provide more flexibility when required."]
2249 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2250 Box::pin({
2251 let this = self.clone();
2252 async move {
2253 let url = this.url()?;
2254 let mut req =
2255 azure_core::http::Request::new(url, azure_core::http::Method::Get);
2256 if let Some(auth_header) = this
2257 .client
2258 .token_credential()
2259 .http_authorization_header(&this.client.scopes())
2260 .await?
2261 {
2262 req.insert_header(
2263 azure_core::http::headers::AUTHORIZATION,
2264 auth_header,
2265 );
2266 }
2267 let req_body = azure_core::Bytes::new();
2268 req.set_body(req_body);
2269 Ok(Response(this.client.send(&mut req).await?.into()))
2270 }
2271 })
2272 }
2273 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2274 let mut url = azure_core::http::Url::parse(&format!(
2275 "{}/{}/{}/{}/_apis/work/boards/{}",
2276 self.client.endpoint(),
2277 &self.organization,
2278 &self.project,
2279 &self.team,
2280 &self.id
2281 ))?;
2282 let has_api_version_already = url
2283 .query_pairs()
2284 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2285 if !has_api_version_already {
2286 url.query_pairs_mut().append_pair(
2287 azure_core::http::headers::query_param::API_VERSION,
2288 "7.1-preview",
2289 );
2290 }
2291 Ok(url)
2292 }
2293 }
2294 impl std::future::IntoFuture for RequestBuilder {
2295 type Output = azure_core::Result<models::Board>;
2296 type IntoFuture = BoxFuture<'static, azure_core::Result<models::Board>>;
2297 #[doc = "Returns a future that sends the request and returns the parsed response body."]
2298 #[doc = ""]
2299 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2300 #[doc = ""]
2301 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2302 fn into_future(self) -> Self::IntoFuture {
2303 Box::pin(async move { self.send().await?.into_body().await })
2304 }
2305 }
2306 }
2307 pub mod set_board_options {
2308 use super::models;
2309 #[cfg(not(target_arch = "wasm32"))]
2310 use futures::future::BoxFuture;
2311 #[cfg(target_arch = "wasm32")]
2312 use futures::future::LocalBoxFuture as BoxFuture;
2313 #[derive(Debug)]
2314 pub struct Response(
2315 azure_core::http::Response<serde_json::Value, azure_core::http::JsonFormat>,
2316 );
2317 impl Response {
2318 pub async fn into_body(self) -> azure_core::Result<serde_json::Value> {
2319 self.0.into_body().await
2320 }
2321 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2322 self.0.into()
2323 }
2324 }
2325 #[derive(Clone)]
2326 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2327 #[doc = r""]
2328 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2329 #[doc = r" parameters can be chained."]
2330 #[doc = r""]
2331 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2332 #[doc = r" converts the [`RequestBuilder`] into a future,"]
2333 #[doc = r" executes the request and returns a `Result` with the parsed"]
2334 #[doc = r" response."]
2335 #[doc = r""]
2336 #[doc = r" If you need lower-level access to the raw response details"]
2337 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2338 #[doc = r" can finalize the request using the"]
2339 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2340 #[doc = r" that resolves to a lower-level [`Response`] value."]
2341 pub struct RequestBuilder {
2342 pub(crate) client: super::super::Client,
2343 pub(crate) organization: String,
2344 pub(crate) body: serde_json::Value,
2345 pub(crate) project: String,
2346 pub(crate) id: String,
2347 pub(crate) team: String,
2348 }
2349 impl RequestBuilder {
2350 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2351 #[doc = ""]
2352 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2353 #[doc = "However, this function can provide more flexibility when required."]
2354 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2355 Box::pin({
2356 let this = self.clone();
2357 async move {
2358 let url = this.url()?;
2359 let mut req =
2360 azure_core::http::Request::new(url, azure_core::http::Method::Put);
2361 if let Some(auth_header) = this
2362 .client
2363 .token_credential()
2364 .http_authorization_header(&this.client.scopes())
2365 .await?
2366 {
2367 req.insert_header(
2368 azure_core::http::headers::AUTHORIZATION,
2369 auth_header,
2370 );
2371 }
2372 req.insert_header("content-type", "application/json");
2373 let req_body = azure_core::json::to_json(&this.body)?;
2374 req.set_body(req_body);
2375 Ok(Response(this.client.send(&mut req).await?.into()))
2376 }
2377 })
2378 }
2379 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2380 let mut url = azure_core::http::Url::parse(&format!(
2381 "{}/{}/{}/{}/_apis/work/boards/{}",
2382 self.client.endpoint(),
2383 &self.organization,
2384 &self.project,
2385 &self.team,
2386 &self.id
2387 ))?;
2388 let has_api_version_already = url
2389 .query_pairs()
2390 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2391 if !has_api_version_already {
2392 url.query_pairs_mut().append_pair(
2393 azure_core::http::headers::query_param::API_VERSION,
2394 "7.1-preview",
2395 );
2396 }
2397 Ok(url)
2398 }
2399 }
2400 impl std::future::IntoFuture for RequestBuilder {
2401 type Output = azure_core::Result<serde_json::Value>;
2402 type IntoFuture = BoxFuture<'static, azure_core::Result<serde_json::Value>>;
2403 #[doc = "Returns a future that sends the request and returns the parsed response body."]
2404 #[doc = ""]
2405 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2406 #[doc = ""]
2407 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2408 fn into_future(self) -> Self::IntoFuture {
2409 Box::pin(async move { self.send().await?.into_body().await })
2410 }
2411 }
2412 }
2413}
2414pub mod boardusersettings {
2415 use super::models;
2416 #[cfg(not(target_arch = "wasm32"))]
2417 use futures::future::BoxFuture;
2418 #[cfg(target_arch = "wasm32")]
2419 use futures::future::LocalBoxFuture as BoxFuture;
2420 pub struct Client(pub(crate) super::Client);
2421 impl Client {
2422 #[doc = "Get board user settings for a board id"]
2423 #[doc = ""]
2424 #[doc = "Arguments:"]
2425 #[doc = "* `organization`: The name of the Azure DevOps organization."]
2426 #[doc = "* `project`: Project ID or project name"]
2427 #[doc = "* `board`: Board ID or Name"]
2428 #[doc = "* `team`: Team ID or team name"]
2429 pub fn get(
2430 &self,
2431 organization: impl Into<String>,
2432 project: impl Into<String>,
2433 board: impl Into<String>,
2434 team: impl Into<String>,
2435 ) -> get::RequestBuilder {
2436 get::RequestBuilder {
2437 client: self.0.clone(),
2438 organization: organization.into(),
2439 project: project.into(),
2440 board: board.into(),
2441 team: team.into(),
2442 }
2443 }
2444 #[doc = "Update board user settings for the board id\n\nWe don't want stakeholders to update board settings (currently just autorefresh). The BacklogManagement feature check validates this."]
2445 #[doc = ""]
2446 #[doc = "Arguments:"]
2447 #[doc = "* `organization`: The name of the Azure DevOps organization."]
2448 #[doc = "* `project`: Project ID or project name"]
2449 #[doc = "* `team`: Team ID or team name"]
2450 pub fn update(
2451 &self,
2452 organization: impl Into<String>,
2453 body: impl Into<serde_json::Value>,
2454 project: impl Into<String>,
2455 board: impl Into<String>,
2456 team: impl Into<String>,
2457 ) -> update::RequestBuilder {
2458 update::RequestBuilder {
2459 client: self.0.clone(),
2460 organization: organization.into(),
2461 body: body.into(),
2462 project: project.into(),
2463 board: board.into(),
2464 team: team.into(),
2465 }
2466 }
2467 }
2468 pub mod get {
2469 use super::models;
2470 #[cfg(not(target_arch = "wasm32"))]
2471 use futures::future::BoxFuture;
2472 #[cfg(target_arch = "wasm32")]
2473 use futures::future::LocalBoxFuture as BoxFuture;
2474 #[derive(Debug)]
2475 pub struct Response(
2476 azure_core::http::Response<models::BoardUserSettings, azure_core::http::JsonFormat>,
2477 );
2478 impl Response {
2479 pub async fn into_body(self) -> azure_core::Result<models::BoardUserSettings> {
2480 self.0.into_body().await
2481 }
2482 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2483 self.0.into()
2484 }
2485 }
2486 #[derive(Clone)]
2487 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2488 #[doc = r""]
2489 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2490 #[doc = r" parameters can be chained."]
2491 #[doc = r""]
2492 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2493 #[doc = r" converts the [`RequestBuilder`] into a future,"]
2494 #[doc = r" executes the request and returns a `Result` with the parsed"]
2495 #[doc = r" response."]
2496 #[doc = r""]
2497 #[doc = r" If you need lower-level access to the raw response details"]
2498 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2499 #[doc = r" can finalize the request using the"]
2500 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2501 #[doc = r" that resolves to a lower-level [`Response`] value."]
2502 pub struct RequestBuilder {
2503 pub(crate) client: super::super::Client,
2504 pub(crate) organization: String,
2505 pub(crate) project: String,
2506 pub(crate) board: String,
2507 pub(crate) team: String,
2508 }
2509 impl RequestBuilder {
2510 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2511 #[doc = ""]
2512 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2513 #[doc = "However, this function can provide more flexibility when required."]
2514 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2515 Box::pin({
2516 let this = self.clone();
2517 async move {
2518 let url = this.url()?;
2519 let mut req =
2520 azure_core::http::Request::new(url, azure_core::http::Method::Get);
2521 if let Some(auth_header) = this
2522 .client
2523 .token_credential()
2524 .http_authorization_header(&this.client.scopes())
2525 .await?
2526 {
2527 req.insert_header(
2528 azure_core::http::headers::AUTHORIZATION,
2529 auth_header,
2530 );
2531 }
2532 let req_body = azure_core::Bytes::new();
2533 req.set_body(req_body);
2534 Ok(Response(this.client.send(&mut req).await?.into()))
2535 }
2536 })
2537 }
2538 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2539 let mut url = azure_core::http::Url::parse(&format!(
2540 "{}/{}/{}/{}/_apis/work/boards/{}/boardusersettings",
2541 self.client.endpoint(),
2542 &self.organization,
2543 &self.project,
2544 &self.team,
2545 &self.board
2546 ))?;
2547 let has_api_version_already = url
2548 .query_pairs()
2549 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2550 if !has_api_version_already {
2551 url.query_pairs_mut().append_pair(
2552 azure_core::http::headers::query_param::API_VERSION,
2553 "7.1-preview",
2554 );
2555 }
2556 Ok(url)
2557 }
2558 }
2559 impl std::future::IntoFuture for RequestBuilder {
2560 type Output = azure_core::Result<models::BoardUserSettings>;
2561 type IntoFuture = BoxFuture<'static, azure_core::Result<models::BoardUserSettings>>;
2562 #[doc = "Returns a future that sends the request and returns the parsed response body."]
2563 #[doc = ""]
2564 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2565 #[doc = ""]
2566 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2567 fn into_future(self) -> Self::IntoFuture {
2568 Box::pin(async move { self.send().await?.into_body().await })
2569 }
2570 }
2571 }
2572 pub mod update {
2573 use super::models;
2574 #[cfg(not(target_arch = "wasm32"))]
2575 use futures::future::BoxFuture;
2576 #[cfg(target_arch = "wasm32")]
2577 use futures::future::LocalBoxFuture as BoxFuture;
2578 #[derive(Debug)]
2579 pub struct Response(
2580 azure_core::http::Response<models::BoardUserSettings, azure_core::http::JsonFormat>,
2581 );
2582 impl Response {
2583 pub async fn into_body(self) -> azure_core::Result<models::BoardUserSettings> {
2584 self.0.into_body().await
2585 }
2586 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2587 self.0.into()
2588 }
2589 }
2590 #[derive(Clone)]
2591 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2592 #[doc = r""]
2593 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2594 #[doc = r" parameters can be chained."]
2595 #[doc = r""]
2596 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2597 #[doc = r" converts the [`RequestBuilder`] into a future,"]
2598 #[doc = r" executes the request and returns a `Result` with the parsed"]
2599 #[doc = r" response."]
2600 #[doc = r""]
2601 #[doc = r" If you need lower-level access to the raw response details"]
2602 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2603 #[doc = r" can finalize the request using the"]
2604 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2605 #[doc = r" that resolves to a lower-level [`Response`] value."]
2606 pub struct RequestBuilder {
2607 pub(crate) client: super::super::Client,
2608 pub(crate) organization: String,
2609 pub(crate) body: serde_json::Value,
2610 pub(crate) project: String,
2611 pub(crate) board: String,
2612 pub(crate) team: String,
2613 }
2614 impl RequestBuilder {
2615 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2616 #[doc = ""]
2617 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2618 #[doc = "However, this function can provide more flexibility when required."]
2619 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2620 Box::pin({
2621 let this = self.clone();
2622 async move {
2623 let url = this.url()?;
2624 let mut req =
2625 azure_core::http::Request::new(url, azure_core::http::Method::Patch);
2626 if let Some(auth_header) = this
2627 .client
2628 .token_credential()
2629 .http_authorization_header(&this.client.scopes())
2630 .await?
2631 {
2632 req.insert_header(
2633 azure_core::http::headers::AUTHORIZATION,
2634 auth_header,
2635 );
2636 }
2637 req.insert_header("content-type", "application/json");
2638 let req_body = azure_core::json::to_json(&this.body)?;
2639 req.set_body(req_body);
2640 Ok(Response(this.client.send(&mut req).await?.into()))
2641 }
2642 })
2643 }
2644 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2645 let mut url = azure_core::http::Url::parse(&format!(
2646 "{}/{}/{}/{}/_apis/work/boards/{}/boardusersettings",
2647 self.client.endpoint(),
2648 &self.organization,
2649 &self.project,
2650 &self.team,
2651 &self.board
2652 ))?;
2653 let has_api_version_already = url
2654 .query_pairs()
2655 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2656 if !has_api_version_already {
2657 url.query_pairs_mut().append_pair(
2658 azure_core::http::headers::query_param::API_VERSION,
2659 "7.1-preview",
2660 );
2661 }
2662 Ok(url)
2663 }
2664 }
2665 impl std::future::IntoFuture for RequestBuilder {
2666 type Output = azure_core::Result<models::BoardUserSettings>;
2667 type IntoFuture = BoxFuture<'static, azure_core::Result<models::BoardUserSettings>>;
2668 #[doc = "Returns a future that sends the request and returns the parsed response body."]
2669 #[doc = ""]
2670 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2671 #[doc = ""]
2672 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2673 fn into_future(self) -> Self::IntoFuture {
2674 Box::pin(async move { self.send().await?.into_body().await })
2675 }
2676 }
2677 }
2678}
2679pub mod cardrulesettings {
2680 use super::models;
2681 #[cfg(not(target_arch = "wasm32"))]
2682 use futures::future::BoxFuture;
2683 #[cfg(target_arch = "wasm32")]
2684 use futures::future::LocalBoxFuture as BoxFuture;
2685 pub struct Client(pub(crate) super::Client);
2686 impl Client {
2687 #[doc = "Get board card Rule settings for the board id or board by name"]
2688 #[doc = ""]
2689 #[doc = "Arguments:"]
2690 #[doc = "* `organization`: The name of the Azure DevOps organization."]
2691 #[doc = "* `project`: Project ID or project name"]
2692 #[doc = "* `team`: Team ID or team name"]
2693 pub fn get(
2694 &self,
2695 organization: impl Into<String>,
2696 project: impl Into<String>,
2697 board: impl Into<String>,
2698 team: impl Into<String>,
2699 ) -> get::RequestBuilder {
2700 get::RequestBuilder {
2701 client: self.0.clone(),
2702 organization: organization.into(),
2703 project: project.into(),
2704 board: board.into(),
2705 team: team.into(),
2706 }
2707 }
2708 #[doc = "Update board card Rule settings for the board id or board by name"]
2709 #[doc = ""]
2710 #[doc = "Arguments:"]
2711 #[doc = "* `organization`: The name of the Azure DevOps organization."]
2712 #[doc = "* `project`: Project ID or project name"]
2713 #[doc = "* `team`: Team ID or team name"]
2714 pub fn update_board_card_rule_settings(
2715 &self,
2716 organization: impl Into<String>,
2717 body: impl Into<models::BoardCardRuleSettings>,
2718 project: impl Into<String>,
2719 board: impl Into<String>,
2720 team: impl Into<String>,
2721 ) -> update_board_card_rule_settings::RequestBuilder {
2722 update_board_card_rule_settings::RequestBuilder {
2723 client: self.0.clone(),
2724 organization: organization.into(),
2725 body: body.into(),
2726 project: project.into(),
2727 board: board.into(),
2728 team: team.into(),
2729 }
2730 }
2731 #[doc = "Update taskboard card Rule settings"]
2732 #[doc = ""]
2733 #[doc = "Arguments:"]
2734 #[doc = "* `organization`: The name of the Azure DevOps organization."]
2735 #[doc = "* `project`: Project ID or project name"]
2736 #[doc = "* `team`: Team ID or team name"]
2737 pub fn update_taskboard_card_rule_settings(
2738 &self,
2739 organization: impl Into<String>,
2740 body: impl Into<models::BoardCardRuleSettings>,
2741 project: impl Into<String>,
2742 team: impl Into<String>,
2743 ) -> update_taskboard_card_rule_settings::RequestBuilder {
2744 update_taskboard_card_rule_settings::RequestBuilder {
2745 client: self.0.clone(),
2746 organization: organization.into(),
2747 body: body.into(),
2748 project: project.into(),
2749 team: team.into(),
2750 }
2751 }
2752 }
2753 pub mod get {
2754 use super::models;
2755 #[cfg(not(target_arch = "wasm32"))]
2756 use futures::future::BoxFuture;
2757 #[cfg(target_arch = "wasm32")]
2758 use futures::future::LocalBoxFuture as BoxFuture;
2759 #[derive(Debug)]
2760 pub struct Response(
2761 azure_core::http::Response<models::BoardCardRuleSettings, azure_core::http::JsonFormat>,
2762 );
2763 impl Response {
2764 pub async fn into_body(self) -> azure_core::Result<models::BoardCardRuleSettings> {
2765 self.0.into_body().await
2766 }
2767 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2768 self.0.into()
2769 }
2770 }
2771 #[derive(Clone)]
2772 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2773 #[doc = r""]
2774 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2775 #[doc = r" parameters can be chained."]
2776 #[doc = r""]
2777 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2778 #[doc = r" converts the [`RequestBuilder`] into a future,"]
2779 #[doc = r" executes the request and returns a `Result` with the parsed"]
2780 #[doc = r" response."]
2781 #[doc = r""]
2782 #[doc = r" If you need lower-level access to the raw response details"]
2783 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2784 #[doc = r" can finalize the request using the"]
2785 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2786 #[doc = r" that resolves to a lower-level [`Response`] value."]
2787 pub struct RequestBuilder {
2788 pub(crate) client: super::super::Client,
2789 pub(crate) organization: String,
2790 pub(crate) project: String,
2791 pub(crate) board: String,
2792 pub(crate) team: String,
2793 }
2794 impl RequestBuilder {
2795 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2796 #[doc = ""]
2797 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2798 #[doc = "However, this function can provide more flexibility when required."]
2799 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2800 Box::pin({
2801 let this = self.clone();
2802 async move {
2803 let url = this.url()?;
2804 let mut req =
2805 azure_core::http::Request::new(url, azure_core::http::Method::Get);
2806 if let Some(auth_header) = this
2807 .client
2808 .token_credential()
2809 .http_authorization_header(&this.client.scopes())
2810 .await?
2811 {
2812 req.insert_header(
2813 azure_core::http::headers::AUTHORIZATION,
2814 auth_header,
2815 );
2816 }
2817 let req_body = azure_core::Bytes::new();
2818 req.set_body(req_body);
2819 Ok(Response(this.client.send(&mut req).await?.into()))
2820 }
2821 })
2822 }
2823 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2824 let mut url = azure_core::http::Url::parse(&format!(
2825 "{}/{}/{}/{}/_apis/work/boards/{}/cardrulesettings",
2826 self.client.endpoint(),
2827 &self.organization,
2828 &self.project,
2829 &self.team,
2830 &self.board
2831 ))?;
2832 let has_api_version_already = url
2833 .query_pairs()
2834 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2835 if !has_api_version_already {
2836 url.query_pairs_mut().append_pair(
2837 azure_core::http::headers::query_param::API_VERSION,
2838 "7.1-preview",
2839 );
2840 }
2841 Ok(url)
2842 }
2843 }
2844 impl std::future::IntoFuture for RequestBuilder {
2845 type Output = azure_core::Result<models::BoardCardRuleSettings>;
2846 type IntoFuture = BoxFuture<'static, azure_core::Result<models::BoardCardRuleSettings>>;
2847 #[doc = "Returns a future that sends the request and returns the parsed response body."]
2848 #[doc = ""]
2849 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2850 #[doc = ""]
2851 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2852 fn into_future(self) -> Self::IntoFuture {
2853 Box::pin(async move { self.send().await?.into_body().await })
2854 }
2855 }
2856 }
2857 pub mod update_board_card_rule_settings {
2858 use super::models;
2859 #[cfg(not(target_arch = "wasm32"))]
2860 use futures::future::BoxFuture;
2861 #[cfg(target_arch = "wasm32")]
2862 use futures::future::LocalBoxFuture as BoxFuture;
2863 #[derive(Debug)]
2864 pub struct Response(
2865 azure_core::http::Response<models::BoardCardRuleSettings, azure_core::http::JsonFormat>,
2866 );
2867 impl Response {
2868 pub async fn into_body(self) -> azure_core::Result<models::BoardCardRuleSettings> {
2869 self.0.into_body().await
2870 }
2871 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2872 self.0.into()
2873 }
2874 }
2875 #[derive(Clone)]
2876 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2877 #[doc = r""]
2878 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2879 #[doc = r" parameters can be chained."]
2880 #[doc = r""]
2881 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2882 #[doc = r" converts the [`RequestBuilder`] into a future,"]
2883 #[doc = r" executes the request and returns a `Result` with the parsed"]
2884 #[doc = r" response."]
2885 #[doc = r""]
2886 #[doc = r" If you need lower-level access to the raw response details"]
2887 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2888 #[doc = r" can finalize the request using the"]
2889 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2890 #[doc = r" that resolves to a lower-level [`Response`] value."]
2891 pub struct RequestBuilder {
2892 pub(crate) client: super::super::Client,
2893 pub(crate) organization: String,
2894 pub(crate) body: models::BoardCardRuleSettings,
2895 pub(crate) project: String,
2896 pub(crate) board: String,
2897 pub(crate) team: String,
2898 }
2899 impl RequestBuilder {
2900 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
2901 #[doc = ""]
2902 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
2903 #[doc = "However, this function can provide more flexibility when required."]
2904 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
2905 Box::pin({
2906 let this = self.clone();
2907 async move {
2908 let url = this.url()?;
2909 let mut req =
2910 azure_core::http::Request::new(url, azure_core::http::Method::Patch);
2911 if let Some(auth_header) = this
2912 .client
2913 .token_credential()
2914 .http_authorization_header(&this.client.scopes())
2915 .await?
2916 {
2917 req.insert_header(
2918 azure_core::http::headers::AUTHORIZATION,
2919 auth_header,
2920 );
2921 }
2922 req.insert_header("content-type", "application/json");
2923 let req_body = azure_core::json::to_json(&this.body)?;
2924 req.set_body(req_body);
2925 Ok(Response(this.client.send(&mut req).await?.into()))
2926 }
2927 })
2928 }
2929 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
2930 let mut url = azure_core::http::Url::parse(&format!(
2931 "{}/{}/{}/{}/_apis/work/boards/{}/cardrulesettings",
2932 self.client.endpoint(),
2933 &self.organization,
2934 &self.project,
2935 &self.team,
2936 &self.board
2937 ))?;
2938 let has_api_version_already = url
2939 .query_pairs()
2940 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
2941 if !has_api_version_already {
2942 url.query_pairs_mut().append_pair(
2943 azure_core::http::headers::query_param::API_VERSION,
2944 "7.1-preview",
2945 );
2946 }
2947 Ok(url)
2948 }
2949 }
2950 impl std::future::IntoFuture for RequestBuilder {
2951 type Output = azure_core::Result<models::BoardCardRuleSettings>;
2952 type IntoFuture = BoxFuture<'static, azure_core::Result<models::BoardCardRuleSettings>>;
2953 #[doc = "Returns a future that sends the request and returns the parsed response body."]
2954 #[doc = ""]
2955 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
2956 #[doc = ""]
2957 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
2958 fn into_future(self) -> Self::IntoFuture {
2959 Box::pin(async move { self.send().await?.into_body().await })
2960 }
2961 }
2962 }
2963 pub mod update_taskboard_card_rule_settings {
2964 use super::models;
2965 #[cfg(not(target_arch = "wasm32"))]
2966 use futures::future::BoxFuture;
2967 #[cfg(target_arch = "wasm32")]
2968 use futures::future::LocalBoxFuture as BoxFuture;
2969 #[derive(Debug)]
2970 pub struct Response(azure_core::http::Response<(), azure_core::http::NoFormat>);
2971 impl Response {
2972 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
2973 self.0.into()
2974 }
2975 }
2976 #[derive(Clone)]
2977 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
2978 #[doc = r""]
2979 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
2980 #[doc = r" parameters can be chained."]
2981 #[doc = r""]
2982 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
2983 #[doc = r" converts the [`RequestBuilder`] into a future,"]
2984 #[doc = r" executes the request and returns a `Result` with the parsed"]
2985 #[doc = r" response."]
2986 #[doc = r""]
2987 #[doc = r" If you need lower-level access to the raw response details"]
2988 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
2989 #[doc = r" can finalize the request using the"]
2990 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
2991 #[doc = r" that resolves to a lower-level [`Response`] value."]
2992 pub struct RequestBuilder {
2993 pub(crate) client: super::super::Client,
2994 pub(crate) organization: String,
2995 pub(crate) body: models::BoardCardRuleSettings,
2996 pub(crate) project: String,
2997 pub(crate) team: String,
2998 }
2999 impl RequestBuilder {
3000 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3001 #[doc = ""]
3002 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3003 #[doc = "However, this function can provide more flexibility when required."]
3004 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3005 Box::pin({
3006 let this = self.clone();
3007 async move {
3008 let url = this.url()?;
3009 let mut req =
3010 azure_core::http::Request::new(url, azure_core::http::Method::Patch);
3011 if let Some(auth_header) = this
3012 .client
3013 .token_credential()
3014 .http_authorization_header(&this.client.scopes())
3015 .await?
3016 {
3017 req.insert_header(
3018 azure_core::http::headers::AUTHORIZATION,
3019 auth_header,
3020 );
3021 }
3022 req.insert_header("content-type", "application/json");
3023 let req_body = azure_core::json::to_json(&this.body)?;
3024 req.set_body(req_body);
3025 Ok(Response(this.client.send(&mut req).await?.into()))
3026 }
3027 })
3028 }
3029 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
3030 let mut url = azure_core::http::Url::parse(&format!(
3031 "{}/{}/{}/{}/_apis/work/taskboard/cardrulesettings",
3032 self.client.endpoint(),
3033 &self.organization,
3034 &self.project,
3035 &self.team
3036 ))?;
3037 let has_api_version_already = url
3038 .query_pairs()
3039 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
3040 if !has_api_version_already {
3041 url.query_pairs_mut().append_pair(
3042 azure_core::http::headers::query_param::API_VERSION,
3043 "7.1-preview",
3044 );
3045 }
3046 Ok(url)
3047 }
3048 }
3049 impl std::future::IntoFuture for RequestBuilder {
3050 type Output = azure_core::Result<()>;
3051 type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
3052 #[doc = "Returns a future that sends the request and waits for the response."]
3053 #[doc = ""]
3054 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3055 #[doc = ""]
3056 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3057 fn into_future(self) -> Self::IntoFuture {
3058 Box::pin(async move {
3059 let _rsp = self.send().await?;
3060 Ok(())
3061 })
3062 }
3063 }
3064 }
3065}
3066pub mod cardsettings {
3067 use super::models;
3068 #[cfg(not(target_arch = "wasm32"))]
3069 use futures::future::BoxFuture;
3070 #[cfg(target_arch = "wasm32")]
3071 use futures::future::LocalBoxFuture as BoxFuture;
3072 pub struct Client(pub(crate) super::Client);
3073 impl Client {
3074 #[doc = "Get board card settings for the board id or board by name"]
3075 #[doc = ""]
3076 #[doc = "Arguments:"]
3077 #[doc = "* `organization`: The name of the Azure DevOps organization."]
3078 #[doc = "* `project`: Project ID or project name"]
3079 #[doc = "* `team`: Team ID or team name"]
3080 pub fn get(
3081 &self,
3082 organization: impl Into<String>,
3083 project: impl Into<String>,
3084 board: impl Into<String>,
3085 team: impl Into<String>,
3086 ) -> get::RequestBuilder {
3087 get::RequestBuilder {
3088 client: self.0.clone(),
3089 organization: organization.into(),
3090 project: project.into(),
3091 board: board.into(),
3092 team: team.into(),
3093 }
3094 }
3095 #[doc = "Update board card settings for the board id or board by name"]
3096 #[doc = ""]
3097 #[doc = "Arguments:"]
3098 #[doc = "* `organization`: The name of the Azure DevOps organization."]
3099 #[doc = "* `project`: Project ID or project name"]
3100 #[doc = "* `team`: Team ID or team name"]
3101 pub fn update_board_card_settings(
3102 &self,
3103 organization: impl Into<String>,
3104 body: impl Into<models::BoardCardSettings>,
3105 project: impl Into<String>,
3106 board: impl Into<String>,
3107 team: impl Into<String>,
3108 ) -> update_board_card_settings::RequestBuilder {
3109 update_board_card_settings::RequestBuilder {
3110 client: self.0.clone(),
3111 organization: organization.into(),
3112 body: body.into(),
3113 project: project.into(),
3114 board: board.into(),
3115 team: team.into(),
3116 }
3117 }
3118 #[doc = "Update taskboard card settings"]
3119 #[doc = ""]
3120 #[doc = "Arguments:"]
3121 #[doc = "* `organization`: The name of the Azure DevOps organization."]
3122 #[doc = "* `project`: Project ID or project name"]
3123 #[doc = "* `team`: Team ID or team name"]
3124 pub fn update_taskboard_card_settings(
3125 &self,
3126 organization: impl Into<String>,
3127 body: impl Into<models::BoardCardSettings>,
3128 project: impl Into<String>,
3129 team: impl Into<String>,
3130 ) -> update_taskboard_card_settings::RequestBuilder {
3131 update_taskboard_card_settings::RequestBuilder {
3132 client: self.0.clone(),
3133 organization: organization.into(),
3134 body: body.into(),
3135 project: project.into(),
3136 team: team.into(),
3137 }
3138 }
3139 }
3140 pub mod get {
3141 use super::models;
3142 #[cfg(not(target_arch = "wasm32"))]
3143 use futures::future::BoxFuture;
3144 #[cfg(target_arch = "wasm32")]
3145 use futures::future::LocalBoxFuture as BoxFuture;
3146 #[derive(Debug)]
3147 pub struct Response(
3148 azure_core::http::Response<models::BoardCardSettings, azure_core::http::JsonFormat>,
3149 );
3150 impl Response {
3151 pub async fn into_body(self) -> azure_core::Result<models::BoardCardSettings> {
3152 self.0.into_body().await
3153 }
3154 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
3155 self.0.into()
3156 }
3157 }
3158 #[derive(Clone)]
3159 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3160 #[doc = r""]
3161 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3162 #[doc = r" parameters can be chained."]
3163 #[doc = r""]
3164 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3165 #[doc = r" converts the [`RequestBuilder`] into a future,"]
3166 #[doc = r" executes the request and returns a `Result` with the parsed"]
3167 #[doc = r" response."]
3168 #[doc = r""]
3169 #[doc = r" If you need lower-level access to the raw response details"]
3170 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3171 #[doc = r" can finalize the request using the"]
3172 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3173 #[doc = r" that resolves to a lower-level [`Response`] value."]
3174 pub struct RequestBuilder {
3175 pub(crate) client: super::super::Client,
3176 pub(crate) organization: String,
3177 pub(crate) project: String,
3178 pub(crate) board: String,
3179 pub(crate) team: String,
3180 }
3181 impl RequestBuilder {
3182 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3183 #[doc = ""]
3184 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3185 #[doc = "However, this function can provide more flexibility when required."]
3186 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3187 Box::pin({
3188 let this = self.clone();
3189 async move {
3190 let url = this.url()?;
3191 let mut req =
3192 azure_core::http::Request::new(url, azure_core::http::Method::Get);
3193 if let Some(auth_header) = this
3194 .client
3195 .token_credential()
3196 .http_authorization_header(&this.client.scopes())
3197 .await?
3198 {
3199 req.insert_header(
3200 azure_core::http::headers::AUTHORIZATION,
3201 auth_header,
3202 );
3203 }
3204 let req_body = azure_core::Bytes::new();
3205 req.set_body(req_body);
3206 Ok(Response(this.client.send(&mut req).await?.into()))
3207 }
3208 })
3209 }
3210 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
3211 let mut url = azure_core::http::Url::parse(&format!(
3212 "{}/{}/{}/{}/_apis/work/boards/{}/cardsettings",
3213 self.client.endpoint(),
3214 &self.organization,
3215 &self.project,
3216 &self.team,
3217 &self.board
3218 ))?;
3219 let has_api_version_already = url
3220 .query_pairs()
3221 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
3222 if !has_api_version_already {
3223 url.query_pairs_mut().append_pair(
3224 azure_core::http::headers::query_param::API_VERSION,
3225 "7.1-preview",
3226 );
3227 }
3228 Ok(url)
3229 }
3230 }
3231 impl std::future::IntoFuture for RequestBuilder {
3232 type Output = azure_core::Result<models::BoardCardSettings>;
3233 type IntoFuture = BoxFuture<'static, azure_core::Result<models::BoardCardSettings>>;
3234 #[doc = "Returns a future that sends the request and returns the parsed response body."]
3235 #[doc = ""]
3236 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3237 #[doc = ""]
3238 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3239 fn into_future(self) -> Self::IntoFuture {
3240 Box::pin(async move { self.send().await?.into_body().await })
3241 }
3242 }
3243 }
3244 pub mod update_board_card_settings {
3245 use super::models;
3246 #[cfg(not(target_arch = "wasm32"))]
3247 use futures::future::BoxFuture;
3248 #[cfg(target_arch = "wasm32")]
3249 use futures::future::LocalBoxFuture as BoxFuture;
3250 #[derive(Debug)]
3251 pub struct Response(
3252 azure_core::http::Response<models::BoardCardSettings, azure_core::http::JsonFormat>,
3253 );
3254 impl Response {
3255 pub async fn into_body(self) -> azure_core::Result<models::BoardCardSettings> {
3256 self.0.into_body().await
3257 }
3258 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
3259 self.0.into()
3260 }
3261 }
3262 #[derive(Clone)]
3263 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3264 #[doc = r""]
3265 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3266 #[doc = r" parameters can be chained."]
3267 #[doc = r""]
3268 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3269 #[doc = r" converts the [`RequestBuilder`] into a future,"]
3270 #[doc = r" executes the request and returns a `Result` with the parsed"]
3271 #[doc = r" response."]
3272 #[doc = r""]
3273 #[doc = r" If you need lower-level access to the raw response details"]
3274 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3275 #[doc = r" can finalize the request using the"]
3276 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3277 #[doc = r" that resolves to a lower-level [`Response`] value."]
3278 pub struct RequestBuilder {
3279 pub(crate) client: super::super::Client,
3280 pub(crate) organization: String,
3281 pub(crate) body: models::BoardCardSettings,
3282 pub(crate) project: String,
3283 pub(crate) board: String,
3284 pub(crate) team: String,
3285 }
3286 impl RequestBuilder {
3287 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3288 #[doc = ""]
3289 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3290 #[doc = "However, this function can provide more flexibility when required."]
3291 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3292 Box::pin({
3293 let this = self.clone();
3294 async move {
3295 let url = this.url()?;
3296 let mut req =
3297 azure_core::http::Request::new(url, azure_core::http::Method::Put);
3298 if let Some(auth_header) = this
3299 .client
3300 .token_credential()
3301 .http_authorization_header(&this.client.scopes())
3302 .await?
3303 {
3304 req.insert_header(
3305 azure_core::http::headers::AUTHORIZATION,
3306 auth_header,
3307 );
3308 }
3309 req.insert_header("content-type", "application/json");
3310 let req_body = azure_core::json::to_json(&this.body)?;
3311 req.set_body(req_body);
3312 Ok(Response(this.client.send(&mut req).await?.into()))
3313 }
3314 })
3315 }
3316 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
3317 let mut url = azure_core::http::Url::parse(&format!(
3318 "{}/{}/{}/{}/_apis/work/boards/{}/cardsettings",
3319 self.client.endpoint(),
3320 &self.organization,
3321 &self.project,
3322 &self.team,
3323 &self.board
3324 ))?;
3325 let has_api_version_already = url
3326 .query_pairs()
3327 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
3328 if !has_api_version_already {
3329 url.query_pairs_mut().append_pair(
3330 azure_core::http::headers::query_param::API_VERSION,
3331 "7.1-preview",
3332 );
3333 }
3334 Ok(url)
3335 }
3336 }
3337 impl std::future::IntoFuture for RequestBuilder {
3338 type Output = azure_core::Result<models::BoardCardSettings>;
3339 type IntoFuture = BoxFuture<'static, azure_core::Result<models::BoardCardSettings>>;
3340 #[doc = "Returns a future that sends the request and returns the parsed response body."]
3341 #[doc = ""]
3342 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3343 #[doc = ""]
3344 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3345 fn into_future(self) -> Self::IntoFuture {
3346 Box::pin(async move { self.send().await?.into_body().await })
3347 }
3348 }
3349 }
3350 pub mod update_taskboard_card_settings {
3351 use super::models;
3352 #[cfg(not(target_arch = "wasm32"))]
3353 use futures::future::BoxFuture;
3354 #[cfg(target_arch = "wasm32")]
3355 use futures::future::LocalBoxFuture as BoxFuture;
3356 #[derive(Debug)]
3357 pub struct Response(azure_core::http::Response<(), azure_core::http::NoFormat>);
3358 impl Response {
3359 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
3360 self.0.into()
3361 }
3362 }
3363 #[derive(Clone)]
3364 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3365 #[doc = r""]
3366 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3367 #[doc = r" parameters can be chained."]
3368 #[doc = r""]
3369 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3370 #[doc = r" converts the [`RequestBuilder`] into a future,"]
3371 #[doc = r" executes the request and returns a `Result` with the parsed"]
3372 #[doc = r" response."]
3373 #[doc = r""]
3374 #[doc = r" If you need lower-level access to the raw response details"]
3375 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3376 #[doc = r" can finalize the request using the"]
3377 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3378 #[doc = r" that resolves to a lower-level [`Response`] value."]
3379 pub struct RequestBuilder {
3380 pub(crate) client: super::super::Client,
3381 pub(crate) organization: String,
3382 pub(crate) body: models::BoardCardSettings,
3383 pub(crate) project: String,
3384 pub(crate) team: String,
3385 }
3386 impl RequestBuilder {
3387 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3388 #[doc = ""]
3389 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3390 #[doc = "However, this function can provide more flexibility when required."]
3391 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3392 Box::pin({
3393 let this = self.clone();
3394 async move {
3395 let url = this.url()?;
3396 let mut req =
3397 azure_core::http::Request::new(url, azure_core::http::Method::Put);
3398 if let Some(auth_header) = this
3399 .client
3400 .token_credential()
3401 .http_authorization_header(&this.client.scopes())
3402 .await?
3403 {
3404 req.insert_header(
3405 azure_core::http::headers::AUTHORIZATION,
3406 auth_header,
3407 );
3408 }
3409 req.insert_header("content-type", "application/json");
3410 let req_body = azure_core::json::to_json(&this.body)?;
3411 req.set_body(req_body);
3412 Ok(Response(this.client.send(&mut req).await?.into()))
3413 }
3414 })
3415 }
3416 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
3417 let mut url = azure_core::http::Url::parse(&format!(
3418 "{}/{}/{}/{}/_apis/work/taskboard/cardsettings",
3419 self.client.endpoint(),
3420 &self.organization,
3421 &self.project,
3422 &self.team
3423 ))?;
3424 let has_api_version_already = url
3425 .query_pairs()
3426 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
3427 if !has_api_version_already {
3428 url.query_pairs_mut().append_pair(
3429 azure_core::http::headers::query_param::API_VERSION,
3430 "7.1-preview",
3431 );
3432 }
3433 Ok(url)
3434 }
3435 }
3436 impl std::future::IntoFuture for RequestBuilder {
3437 type Output = azure_core::Result<()>;
3438 type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
3439 #[doc = "Returns a future that sends the request and waits for the response."]
3440 #[doc = ""]
3441 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3442 #[doc = ""]
3443 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3444 fn into_future(self) -> Self::IntoFuture {
3445 Box::pin(async move {
3446 let _rsp = self.send().await?;
3447 Ok(())
3448 })
3449 }
3450 }
3451 }
3452}
3453pub mod chartimages {
3454 use super::models;
3455 #[cfg(not(target_arch = "wasm32"))]
3456 use futures::future::BoxFuture;
3457 #[cfg(target_arch = "wasm32")]
3458 use futures::future::LocalBoxFuture as BoxFuture;
3459 pub struct Client(pub(crate) super::Client);
3460 impl Client {
3461 #[doc = "Get a board chart image."]
3462 #[doc = ""]
3463 #[doc = "Arguments:"]
3464 #[doc = "* `organization`: The name of the Azure DevOps organization."]
3465 #[doc = "* `project`: Project ID or project name"]
3466 #[doc = "* `team`: Team ID or team name"]
3467 #[doc = "* `board`: Identifier for board, either board's backlog level name (e.g. \"Issues\") or Id."]
3468 #[doc = "* `name`: The chart name. e.g. CumulativeFlow."]
3469 pub fn get_board_chart_image(
3470 &self,
3471 organization: impl Into<String>,
3472 project: impl Into<String>,
3473 team: impl Into<String>,
3474 board: impl Into<String>,
3475 name: impl Into<String>,
3476 ) -> get_board_chart_image::RequestBuilder {
3477 get_board_chart_image::RequestBuilder {
3478 client: self.0.clone(),
3479 organization: organization.into(),
3480 project: project.into(),
3481 team: team.into(),
3482 board: board.into(),
3483 name: name.into(),
3484 width: None,
3485 height: None,
3486 show_details: None,
3487 title: None,
3488 }
3489 }
3490 #[doc = "Get an iteration chart image."]
3491 #[doc = ""]
3492 #[doc = "Arguments:"]
3493 #[doc = "* `organization`: The name of the Azure DevOps organization."]
3494 #[doc = "* `project`: Project ID or project name"]
3495 #[doc = "* `team`: Team ID or team name"]
3496 #[doc = "* `iteration_id`: ID of the iteration."]
3497 #[doc = "* `name`: The chart name. e.g. Burndown."]
3498 pub fn get_iteration_chart_image(
3499 &self,
3500 organization: impl Into<String>,
3501 project: impl Into<String>,
3502 team: impl Into<String>,
3503 iteration_id: impl Into<String>,
3504 name: impl Into<String>,
3505 ) -> get_iteration_chart_image::RequestBuilder {
3506 get_iteration_chart_image::RequestBuilder {
3507 client: self.0.clone(),
3508 organization: organization.into(),
3509 project: project.into(),
3510 team: team.into(),
3511 iteration_id: iteration_id.into(),
3512 name: name.into(),
3513 width: None,
3514 height: None,
3515 show_details: None,
3516 title: None,
3517 }
3518 }
3519 #[doc = "Get an iterations chart image."]
3520 #[doc = ""]
3521 #[doc = "Arguments:"]
3522 #[doc = "* `organization`: The name of the Azure DevOps organization."]
3523 #[doc = "* `project`: Project ID or project name"]
3524 #[doc = "* `team`: Team ID or team name"]
3525 #[doc = "* `name`: The chart name. e.g. Velocity."]
3526 pub fn get_iterations_chart_image(
3527 &self,
3528 organization: impl Into<String>,
3529 project: impl Into<String>,
3530 team: impl Into<String>,
3531 name: impl Into<String>,
3532 ) -> get_iterations_chart_image::RequestBuilder {
3533 get_iterations_chart_image::RequestBuilder {
3534 client: self.0.clone(),
3535 organization: organization.into(),
3536 project: project.into(),
3537 team: team.into(),
3538 name: name.into(),
3539 iterations_number: None,
3540 width: None,
3541 height: None,
3542 show_details: None,
3543 title: None,
3544 }
3545 }
3546 }
3547 pub mod get_board_chart_image {
3548 use super::models;
3549 #[cfg(not(target_arch = "wasm32"))]
3550 use futures::future::BoxFuture;
3551 #[cfg(target_arch = "wasm32")]
3552 use futures::future::LocalBoxFuture as BoxFuture;
3553 #[derive(Debug)]
3554 pub struct Response(azure_core::http::Response<String, azure_core::http::JsonFormat>);
3555 impl Response {
3556 pub async fn into_body(self) -> azure_core::Result<String> {
3557 self.0.into_body().await
3558 }
3559 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
3560 self.0.into()
3561 }
3562 }
3563 #[derive(Clone)]
3564 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3565 #[doc = r""]
3566 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3567 #[doc = r" parameters can be chained."]
3568 #[doc = r""]
3569 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3570 #[doc = r" converts the [`RequestBuilder`] into a future,"]
3571 #[doc = r" executes the request and returns a `Result` with the parsed"]
3572 #[doc = r" response."]
3573 #[doc = r""]
3574 #[doc = r" If you need lower-level access to the raw response details"]
3575 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3576 #[doc = r" can finalize the request using the"]
3577 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3578 #[doc = r" that resolves to a lower-level [`Response`] value."]
3579 pub struct RequestBuilder {
3580 pub(crate) client: super::super::Client,
3581 pub(crate) organization: String,
3582 pub(crate) project: String,
3583 pub(crate) team: String,
3584 pub(crate) board: String,
3585 pub(crate) name: String,
3586 pub(crate) width: Option<i32>,
3587 pub(crate) height: Option<i32>,
3588 pub(crate) show_details: Option<bool>,
3589 pub(crate) title: Option<String>,
3590 }
3591 impl RequestBuilder {
3592 #[doc = "The width of the chart in pixels. Must be greater than 0."]
3593 pub fn width(mut self, width: i32) -> Self {
3594 self.width = Some(width);
3595 self
3596 }
3597 #[doc = "The height of the chart in pixels. Must be greater than 0."]
3598 pub fn height(mut self, height: i32) -> Self {
3599 self.height = Some(height);
3600 self
3601 }
3602 #[doc = "Whether or not the chart should include detailed information (e.g. axis labels, titles, trend lines, etc.)."]
3603 pub fn show_details(mut self, show_details: bool) -> Self {
3604 self.show_details = Some(show_details);
3605 self
3606 }
3607 #[doc = "The title of the chart. Can only be displayed if ShowLabels is true."]
3608 pub fn title(mut self, title: impl Into<String>) -> Self {
3609 self.title = Some(title.into());
3610 self
3611 }
3612 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3613 #[doc = ""]
3614 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3615 #[doc = "However, this function can provide more flexibility when required."]
3616 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3617 Box::pin({
3618 let this = self.clone();
3619 async move {
3620 let url = this.url()?;
3621 let mut req =
3622 azure_core::http::Request::new(url, azure_core::http::Method::Get);
3623 if let Some(auth_header) = this
3624 .client
3625 .token_credential()
3626 .http_authorization_header(&this.client.scopes())
3627 .await?
3628 {
3629 req.insert_header(
3630 azure_core::http::headers::AUTHORIZATION,
3631 auth_header,
3632 );
3633 }
3634 if let Some(width) = &this.width {
3635 req.url_mut()
3636 .query_pairs_mut()
3637 .append_pair("width", &width.to_string());
3638 }
3639 if let Some(height) = &this.height {
3640 req.url_mut()
3641 .query_pairs_mut()
3642 .append_pair("height", &height.to_string());
3643 }
3644 if let Some(show_details) = &this.show_details {
3645 req.url_mut()
3646 .query_pairs_mut()
3647 .append_pair("showDetails", &show_details.to_string());
3648 }
3649 if let Some(title) = &this.title {
3650 req.url_mut().query_pairs_mut().append_pair("title", title);
3651 }
3652 let req_body = azure_core::Bytes::new();
3653 req.set_body(req_body);
3654 Ok(Response(this.client.send(&mut req).await?.into()))
3655 }
3656 })
3657 }
3658 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
3659 let mut url = azure_core::http::Url::parse(&format!(
3660 "{}/{}/{}/{}/_apis/work/boards/{}/chartimages/{}",
3661 self.client.endpoint(),
3662 &self.organization,
3663 &self.project,
3664 &self.team,
3665 &self.board,
3666 &self.name
3667 ))?;
3668 let has_api_version_already = url
3669 .query_pairs()
3670 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
3671 if !has_api_version_already {
3672 url.query_pairs_mut().append_pair(
3673 azure_core::http::headers::query_param::API_VERSION,
3674 "7.1-preview",
3675 );
3676 }
3677 Ok(url)
3678 }
3679 }
3680 impl std::future::IntoFuture for RequestBuilder {
3681 type Output = azure_core::Result<String>;
3682 type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
3683 #[doc = "Returns a future that sends the request and returns the parsed response body."]
3684 #[doc = ""]
3685 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3686 #[doc = ""]
3687 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3688 fn into_future(self) -> Self::IntoFuture {
3689 Box::pin(async move { self.send().await?.into_body().await })
3690 }
3691 }
3692 }
3693 pub mod get_iteration_chart_image {
3694 use super::models;
3695 #[cfg(not(target_arch = "wasm32"))]
3696 use futures::future::BoxFuture;
3697 #[cfg(target_arch = "wasm32")]
3698 use futures::future::LocalBoxFuture as BoxFuture;
3699 #[derive(Debug)]
3700 pub struct Response(azure_core::http::Response<String, azure_core::http::JsonFormat>);
3701 impl Response {
3702 pub async fn into_body(self) -> azure_core::Result<String> {
3703 self.0.into_body().await
3704 }
3705 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
3706 self.0.into()
3707 }
3708 }
3709 #[derive(Clone)]
3710 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3711 #[doc = r""]
3712 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3713 #[doc = r" parameters can be chained."]
3714 #[doc = r""]
3715 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3716 #[doc = r" converts the [`RequestBuilder`] into a future,"]
3717 #[doc = r" executes the request and returns a `Result` with the parsed"]
3718 #[doc = r" response."]
3719 #[doc = r""]
3720 #[doc = r" If you need lower-level access to the raw response details"]
3721 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3722 #[doc = r" can finalize the request using the"]
3723 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3724 #[doc = r" that resolves to a lower-level [`Response`] value."]
3725 pub struct RequestBuilder {
3726 pub(crate) client: super::super::Client,
3727 pub(crate) organization: String,
3728 pub(crate) project: String,
3729 pub(crate) team: String,
3730 pub(crate) iteration_id: String,
3731 pub(crate) name: String,
3732 pub(crate) width: Option<i32>,
3733 pub(crate) height: Option<i32>,
3734 pub(crate) show_details: Option<bool>,
3735 pub(crate) title: Option<String>,
3736 }
3737 impl RequestBuilder {
3738 #[doc = "The width of the chart in pixels. Must be greater than 0."]
3739 pub fn width(mut self, width: i32) -> Self {
3740 self.width = Some(width);
3741 self
3742 }
3743 #[doc = "The height of the chart in pixels. Must be greater than 0."]
3744 pub fn height(mut self, height: i32) -> Self {
3745 self.height = Some(height);
3746 self
3747 }
3748 #[doc = "Whether or not the chart should include detailed information (e.g. axis labels, titles, trend lines, etc.)"]
3749 pub fn show_details(mut self, show_details: bool) -> Self {
3750 self.show_details = Some(show_details);
3751 self
3752 }
3753 #[doc = "The title of the chart. Can only be displayed if ShowLabels is true."]
3754 pub fn title(mut self, title: impl Into<String>) -> Self {
3755 self.title = Some(title.into());
3756 self
3757 }
3758 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3759 #[doc = ""]
3760 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3761 #[doc = "However, this function can provide more flexibility when required."]
3762 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3763 Box::pin({
3764 let this = self.clone();
3765 async move {
3766 let url = this.url()?;
3767 let mut req =
3768 azure_core::http::Request::new(url, azure_core::http::Method::Get);
3769 if let Some(auth_header) = this
3770 .client
3771 .token_credential()
3772 .http_authorization_header(&this.client.scopes())
3773 .await?
3774 {
3775 req.insert_header(
3776 azure_core::http::headers::AUTHORIZATION,
3777 auth_header,
3778 );
3779 }
3780 if let Some(width) = &this.width {
3781 req.url_mut()
3782 .query_pairs_mut()
3783 .append_pair("width", &width.to_string());
3784 }
3785 if let Some(height) = &this.height {
3786 req.url_mut()
3787 .query_pairs_mut()
3788 .append_pair("height", &height.to_string());
3789 }
3790 if let Some(show_details) = &this.show_details {
3791 req.url_mut()
3792 .query_pairs_mut()
3793 .append_pair("showDetails", &show_details.to_string());
3794 }
3795 if let Some(title) = &this.title {
3796 req.url_mut().query_pairs_mut().append_pair("title", title);
3797 }
3798 let req_body = azure_core::Bytes::new();
3799 req.set_body(req_body);
3800 Ok(Response(this.client.send(&mut req).await?.into()))
3801 }
3802 })
3803 }
3804 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
3805 let mut url = azure_core::http::Url::parse(&format!(
3806 "{}/{}/{}/{}/_apis/work/iterations/{}/chartimages/{}",
3807 self.client.endpoint(),
3808 &self.organization,
3809 &self.project,
3810 &self.team,
3811 &self.iteration_id,
3812 &self.name
3813 ))?;
3814 let has_api_version_already = url
3815 .query_pairs()
3816 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
3817 if !has_api_version_already {
3818 url.query_pairs_mut().append_pair(
3819 azure_core::http::headers::query_param::API_VERSION,
3820 "7.1-preview",
3821 );
3822 }
3823 Ok(url)
3824 }
3825 }
3826 impl std::future::IntoFuture for RequestBuilder {
3827 type Output = azure_core::Result<String>;
3828 type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
3829 #[doc = "Returns a future that sends the request and returns the parsed response body."]
3830 #[doc = ""]
3831 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3832 #[doc = ""]
3833 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3834 fn into_future(self) -> Self::IntoFuture {
3835 Box::pin(async move { self.send().await?.into_body().await })
3836 }
3837 }
3838 }
3839 pub mod get_iterations_chart_image {
3840 use super::models;
3841 #[cfg(not(target_arch = "wasm32"))]
3842 use futures::future::BoxFuture;
3843 #[cfg(target_arch = "wasm32")]
3844 use futures::future::LocalBoxFuture as BoxFuture;
3845 #[derive(Debug)]
3846 pub struct Response(azure_core::http::Response<String, azure_core::http::JsonFormat>);
3847 impl Response {
3848 pub async fn into_body(self) -> azure_core::Result<String> {
3849 self.0.into_body().await
3850 }
3851 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
3852 self.0.into()
3853 }
3854 }
3855 #[derive(Clone)]
3856 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
3857 #[doc = r""]
3858 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
3859 #[doc = r" parameters can be chained."]
3860 #[doc = r""]
3861 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
3862 #[doc = r" converts the [`RequestBuilder`] into a future,"]
3863 #[doc = r" executes the request and returns a `Result` with the parsed"]
3864 #[doc = r" response."]
3865 #[doc = r""]
3866 #[doc = r" If you need lower-level access to the raw response details"]
3867 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
3868 #[doc = r" can finalize the request using the"]
3869 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
3870 #[doc = r" that resolves to a lower-level [`Response`] value."]
3871 pub struct RequestBuilder {
3872 pub(crate) client: super::super::Client,
3873 pub(crate) organization: String,
3874 pub(crate) project: String,
3875 pub(crate) team: String,
3876 pub(crate) name: String,
3877 pub(crate) iterations_number: Option<i32>,
3878 pub(crate) width: Option<i32>,
3879 pub(crate) height: Option<i32>,
3880 pub(crate) show_details: Option<bool>,
3881 pub(crate) title: Option<String>,
3882 }
3883 impl RequestBuilder {
3884 #[doc = "Number of iterations the chart is for."]
3885 pub fn iterations_number(mut self, iterations_number: i32) -> Self {
3886 self.iterations_number = Some(iterations_number);
3887 self
3888 }
3889 #[doc = "The width of the chart in pixels. Must be greater than 0."]
3890 pub fn width(mut self, width: i32) -> Self {
3891 self.width = Some(width);
3892 self
3893 }
3894 #[doc = "The height of the chart in pixels. Must be greater than 0."]
3895 pub fn height(mut self, height: i32) -> Self {
3896 self.height = Some(height);
3897 self
3898 }
3899 #[doc = "Whether or not the chart should include detailed information (e.g. axis labels, titles, trend lines, etc.)"]
3900 pub fn show_details(mut self, show_details: bool) -> Self {
3901 self.show_details = Some(show_details);
3902 self
3903 }
3904 #[doc = "The title of the chart. Can only be displayed if ShowLabels is true."]
3905 pub fn title(mut self, title: impl Into<String>) -> Self {
3906 self.title = Some(title.into());
3907 self
3908 }
3909 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
3910 #[doc = ""]
3911 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
3912 #[doc = "However, this function can provide more flexibility when required."]
3913 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
3914 Box::pin({
3915 let this = self.clone();
3916 async move {
3917 let url = this.url()?;
3918 let mut req =
3919 azure_core::http::Request::new(url, azure_core::http::Method::Get);
3920 if let Some(auth_header) = this
3921 .client
3922 .token_credential()
3923 .http_authorization_header(&this.client.scopes())
3924 .await?
3925 {
3926 req.insert_header(
3927 azure_core::http::headers::AUTHORIZATION,
3928 auth_header,
3929 );
3930 }
3931 if let Some(iterations_number) = &this.iterations_number {
3932 req.url_mut()
3933 .query_pairs_mut()
3934 .append_pair("iterationsNumber", &iterations_number.to_string());
3935 }
3936 if let Some(width) = &this.width {
3937 req.url_mut()
3938 .query_pairs_mut()
3939 .append_pair("width", &width.to_string());
3940 }
3941 if let Some(height) = &this.height {
3942 req.url_mut()
3943 .query_pairs_mut()
3944 .append_pair("height", &height.to_string());
3945 }
3946 if let Some(show_details) = &this.show_details {
3947 req.url_mut()
3948 .query_pairs_mut()
3949 .append_pair("showDetails", &show_details.to_string());
3950 }
3951 if let Some(title) = &this.title {
3952 req.url_mut().query_pairs_mut().append_pair("title", title);
3953 }
3954 let req_body = azure_core::Bytes::new();
3955 req.set_body(req_body);
3956 Ok(Response(this.client.send(&mut req).await?.into()))
3957 }
3958 })
3959 }
3960 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
3961 let mut url = azure_core::http::Url::parse(&format!(
3962 "{}/{}/{}/{}/_apis/work/iterations/chartimages/{}",
3963 self.client.endpoint(),
3964 &self.organization,
3965 &self.project,
3966 &self.team,
3967 &self.name
3968 ))?;
3969 let has_api_version_already = url
3970 .query_pairs()
3971 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
3972 if !has_api_version_already {
3973 url.query_pairs_mut().append_pair(
3974 azure_core::http::headers::query_param::API_VERSION,
3975 "7.1-preview",
3976 );
3977 }
3978 Ok(url)
3979 }
3980 }
3981 impl std::future::IntoFuture for RequestBuilder {
3982 type Output = azure_core::Result<String>;
3983 type IntoFuture = BoxFuture<'static, azure_core::Result<String>>;
3984 #[doc = "Returns a future that sends the request and returns the parsed response body."]
3985 #[doc = ""]
3986 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
3987 #[doc = ""]
3988 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
3989 fn into_future(self) -> Self::IntoFuture {
3990 Box::pin(async move { self.send().await?.into_body().await })
3991 }
3992 }
3993 }
3994}
3995pub mod charts {
3996 use super::models;
3997 #[cfg(not(target_arch = "wasm32"))]
3998 use futures::future::BoxFuture;
3999 #[cfg(target_arch = "wasm32")]
4000 use futures::future::LocalBoxFuture as BoxFuture;
4001 pub struct Client(pub(crate) super::Client);
4002 impl Client {
4003 #[doc = "Get board charts"]
4004 #[doc = ""]
4005 #[doc = "Arguments:"]
4006 #[doc = "* `organization`: The name of the Azure DevOps organization."]
4007 #[doc = "* `project`: Project ID or project name"]
4008 #[doc = "* `board`: Identifier for board, either board's backlog level name (Eg:\"Stories\") or Id"]
4009 #[doc = "* `team`: Team ID or team name"]
4010 pub fn list(
4011 &self,
4012 organization: impl Into<String>,
4013 project: impl Into<String>,
4014 board: impl Into<String>,
4015 team: impl Into<String>,
4016 ) -> list::RequestBuilder {
4017 list::RequestBuilder {
4018 client: self.0.clone(),
4019 organization: organization.into(),
4020 project: project.into(),
4021 board: board.into(),
4022 team: team.into(),
4023 }
4024 }
4025 #[doc = "Get a board chart"]
4026 #[doc = ""]
4027 #[doc = "Arguments:"]
4028 #[doc = "* `organization`: The name of the Azure DevOps organization."]
4029 #[doc = "* `project`: Project ID or project name"]
4030 #[doc = "* `board`: Identifier for board, either board's backlog level name (Eg:\"Stories\") or Id"]
4031 #[doc = "* `name`: The chart name"]
4032 #[doc = "* `team`: Team ID or team name"]
4033 pub fn get(
4034 &self,
4035 organization: impl Into<String>,
4036 project: impl Into<String>,
4037 board: impl Into<String>,
4038 name: impl Into<String>,
4039 team: impl Into<String>,
4040 ) -> get::RequestBuilder {
4041 get::RequestBuilder {
4042 client: self.0.clone(),
4043 organization: organization.into(),
4044 project: project.into(),
4045 board: board.into(),
4046 name: name.into(),
4047 team: team.into(),
4048 }
4049 }
4050 #[doc = "Update a board chart"]
4051 #[doc = ""]
4052 #[doc = "Arguments:"]
4053 #[doc = "* `organization`: The name of the Azure DevOps organization."]
4054 #[doc = "* `project`: Project ID or project name"]
4055 #[doc = "* `board`: Identifier for board, either board's backlog level name (Eg:\"Stories\") or Id"]
4056 #[doc = "* `name`: The chart name"]
4057 #[doc = "* `team`: Team ID or team name"]
4058 pub fn update(
4059 &self,
4060 organization: impl Into<String>,
4061 body: impl Into<models::BoardChart>,
4062 project: impl Into<String>,
4063 board: impl Into<String>,
4064 name: impl Into<String>,
4065 team: impl Into<String>,
4066 ) -> update::RequestBuilder {
4067 update::RequestBuilder {
4068 client: self.0.clone(),
4069 organization: organization.into(),
4070 body: body.into(),
4071 project: project.into(),
4072 board: board.into(),
4073 name: name.into(),
4074 team: team.into(),
4075 }
4076 }
4077 }
4078 pub mod list {
4079 use super::models;
4080 #[cfg(not(target_arch = "wasm32"))]
4081 use futures::future::BoxFuture;
4082 #[cfg(target_arch = "wasm32")]
4083 use futures::future::LocalBoxFuture as BoxFuture;
4084 #[derive(Debug)]
4085 pub struct Response(
4086 azure_core::http::Response<
4087 models::BoardChartReferenceList,
4088 azure_core::http::JsonFormat,
4089 >,
4090 );
4091 impl Response {
4092 pub async fn into_body(self) -> azure_core::Result<models::BoardChartReferenceList> {
4093 self.0.into_body().await
4094 }
4095 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
4096 self.0.into()
4097 }
4098 }
4099 #[derive(Clone)]
4100 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4101 #[doc = r""]
4102 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4103 #[doc = r" parameters can be chained."]
4104 #[doc = r""]
4105 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4106 #[doc = r" converts the [`RequestBuilder`] into a future,"]
4107 #[doc = r" executes the request and returns a `Result` with the parsed"]
4108 #[doc = r" response."]
4109 #[doc = r""]
4110 #[doc = r" If you need lower-level access to the raw response details"]
4111 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4112 #[doc = r" can finalize the request using the"]
4113 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4114 #[doc = r" that resolves to a lower-level [`Response`] value."]
4115 pub struct RequestBuilder {
4116 pub(crate) client: super::super::Client,
4117 pub(crate) organization: String,
4118 pub(crate) project: String,
4119 pub(crate) board: String,
4120 pub(crate) team: String,
4121 }
4122 impl RequestBuilder {
4123 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4124 #[doc = ""]
4125 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4126 #[doc = "However, this function can provide more flexibility when required."]
4127 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4128 Box::pin({
4129 let this = self.clone();
4130 async move {
4131 let url = this.url()?;
4132 let mut req =
4133 azure_core::http::Request::new(url, azure_core::http::Method::Get);
4134 if let Some(auth_header) = this
4135 .client
4136 .token_credential()
4137 .http_authorization_header(&this.client.scopes())
4138 .await?
4139 {
4140 req.insert_header(
4141 azure_core::http::headers::AUTHORIZATION,
4142 auth_header,
4143 );
4144 }
4145 let req_body = azure_core::Bytes::new();
4146 req.set_body(req_body);
4147 Ok(Response(this.client.send(&mut req).await?.into()))
4148 }
4149 })
4150 }
4151 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
4152 let mut url = azure_core::http::Url::parse(&format!(
4153 "{}/{}/{}/{}/_apis/work/boards/{}/charts",
4154 self.client.endpoint(),
4155 &self.organization,
4156 &self.project,
4157 &self.team,
4158 &self.board
4159 ))?;
4160 let has_api_version_already = url
4161 .query_pairs()
4162 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
4163 if !has_api_version_already {
4164 url.query_pairs_mut().append_pair(
4165 azure_core::http::headers::query_param::API_VERSION,
4166 "7.1-preview",
4167 );
4168 }
4169 Ok(url)
4170 }
4171 }
4172 impl std::future::IntoFuture for RequestBuilder {
4173 type Output = azure_core::Result<models::BoardChartReferenceList>;
4174 type IntoFuture =
4175 BoxFuture<'static, azure_core::Result<models::BoardChartReferenceList>>;
4176 #[doc = "Returns a future that sends the request and returns the parsed response body."]
4177 #[doc = ""]
4178 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4179 #[doc = ""]
4180 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4181 fn into_future(self) -> Self::IntoFuture {
4182 Box::pin(async move { self.send().await?.into_body().await })
4183 }
4184 }
4185 }
4186 pub mod get {
4187 use super::models;
4188 #[cfg(not(target_arch = "wasm32"))]
4189 use futures::future::BoxFuture;
4190 #[cfg(target_arch = "wasm32")]
4191 use futures::future::LocalBoxFuture as BoxFuture;
4192 #[derive(Debug)]
4193 pub struct Response(
4194 azure_core::http::Response<models::BoardChart, azure_core::http::JsonFormat>,
4195 );
4196 impl Response {
4197 pub async fn into_body(self) -> azure_core::Result<models::BoardChart> {
4198 self.0.into_body().await
4199 }
4200 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
4201 self.0.into()
4202 }
4203 }
4204 #[derive(Clone)]
4205 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4206 #[doc = r""]
4207 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4208 #[doc = r" parameters can be chained."]
4209 #[doc = r""]
4210 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4211 #[doc = r" converts the [`RequestBuilder`] into a future,"]
4212 #[doc = r" executes the request and returns a `Result` with the parsed"]
4213 #[doc = r" response."]
4214 #[doc = r""]
4215 #[doc = r" If you need lower-level access to the raw response details"]
4216 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4217 #[doc = r" can finalize the request using the"]
4218 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4219 #[doc = r" that resolves to a lower-level [`Response`] value."]
4220 pub struct RequestBuilder {
4221 pub(crate) client: super::super::Client,
4222 pub(crate) organization: String,
4223 pub(crate) project: String,
4224 pub(crate) board: String,
4225 pub(crate) name: String,
4226 pub(crate) team: String,
4227 }
4228 impl RequestBuilder {
4229 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4230 #[doc = ""]
4231 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4232 #[doc = "However, this function can provide more flexibility when required."]
4233 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4234 Box::pin({
4235 let this = self.clone();
4236 async move {
4237 let url = this.url()?;
4238 let mut req =
4239 azure_core::http::Request::new(url, azure_core::http::Method::Get);
4240 if let Some(auth_header) = this
4241 .client
4242 .token_credential()
4243 .http_authorization_header(&this.client.scopes())
4244 .await?
4245 {
4246 req.insert_header(
4247 azure_core::http::headers::AUTHORIZATION,
4248 auth_header,
4249 );
4250 }
4251 let req_body = azure_core::Bytes::new();
4252 req.set_body(req_body);
4253 Ok(Response(this.client.send(&mut req).await?.into()))
4254 }
4255 })
4256 }
4257 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
4258 let mut url = azure_core::http::Url::parse(&format!(
4259 "{}/{}/{}/{}/_apis/work/boards/{}/charts/{}",
4260 self.client.endpoint(),
4261 &self.organization,
4262 &self.project,
4263 &self.team,
4264 &self.board,
4265 &self.name
4266 ))?;
4267 let has_api_version_already = url
4268 .query_pairs()
4269 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
4270 if !has_api_version_already {
4271 url.query_pairs_mut().append_pair(
4272 azure_core::http::headers::query_param::API_VERSION,
4273 "7.1-preview",
4274 );
4275 }
4276 Ok(url)
4277 }
4278 }
4279 impl std::future::IntoFuture for RequestBuilder {
4280 type Output = azure_core::Result<models::BoardChart>;
4281 type IntoFuture = BoxFuture<'static, azure_core::Result<models::BoardChart>>;
4282 #[doc = "Returns a future that sends the request and returns the parsed response body."]
4283 #[doc = ""]
4284 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4285 #[doc = ""]
4286 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4287 fn into_future(self) -> Self::IntoFuture {
4288 Box::pin(async move { self.send().await?.into_body().await })
4289 }
4290 }
4291 }
4292 pub mod update {
4293 use super::models;
4294 #[cfg(not(target_arch = "wasm32"))]
4295 use futures::future::BoxFuture;
4296 #[cfg(target_arch = "wasm32")]
4297 use futures::future::LocalBoxFuture as BoxFuture;
4298 #[derive(Debug)]
4299 pub struct Response(
4300 azure_core::http::Response<models::BoardChart, azure_core::http::JsonFormat>,
4301 );
4302 impl Response {
4303 pub async fn into_body(self) -> azure_core::Result<models::BoardChart> {
4304 self.0.into_body().await
4305 }
4306 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
4307 self.0.into()
4308 }
4309 }
4310 #[derive(Clone)]
4311 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4312 #[doc = r""]
4313 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4314 #[doc = r" parameters can be chained."]
4315 #[doc = r""]
4316 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4317 #[doc = r" converts the [`RequestBuilder`] into a future,"]
4318 #[doc = r" executes the request and returns a `Result` with the parsed"]
4319 #[doc = r" response."]
4320 #[doc = r""]
4321 #[doc = r" If you need lower-level access to the raw response details"]
4322 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4323 #[doc = r" can finalize the request using the"]
4324 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4325 #[doc = r" that resolves to a lower-level [`Response`] value."]
4326 pub struct RequestBuilder {
4327 pub(crate) client: super::super::Client,
4328 pub(crate) organization: String,
4329 pub(crate) body: models::BoardChart,
4330 pub(crate) project: String,
4331 pub(crate) board: String,
4332 pub(crate) name: String,
4333 pub(crate) team: String,
4334 }
4335 impl RequestBuilder {
4336 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4337 #[doc = ""]
4338 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4339 #[doc = "However, this function can provide more flexibility when required."]
4340 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4341 Box::pin({
4342 let this = self.clone();
4343 async move {
4344 let url = this.url()?;
4345 let mut req =
4346 azure_core::http::Request::new(url, azure_core::http::Method::Patch);
4347 if let Some(auth_header) = this
4348 .client
4349 .token_credential()
4350 .http_authorization_header(&this.client.scopes())
4351 .await?
4352 {
4353 req.insert_header(
4354 azure_core::http::headers::AUTHORIZATION,
4355 auth_header,
4356 );
4357 }
4358 req.insert_header("content-type", "application/json");
4359 let req_body = azure_core::json::to_json(&this.body)?;
4360 req.set_body(req_body);
4361 Ok(Response(this.client.send(&mut req).await?.into()))
4362 }
4363 })
4364 }
4365 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
4366 let mut url = azure_core::http::Url::parse(&format!(
4367 "{}/{}/{}/{}/_apis/work/boards/{}/charts/{}",
4368 self.client.endpoint(),
4369 &self.organization,
4370 &self.project,
4371 &self.team,
4372 &self.board,
4373 &self.name
4374 ))?;
4375 let has_api_version_already = url
4376 .query_pairs()
4377 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
4378 if !has_api_version_already {
4379 url.query_pairs_mut().append_pair(
4380 azure_core::http::headers::query_param::API_VERSION,
4381 "7.1-preview",
4382 );
4383 }
4384 Ok(url)
4385 }
4386 }
4387 impl std::future::IntoFuture for RequestBuilder {
4388 type Output = azure_core::Result<models::BoardChart>;
4389 type IntoFuture = BoxFuture<'static, azure_core::Result<models::BoardChart>>;
4390 #[doc = "Returns a future that sends the request and returns the parsed response body."]
4391 #[doc = ""]
4392 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4393 #[doc = ""]
4394 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4395 fn into_future(self) -> Self::IntoFuture {
4396 Box::pin(async move { self.send().await?.into_body().await })
4397 }
4398 }
4399 }
4400}
4401pub mod columns {
4402 use super::models;
4403 #[cfg(not(target_arch = "wasm32"))]
4404 use futures::future::BoxFuture;
4405 #[cfg(target_arch = "wasm32")]
4406 use futures::future::LocalBoxFuture as BoxFuture;
4407 pub struct Client(pub(crate) super::Client);
4408 impl Client {
4409 #[doc = "Get columns on a board"]
4410 #[doc = ""]
4411 #[doc = "Arguments:"]
4412 #[doc = "* `organization`: The name of the Azure DevOps organization."]
4413 #[doc = "* `project`: Project ID or project name"]
4414 #[doc = "* `board`: Name or ID of the specific board"]
4415 #[doc = "* `team`: Team ID or team name"]
4416 pub fn list(
4417 &self,
4418 organization: impl Into<String>,
4419 project: impl Into<String>,
4420 board: impl Into<String>,
4421 team: impl Into<String>,
4422 ) -> list::RequestBuilder {
4423 list::RequestBuilder {
4424 client: self.0.clone(),
4425 organization: organization.into(),
4426 project: project.into(),
4427 board: board.into(),
4428 team: team.into(),
4429 }
4430 }
4431 #[doc = "Update columns on a board"]
4432 #[doc = ""]
4433 #[doc = "Arguments:"]
4434 #[doc = "* `organization`: The name of the Azure DevOps organization."]
4435 #[doc = "* `body`: List of board columns to update"]
4436 #[doc = "* `project`: Project ID or project name"]
4437 #[doc = "* `board`: Name or ID of the specific board"]
4438 #[doc = "* `team`: Team ID or team name"]
4439 pub fn update(
4440 &self,
4441 organization: impl Into<String>,
4442 body: Vec<models::BoardColumn>,
4443 project: impl Into<String>,
4444 board: impl Into<String>,
4445 team: impl Into<String>,
4446 ) -> update::RequestBuilder {
4447 update::RequestBuilder {
4448 client: self.0.clone(),
4449 organization: organization.into(),
4450 body,
4451 project: project.into(),
4452 board: board.into(),
4453 team: team.into(),
4454 }
4455 }
4456 }
4457 pub mod list {
4458 use super::models;
4459 #[cfg(not(target_arch = "wasm32"))]
4460 use futures::future::BoxFuture;
4461 #[cfg(target_arch = "wasm32")]
4462 use futures::future::LocalBoxFuture as BoxFuture;
4463 #[derive(Debug)]
4464 pub struct Response(
4465 azure_core::http::Response<models::BoardColumnList, azure_core::http::JsonFormat>,
4466 );
4467 impl Response {
4468 pub async fn into_body(self) -> azure_core::Result<models::BoardColumnList> {
4469 self.0.into_body().await
4470 }
4471 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
4472 self.0.into()
4473 }
4474 }
4475 #[derive(Clone)]
4476 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4477 #[doc = r""]
4478 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4479 #[doc = r" parameters can be chained."]
4480 #[doc = r""]
4481 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4482 #[doc = r" converts the [`RequestBuilder`] into a future,"]
4483 #[doc = r" executes the request and returns a `Result` with the parsed"]
4484 #[doc = r" response."]
4485 #[doc = r""]
4486 #[doc = r" If you need lower-level access to the raw response details"]
4487 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4488 #[doc = r" can finalize the request using the"]
4489 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4490 #[doc = r" that resolves to a lower-level [`Response`] value."]
4491 pub struct RequestBuilder {
4492 pub(crate) client: super::super::Client,
4493 pub(crate) organization: String,
4494 pub(crate) project: String,
4495 pub(crate) board: String,
4496 pub(crate) team: String,
4497 }
4498 impl RequestBuilder {
4499 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4500 #[doc = ""]
4501 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4502 #[doc = "However, this function can provide more flexibility when required."]
4503 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4504 Box::pin({
4505 let this = self.clone();
4506 async move {
4507 let url = this.url()?;
4508 let mut req =
4509 azure_core::http::Request::new(url, azure_core::http::Method::Get);
4510 if let Some(auth_header) = this
4511 .client
4512 .token_credential()
4513 .http_authorization_header(&this.client.scopes())
4514 .await?
4515 {
4516 req.insert_header(
4517 azure_core::http::headers::AUTHORIZATION,
4518 auth_header,
4519 );
4520 }
4521 let req_body = azure_core::Bytes::new();
4522 req.set_body(req_body);
4523 Ok(Response(this.client.send(&mut req).await?.into()))
4524 }
4525 })
4526 }
4527 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
4528 let mut url = azure_core::http::Url::parse(&format!(
4529 "{}/{}/{}/{}/_apis/work/boards/{}/columns",
4530 self.client.endpoint(),
4531 &self.organization,
4532 &self.project,
4533 &self.team,
4534 &self.board
4535 ))?;
4536 let has_api_version_already = url
4537 .query_pairs()
4538 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
4539 if !has_api_version_already {
4540 url.query_pairs_mut().append_pair(
4541 azure_core::http::headers::query_param::API_VERSION,
4542 "7.1-preview",
4543 );
4544 }
4545 Ok(url)
4546 }
4547 }
4548 impl std::future::IntoFuture for RequestBuilder {
4549 type Output = azure_core::Result<models::BoardColumnList>;
4550 type IntoFuture = BoxFuture<'static, azure_core::Result<models::BoardColumnList>>;
4551 #[doc = "Returns a future that sends the request and returns the parsed response body."]
4552 #[doc = ""]
4553 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4554 #[doc = ""]
4555 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4556 fn into_future(self) -> Self::IntoFuture {
4557 Box::pin(async move { self.send().await?.into_body().await })
4558 }
4559 }
4560 }
4561 pub mod update {
4562 use super::models;
4563 #[cfg(not(target_arch = "wasm32"))]
4564 use futures::future::BoxFuture;
4565 #[cfg(target_arch = "wasm32")]
4566 use futures::future::LocalBoxFuture as BoxFuture;
4567 #[derive(Debug)]
4568 pub struct Response(
4569 azure_core::http::Response<models::BoardColumnList, azure_core::http::JsonFormat>,
4570 );
4571 impl Response {
4572 pub async fn into_body(self) -> azure_core::Result<models::BoardColumnList> {
4573 self.0.into_body().await
4574 }
4575 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
4576 self.0.into()
4577 }
4578 }
4579 #[derive(Clone)]
4580 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4581 #[doc = r""]
4582 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4583 #[doc = r" parameters can be chained."]
4584 #[doc = r""]
4585 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4586 #[doc = r" converts the [`RequestBuilder`] into a future,"]
4587 #[doc = r" executes the request and returns a `Result` with the parsed"]
4588 #[doc = r" response."]
4589 #[doc = r""]
4590 #[doc = r" If you need lower-level access to the raw response details"]
4591 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4592 #[doc = r" can finalize the request using the"]
4593 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4594 #[doc = r" that resolves to a lower-level [`Response`] value."]
4595 pub struct RequestBuilder {
4596 pub(crate) client: super::super::Client,
4597 pub(crate) organization: String,
4598 pub(crate) body: Vec<models::BoardColumn>,
4599 pub(crate) project: String,
4600 pub(crate) board: String,
4601 pub(crate) team: String,
4602 }
4603 impl RequestBuilder {
4604 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4605 #[doc = ""]
4606 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4607 #[doc = "However, this function can provide more flexibility when required."]
4608 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4609 Box::pin({
4610 let this = self.clone();
4611 async move {
4612 let url = this.url()?;
4613 let mut req =
4614 azure_core::http::Request::new(url, azure_core::http::Method::Put);
4615 if let Some(auth_header) = this
4616 .client
4617 .token_credential()
4618 .http_authorization_header(&this.client.scopes())
4619 .await?
4620 {
4621 req.insert_header(
4622 azure_core::http::headers::AUTHORIZATION,
4623 auth_header,
4624 );
4625 }
4626 req.insert_header("content-type", "application/json");
4627 let req_body = azure_core::json::to_json(&this.body)?;
4628 req.set_body(req_body);
4629 Ok(Response(this.client.send(&mut req).await?.into()))
4630 }
4631 })
4632 }
4633 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
4634 let mut url = azure_core::http::Url::parse(&format!(
4635 "{}/{}/{}/{}/_apis/work/boards/{}/columns",
4636 self.client.endpoint(),
4637 &self.organization,
4638 &self.project,
4639 &self.team,
4640 &self.board
4641 ))?;
4642 let has_api_version_already = url
4643 .query_pairs()
4644 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
4645 if !has_api_version_already {
4646 url.query_pairs_mut().append_pair(
4647 azure_core::http::headers::query_param::API_VERSION,
4648 "7.1-preview",
4649 );
4650 }
4651 Ok(url)
4652 }
4653 }
4654 impl std::future::IntoFuture for RequestBuilder {
4655 type Output = azure_core::Result<models::BoardColumnList>;
4656 type IntoFuture = BoxFuture<'static, azure_core::Result<models::BoardColumnList>>;
4657 #[doc = "Returns a future that sends the request and returns the parsed response body."]
4658 #[doc = ""]
4659 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4660 #[doc = ""]
4661 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4662 fn into_future(self) -> Self::IntoFuture {
4663 Box::pin(async move { self.send().await?.into_body().await })
4664 }
4665 }
4666 }
4667}
4668pub mod rows {
4669 use super::models;
4670 #[cfg(not(target_arch = "wasm32"))]
4671 use futures::future::BoxFuture;
4672 #[cfg(target_arch = "wasm32")]
4673 use futures::future::LocalBoxFuture as BoxFuture;
4674 pub struct Client(pub(crate) super::Client);
4675 impl Client {
4676 #[doc = "Get rows on a board"]
4677 #[doc = ""]
4678 #[doc = "Arguments:"]
4679 #[doc = "* `organization`: The name of the Azure DevOps organization."]
4680 #[doc = "* `project`: Project ID or project name"]
4681 #[doc = "* `board`: Name or ID of the specific board"]
4682 #[doc = "* `team`: Team ID or team name"]
4683 pub fn list(
4684 &self,
4685 organization: impl Into<String>,
4686 project: impl Into<String>,
4687 board: impl Into<String>,
4688 team: impl Into<String>,
4689 ) -> list::RequestBuilder {
4690 list::RequestBuilder {
4691 client: self.0.clone(),
4692 organization: organization.into(),
4693 project: project.into(),
4694 board: board.into(),
4695 team: team.into(),
4696 }
4697 }
4698 #[doc = "Update rows on a board"]
4699 #[doc = ""]
4700 #[doc = "Arguments:"]
4701 #[doc = "* `organization`: The name of the Azure DevOps organization."]
4702 #[doc = "* `body`: List of board rows to update"]
4703 #[doc = "* `project`: Project ID or project name"]
4704 #[doc = "* `board`: Name or ID of the specific board"]
4705 #[doc = "* `team`: Team ID or team name"]
4706 pub fn update(
4707 &self,
4708 organization: impl Into<String>,
4709 body: Vec<models::BoardRow>,
4710 project: impl Into<String>,
4711 board: impl Into<String>,
4712 team: impl Into<String>,
4713 ) -> update::RequestBuilder {
4714 update::RequestBuilder {
4715 client: self.0.clone(),
4716 organization: organization.into(),
4717 body,
4718 project: project.into(),
4719 board: board.into(),
4720 team: team.into(),
4721 }
4722 }
4723 }
4724 pub mod list {
4725 use super::models;
4726 #[cfg(not(target_arch = "wasm32"))]
4727 use futures::future::BoxFuture;
4728 #[cfg(target_arch = "wasm32")]
4729 use futures::future::LocalBoxFuture as BoxFuture;
4730 #[derive(Debug)]
4731 pub struct Response(
4732 azure_core::http::Response<models::BoardRowList, azure_core::http::JsonFormat>,
4733 );
4734 impl Response {
4735 pub async fn into_body(self) -> azure_core::Result<models::BoardRowList> {
4736 self.0.into_body().await
4737 }
4738 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
4739 self.0.into()
4740 }
4741 }
4742 #[derive(Clone)]
4743 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4744 #[doc = r""]
4745 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4746 #[doc = r" parameters can be chained."]
4747 #[doc = r""]
4748 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4749 #[doc = r" converts the [`RequestBuilder`] into a future,"]
4750 #[doc = r" executes the request and returns a `Result` with the parsed"]
4751 #[doc = r" response."]
4752 #[doc = r""]
4753 #[doc = r" If you need lower-level access to the raw response details"]
4754 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4755 #[doc = r" can finalize the request using the"]
4756 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4757 #[doc = r" that resolves to a lower-level [`Response`] value."]
4758 pub struct RequestBuilder {
4759 pub(crate) client: super::super::Client,
4760 pub(crate) organization: String,
4761 pub(crate) project: String,
4762 pub(crate) board: String,
4763 pub(crate) team: String,
4764 }
4765 impl RequestBuilder {
4766 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4767 #[doc = ""]
4768 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4769 #[doc = "However, this function can provide more flexibility when required."]
4770 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4771 Box::pin({
4772 let this = self.clone();
4773 async move {
4774 let url = this.url()?;
4775 let mut req =
4776 azure_core::http::Request::new(url, azure_core::http::Method::Get);
4777 if let Some(auth_header) = this
4778 .client
4779 .token_credential()
4780 .http_authorization_header(&this.client.scopes())
4781 .await?
4782 {
4783 req.insert_header(
4784 azure_core::http::headers::AUTHORIZATION,
4785 auth_header,
4786 );
4787 }
4788 let req_body = azure_core::Bytes::new();
4789 req.set_body(req_body);
4790 Ok(Response(this.client.send(&mut req).await?.into()))
4791 }
4792 })
4793 }
4794 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
4795 let mut url = azure_core::http::Url::parse(&format!(
4796 "{}/{}/{}/{}/_apis/work/boards/{}/rows",
4797 self.client.endpoint(),
4798 &self.organization,
4799 &self.project,
4800 &self.team,
4801 &self.board
4802 ))?;
4803 let has_api_version_already = url
4804 .query_pairs()
4805 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
4806 if !has_api_version_already {
4807 url.query_pairs_mut().append_pair(
4808 azure_core::http::headers::query_param::API_VERSION,
4809 "7.1-preview",
4810 );
4811 }
4812 Ok(url)
4813 }
4814 }
4815 impl std::future::IntoFuture for RequestBuilder {
4816 type Output = azure_core::Result<models::BoardRowList>;
4817 type IntoFuture = BoxFuture<'static, azure_core::Result<models::BoardRowList>>;
4818 #[doc = "Returns a future that sends the request and returns the parsed response body."]
4819 #[doc = ""]
4820 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4821 #[doc = ""]
4822 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4823 fn into_future(self) -> Self::IntoFuture {
4824 Box::pin(async move { self.send().await?.into_body().await })
4825 }
4826 }
4827 }
4828 pub mod update {
4829 use super::models;
4830 #[cfg(not(target_arch = "wasm32"))]
4831 use futures::future::BoxFuture;
4832 #[cfg(target_arch = "wasm32")]
4833 use futures::future::LocalBoxFuture as BoxFuture;
4834 #[derive(Debug)]
4835 pub struct Response(
4836 azure_core::http::Response<models::BoardRowList, azure_core::http::JsonFormat>,
4837 );
4838 impl Response {
4839 pub async fn into_body(self) -> azure_core::Result<models::BoardRowList> {
4840 self.0.into_body().await
4841 }
4842 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
4843 self.0.into()
4844 }
4845 }
4846 #[derive(Clone)]
4847 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4848 #[doc = r""]
4849 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4850 #[doc = r" parameters can be chained."]
4851 #[doc = r""]
4852 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4853 #[doc = r" converts the [`RequestBuilder`] into a future,"]
4854 #[doc = r" executes the request and returns a `Result` with the parsed"]
4855 #[doc = r" response."]
4856 #[doc = r""]
4857 #[doc = r" If you need lower-level access to the raw response details"]
4858 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4859 #[doc = r" can finalize the request using the"]
4860 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
4861 #[doc = r" that resolves to a lower-level [`Response`] value."]
4862 pub struct RequestBuilder {
4863 pub(crate) client: super::super::Client,
4864 pub(crate) organization: String,
4865 pub(crate) body: Vec<models::BoardRow>,
4866 pub(crate) project: String,
4867 pub(crate) board: String,
4868 pub(crate) team: String,
4869 }
4870 impl RequestBuilder {
4871 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
4872 #[doc = ""]
4873 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
4874 #[doc = "However, this function can provide more flexibility when required."]
4875 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
4876 Box::pin({
4877 let this = self.clone();
4878 async move {
4879 let url = this.url()?;
4880 let mut req =
4881 azure_core::http::Request::new(url, azure_core::http::Method::Put);
4882 if let Some(auth_header) = this
4883 .client
4884 .token_credential()
4885 .http_authorization_header(&this.client.scopes())
4886 .await?
4887 {
4888 req.insert_header(
4889 azure_core::http::headers::AUTHORIZATION,
4890 auth_header,
4891 );
4892 }
4893 req.insert_header("content-type", "application/json");
4894 let req_body = azure_core::json::to_json(&this.body)?;
4895 req.set_body(req_body);
4896 Ok(Response(this.client.send(&mut req).await?.into()))
4897 }
4898 })
4899 }
4900 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
4901 let mut url = azure_core::http::Url::parse(&format!(
4902 "{}/{}/{}/{}/_apis/work/boards/{}/rows",
4903 self.client.endpoint(),
4904 &self.organization,
4905 &self.project,
4906 &self.team,
4907 &self.board
4908 ))?;
4909 let has_api_version_already = url
4910 .query_pairs()
4911 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
4912 if !has_api_version_already {
4913 url.query_pairs_mut().append_pair(
4914 azure_core::http::headers::query_param::API_VERSION,
4915 "7.1-preview",
4916 );
4917 }
4918 Ok(url)
4919 }
4920 }
4921 impl std::future::IntoFuture for RequestBuilder {
4922 type Output = azure_core::Result<models::BoardRowList>;
4923 type IntoFuture = BoxFuture<'static, azure_core::Result<models::BoardRowList>>;
4924 #[doc = "Returns a future that sends the request and returns the parsed response body."]
4925 #[doc = ""]
4926 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
4927 #[doc = ""]
4928 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
4929 fn into_future(self) -> Self::IntoFuture {
4930 Box::pin(async move { self.send().await?.into_body().await })
4931 }
4932 }
4933 }
4934}
4935pub mod boardparents {
4936 use super::models;
4937 #[cfg(not(target_arch = "wasm32"))]
4938 use futures::future::BoxFuture;
4939 #[cfg(target_arch = "wasm32")]
4940 use futures::future::LocalBoxFuture as BoxFuture;
4941 pub struct Client(pub(crate) super::Client);
4942 impl Client {
4943 #[doc = "Returns the list of parent field filter model for the given list of workitem ids"]
4944 #[doc = ""]
4945 #[doc = "Arguments:"]
4946 #[doc = "* `organization`: The name of the Azure DevOps organization."]
4947 #[doc = "* `project`: Project ID or project name"]
4948 #[doc = "* `team`: Team ID or team name"]
4949 pub fn list(
4950 &self,
4951 organization: impl Into<String>,
4952 project: impl Into<String>,
4953 child_backlog_context_category_ref_name: impl Into<String>,
4954 workitem_ids: impl Into<String>,
4955 team: impl Into<String>,
4956 ) -> list::RequestBuilder {
4957 list::RequestBuilder {
4958 client: self.0.clone(),
4959 organization: organization.into(),
4960 project: project.into(),
4961 child_backlog_context_category_ref_name: child_backlog_context_category_ref_name
4962 .into(),
4963 workitem_ids: workitem_ids.into(),
4964 team: team.into(),
4965 }
4966 }
4967 }
4968 pub mod list {
4969 use super::models;
4970 #[cfg(not(target_arch = "wasm32"))]
4971 use futures::future::BoxFuture;
4972 #[cfg(target_arch = "wasm32")]
4973 use futures::future::LocalBoxFuture as BoxFuture;
4974 #[derive(Debug)]
4975 pub struct Response(
4976 azure_core::http::Response<models::ParentChildWiMapList, azure_core::http::JsonFormat>,
4977 );
4978 impl Response {
4979 pub async fn into_body(self) -> azure_core::Result<models::ParentChildWiMapList> {
4980 self.0.into_body().await
4981 }
4982 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
4983 self.0.into()
4984 }
4985 }
4986 #[derive(Clone)]
4987 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
4988 #[doc = r""]
4989 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
4990 #[doc = r" parameters can be chained."]
4991 #[doc = r""]
4992 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
4993 #[doc = r" converts the [`RequestBuilder`] into a future,"]
4994 #[doc = r" executes the request and returns a `Result` with the parsed"]
4995 #[doc = r" response."]
4996 #[doc = r""]
4997 #[doc = r" If you need lower-level access to the raw response details"]
4998 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
4999 #[doc = r" can finalize the request using the"]
5000 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5001 #[doc = r" that resolves to a lower-level [`Response`] value."]
5002 pub struct RequestBuilder {
5003 pub(crate) client: super::super::Client,
5004 pub(crate) organization: String,
5005 pub(crate) project: String,
5006 pub(crate) child_backlog_context_category_ref_name: String,
5007 pub(crate) workitem_ids: String,
5008 pub(crate) team: String,
5009 }
5010 impl RequestBuilder {
5011 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5012 #[doc = ""]
5013 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5014 #[doc = "However, this function can provide more flexibility when required."]
5015 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5016 Box::pin({
5017 let this = self.clone();
5018 async move {
5019 let url = this.url()?;
5020 let mut req =
5021 azure_core::http::Request::new(url, azure_core::http::Method::Get);
5022 if let Some(auth_header) = this
5023 .client
5024 .token_credential()
5025 .http_authorization_header(&this.client.scopes())
5026 .await?
5027 {
5028 req.insert_header(
5029 azure_core::http::headers::AUTHORIZATION,
5030 auth_header,
5031 );
5032 }
5033 let child_backlog_context_category_ref_name =
5034 &this.child_backlog_context_category_ref_name;
5035 req.url_mut().query_pairs_mut().append_pair(
5036 "childBacklogContextCategoryRefName",
5037 child_backlog_context_category_ref_name,
5038 );
5039 let workitem_ids = &this.workitem_ids;
5040 req.url_mut()
5041 .query_pairs_mut()
5042 .append_pair("workitemIds", workitem_ids);
5043 let req_body = azure_core::Bytes::new();
5044 req.set_body(req_body);
5045 Ok(Response(this.client.send(&mut req).await?.into()))
5046 }
5047 })
5048 }
5049 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
5050 let mut url = azure_core::http::Url::parse(&format!(
5051 "{}/{}/{}/{}/_apis/work/boards/boardparents",
5052 self.client.endpoint(),
5053 &self.organization,
5054 &self.project,
5055 &self.team
5056 ))?;
5057 let has_api_version_already = url
5058 .query_pairs()
5059 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
5060 if !has_api_version_already {
5061 url.query_pairs_mut().append_pair(
5062 azure_core::http::headers::query_param::API_VERSION,
5063 "7.1-preview",
5064 );
5065 }
5066 Ok(url)
5067 }
5068 }
5069 impl std::future::IntoFuture for RequestBuilder {
5070 type Output = azure_core::Result<models::ParentChildWiMapList>;
5071 type IntoFuture = BoxFuture<'static, azure_core::Result<models::ParentChildWiMapList>>;
5072 #[doc = "Returns a future that sends the request and returns the parsed response body."]
5073 #[doc = ""]
5074 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5075 #[doc = ""]
5076 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5077 fn into_future(self) -> Self::IntoFuture {
5078 Box::pin(async move { self.send().await?.into_body().await })
5079 }
5080 }
5081 }
5082}
5083pub mod workitemsorder {
5084 use super::models;
5085 #[cfg(not(target_arch = "wasm32"))]
5086 use futures::future::BoxFuture;
5087 #[cfg(target_arch = "wasm32")]
5088 use futures::future::LocalBoxFuture as BoxFuture;
5089 pub struct Client(pub(crate) super::Client);
5090 impl Client {
5091 #[doc = "Reorder Sprint Backlog/Taskboard Work Items"]
5092 #[doc = ""]
5093 #[doc = "Arguments:"]
5094 #[doc = "* `organization`: The name of the Azure DevOps organization."]
5095 #[doc = "* `project`: Project ID or project name"]
5096 #[doc = "* `team`: Team ID or team name"]
5097 #[doc = "* `iteration_id`: The id of the iteration"]
5098 pub fn reorder_iteration_work_items(
5099 &self,
5100 organization: impl Into<String>,
5101 body: impl Into<models::ReorderOperation>,
5102 project: impl Into<String>,
5103 team: impl Into<String>,
5104 iteration_id: impl Into<String>,
5105 ) -> reorder_iteration_work_items::RequestBuilder {
5106 reorder_iteration_work_items::RequestBuilder {
5107 client: self.0.clone(),
5108 organization: organization.into(),
5109 body: body.into(),
5110 project: project.into(),
5111 team: team.into(),
5112 iteration_id: iteration_id.into(),
5113 }
5114 }
5115 #[doc = "Reorder Product Backlog/Boards Work Items"]
5116 #[doc = ""]
5117 #[doc = "Arguments:"]
5118 #[doc = "* `organization`: The name of the Azure DevOps organization."]
5119 #[doc = "* `project`: Project ID or project name"]
5120 #[doc = "* `team`: Team ID or team name"]
5121 pub fn reorder_backlog_work_items(
5122 &self,
5123 organization: impl Into<String>,
5124 body: impl Into<models::ReorderOperation>,
5125 project: impl Into<String>,
5126 team: impl Into<String>,
5127 ) -> reorder_backlog_work_items::RequestBuilder {
5128 reorder_backlog_work_items::RequestBuilder {
5129 client: self.0.clone(),
5130 organization: organization.into(),
5131 body: body.into(),
5132 project: project.into(),
5133 team: team.into(),
5134 }
5135 }
5136 }
5137 pub mod reorder_iteration_work_items {
5138 use super::models;
5139 #[cfg(not(target_arch = "wasm32"))]
5140 use futures::future::BoxFuture;
5141 #[cfg(target_arch = "wasm32")]
5142 use futures::future::LocalBoxFuture as BoxFuture;
5143 #[derive(Debug)]
5144 pub struct Response(
5145 azure_core::http::Response<models::ReorderResultList, azure_core::http::JsonFormat>,
5146 );
5147 impl Response {
5148 pub async fn into_body(self) -> azure_core::Result<models::ReorderResultList> {
5149 self.0.into_body().await
5150 }
5151 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
5152 self.0.into()
5153 }
5154 }
5155 #[derive(Clone)]
5156 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5157 #[doc = r""]
5158 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5159 #[doc = r" parameters can be chained."]
5160 #[doc = r""]
5161 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5162 #[doc = r" converts the [`RequestBuilder`] into a future,"]
5163 #[doc = r" executes the request and returns a `Result` with the parsed"]
5164 #[doc = r" response."]
5165 #[doc = r""]
5166 #[doc = r" If you need lower-level access to the raw response details"]
5167 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5168 #[doc = r" can finalize the request using the"]
5169 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5170 #[doc = r" that resolves to a lower-level [`Response`] value."]
5171 pub struct RequestBuilder {
5172 pub(crate) client: super::super::Client,
5173 pub(crate) organization: String,
5174 pub(crate) body: models::ReorderOperation,
5175 pub(crate) project: String,
5176 pub(crate) team: String,
5177 pub(crate) iteration_id: String,
5178 }
5179 impl RequestBuilder {
5180 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5181 #[doc = ""]
5182 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5183 #[doc = "However, this function can provide more flexibility when required."]
5184 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5185 Box::pin({
5186 let this = self.clone();
5187 async move {
5188 let url = this.url()?;
5189 let mut req =
5190 azure_core::http::Request::new(url, azure_core::http::Method::Patch);
5191 if let Some(auth_header) = this
5192 .client
5193 .token_credential()
5194 .http_authorization_header(&this.client.scopes())
5195 .await?
5196 {
5197 req.insert_header(
5198 azure_core::http::headers::AUTHORIZATION,
5199 auth_header,
5200 );
5201 }
5202 req.insert_header("content-type", "application/json");
5203 let req_body = azure_core::json::to_json(&this.body)?;
5204 req.set_body(req_body);
5205 Ok(Response(this.client.send(&mut req).await?.into()))
5206 }
5207 })
5208 }
5209 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
5210 let mut url = azure_core::http::Url::parse(&format!(
5211 "{}/{}/{}/{}/_apis/work/iterations/{}/workitemsorder",
5212 self.client.endpoint(),
5213 &self.organization,
5214 &self.project,
5215 &self.team,
5216 &self.iteration_id
5217 ))?;
5218 let has_api_version_already = url
5219 .query_pairs()
5220 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
5221 if !has_api_version_already {
5222 url.query_pairs_mut().append_pair(
5223 azure_core::http::headers::query_param::API_VERSION,
5224 "7.1-preview",
5225 );
5226 }
5227 Ok(url)
5228 }
5229 }
5230 impl std::future::IntoFuture for RequestBuilder {
5231 type Output = azure_core::Result<models::ReorderResultList>;
5232 type IntoFuture = BoxFuture<'static, azure_core::Result<models::ReorderResultList>>;
5233 #[doc = "Returns a future that sends the request and returns the parsed response body."]
5234 #[doc = ""]
5235 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5236 #[doc = ""]
5237 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5238 fn into_future(self) -> Self::IntoFuture {
5239 Box::pin(async move { self.send().await?.into_body().await })
5240 }
5241 }
5242 }
5243 pub mod reorder_backlog_work_items {
5244 use super::models;
5245 #[cfg(not(target_arch = "wasm32"))]
5246 use futures::future::BoxFuture;
5247 #[cfg(target_arch = "wasm32")]
5248 use futures::future::LocalBoxFuture as BoxFuture;
5249 #[derive(Debug)]
5250 pub struct Response(
5251 azure_core::http::Response<models::ReorderResultList, azure_core::http::JsonFormat>,
5252 );
5253 impl Response {
5254 pub async fn into_body(self) -> azure_core::Result<models::ReorderResultList> {
5255 self.0.into_body().await
5256 }
5257 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
5258 self.0.into()
5259 }
5260 }
5261 #[derive(Clone)]
5262 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5263 #[doc = r""]
5264 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5265 #[doc = r" parameters can be chained."]
5266 #[doc = r""]
5267 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5268 #[doc = r" converts the [`RequestBuilder`] into a future,"]
5269 #[doc = r" executes the request and returns a `Result` with the parsed"]
5270 #[doc = r" response."]
5271 #[doc = r""]
5272 #[doc = r" If you need lower-level access to the raw response details"]
5273 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5274 #[doc = r" can finalize the request using the"]
5275 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5276 #[doc = r" that resolves to a lower-level [`Response`] value."]
5277 pub struct RequestBuilder {
5278 pub(crate) client: super::super::Client,
5279 pub(crate) organization: String,
5280 pub(crate) body: models::ReorderOperation,
5281 pub(crate) project: String,
5282 pub(crate) team: String,
5283 }
5284 impl RequestBuilder {
5285 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5286 #[doc = ""]
5287 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5288 #[doc = "However, this function can provide more flexibility when required."]
5289 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5290 Box::pin({
5291 let this = self.clone();
5292 async move {
5293 let url = this.url()?;
5294 let mut req =
5295 azure_core::http::Request::new(url, azure_core::http::Method::Patch);
5296 if let Some(auth_header) = this
5297 .client
5298 .token_credential()
5299 .http_authorization_header(&this.client.scopes())
5300 .await?
5301 {
5302 req.insert_header(
5303 azure_core::http::headers::AUTHORIZATION,
5304 auth_header,
5305 );
5306 }
5307 req.insert_header("content-type", "application/json");
5308 let req_body = azure_core::json::to_json(&this.body)?;
5309 req.set_body(req_body);
5310 Ok(Response(this.client.send(&mut req).await?.into()))
5311 }
5312 })
5313 }
5314 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
5315 let mut url = azure_core::http::Url::parse(&format!(
5316 "{}/{}/{}/{}/_apis/work/workitemsorder",
5317 self.client.endpoint(),
5318 &self.organization,
5319 &self.project,
5320 &self.team
5321 ))?;
5322 let has_api_version_already = url
5323 .query_pairs()
5324 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
5325 if !has_api_version_already {
5326 url.query_pairs_mut().append_pair(
5327 azure_core::http::headers::query_param::API_VERSION,
5328 "7.1-preview",
5329 );
5330 }
5331 Ok(url)
5332 }
5333 }
5334 impl std::future::IntoFuture for RequestBuilder {
5335 type Output = azure_core::Result<models::ReorderResultList>;
5336 type IntoFuture = BoxFuture<'static, azure_core::Result<models::ReorderResultList>>;
5337 #[doc = "Returns a future that sends the request and returns the parsed response body."]
5338 #[doc = ""]
5339 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5340 #[doc = ""]
5341 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5342 fn into_future(self) -> Self::IntoFuture {
5343 Box::pin(async move { self.send().await?.into_body().await })
5344 }
5345 }
5346 }
5347}
5348pub mod taskboard_columns {
5349 use super::models;
5350 #[cfg(not(target_arch = "wasm32"))]
5351 use futures::future::BoxFuture;
5352 #[cfg(target_arch = "wasm32")]
5353 use futures::future::LocalBoxFuture as BoxFuture;
5354 pub struct Client(pub(crate) super::Client);
5355 impl Client {
5356 #[doc = "Arguments:"]
5357 #[doc = "* `organization`: The name of the Azure DevOps organization."]
5358 #[doc = "* `project`: Project ID or project name"]
5359 #[doc = "* `team`: Team ID or team name"]
5360 pub fn get(
5361 &self,
5362 organization: impl Into<String>,
5363 project: impl Into<String>,
5364 team: impl Into<String>,
5365 ) -> get::RequestBuilder {
5366 get::RequestBuilder {
5367 client: self.0.clone(),
5368 organization: organization.into(),
5369 project: project.into(),
5370 team: team.into(),
5371 }
5372 }
5373 #[doc = "Arguments:"]
5374 #[doc = "* `organization`: The name of the Azure DevOps organization."]
5375 #[doc = "* `project`: Project ID or project name"]
5376 #[doc = "* `team`: Team ID or team name"]
5377 pub fn update(
5378 &self,
5379 organization: impl Into<String>,
5380 body: Vec<models::UpdateTaskboardColumn>,
5381 project: impl Into<String>,
5382 team: impl Into<String>,
5383 ) -> update::RequestBuilder {
5384 update::RequestBuilder {
5385 client: self.0.clone(),
5386 organization: organization.into(),
5387 body,
5388 project: project.into(),
5389 team: team.into(),
5390 }
5391 }
5392 }
5393 pub mod get {
5394 use super::models;
5395 #[cfg(not(target_arch = "wasm32"))]
5396 use futures::future::BoxFuture;
5397 #[cfg(target_arch = "wasm32")]
5398 use futures::future::LocalBoxFuture as BoxFuture;
5399 #[derive(Debug)]
5400 pub struct Response(
5401 azure_core::http::Response<models::TaskboardColumns, azure_core::http::JsonFormat>,
5402 );
5403 impl Response {
5404 pub async fn into_body(self) -> azure_core::Result<models::TaskboardColumns> {
5405 self.0.into_body().await
5406 }
5407 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
5408 self.0.into()
5409 }
5410 }
5411 #[derive(Clone)]
5412 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5413 #[doc = r""]
5414 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5415 #[doc = r" parameters can be chained."]
5416 #[doc = r""]
5417 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5418 #[doc = r" converts the [`RequestBuilder`] into a future,"]
5419 #[doc = r" executes the request and returns a `Result` with the parsed"]
5420 #[doc = r" response."]
5421 #[doc = r""]
5422 #[doc = r" If you need lower-level access to the raw response details"]
5423 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5424 #[doc = r" can finalize the request using the"]
5425 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5426 #[doc = r" that resolves to a lower-level [`Response`] value."]
5427 pub struct RequestBuilder {
5428 pub(crate) client: super::super::Client,
5429 pub(crate) organization: String,
5430 pub(crate) project: String,
5431 pub(crate) team: String,
5432 }
5433 impl RequestBuilder {
5434 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5435 #[doc = ""]
5436 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5437 #[doc = "However, this function can provide more flexibility when required."]
5438 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5439 Box::pin({
5440 let this = self.clone();
5441 async move {
5442 let url = this.url()?;
5443 let mut req =
5444 azure_core::http::Request::new(url, azure_core::http::Method::Get);
5445 if let Some(auth_header) = this
5446 .client
5447 .token_credential()
5448 .http_authorization_header(&this.client.scopes())
5449 .await?
5450 {
5451 req.insert_header(
5452 azure_core::http::headers::AUTHORIZATION,
5453 auth_header,
5454 );
5455 }
5456 let req_body = azure_core::Bytes::new();
5457 req.set_body(req_body);
5458 Ok(Response(this.client.send(&mut req).await?.into()))
5459 }
5460 })
5461 }
5462 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
5463 let mut url = azure_core::http::Url::parse(&format!(
5464 "{}/{}/{}/{}/_apis/work/taskboardcolumns",
5465 self.client.endpoint(),
5466 &self.organization,
5467 &self.project,
5468 &self.team
5469 ))?;
5470 let has_api_version_already = url
5471 .query_pairs()
5472 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
5473 if !has_api_version_already {
5474 url.query_pairs_mut().append_pair(
5475 azure_core::http::headers::query_param::API_VERSION,
5476 "7.1-preview",
5477 );
5478 }
5479 Ok(url)
5480 }
5481 }
5482 impl std::future::IntoFuture for RequestBuilder {
5483 type Output = azure_core::Result<models::TaskboardColumns>;
5484 type IntoFuture = BoxFuture<'static, azure_core::Result<models::TaskboardColumns>>;
5485 #[doc = "Returns a future that sends the request and returns the parsed response body."]
5486 #[doc = ""]
5487 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5488 #[doc = ""]
5489 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5490 fn into_future(self) -> Self::IntoFuture {
5491 Box::pin(async move { self.send().await?.into_body().await })
5492 }
5493 }
5494 }
5495 pub mod update {
5496 use super::models;
5497 #[cfg(not(target_arch = "wasm32"))]
5498 use futures::future::BoxFuture;
5499 #[cfg(target_arch = "wasm32")]
5500 use futures::future::LocalBoxFuture as BoxFuture;
5501 #[derive(Debug)]
5502 pub struct Response(
5503 azure_core::http::Response<models::TaskboardColumns, azure_core::http::JsonFormat>,
5504 );
5505 impl Response {
5506 pub async fn into_body(self) -> azure_core::Result<models::TaskboardColumns> {
5507 self.0.into_body().await
5508 }
5509 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
5510 self.0.into()
5511 }
5512 }
5513 #[derive(Clone)]
5514 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5515 #[doc = r""]
5516 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5517 #[doc = r" parameters can be chained."]
5518 #[doc = r""]
5519 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5520 #[doc = r" converts the [`RequestBuilder`] into a future,"]
5521 #[doc = r" executes the request and returns a `Result` with the parsed"]
5522 #[doc = r" response."]
5523 #[doc = r""]
5524 #[doc = r" If you need lower-level access to the raw response details"]
5525 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5526 #[doc = r" can finalize the request using the"]
5527 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5528 #[doc = r" that resolves to a lower-level [`Response`] value."]
5529 pub struct RequestBuilder {
5530 pub(crate) client: super::super::Client,
5531 pub(crate) organization: String,
5532 pub(crate) body: Vec<models::UpdateTaskboardColumn>,
5533 pub(crate) project: String,
5534 pub(crate) team: String,
5535 }
5536 impl RequestBuilder {
5537 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5538 #[doc = ""]
5539 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5540 #[doc = "However, this function can provide more flexibility when required."]
5541 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5542 Box::pin({
5543 let this = self.clone();
5544 async move {
5545 let url = this.url()?;
5546 let mut req =
5547 azure_core::http::Request::new(url, azure_core::http::Method::Put);
5548 if let Some(auth_header) = this
5549 .client
5550 .token_credential()
5551 .http_authorization_header(&this.client.scopes())
5552 .await?
5553 {
5554 req.insert_header(
5555 azure_core::http::headers::AUTHORIZATION,
5556 auth_header,
5557 );
5558 }
5559 req.insert_header("content-type", "application/json");
5560 let req_body = azure_core::json::to_json(&this.body)?;
5561 req.set_body(req_body);
5562 Ok(Response(this.client.send(&mut req).await?.into()))
5563 }
5564 })
5565 }
5566 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
5567 let mut url = azure_core::http::Url::parse(&format!(
5568 "{}/{}/{}/{}/_apis/work/taskboardcolumns",
5569 self.client.endpoint(),
5570 &self.organization,
5571 &self.project,
5572 &self.team
5573 ))?;
5574 let has_api_version_already = url
5575 .query_pairs()
5576 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
5577 if !has_api_version_already {
5578 url.query_pairs_mut().append_pair(
5579 azure_core::http::headers::query_param::API_VERSION,
5580 "7.1-preview",
5581 );
5582 }
5583 Ok(url)
5584 }
5585 }
5586 impl std::future::IntoFuture for RequestBuilder {
5587 type Output = azure_core::Result<models::TaskboardColumns>;
5588 type IntoFuture = BoxFuture<'static, azure_core::Result<models::TaskboardColumns>>;
5589 #[doc = "Returns a future that sends the request and returns the parsed response body."]
5590 #[doc = ""]
5591 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5592 #[doc = ""]
5593 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5594 fn into_future(self) -> Self::IntoFuture {
5595 Box::pin(async move { self.send().await?.into_body().await })
5596 }
5597 }
5598 }
5599}
5600pub mod taskboard_work_items {
5601 use super::models;
5602 #[cfg(not(target_arch = "wasm32"))]
5603 use futures::future::BoxFuture;
5604 #[cfg(target_arch = "wasm32")]
5605 use futures::future::LocalBoxFuture as BoxFuture;
5606 pub struct Client(pub(crate) super::Client);
5607 impl Client {
5608 #[doc = "Arguments:"]
5609 #[doc = "* `organization`: The name of the Azure DevOps organization."]
5610 #[doc = "* `project`: Project ID or project name"]
5611 #[doc = "* `team`: Team ID or team name"]
5612 pub fn list(
5613 &self,
5614 organization: impl Into<String>,
5615 project: impl Into<String>,
5616 team: impl Into<String>,
5617 iteration_id: impl Into<String>,
5618 ) -> list::RequestBuilder {
5619 list::RequestBuilder {
5620 client: self.0.clone(),
5621 organization: organization.into(),
5622 project: project.into(),
5623 team: team.into(),
5624 iteration_id: iteration_id.into(),
5625 }
5626 }
5627 #[doc = "Arguments:"]
5628 #[doc = "* `organization`: The name of the Azure DevOps organization."]
5629 #[doc = "* `project`: Project ID or project name"]
5630 #[doc = "* `team`: Team ID or team name"]
5631 pub fn update(
5632 &self,
5633 organization: impl Into<String>,
5634 body: impl Into<models::UpdateTaskboardWorkItemColumn>,
5635 project: impl Into<String>,
5636 team: impl Into<String>,
5637 iteration_id: impl Into<String>,
5638 work_item_id: i32,
5639 ) -> update::RequestBuilder {
5640 update::RequestBuilder {
5641 client: self.0.clone(),
5642 organization: organization.into(),
5643 body: body.into(),
5644 project: project.into(),
5645 team: team.into(),
5646 iteration_id: iteration_id.into(),
5647 work_item_id,
5648 }
5649 }
5650 }
5651 pub mod list {
5652 use super::models;
5653 #[cfg(not(target_arch = "wasm32"))]
5654 use futures::future::BoxFuture;
5655 #[cfg(target_arch = "wasm32")]
5656 use futures::future::LocalBoxFuture as BoxFuture;
5657 #[derive(Debug)]
5658 pub struct Response(
5659 azure_core::http::Response<
5660 models::TaskboardWorkItemColumnList,
5661 azure_core::http::JsonFormat,
5662 >,
5663 );
5664 impl Response {
5665 pub async fn into_body(
5666 self,
5667 ) -> azure_core::Result<models::TaskboardWorkItemColumnList> {
5668 self.0.into_body().await
5669 }
5670 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
5671 self.0.into()
5672 }
5673 }
5674 #[derive(Clone)]
5675 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5676 #[doc = r""]
5677 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5678 #[doc = r" parameters can be chained."]
5679 #[doc = r""]
5680 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5681 #[doc = r" converts the [`RequestBuilder`] into a future,"]
5682 #[doc = r" executes the request and returns a `Result` with the parsed"]
5683 #[doc = r" response."]
5684 #[doc = r""]
5685 #[doc = r" If you need lower-level access to the raw response details"]
5686 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5687 #[doc = r" can finalize the request using the"]
5688 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5689 #[doc = r" that resolves to a lower-level [`Response`] value."]
5690 pub struct RequestBuilder {
5691 pub(crate) client: super::super::Client,
5692 pub(crate) organization: String,
5693 pub(crate) project: String,
5694 pub(crate) team: String,
5695 pub(crate) iteration_id: String,
5696 }
5697 impl RequestBuilder {
5698 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5699 #[doc = ""]
5700 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5701 #[doc = "However, this function can provide more flexibility when required."]
5702 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5703 Box::pin({
5704 let this = self.clone();
5705 async move {
5706 let url = this.url()?;
5707 let mut req =
5708 azure_core::http::Request::new(url, azure_core::http::Method::Get);
5709 if let Some(auth_header) = this
5710 .client
5711 .token_credential()
5712 .http_authorization_header(&this.client.scopes())
5713 .await?
5714 {
5715 req.insert_header(
5716 azure_core::http::headers::AUTHORIZATION,
5717 auth_header,
5718 );
5719 }
5720 let req_body = azure_core::Bytes::new();
5721 req.set_body(req_body);
5722 Ok(Response(this.client.send(&mut req).await?.into()))
5723 }
5724 })
5725 }
5726 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
5727 let mut url = azure_core::http::Url::parse(&format!(
5728 "{}/{}/{}/{}/_apis/work/taskboardworkitems/{}",
5729 self.client.endpoint(),
5730 &self.organization,
5731 &self.project,
5732 &self.team,
5733 &self.iteration_id
5734 ))?;
5735 let has_api_version_already = url
5736 .query_pairs()
5737 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
5738 if !has_api_version_already {
5739 url.query_pairs_mut().append_pair(
5740 azure_core::http::headers::query_param::API_VERSION,
5741 "7.1-preview",
5742 );
5743 }
5744 Ok(url)
5745 }
5746 }
5747 impl std::future::IntoFuture for RequestBuilder {
5748 type Output = azure_core::Result<models::TaskboardWorkItemColumnList>;
5749 type IntoFuture =
5750 BoxFuture<'static, azure_core::Result<models::TaskboardWorkItemColumnList>>;
5751 #[doc = "Returns a future that sends the request and returns the parsed response body."]
5752 #[doc = ""]
5753 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5754 #[doc = ""]
5755 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5756 fn into_future(self) -> Self::IntoFuture {
5757 Box::pin(async move { self.send().await?.into_body().await })
5758 }
5759 }
5760 }
5761 pub mod update {
5762 use super::models;
5763 #[cfg(not(target_arch = "wasm32"))]
5764 use futures::future::BoxFuture;
5765 #[cfg(target_arch = "wasm32")]
5766 use futures::future::LocalBoxFuture as BoxFuture;
5767 #[derive(Debug)]
5768 pub struct Response(azure_core::http::Response<(), azure_core::http::NoFormat>);
5769 impl Response {
5770 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
5771 self.0.into()
5772 }
5773 }
5774 #[derive(Clone)]
5775 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5776 #[doc = r""]
5777 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5778 #[doc = r" parameters can be chained."]
5779 #[doc = r""]
5780 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5781 #[doc = r" converts the [`RequestBuilder`] into a future,"]
5782 #[doc = r" executes the request and returns a `Result` with the parsed"]
5783 #[doc = r" response."]
5784 #[doc = r""]
5785 #[doc = r" If you need lower-level access to the raw response details"]
5786 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5787 #[doc = r" can finalize the request using the"]
5788 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5789 #[doc = r" that resolves to a lower-level [`Response`] value."]
5790 pub struct RequestBuilder {
5791 pub(crate) client: super::super::Client,
5792 pub(crate) organization: String,
5793 pub(crate) body: models::UpdateTaskboardWorkItemColumn,
5794 pub(crate) project: String,
5795 pub(crate) team: String,
5796 pub(crate) iteration_id: String,
5797 pub(crate) work_item_id: i32,
5798 }
5799 impl RequestBuilder {
5800 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5801 #[doc = ""]
5802 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5803 #[doc = "However, this function can provide more flexibility when required."]
5804 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5805 Box::pin({
5806 let this = self.clone();
5807 async move {
5808 let url = this.url()?;
5809 let mut req =
5810 azure_core::http::Request::new(url, azure_core::http::Method::Patch);
5811 if let Some(auth_header) = this
5812 .client
5813 .token_credential()
5814 .http_authorization_header(&this.client.scopes())
5815 .await?
5816 {
5817 req.insert_header(
5818 azure_core::http::headers::AUTHORIZATION,
5819 auth_header,
5820 );
5821 }
5822 req.insert_header("content-type", "application/json");
5823 let req_body = azure_core::json::to_json(&this.body)?;
5824 req.set_body(req_body);
5825 Ok(Response(this.client.send(&mut req).await?.into()))
5826 }
5827 })
5828 }
5829 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
5830 let mut url = azure_core::http::Url::parse(&format!(
5831 "{}/{}/{}/{}/_apis/work/taskboardworkitems/{}/{}",
5832 self.client.endpoint(),
5833 &self.organization,
5834 &self.project,
5835 &self.team,
5836 &self.iteration_id,
5837 &self.work_item_id
5838 ))?;
5839 let has_api_version_already = url
5840 .query_pairs()
5841 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
5842 if !has_api_version_already {
5843 url.query_pairs_mut().append_pair(
5844 azure_core::http::headers::query_param::API_VERSION,
5845 "7.1-preview",
5846 );
5847 }
5848 Ok(url)
5849 }
5850 }
5851 impl std::future::IntoFuture for RequestBuilder {
5852 type Output = azure_core::Result<()>;
5853 type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
5854 #[doc = "Returns a future that sends the request and waits for the response."]
5855 #[doc = ""]
5856 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
5857 #[doc = ""]
5858 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
5859 fn into_future(self) -> Self::IntoFuture {
5860 Box::pin(async move {
5861 let _rsp = self.send().await?;
5862 Ok(())
5863 })
5864 }
5865 }
5866 }
5867}
5868pub mod teamsettings {
5869 use super::models;
5870 #[cfg(not(target_arch = "wasm32"))]
5871 use futures::future::BoxFuture;
5872 #[cfg(target_arch = "wasm32")]
5873 use futures::future::LocalBoxFuture as BoxFuture;
5874 pub struct Client(pub(crate) super::Client);
5875 impl Client {
5876 #[doc = "Get a team's settings"]
5877 #[doc = ""]
5878 #[doc = "Arguments:"]
5879 #[doc = "* `organization`: The name of the Azure DevOps organization."]
5880 #[doc = "* `project`: Project ID or project name"]
5881 #[doc = "* `team`: Team ID or team name"]
5882 pub fn get(
5883 &self,
5884 organization: impl Into<String>,
5885 project: impl Into<String>,
5886 team: impl Into<String>,
5887 ) -> get::RequestBuilder {
5888 get::RequestBuilder {
5889 client: self.0.clone(),
5890 organization: organization.into(),
5891 project: project.into(),
5892 team: team.into(),
5893 }
5894 }
5895 #[doc = "Update a team's settings"]
5896 #[doc = ""]
5897 #[doc = "Arguments:"]
5898 #[doc = "* `organization`: The name of the Azure DevOps organization."]
5899 #[doc = "* `body`: TeamSettings changes"]
5900 #[doc = "* `project`: Project ID or project name"]
5901 #[doc = "* `team`: Team ID or team name"]
5902 pub fn update(
5903 &self,
5904 organization: impl Into<String>,
5905 body: impl Into<models::TeamSettingsPatch>,
5906 project: impl Into<String>,
5907 team: impl Into<String>,
5908 ) -> update::RequestBuilder {
5909 update::RequestBuilder {
5910 client: self.0.clone(),
5911 organization: organization.into(),
5912 body: body.into(),
5913 project: project.into(),
5914 team: team.into(),
5915 }
5916 }
5917 }
5918 pub mod get {
5919 use super::models;
5920 #[cfg(not(target_arch = "wasm32"))]
5921 use futures::future::BoxFuture;
5922 #[cfg(target_arch = "wasm32")]
5923 use futures::future::LocalBoxFuture as BoxFuture;
5924 #[derive(Debug)]
5925 pub struct Response(
5926 azure_core::http::Response<models::TeamSetting, azure_core::http::JsonFormat>,
5927 );
5928 impl Response {
5929 pub async fn into_body(self) -> azure_core::Result<models::TeamSetting> {
5930 self.0.into_body().await
5931 }
5932 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
5933 self.0.into()
5934 }
5935 }
5936 #[derive(Clone)]
5937 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
5938 #[doc = r""]
5939 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
5940 #[doc = r" parameters can be chained."]
5941 #[doc = r""]
5942 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
5943 #[doc = r" converts the [`RequestBuilder`] into a future,"]
5944 #[doc = r" executes the request and returns a `Result` with the parsed"]
5945 #[doc = r" response."]
5946 #[doc = r""]
5947 #[doc = r" If you need lower-level access to the raw response details"]
5948 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
5949 #[doc = r" can finalize the request using the"]
5950 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
5951 #[doc = r" that resolves to a lower-level [`Response`] value."]
5952 pub struct RequestBuilder {
5953 pub(crate) client: super::super::Client,
5954 pub(crate) organization: String,
5955 pub(crate) project: String,
5956 pub(crate) team: String,
5957 }
5958 impl RequestBuilder {
5959 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
5960 #[doc = ""]
5961 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
5962 #[doc = "However, this function can provide more flexibility when required."]
5963 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
5964 Box::pin({
5965 let this = self.clone();
5966 async move {
5967 let url = this.url()?;
5968 let mut req =
5969 azure_core::http::Request::new(url, azure_core::http::Method::Get);
5970 if let Some(auth_header) = this
5971 .client
5972 .token_credential()
5973 .http_authorization_header(&this.client.scopes())
5974 .await?
5975 {
5976 req.insert_header(
5977 azure_core::http::headers::AUTHORIZATION,
5978 auth_header,
5979 );
5980 }
5981 let req_body = azure_core::Bytes::new();
5982 req.set_body(req_body);
5983 Ok(Response(this.client.send(&mut req).await?.into()))
5984 }
5985 })
5986 }
5987 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
5988 let mut url = azure_core::http::Url::parse(&format!(
5989 "{}/{}/{}/{}/_apis/work/teamsettings",
5990 self.client.endpoint(),
5991 &self.organization,
5992 &self.project,
5993 &self.team
5994 ))?;
5995 let has_api_version_already = url
5996 .query_pairs()
5997 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
5998 if !has_api_version_already {
5999 url.query_pairs_mut().append_pair(
6000 azure_core::http::headers::query_param::API_VERSION,
6001 "7.1-preview",
6002 );
6003 }
6004 Ok(url)
6005 }
6006 }
6007 impl std::future::IntoFuture for RequestBuilder {
6008 type Output = azure_core::Result<models::TeamSetting>;
6009 type IntoFuture = BoxFuture<'static, azure_core::Result<models::TeamSetting>>;
6010 #[doc = "Returns a future that sends the request and returns the parsed response body."]
6011 #[doc = ""]
6012 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6013 #[doc = ""]
6014 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6015 fn into_future(self) -> Self::IntoFuture {
6016 Box::pin(async move { self.send().await?.into_body().await })
6017 }
6018 }
6019 }
6020 pub mod update {
6021 use super::models;
6022 #[cfg(not(target_arch = "wasm32"))]
6023 use futures::future::BoxFuture;
6024 #[cfg(target_arch = "wasm32")]
6025 use futures::future::LocalBoxFuture as BoxFuture;
6026 #[derive(Debug)]
6027 pub struct Response(
6028 azure_core::http::Response<models::TeamSetting, azure_core::http::JsonFormat>,
6029 );
6030 impl Response {
6031 pub async fn into_body(self) -> azure_core::Result<models::TeamSetting> {
6032 self.0.into_body().await
6033 }
6034 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
6035 self.0.into()
6036 }
6037 }
6038 #[derive(Clone)]
6039 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6040 #[doc = r""]
6041 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6042 #[doc = r" parameters can be chained."]
6043 #[doc = r""]
6044 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6045 #[doc = r" converts the [`RequestBuilder`] into a future,"]
6046 #[doc = r" executes the request and returns a `Result` with the parsed"]
6047 #[doc = r" response."]
6048 #[doc = r""]
6049 #[doc = r" If you need lower-level access to the raw response details"]
6050 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6051 #[doc = r" can finalize the request using the"]
6052 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6053 #[doc = r" that resolves to a lower-level [`Response`] value."]
6054 pub struct RequestBuilder {
6055 pub(crate) client: super::super::Client,
6056 pub(crate) organization: String,
6057 pub(crate) body: models::TeamSettingsPatch,
6058 pub(crate) project: String,
6059 pub(crate) team: String,
6060 }
6061 impl RequestBuilder {
6062 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6063 #[doc = ""]
6064 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6065 #[doc = "However, this function can provide more flexibility when required."]
6066 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6067 Box::pin({
6068 let this = self.clone();
6069 async move {
6070 let url = this.url()?;
6071 let mut req =
6072 azure_core::http::Request::new(url, azure_core::http::Method::Patch);
6073 if let Some(auth_header) = this
6074 .client
6075 .token_credential()
6076 .http_authorization_header(&this.client.scopes())
6077 .await?
6078 {
6079 req.insert_header(
6080 azure_core::http::headers::AUTHORIZATION,
6081 auth_header,
6082 );
6083 }
6084 req.insert_header("content-type", "application/json");
6085 let req_body = azure_core::json::to_json(&this.body)?;
6086 req.set_body(req_body);
6087 Ok(Response(this.client.send(&mut req).await?.into()))
6088 }
6089 })
6090 }
6091 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
6092 let mut url = azure_core::http::Url::parse(&format!(
6093 "{}/{}/{}/{}/_apis/work/teamsettings",
6094 self.client.endpoint(),
6095 &self.organization,
6096 &self.project,
6097 &self.team
6098 ))?;
6099 let has_api_version_already = url
6100 .query_pairs()
6101 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
6102 if !has_api_version_already {
6103 url.query_pairs_mut().append_pair(
6104 azure_core::http::headers::query_param::API_VERSION,
6105 "7.1-preview",
6106 );
6107 }
6108 Ok(url)
6109 }
6110 }
6111 impl std::future::IntoFuture for RequestBuilder {
6112 type Output = azure_core::Result<models::TeamSetting>;
6113 type IntoFuture = BoxFuture<'static, azure_core::Result<models::TeamSetting>>;
6114 #[doc = "Returns a future that sends the request and returns the parsed response body."]
6115 #[doc = ""]
6116 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6117 #[doc = ""]
6118 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6119 fn into_future(self) -> Self::IntoFuture {
6120 Box::pin(async move { self.send().await?.into_body().await })
6121 }
6122 }
6123 }
6124}
6125pub mod iterations {
6126 use super::models;
6127 #[cfg(not(target_arch = "wasm32"))]
6128 use futures::future::BoxFuture;
6129 #[cfg(target_arch = "wasm32")]
6130 use futures::future::LocalBoxFuture as BoxFuture;
6131 pub struct Client(pub(crate) super::Client);
6132 impl Client {
6133 #[doc = "Get a team's iterations using timeframe filter"]
6134 #[doc = ""]
6135 #[doc = "Arguments:"]
6136 #[doc = "* `organization`: The name of the Azure DevOps organization."]
6137 #[doc = "* `project`: Project ID or project name"]
6138 #[doc = "* `team`: Team ID or team name"]
6139 pub fn list(
6140 &self,
6141 organization: impl Into<String>,
6142 project: impl Into<String>,
6143 team: impl Into<String>,
6144 ) -> list::RequestBuilder {
6145 list::RequestBuilder {
6146 client: self.0.clone(),
6147 organization: organization.into(),
6148 project: project.into(),
6149 team: team.into(),
6150 timeframe: None,
6151 }
6152 }
6153 #[doc = "Add an iteration to the team"]
6154 #[doc = ""]
6155 #[doc = "Arguments:"]
6156 #[doc = "* `organization`: The name of the Azure DevOps organization."]
6157 #[doc = "* `body`: Iteration to add"]
6158 #[doc = "* `project`: Project ID or project name"]
6159 #[doc = "* `team`: Team ID or team name"]
6160 pub fn post_team_iteration(
6161 &self,
6162 organization: impl Into<String>,
6163 body: impl Into<models::TeamSettingsIteration>,
6164 project: impl Into<String>,
6165 team: impl Into<String>,
6166 ) -> post_team_iteration::RequestBuilder {
6167 post_team_iteration::RequestBuilder {
6168 client: self.0.clone(),
6169 organization: organization.into(),
6170 body: body.into(),
6171 project: project.into(),
6172 team: team.into(),
6173 }
6174 }
6175 #[doc = "Get team's iteration by iterationId"]
6176 #[doc = ""]
6177 #[doc = "Arguments:"]
6178 #[doc = "* `organization`: The name of the Azure DevOps organization."]
6179 #[doc = "* `project`: Project ID or project name"]
6180 #[doc = "* `id`: ID of the iteration"]
6181 #[doc = "* `team`: Team ID or team name"]
6182 pub fn get(
6183 &self,
6184 organization: impl Into<String>,
6185 project: impl Into<String>,
6186 id: impl Into<String>,
6187 team: impl Into<String>,
6188 ) -> get::RequestBuilder {
6189 get::RequestBuilder {
6190 client: self.0.clone(),
6191 organization: organization.into(),
6192 project: project.into(),
6193 id: id.into(),
6194 team: team.into(),
6195 }
6196 }
6197 #[doc = "Delete a team's iteration by iterationId"]
6198 #[doc = ""]
6199 #[doc = "Arguments:"]
6200 #[doc = "* `organization`: The name of the Azure DevOps organization."]
6201 #[doc = "* `project`: Project ID or project name"]
6202 #[doc = "* `id`: ID of the iteration"]
6203 #[doc = "* `team`: Team ID or team name"]
6204 pub fn delete(
6205 &self,
6206 organization: impl Into<String>,
6207 project: impl Into<String>,
6208 id: impl Into<String>,
6209 team: impl Into<String>,
6210 ) -> delete::RequestBuilder {
6211 delete::RequestBuilder {
6212 client: self.0.clone(),
6213 organization: organization.into(),
6214 project: project.into(),
6215 id: id.into(),
6216 team: team.into(),
6217 }
6218 }
6219 #[doc = "Get work items for iteration"]
6220 #[doc = ""]
6221 #[doc = "Arguments:"]
6222 #[doc = "* `organization`: The name of the Azure DevOps organization."]
6223 #[doc = "* `project`: Project ID or project name"]
6224 #[doc = "* `iteration_id`: ID of the iteration"]
6225 #[doc = "* `team`: Team ID or team name"]
6226 pub fn get_iteration_work_items(
6227 &self,
6228 organization: impl Into<String>,
6229 project: impl Into<String>,
6230 iteration_id: impl Into<String>,
6231 team: impl Into<String>,
6232 ) -> get_iteration_work_items::RequestBuilder {
6233 get_iteration_work_items::RequestBuilder {
6234 client: self.0.clone(),
6235 organization: organization.into(),
6236 project: project.into(),
6237 iteration_id: iteration_id.into(),
6238 team: team.into(),
6239 }
6240 }
6241 }
6242 pub mod list {
6243 use super::models;
6244 #[cfg(not(target_arch = "wasm32"))]
6245 use futures::future::BoxFuture;
6246 #[cfg(target_arch = "wasm32")]
6247 use futures::future::LocalBoxFuture as BoxFuture;
6248 #[derive(Debug)]
6249 pub struct Response(
6250 azure_core::http::Response<
6251 models::TeamSettingsIterationList,
6252 azure_core::http::JsonFormat,
6253 >,
6254 );
6255 impl Response {
6256 pub async fn into_body(self) -> azure_core::Result<models::TeamSettingsIterationList> {
6257 self.0.into_body().await
6258 }
6259 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
6260 self.0.into()
6261 }
6262 }
6263 #[derive(Clone)]
6264 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6265 #[doc = r""]
6266 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6267 #[doc = r" parameters can be chained."]
6268 #[doc = r""]
6269 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6270 #[doc = r" converts the [`RequestBuilder`] into a future,"]
6271 #[doc = r" executes the request and returns a `Result` with the parsed"]
6272 #[doc = r" response."]
6273 #[doc = r""]
6274 #[doc = r" If you need lower-level access to the raw response details"]
6275 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6276 #[doc = r" can finalize the request using the"]
6277 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6278 #[doc = r" that resolves to a lower-level [`Response`] value."]
6279 pub struct RequestBuilder {
6280 pub(crate) client: super::super::Client,
6281 pub(crate) organization: String,
6282 pub(crate) project: String,
6283 pub(crate) team: String,
6284 pub(crate) timeframe: Option<String>,
6285 }
6286 impl RequestBuilder {
6287 #[doc = "A filter for which iterations are returned based on relative time. Only Current is supported currently."]
6288 pub fn timeframe(mut self, timeframe: impl Into<String>) -> Self {
6289 self.timeframe = Some(timeframe.into());
6290 self
6291 }
6292 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6293 #[doc = ""]
6294 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6295 #[doc = "However, this function can provide more flexibility when required."]
6296 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6297 Box::pin({
6298 let this = self.clone();
6299 async move {
6300 let url = this.url()?;
6301 let mut req =
6302 azure_core::http::Request::new(url, azure_core::http::Method::Get);
6303 if let Some(auth_header) = this
6304 .client
6305 .token_credential()
6306 .http_authorization_header(&this.client.scopes())
6307 .await?
6308 {
6309 req.insert_header(
6310 azure_core::http::headers::AUTHORIZATION,
6311 auth_header,
6312 );
6313 }
6314 if let Some(timeframe) = &this.timeframe {
6315 req.url_mut()
6316 .query_pairs_mut()
6317 .append_pair("$timeframe", timeframe);
6318 }
6319 let req_body = azure_core::Bytes::new();
6320 req.set_body(req_body);
6321 Ok(Response(this.client.send(&mut req).await?.into()))
6322 }
6323 })
6324 }
6325 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
6326 let mut url = azure_core::http::Url::parse(&format!(
6327 "{}/{}/{}/{}/_apis/work/teamsettings/iterations",
6328 self.client.endpoint(),
6329 &self.organization,
6330 &self.project,
6331 &self.team
6332 ))?;
6333 let has_api_version_already = url
6334 .query_pairs()
6335 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
6336 if !has_api_version_already {
6337 url.query_pairs_mut().append_pair(
6338 azure_core::http::headers::query_param::API_VERSION,
6339 "7.1-preview",
6340 );
6341 }
6342 Ok(url)
6343 }
6344 }
6345 impl std::future::IntoFuture for RequestBuilder {
6346 type Output = azure_core::Result<models::TeamSettingsIterationList>;
6347 type IntoFuture =
6348 BoxFuture<'static, azure_core::Result<models::TeamSettingsIterationList>>;
6349 #[doc = "Returns a future that sends the request and returns the parsed response body."]
6350 #[doc = ""]
6351 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6352 #[doc = ""]
6353 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6354 fn into_future(self) -> Self::IntoFuture {
6355 Box::pin(async move { self.send().await?.into_body().await })
6356 }
6357 }
6358 }
6359 pub mod post_team_iteration {
6360 use super::models;
6361 #[cfg(not(target_arch = "wasm32"))]
6362 use futures::future::BoxFuture;
6363 #[cfg(target_arch = "wasm32")]
6364 use futures::future::LocalBoxFuture as BoxFuture;
6365 #[derive(Debug)]
6366 pub struct Response(
6367 azure_core::http::Response<models::TeamSettingsIteration, azure_core::http::JsonFormat>,
6368 );
6369 impl Response {
6370 pub async fn into_body(self) -> azure_core::Result<models::TeamSettingsIteration> {
6371 self.0.into_body().await
6372 }
6373 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
6374 self.0.into()
6375 }
6376 }
6377 #[derive(Clone)]
6378 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6379 #[doc = r""]
6380 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6381 #[doc = r" parameters can be chained."]
6382 #[doc = r""]
6383 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6384 #[doc = r" converts the [`RequestBuilder`] into a future,"]
6385 #[doc = r" executes the request and returns a `Result` with the parsed"]
6386 #[doc = r" response."]
6387 #[doc = r""]
6388 #[doc = r" If you need lower-level access to the raw response details"]
6389 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6390 #[doc = r" can finalize the request using the"]
6391 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6392 #[doc = r" that resolves to a lower-level [`Response`] value."]
6393 pub struct RequestBuilder {
6394 pub(crate) client: super::super::Client,
6395 pub(crate) organization: String,
6396 pub(crate) body: models::TeamSettingsIteration,
6397 pub(crate) project: String,
6398 pub(crate) team: String,
6399 }
6400 impl RequestBuilder {
6401 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6402 #[doc = ""]
6403 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6404 #[doc = "However, this function can provide more flexibility when required."]
6405 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6406 Box::pin({
6407 let this = self.clone();
6408 async move {
6409 let url = this.url()?;
6410 let mut req =
6411 azure_core::http::Request::new(url, azure_core::http::Method::Post);
6412 if let Some(auth_header) = this
6413 .client
6414 .token_credential()
6415 .http_authorization_header(&this.client.scopes())
6416 .await?
6417 {
6418 req.insert_header(
6419 azure_core::http::headers::AUTHORIZATION,
6420 auth_header,
6421 );
6422 }
6423 req.insert_header("content-type", "application/json");
6424 let req_body = azure_core::json::to_json(&this.body)?;
6425 req.set_body(req_body);
6426 Ok(Response(this.client.send(&mut req).await?.into()))
6427 }
6428 })
6429 }
6430 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
6431 let mut url = azure_core::http::Url::parse(&format!(
6432 "{}/{}/{}/{}/_apis/work/teamsettings/iterations",
6433 self.client.endpoint(),
6434 &self.organization,
6435 &self.project,
6436 &self.team
6437 ))?;
6438 let has_api_version_already = url
6439 .query_pairs()
6440 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
6441 if !has_api_version_already {
6442 url.query_pairs_mut().append_pair(
6443 azure_core::http::headers::query_param::API_VERSION,
6444 "7.1-preview",
6445 );
6446 }
6447 Ok(url)
6448 }
6449 }
6450 impl std::future::IntoFuture for RequestBuilder {
6451 type Output = azure_core::Result<models::TeamSettingsIteration>;
6452 type IntoFuture = BoxFuture<'static, azure_core::Result<models::TeamSettingsIteration>>;
6453 #[doc = "Returns a future that sends the request and returns the parsed response body."]
6454 #[doc = ""]
6455 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6456 #[doc = ""]
6457 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6458 fn into_future(self) -> Self::IntoFuture {
6459 Box::pin(async move { self.send().await?.into_body().await })
6460 }
6461 }
6462 }
6463 pub mod get {
6464 use super::models;
6465 #[cfg(not(target_arch = "wasm32"))]
6466 use futures::future::BoxFuture;
6467 #[cfg(target_arch = "wasm32")]
6468 use futures::future::LocalBoxFuture as BoxFuture;
6469 #[derive(Debug)]
6470 pub struct Response(
6471 azure_core::http::Response<models::TeamSettingsIteration, azure_core::http::JsonFormat>,
6472 );
6473 impl Response {
6474 pub async fn into_body(self) -> azure_core::Result<models::TeamSettingsIteration> {
6475 self.0.into_body().await
6476 }
6477 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
6478 self.0.into()
6479 }
6480 }
6481 #[derive(Clone)]
6482 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6483 #[doc = r""]
6484 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6485 #[doc = r" parameters can be chained."]
6486 #[doc = r""]
6487 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6488 #[doc = r" converts the [`RequestBuilder`] into a future,"]
6489 #[doc = r" executes the request and returns a `Result` with the parsed"]
6490 #[doc = r" response."]
6491 #[doc = r""]
6492 #[doc = r" If you need lower-level access to the raw response details"]
6493 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6494 #[doc = r" can finalize the request using the"]
6495 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6496 #[doc = r" that resolves to a lower-level [`Response`] value."]
6497 pub struct RequestBuilder {
6498 pub(crate) client: super::super::Client,
6499 pub(crate) organization: String,
6500 pub(crate) project: String,
6501 pub(crate) id: String,
6502 pub(crate) team: String,
6503 }
6504 impl RequestBuilder {
6505 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6506 #[doc = ""]
6507 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6508 #[doc = "However, this function can provide more flexibility when required."]
6509 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6510 Box::pin({
6511 let this = self.clone();
6512 async move {
6513 let url = this.url()?;
6514 let mut req =
6515 azure_core::http::Request::new(url, azure_core::http::Method::Get);
6516 if let Some(auth_header) = this
6517 .client
6518 .token_credential()
6519 .http_authorization_header(&this.client.scopes())
6520 .await?
6521 {
6522 req.insert_header(
6523 azure_core::http::headers::AUTHORIZATION,
6524 auth_header,
6525 );
6526 }
6527 let req_body = azure_core::Bytes::new();
6528 req.set_body(req_body);
6529 Ok(Response(this.client.send(&mut req).await?.into()))
6530 }
6531 })
6532 }
6533 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
6534 let mut url = azure_core::http::Url::parse(&format!(
6535 "{}/{}/{}/{}/_apis/work/teamsettings/iterations/{}",
6536 self.client.endpoint(),
6537 &self.organization,
6538 &self.project,
6539 &self.team,
6540 &self.id
6541 ))?;
6542 let has_api_version_already = url
6543 .query_pairs()
6544 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
6545 if !has_api_version_already {
6546 url.query_pairs_mut().append_pair(
6547 azure_core::http::headers::query_param::API_VERSION,
6548 "7.1-preview",
6549 );
6550 }
6551 Ok(url)
6552 }
6553 }
6554 impl std::future::IntoFuture for RequestBuilder {
6555 type Output = azure_core::Result<models::TeamSettingsIteration>;
6556 type IntoFuture = BoxFuture<'static, azure_core::Result<models::TeamSettingsIteration>>;
6557 #[doc = "Returns a future that sends the request and returns the parsed response body."]
6558 #[doc = ""]
6559 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6560 #[doc = ""]
6561 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6562 fn into_future(self) -> Self::IntoFuture {
6563 Box::pin(async move { self.send().await?.into_body().await })
6564 }
6565 }
6566 }
6567 pub mod delete {
6568 use super::models;
6569 #[cfg(not(target_arch = "wasm32"))]
6570 use futures::future::BoxFuture;
6571 #[cfg(target_arch = "wasm32")]
6572 use futures::future::LocalBoxFuture as BoxFuture;
6573 #[derive(Debug)]
6574 pub struct Response(azure_core::http::Response<(), azure_core::http::NoFormat>);
6575 impl Response {
6576 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
6577 self.0.into()
6578 }
6579 }
6580 #[derive(Clone)]
6581 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6582 #[doc = r""]
6583 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6584 #[doc = r" parameters can be chained."]
6585 #[doc = r""]
6586 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6587 #[doc = r" converts the [`RequestBuilder`] into a future,"]
6588 #[doc = r" executes the request and returns a `Result` with the parsed"]
6589 #[doc = r" response."]
6590 #[doc = r""]
6591 #[doc = r" If you need lower-level access to the raw response details"]
6592 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6593 #[doc = r" can finalize the request using the"]
6594 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6595 #[doc = r" that resolves to a lower-level [`Response`] value."]
6596 pub struct RequestBuilder {
6597 pub(crate) client: super::super::Client,
6598 pub(crate) organization: String,
6599 pub(crate) project: String,
6600 pub(crate) id: String,
6601 pub(crate) team: String,
6602 }
6603 impl RequestBuilder {
6604 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6605 #[doc = ""]
6606 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6607 #[doc = "However, this function can provide more flexibility when required."]
6608 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6609 Box::pin({
6610 let this = self.clone();
6611 async move {
6612 let url = this.url()?;
6613 let mut req =
6614 azure_core::http::Request::new(url, azure_core::http::Method::Delete);
6615 if let Some(auth_header) = this
6616 .client
6617 .token_credential()
6618 .http_authorization_header(&this.client.scopes())
6619 .await?
6620 {
6621 req.insert_header(
6622 azure_core::http::headers::AUTHORIZATION,
6623 auth_header,
6624 );
6625 }
6626 let req_body = azure_core::Bytes::new();
6627 req.set_body(req_body);
6628 Ok(Response(this.client.send(&mut req).await?.into()))
6629 }
6630 })
6631 }
6632 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
6633 let mut url = azure_core::http::Url::parse(&format!(
6634 "{}/{}/{}/{}/_apis/work/teamsettings/iterations/{}",
6635 self.client.endpoint(),
6636 &self.organization,
6637 &self.project,
6638 &self.team,
6639 &self.id
6640 ))?;
6641 let has_api_version_already = url
6642 .query_pairs()
6643 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
6644 if !has_api_version_already {
6645 url.query_pairs_mut().append_pair(
6646 azure_core::http::headers::query_param::API_VERSION,
6647 "7.1-preview",
6648 );
6649 }
6650 Ok(url)
6651 }
6652 }
6653 impl std::future::IntoFuture for RequestBuilder {
6654 type Output = azure_core::Result<()>;
6655 type IntoFuture = BoxFuture<'static, azure_core::Result<()>>;
6656 #[doc = "Returns a future that sends the request and waits for the response."]
6657 #[doc = ""]
6658 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6659 #[doc = ""]
6660 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6661 fn into_future(self) -> Self::IntoFuture {
6662 Box::pin(async move {
6663 let _rsp = self.send().await?;
6664 Ok(())
6665 })
6666 }
6667 }
6668 }
6669 pub mod get_iteration_work_items {
6670 use super::models;
6671 #[cfg(not(target_arch = "wasm32"))]
6672 use futures::future::BoxFuture;
6673 #[cfg(target_arch = "wasm32")]
6674 use futures::future::LocalBoxFuture as BoxFuture;
6675 #[derive(Debug)]
6676 pub struct Response(
6677 azure_core::http::Response<models::IterationWorkItems, azure_core::http::JsonFormat>,
6678 );
6679 impl Response {
6680 pub async fn into_body(self) -> azure_core::Result<models::IterationWorkItems> {
6681 self.0.into_body().await
6682 }
6683 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
6684 self.0.into()
6685 }
6686 }
6687 #[derive(Clone)]
6688 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6689 #[doc = r""]
6690 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6691 #[doc = r" parameters can be chained."]
6692 #[doc = r""]
6693 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6694 #[doc = r" converts the [`RequestBuilder`] into a future,"]
6695 #[doc = r" executes the request and returns a `Result` with the parsed"]
6696 #[doc = r" response."]
6697 #[doc = r""]
6698 #[doc = r" If you need lower-level access to the raw response details"]
6699 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6700 #[doc = r" can finalize the request using the"]
6701 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6702 #[doc = r" that resolves to a lower-level [`Response`] value."]
6703 pub struct RequestBuilder {
6704 pub(crate) client: super::super::Client,
6705 pub(crate) organization: String,
6706 pub(crate) project: String,
6707 pub(crate) iteration_id: String,
6708 pub(crate) team: String,
6709 }
6710 impl RequestBuilder {
6711 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6712 #[doc = ""]
6713 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6714 #[doc = "However, this function can provide more flexibility when required."]
6715 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6716 Box::pin({
6717 let this = self.clone();
6718 async move {
6719 let url = this.url()?;
6720 let mut req =
6721 azure_core::http::Request::new(url, azure_core::http::Method::Get);
6722 if let Some(auth_header) = this
6723 .client
6724 .token_credential()
6725 .http_authorization_header(&this.client.scopes())
6726 .await?
6727 {
6728 req.insert_header(
6729 azure_core::http::headers::AUTHORIZATION,
6730 auth_header,
6731 );
6732 }
6733 let req_body = azure_core::Bytes::new();
6734 req.set_body(req_body);
6735 Ok(Response(this.client.send(&mut req).await?.into()))
6736 }
6737 })
6738 }
6739 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
6740 let mut url = azure_core::http::Url::parse(&format!(
6741 "{}/{}/{}/{}/_apis/work/teamsettings/iterations/{}/workitems",
6742 self.client.endpoint(),
6743 &self.organization,
6744 &self.project,
6745 &self.team,
6746 &self.iteration_id
6747 ))?;
6748 let has_api_version_already = url
6749 .query_pairs()
6750 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
6751 if !has_api_version_already {
6752 url.query_pairs_mut().append_pair(
6753 azure_core::http::headers::query_param::API_VERSION,
6754 "7.1-preview",
6755 );
6756 }
6757 Ok(url)
6758 }
6759 }
6760 impl std::future::IntoFuture for RequestBuilder {
6761 type Output = azure_core::Result<models::IterationWorkItems>;
6762 type IntoFuture = BoxFuture<'static, azure_core::Result<models::IterationWorkItems>>;
6763 #[doc = "Returns a future that sends the request and returns the parsed response body."]
6764 #[doc = ""]
6765 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6766 #[doc = ""]
6767 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6768 fn into_future(self) -> Self::IntoFuture {
6769 Box::pin(async move { self.send().await?.into_body().await })
6770 }
6771 }
6772 }
6773}
6774pub mod capacities {
6775 use super::models;
6776 #[cfg(not(target_arch = "wasm32"))]
6777 use futures::future::BoxFuture;
6778 #[cfg(target_arch = "wasm32")]
6779 use futures::future::LocalBoxFuture as BoxFuture;
6780 pub struct Client(pub(crate) super::Client);
6781 impl Client {
6782 #[doc = "Get a team's capacity including total capacity and days off"]
6783 #[doc = ""]
6784 #[doc = "Arguments:"]
6785 #[doc = "* `organization`: The name of the Azure DevOps organization."]
6786 #[doc = "* `project`: Project ID or project name"]
6787 #[doc = "* `iteration_id`: ID of the iteration"]
6788 #[doc = "* `team`: Team ID or team name"]
6789 pub fn get_capacities_with_identity_ref_and_totals(
6790 &self,
6791 organization: impl Into<String>,
6792 project: impl Into<String>,
6793 iteration_id: impl Into<String>,
6794 team: impl Into<String>,
6795 ) -> get_capacities_with_identity_ref_and_totals::RequestBuilder {
6796 get_capacities_with_identity_ref_and_totals::RequestBuilder {
6797 client: self.0.clone(),
6798 organization: organization.into(),
6799 project: project.into(),
6800 iteration_id: iteration_id.into(),
6801 team: team.into(),
6802 }
6803 }
6804 #[doc = "Replace a team's capacity"]
6805 #[doc = ""]
6806 #[doc = "Arguments:"]
6807 #[doc = "* `organization`: The name of the Azure DevOps organization."]
6808 #[doc = "* `body`: Team capacity to replace"]
6809 #[doc = "* `project`: Project ID or project name"]
6810 #[doc = "* `iteration_id`: ID of the iteration"]
6811 #[doc = "* `team`: Team ID or team name"]
6812 pub fn replace_capacities_with_identity_ref(
6813 &self,
6814 organization: impl Into<String>,
6815 body: Vec<models::TeamMemberCapacityIdentityRef>,
6816 project: impl Into<String>,
6817 iteration_id: impl Into<String>,
6818 team: impl Into<String>,
6819 ) -> replace_capacities_with_identity_ref::RequestBuilder {
6820 replace_capacities_with_identity_ref::RequestBuilder {
6821 client: self.0.clone(),
6822 organization: organization.into(),
6823 body,
6824 project: project.into(),
6825 iteration_id: iteration_id.into(),
6826 team: team.into(),
6827 }
6828 }
6829 #[doc = "Get a team member's capacity"]
6830 #[doc = ""]
6831 #[doc = "Arguments:"]
6832 #[doc = "* `organization`: The name of the Azure DevOps organization."]
6833 #[doc = "* `project`: Project ID or project name"]
6834 #[doc = "* `iteration_id`: ID of the iteration"]
6835 #[doc = "* `team_member_id`: ID of the team member"]
6836 #[doc = "* `team`: Team ID or team name"]
6837 pub fn get_capacity_with_identity_ref(
6838 &self,
6839 organization: impl Into<String>,
6840 project: impl Into<String>,
6841 iteration_id: impl Into<String>,
6842 team_member_id: impl Into<String>,
6843 team: impl Into<String>,
6844 ) -> get_capacity_with_identity_ref::RequestBuilder {
6845 get_capacity_with_identity_ref::RequestBuilder {
6846 client: self.0.clone(),
6847 organization: organization.into(),
6848 project: project.into(),
6849 iteration_id: iteration_id.into(),
6850 team_member_id: team_member_id.into(),
6851 team: team.into(),
6852 }
6853 }
6854 #[doc = "Update a team member's capacity"]
6855 #[doc = ""]
6856 #[doc = "Arguments:"]
6857 #[doc = "* `organization`: The name of the Azure DevOps organization."]
6858 #[doc = "* `body`: Updated capacity"]
6859 #[doc = "* `project`: Project ID or project name"]
6860 #[doc = "* `iteration_id`: ID of the iteration"]
6861 #[doc = "* `team_member_id`: ID of the team member"]
6862 #[doc = "* `team`: Team ID or team name"]
6863 pub fn update(
6864 &self,
6865 organization: impl Into<String>,
6866 body: impl Into<models::CapacityPatch>,
6867 project: impl Into<String>,
6868 iteration_id: impl Into<String>,
6869 team_member_id: impl Into<String>,
6870 team: impl Into<String>,
6871 ) -> update::RequestBuilder {
6872 update::RequestBuilder {
6873 client: self.0.clone(),
6874 organization: organization.into(),
6875 body: body.into(),
6876 project: project.into(),
6877 iteration_id: iteration_id.into(),
6878 team_member_id: team_member_id.into(),
6879 team: team.into(),
6880 }
6881 }
6882 }
6883 pub mod get_capacities_with_identity_ref_and_totals {
6884 use super::models;
6885 #[cfg(not(target_arch = "wasm32"))]
6886 use futures::future::BoxFuture;
6887 #[cfg(target_arch = "wasm32")]
6888 use futures::future::LocalBoxFuture as BoxFuture;
6889 #[derive(Debug)]
6890 pub struct Response(
6891 azure_core::http::Response<models::TeamCapacity, azure_core::http::JsonFormat>,
6892 );
6893 impl Response {
6894 pub async fn into_body(self) -> azure_core::Result<models::TeamCapacity> {
6895 self.0.into_body().await
6896 }
6897 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
6898 self.0.into()
6899 }
6900 }
6901 #[derive(Clone)]
6902 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
6903 #[doc = r""]
6904 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
6905 #[doc = r" parameters can be chained."]
6906 #[doc = r""]
6907 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
6908 #[doc = r" converts the [`RequestBuilder`] into a future,"]
6909 #[doc = r" executes the request and returns a `Result` with the parsed"]
6910 #[doc = r" response."]
6911 #[doc = r""]
6912 #[doc = r" If you need lower-level access to the raw response details"]
6913 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
6914 #[doc = r" can finalize the request using the"]
6915 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
6916 #[doc = r" that resolves to a lower-level [`Response`] value."]
6917 pub struct RequestBuilder {
6918 pub(crate) client: super::super::Client,
6919 pub(crate) organization: String,
6920 pub(crate) project: String,
6921 pub(crate) iteration_id: String,
6922 pub(crate) team: String,
6923 }
6924 impl RequestBuilder {
6925 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
6926 #[doc = ""]
6927 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
6928 #[doc = "However, this function can provide more flexibility when required."]
6929 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
6930 Box::pin({
6931 let this = self.clone();
6932 async move {
6933 let url = this.url()?;
6934 let mut req =
6935 azure_core::http::Request::new(url, azure_core::http::Method::Get);
6936 if let Some(auth_header) = this
6937 .client
6938 .token_credential()
6939 .http_authorization_header(&this.client.scopes())
6940 .await?
6941 {
6942 req.insert_header(
6943 azure_core::http::headers::AUTHORIZATION,
6944 auth_header,
6945 );
6946 }
6947 let req_body = azure_core::Bytes::new();
6948 req.set_body(req_body);
6949 Ok(Response(this.client.send(&mut req).await?.into()))
6950 }
6951 })
6952 }
6953 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
6954 let mut url = azure_core::http::Url::parse(&format!(
6955 "{}/{}/{}/{}/_apis/work/teamsettings/iterations/{}/capacities",
6956 self.client.endpoint(),
6957 &self.organization,
6958 &self.project,
6959 &self.team,
6960 &self.iteration_id
6961 ))?;
6962 let has_api_version_already = url
6963 .query_pairs()
6964 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
6965 if !has_api_version_already {
6966 url.query_pairs_mut().append_pair(
6967 azure_core::http::headers::query_param::API_VERSION,
6968 "7.1-preview",
6969 );
6970 }
6971 Ok(url)
6972 }
6973 }
6974 impl std::future::IntoFuture for RequestBuilder {
6975 type Output = azure_core::Result<models::TeamCapacity>;
6976 type IntoFuture = BoxFuture<'static, azure_core::Result<models::TeamCapacity>>;
6977 #[doc = "Returns a future that sends the request and returns the parsed response body."]
6978 #[doc = ""]
6979 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
6980 #[doc = ""]
6981 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
6982 fn into_future(self) -> Self::IntoFuture {
6983 Box::pin(async move { self.send().await?.into_body().await })
6984 }
6985 }
6986 }
6987 pub mod replace_capacities_with_identity_ref {
6988 use super::models;
6989 #[cfg(not(target_arch = "wasm32"))]
6990 use futures::future::BoxFuture;
6991 #[cfg(target_arch = "wasm32")]
6992 use futures::future::LocalBoxFuture as BoxFuture;
6993 #[derive(Debug)]
6994 pub struct Response(
6995 azure_core::http::Response<
6996 models::TeamMemberCapacityIdentityRefList,
6997 azure_core::http::JsonFormat,
6998 >,
6999 );
7000 impl Response {
7001 pub async fn into_body(
7002 self,
7003 ) -> azure_core::Result<models::TeamMemberCapacityIdentityRefList> {
7004 self.0.into_body().await
7005 }
7006 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
7007 self.0.into()
7008 }
7009 }
7010 #[derive(Clone)]
7011 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7012 #[doc = r""]
7013 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7014 #[doc = r" parameters can be chained."]
7015 #[doc = r""]
7016 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7017 #[doc = r" converts the [`RequestBuilder`] into a future,"]
7018 #[doc = r" executes the request and returns a `Result` with the parsed"]
7019 #[doc = r" response."]
7020 #[doc = r""]
7021 #[doc = r" If you need lower-level access to the raw response details"]
7022 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7023 #[doc = r" can finalize the request using the"]
7024 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7025 #[doc = r" that resolves to a lower-level [`Response`] value."]
7026 pub struct RequestBuilder {
7027 pub(crate) client: super::super::Client,
7028 pub(crate) organization: String,
7029 pub(crate) body: Vec<models::TeamMemberCapacityIdentityRef>,
7030 pub(crate) project: String,
7031 pub(crate) iteration_id: String,
7032 pub(crate) team: String,
7033 }
7034 impl RequestBuilder {
7035 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7036 #[doc = ""]
7037 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7038 #[doc = "However, this function can provide more flexibility when required."]
7039 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7040 Box::pin({
7041 let this = self.clone();
7042 async move {
7043 let url = this.url()?;
7044 let mut req =
7045 azure_core::http::Request::new(url, azure_core::http::Method::Put);
7046 if let Some(auth_header) = this
7047 .client
7048 .token_credential()
7049 .http_authorization_header(&this.client.scopes())
7050 .await?
7051 {
7052 req.insert_header(
7053 azure_core::http::headers::AUTHORIZATION,
7054 auth_header,
7055 );
7056 }
7057 req.insert_header("content-type", "application/json");
7058 let req_body = azure_core::json::to_json(&this.body)?;
7059 req.set_body(req_body);
7060 Ok(Response(this.client.send(&mut req).await?.into()))
7061 }
7062 })
7063 }
7064 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
7065 let mut url = azure_core::http::Url::parse(&format!(
7066 "{}/{}/{}/{}/_apis/work/teamsettings/iterations/{}/capacities",
7067 self.client.endpoint(),
7068 &self.organization,
7069 &self.project,
7070 &self.team,
7071 &self.iteration_id
7072 ))?;
7073 let has_api_version_already = url
7074 .query_pairs()
7075 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
7076 if !has_api_version_already {
7077 url.query_pairs_mut().append_pair(
7078 azure_core::http::headers::query_param::API_VERSION,
7079 "7.1-preview",
7080 );
7081 }
7082 Ok(url)
7083 }
7084 }
7085 impl std::future::IntoFuture for RequestBuilder {
7086 type Output = azure_core::Result<models::TeamMemberCapacityIdentityRefList>;
7087 type IntoFuture =
7088 BoxFuture<'static, azure_core::Result<models::TeamMemberCapacityIdentityRefList>>;
7089 #[doc = "Returns a future that sends the request and returns the parsed response body."]
7090 #[doc = ""]
7091 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7092 #[doc = ""]
7093 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7094 fn into_future(self) -> Self::IntoFuture {
7095 Box::pin(async move { self.send().await?.into_body().await })
7096 }
7097 }
7098 }
7099 pub mod get_capacity_with_identity_ref {
7100 use super::models;
7101 #[cfg(not(target_arch = "wasm32"))]
7102 use futures::future::BoxFuture;
7103 #[cfg(target_arch = "wasm32")]
7104 use futures::future::LocalBoxFuture as BoxFuture;
7105 #[derive(Debug)]
7106 pub struct Response(
7107 azure_core::http::Response<
7108 models::TeamMemberCapacityIdentityRef,
7109 azure_core::http::JsonFormat,
7110 >,
7111 );
7112 impl Response {
7113 pub async fn into_body(
7114 self,
7115 ) -> azure_core::Result<models::TeamMemberCapacityIdentityRef> {
7116 self.0.into_body().await
7117 }
7118 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
7119 self.0.into()
7120 }
7121 }
7122 #[derive(Clone)]
7123 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7124 #[doc = r""]
7125 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7126 #[doc = r" parameters can be chained."]
7127 #[doc = r""]
7128 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7129 #[doc = r" converts the [`RequestBuilder`] into a future,"]
7130 #[doc = r" executes the request and returns a `Result` with the parsed"]
7131 #[doc = r" response."]
7132 #[doc = r""]
7133 #[doc = r" If you need lower-level access to the raw response details"]
7134 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7135 #[doc = r" can finalize the request using the"]
7136 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7137 #[doc = r" that resolves to a lower-level [`Response`] value."]
7138 pub struct RequestBuilder {
7139 pub(crate) client: super::super::Client,
7140 pub(crate) organization: String,
7141 pub(crate) project: String,
7142 pub(crate) iteration_id: String,
7143 pub(crate) team_member_id: String,
7144 pub(crate) team: String,
7145 }
7146 impl RequestBuilder {
7147 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7148 #[doc = ""]
7149 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7150 #[doc = "However, this function can provide more flexibility when required."]
7151 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7152 Box::pin({
7153 let this = self.clone();
7154 async move {
7155 let url = this.url()?;
7156 let mut req =
7157 azure_core::http::Request::new(url, azure_core::http::Method::Get);
7158 if let Some(auth_header) = this
7159 .client
7160 .token_credential()
7161 .http_authorization_header(&this.client.scopes())
7162 .await?
7163 {
7164 req.insert_header(
7165 azure_core::http::headers::AUTHORIZATION,
7166 auth_header,
7167 );
7168 }
7169 let req_body = azure_core::Bytes::new();
7170 req.set_body(req_body);
7171 Ok(Response(this.client.send(&mut req).await?.into()))
7172 }
7173 })
7174 }
7175 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
7176 let mut url = azure_core::http::Url::parse(&format!(
7177 "{}/{}/{}/{}/_apis/work/teamsettings/iterations/{}/capacities/{}",
7178 self.client.endpoint(),
7179 &self.organization,
7180 &self.project,
7181 &self.team,
7182 &self.iteration_id,
7183 &self.team_member_id
7184 ))?;
7185 let has_api_version_already = url
7186 .query_pairs()
7187 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
7188 if !has_api_version_already {
7189 url.query_pairs_mut().append_pair(
7190 azure_core::http::headers::query_param::API_VERSION,
7191 "7.1-preview",
7192 );
7193 }
7194 Ok(url)
7195 }
7196 }
7197 impl std::future::IntoFuture for RequestBuilder {
7198 type Output = azure_core::Result<models::TeamMemberCapacityIdentityRef>;
7199 type IntoFuture =
7200 BoxFuture<'static, azure_core::Result<models::TeamMemberCapacityIdentityRef>>;
7201 #[doc = "Returns a future that sends the request and returns the parsed response body."]
7202 #[doc = ""]
7203 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7204 #[doc = ""]
7205 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7206 fn into_future(self) -> Self::IntoFuture {
7207 Box::pin(async move { self.send().await?.into_body().await })
7208 }
7209 }
7210 }
7211 pub mod update {
7212 use super::models;
7213 #[cfg(not(target_arch = "wasm32"))]
7214 use futures::future::BoxFuture;
7215 #[cfg(target_arch = "wasm32")]
7216 use futures::future::LocalBoxFuture as BoxFuture;
7217 #[derive(Debug)]
7218 pub struct Response(
7219 azure_core::http::Response<
7220 models::TeamMemberCapacityIdentityRef,
7221 azure_core::http::JsonFormat,
7222 >,
7223 );
7224 impl Response {
7225 pub async fn into_body(
7226 self,
7227 ) -> azure_core::Result<models::TeamMemberCapacityIdentityRef> {
7228 self.0.into_body().await
7229 }
7230 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
7231 self.0.into()
7232 }
7233 }
7234 #[derive(Clone)]
7235 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7236 #[doc = r""]
7237 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7238 #[doc = r" parameters can be chained."]
7239 #[doc = r""]
7240 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7241 #[doc = r" converts the [`RequestBuilder`] into a future,"]
7242 #[doc = r" executes the request and returns a `Result` with the parsed"]
7243 #[doc = r" response."]
7244 #[doc = r""]
7245 #[doc = r" If you need lower-level access to the raw response details"]
7246 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7247 #[doc = r" can finalize the request using the"]
7248 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7249 #[doc = r" that resolves to a lower-level [`Response`] value."]
7250 pub struct RequestBuilder {
7251 pub(crate) client: super::super::Client,
7252 pub(crate) organization: String,
7253 pub(crate) body: models::CapacityPatch,
7254 pub(crate) project: String,
7255 pub(crate) iteration_id: String,
7256 pub(crate) team_member_id: String,
7257 pub(crate) team: String,
7258 }
7259 impl RequestBuilder {
7260 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7261 #[doc = ""]
7262 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7263 #[doc = "However, this function can provide more flexibility when required."]
7264 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7265 Box::pin({
7266 let this = self.clone();
7267 async move {
7268 let url = this.url()?;
7269 let mut req =
7270 azure_core::http::Request::new(url, azure_core::http::Method::Patch);
7271 if let Some(auth_header) = this
7272 .client
7273 .token_credential()
7274 .http_authorization_header(&this.client.scopes())
7275 .await?
7276 {
7277 req.insert_header(
7278 azure_core::http::headers::AUTHORIZATION,
7279 auth_header,
7280 );
7281 }
7282 req.insert_header("content-type", "application/json");
7283 let req_body = azure_core::json::to_json(&this.body)?;
7284 req.set_body(req_body);
7285 Ok(Response(this.client.send(&mut req).await?.into()))
7286 }
7287 })
7288 }
7289 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
7290 let mut url = azure_core::http::Url::parse(&format!(
7291 "{}/{}/{}/{}/_apis/work/teamsettings/iterations/{}/capacities/{}",
7292 self.client.endpoint(),
7293 &self.organization,
7294 &self.project,
7295 &self.team,
7296 &self.iteration_id,
7297 &self.team_member_id
7298 ))?;
7299 let has_api_version_already = url
7300 .query_pairs()
7301 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
7302 if !has_api_version_already {
7303 url.query_pairs_mut().append_pair(
7304 azure_core::http::headers::query_param::API_VERSION,
7305 "7.1-preview",
7306 );
7307 }
7308 Ok(url)
7309 }
7310 }
7311 impl std::future::IntoFuture for RequestBuilder {
7312 type Output = azure_core::Result<models::TeamMemberCapacityIdentityRef>;
7313 type IntoFuture =
7314 BoxFuture<'static, azure_core::Result<models::TeamMemberCapacityIdentityRef>>;
7315 #[doc = "Returns a future that sends the request and returns the parsed response body."]
7316 #[doc = ""]
7317 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7318 #[doc = ""]
7319 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7320 fn into_future(self) -> Self::IntoFuture {
7321 Box::pin(async move { self.send().await?.into_body().await })
7322 }
7323 }
7324 }
7325}
7326pub mod teamdaysoff {
7327 use super::models;
7328 #[cfg(not(target_arch = "wasm32"))]
7329 use futures::future::BoxFuture;
7330 #[cfg(target_arch = "wasm32")]
7331 use futures::future::LocalBoxFuture as BoxFuture;
7332 pub struct Client(pub(crate) super::Client);
7333 impl Client {
7334 #[doc = "Get team's days off for an iteration"]
7335 #[doc = ""]
7336 #[doc = "Arguments:"]
7337 #[doc = "* `organization`: The name of the Azure DevOps organization."]
7338 #[doc = "* `project`: Project ID or project name"]
7339 #[doc = "* `iteration_id`: ID of the iteration"]
7340 #[doc = "* `team`: Team ID or team name"]
7341 pub fn get(
7342 &self,
7343 organization: impl Into<String>,
7344 project: impl Into<String>,
7345 iteration_id: impl Into<String>,
7346 team: impl Into<String>,
7347 ) -> get::RequestBuilder {
7348 get::RequestBuilder {
7349 client: self.0.clone(),
7350 organization: organization.into(),
7351 project: project.into(),
7352 iteration_id: iteration_id.into(),
7353 team: team.into(),
7354 }
7355 }
7356 #[doc = "Set a team's days off for an iteration"]
7357 #[doc = ""]
7358 #[doc = "Arguments:"]
7359 #[doc = "* `organization`: The name of the Azure DevOps organization."]
7360 #[doc = "* `body`: Team's days off patch containing a list of start and end dates"]
7361 #[doc = "* `project`: Project ID or project name"]
7362 #[doc = "* `iteration_id`: ID of the iteration"]
7363 #[doc = "* `team`: Team ID or team name"]
7364 pub fn update(
7365 &self,
7366 organization: impl Into<String>,
7367 body: impl Into<models::TeamSettingsDaysOffPatch>,
7368 project: impl Into<String>,
7369 iteration_id: impl Into<String>,
7370 team: impl Into<String>,
7371 ) -> update::RequestBuilder {
7372 update::RequestBuilder {
7373 client: self.0.clone(),
7374 organization: organization.into(),
7375 body: body.into(),
7376 project: project.into(),
7377 iteration_id: iteration_id.into(),
7378 team: team.into(),
7379 }
7380 }
7381 }
7382 pub mod get {
7383 use super::models;
7384 #[cfg(not(target_arch = "wasm32"))]
7385 use futures::future::BoxFuture;
7386 #[cfg(target_arch = "wasm32")]
7387 use futures::future::LocalBoxFuture as BoxFuture;
7388 #[derive(Debug)]
7389 pub struct Response(
7390 azure_core::http::Response<models::TeamSettingsDaysOff, azure_core::http::JsonFormat>,
7391 );
7392 impl Response {
7393 pub async fn into_body(self) -> azure_core::Result<models::TeamSettingsDaysOff> {
7394 self.0.into_body().await
7395 }
7396 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
7397 self.0.into()
7398 }
7399 }
7400 #[derive(Clone)]
7401 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7402 #[doc = r""]
7403 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7404 #[doc = r" parameters can be chained."]
7405 #[doc = r""]
7406 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7407 #[doc = r" converts the [`RequestBuilder`] into a future,"]
7408 #[doc = r" executes the request and returns a `Result` with the parsed"]
7409 #[doc = r" response."]
7410 #[doc = r""]
7411 #[doc = r" If you need lower-level access to the raw response details"]
7412 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7413 #[doc = r" can finalize the request using the"]
7414 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7415 #[doc = r" that resolves to a lower-level [`Response`] value."]
7416 pub struct RequestBuilder {
7417 pub(crate) client: super::super::Client,
7418 pub(crate) organization: String,
7419 pub(crate) project: String,
7420 pub(crate) iteration_id: String,
7421 pub(crate) team: String,
7422 }
7423 impl RequestBuilder {
7424 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7425 #[doc = ""]
7426 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7427 #[doc = "However, this function can provide more flexibility when required."]
7428 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7429 Box::pin({
7430 let this = self.clone();
7431 async move {
7432 let url = this.url()?;
7433 let mut req =
7434 azure_core::http::Request::new(url, azure_core::http::Method::Get);
7435 if let Some(auth_header) = this
7436 .client
7437 .token_credential()
7438 .http_authorization_header(&this.client.scopes())
7439 .await?
7440 {
7441 req.insert_header(
7442 azure_core::http::headers::AUTHORIZATION,
7443 auth_header,
7444 );
7445 }
7446 let req_body = azure_core::Bytes::new();
7447 req.set_body(req_body);
7448 Ok(Response(this.client.send(&mut req).await?.into()))
7449 }
7450 })
7451 }
7452 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
7453 let mut url = azure_core::http::Url::parse(&format!(
7454 "{}/{}/{}/{}/_apis/work/teamsettings/iterations/{}/teamdaysoff",
7455 self.client.endpoint(),
7456 &self.organization,
7457 &self.project,
7458 &self.team,
7459 &self.iteration_id
7460 ))?;
7461 let has_api_version_already = url
7462 .query_pairs()
7463 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
7464 if !has_api_version_already {
7465 url.query_pairs_mut().append_pair(
7466 azure_core::http::headers::query_param::API_VERSION,
7467 "7.1-preview",
7468 );
7469 }
7470 Ok(url)
7471 }
7472 }
7473 impl std::future::IntoFuture for RequestBuilder {
7474 type Output = azure_core::Result<models::TeamSettingsDaysOff>;
7475 type IntoFuture = BoxFuture<'static, azure_core::Result<models::TeamSettingsDaysOff>>;
7476 #[doc = "Returns a future that sends the request and returns the parsed response body."]
7477 #[doc = ""]
7478 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7479 #[doc = ""]
7480 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7481 fn into_future(self) -> Self::IntoFuture {
7482 Box::pin(async move { self.send().await?.into_body().await })
7483 }
7484 }
7485 }
7486 pub mod update {
7487 use super::models;
7488 #[cfg(not(target_arch = "wasm32"))]
7489 use futures::future::BoxFuture;
7490 #[cfg(target_arch = "wasm32")]
7491 use futures::future::LocalBoxFuture as BoxFuture;
7492 #[derive(Debug)]
7493 pub struct Response(
7494 azure_core::http::Response<models::TeamSettingsDaysOff, azure_core::http::JsonFormat>,
7495 );
7496 impl Response {
7497 pub async fn into_body(self) -> azure_core::Result<models::TeamSettingsDaysOff> {
7498 self.0.into_body().await
7499 }
7500 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
7501 self.0.into()
7502 }
7503 }
7504 #[derive(Clone)]
7505 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7506 #[doc = r""]
7507 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7508 #[doc = r" parameters can be chained."]
7509 #[doc = r""]
7510 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7511 #[doc = r" converts the [`RequestBuilder`] into a future,"]
7512 #[doc = r" executes the request and returns a `Result` with the parsed"]
7513 #[doc = r" response."]
7514 #[doc = r""]
7515 #[doc = r" If you need lower-level access to the raw response details"]
7516 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7517 #[doc = r" can finalize the request using the"]
7518 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7519 #[doc = r" that resolves to a lower-level [`Response`] value."]
7520 pub struct RequestBuilder {
7521 pub(crate) client: super::super::Client,
7522 pub(crate) organization: String,
7523 pub(crate) body: models::TeamSettingsDaysOffPatch,
7524 pub(crate) project: String,
7525 pub(crate) iteration_id: String,
7526 pub(crate) team: String,
7527 }
7528 impl RequestBuilder {
7529 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7530 #[doc = ""]
7531 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7532 #[doc = "However, this function can provide more flexibility when required."]
7533 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7534 Box::pin({
7535 let this = self.clone();
7536 async move {
7537 let url = this.url()?;
7538 let mut req =
7539 azure_core::http::Request::new(url, azure_core::http::Method::Patch);
7540 if let Some(auth_header) = this
7541 .client
7542 .token_credential()
7543 .http_authorization_header(&this.client.scopes())
7544 .await?
7545 {
7546 req.insert_header(
7547 azure_core::http::headers::AUTHORIZATION,
7548 auth_header,
7549 );
7550 }
7551 req.insert_header("content-type", "application/json");
7552 let req_body = azure_core::json::to_json(&this.body)?;
7553 req.set_body(req_body);
7554 Ok(Response(this.client.send(&mut req).await?.into()))
7555 }
7556 })
7557 }
7558 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
7559 let mut url = azure_core::http::Url::parse(&format!(
7560 "{}/{}/{}/{}/_apis/work/teamsettings/iterations/{}/teamdaysoff",
7561 self.client.endpoint(),
7562 &self.organization,
7563 &self.project,
7564 &self.team,
7565 &self.iteration_id
7566 ))?;
7567 let has_api_version_already = url
7568 .query_pairs()
7569 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
7570 if !has_api_version_already {
7571 url.query_pairs_mut().append_pair(
7572 azure_core::http::headers::query_param::API_VERSION,
7573 "7.1-preview",
7574 );
7575 }
7576 Ok(url)
7577 }
7578 }
7579 impl std::future::IntoFuture for RequestBuilder {
7580 type Output = azure_core::Result<models::TeamSettingsDaysOff>;
7581 type IntoFuture = BoxFuture<'static, azure_core::Result<models::TeamSettingsDaysOff>>;
7582 #[doc = "Returns a future that sends the request and returns the parsed response body."]
7583 #[doc = ""]
7584 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7585 #[doc = ""]
7586 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7587 fn into_future(self) -> Self::IntoFuture {
7588 Box::pin(async move { self.send().await?.into_body().await })
7589 }
7590 }
7591 }
7592}
7593pub mod teamfieldvalues {
7594 use super::models;
7595 #[cfg(not(target_arch = "wasm32"))]
7596 use futures::future::BoxFuture;
7597 #[cfg(target_arch = "wasm32")]
7598 use futures::future::LocalBoxFuture as BoxFuture;
7599 pub struct Client(pub(crate) super::Client);
7600 impl Client {
7601 #[doc = "Get a collection of team field values"]
7602 #[doc = ""]
7603 #[doc = "Arguments:"]
7604 #[doc = "* `organization`: The name of the Azure DevOps organization."]
7605 #[doc = "* `project`: Project ID or project name"]
7606 #[doc = "* `team`: Team ID or team name"]
7607 pub fn get(
7608 &self,
7609 organization: impl Into<String>,
7610 project: impl Into<String>,
7611 team: impl Into<String>,
7612 ) -> get::RequestBuilder {
7613 get::RequestBuilder {
7614 client: self.0.clone(),
7615 organization: organization.into(),
7616 project: project.into(),
7617 team: team.into(),
7618 }
7619 }
7620 #[doc = "Update team field values"]
7621 #[doc = ""]
7622 #[doc = "Arguments:"]
7623 #[doc = "* `organization`: The name of the Azure DevOps organization."]
7624 #[doc = "* `project`: Project ID or project name"]
7625 #[doc = "* `team`: Team ID or team name"]
7626 pub fn update(
7627 &self,
7628 organization: impl Into<String>,
7629 body: impl Into<models::TeamFieldValuesPatch>,
7630 project: impl Into<String>,
7631 team: impl Into<String>,
7632 ) -> update::RequestBuilder {
7633 update::RequestBuilder {
7634 client: self.0.clone(),
7635 organization: organization.into(),
7636 body: body.into(),
7637 project: project.into(),
7638 team: team.into(),
7639 }
7640 }
7641 }
7642 pub mod get {
7643 use super::models;
7644 #[cfg(not(target_arch = "wasm32"))]
7645 use futures::future::BoxFuture;
7646 #[cfg(target_arch = "wasm32")]
7647 use futures::future::LocalBoxFuture as BoxFuture;
7648 #[derive(Debug)]
7649 pub struct Response(
7650 azure_core::http::Response<models::TeamFieldValues, azure_core::http::JsonFormat>,
7651 );
7652 impl Response {
7653 pub async fn into_body(self) -> azure_core::Result<models::TeamFieldValues> {
7654 self.0.into_body().await
7655 }
7656 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
7657 self.0.into()
7658 }
7659 }
7660 #[derive(Clone)]
7661 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7662 #[doc = r""]
7663 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7664 #[doc = r" parameters can be chained."]
7665 #[doc = r""]
7666 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7667 #[doc = r" converts the [`RequestBuilder`] into a future,"]
7668 #[doc = r" executes the request and returns a `Result` with the parsed"]
7669 #[doc = r" response."]
7670 #[doc = r""]
7671 #[doc = r" If you need lower-level access to the raw response details"]
7672 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7673 #[doc = r" can finalize the request using the"]
7674 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7675 #[doc = r" that resolves to a lower-level [`Response`] value."]
7676 pub struct RequestBuilder {
7677 pub(crate) client: super::super::Client,
7678 pub(crate) organization: String,
7679 pub(crate) project: String,
7680 pub(crate) team: String,
7681 }
7682 impl RequestBuilder {
7683 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7684 #[doc = ""]
7685 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7686 #[doc = "However, this function can provide more flexibility when required."]
7687 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7688 Box::pin({
7689 let this = self.clone();
7690 async move {
7691 let url = this.url()?;
7692 let mut req =
7693 azure_core::http::Request::new(url, azure_core::http::Method::Get);
7694 if let Some(auth_header) = this
7695 .client
7696 .token_credential()
7697 .http_authorization_header(&this.client.scopes())
7698 .await?
7699 {
7700 req.insert_header(
7701 azure_core::http::headers::AUTHORIZATION,
7702 auth_header,
7703 );
7704 }
7705 let req_body = azure_core::Bytes::new();
7706 req.set_body(req_body);
7707 Ok(Response(this.client.send(&mut req).await?.into()))
7708 }
7709 })
7710 }
7711 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
7712 let mut url = azure_core::http::Url::parse(&format!(
7713 "{}/{}/{}/{}/_apis/work/teamsettings/teamfieldvalues",
7714 self.client.endpoint(),
7715 &self.organization,
7716 &self.project,
7717 &self.team
7718 ))?;
7719 let has_api_version_already = url
7720 .query_pairs()
7721 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
7722 if !has_api_version_already {
7723 url.query_pairs_mut().append_pair(
7724 azure_core::http::headers::query_param::API_VERSION,
7725 "7.1-preview",
7726 );
7727 }
7728 Ok(url)
7729 }
7730 }
7731 impl std::future::IntoFuture for RequestBuilder {
7732 type Output = azure_core::Result<models::TeamFieldValues>;
7733 type IntoFuture = BoxFuture<'static, azure_core::Result<models::TeamFieldValues>>;
7734 #[doc = "Returns a future that sends the request and returns the parsed response body."]
7735 #[doc = ""]
7736 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7737 #[doc = ""]
7738 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7739 fn into_future(self) -> Self::IntoFuture {
7740 Box::pin(async move { self.send().await?.into_body().await })
7741 }
7742 }
7743 }
7744 pub mod update {
7745 use super::models;
7746 #[cfg(not(target_arch = "wasm32"))]
7747 use futures::future::BoxFuture;
7748 #[cfg(target_arch = "wasm32")]
7749 use futures::future::LocalBoxFuture as BoxFuture;
7750 #[derive(Debug)]
7751 pub struct Response(
7752 azure_core::http::Response<models::TeamFieldValues, azure_core::http::JsonFormat>,
7753 );
7754 impl Response {
7755 pub async fn into_body(self) -> azure_core::Result<models::TeamFieldValues> {
7756 self.0.into_body().await
7757 }
7758 pub fn into_raw_response(self) -> azure_core::http::BufResponse {
7759 self.0.into()
7760 }
7761 }
7762 #[derive(Clone)]
7763 #[doc = r" `RequestBuilder` provides a mechanism for setting optional parameters on a request."]
7764 #[doc = r""]
7765 #[doc = r" Each `RequestBuilder` parameter method call returns `Self`, so setting of multiple"]
7766 #[doc = r" parameters can be chained."]
7767 #[doc = r""]
7768 #[doc = r" To finalize and submit the request, invoke `.await`, which"]
7769 #[doc = r" converts the [`RequestBuilder`] into a future,"]
7770 #[doc = r" executes the request and returns a `Result` with the parsed"]
7771 #[doc = r" response."]
7772 #[doc = r""]
7773 #[doc = r" If you need lower-level access to the raw response details"]
7774 #[doc = r" (e.g. to inspect response headers or raw body data) then you"]
7775 #[doc = r" can finalize the request using the"]
7776 #[doc = r" [`RequestBuilder::send()`] method which returns a future"]
7777 #[doc = r" that resolves to a lower-level [`Response`] value."]
7778 pub struct RequestBuilder {
7779 pub(crate) client: super::super::Client,
7780 pub(crate) organization: String,
7781 pub(crate) body: models::TeamFieldValuesPatch,
7782 pub(crate) project: String,
7783 pub(crate) team: String,
7784 }
7785 impl RequestBuilder {
7786 #[doc = "Returns a future that sends the request and returns a [`Response`] object that provides low-level access to full response details."]
7787 #[doc = ""]
7788 #[doc = "You should typically use `.await` (which implicitly calls `IntoFuture::into_future()`) to finalize and send requests rather than `send()`."]
7789 #[doc = "However, this function can provide more flexibility when required."]
7790 pub fn send(self) -> BoxFuture<'static, azure_core::Result<Response>> {
7791 Box::pin({
7792 let this = self.clone();
7793 async move {
7794 let url = this.url()?;
7795 let mut req =
7796 azure_core::http::Request::new(url, azure_core::http::Method::Patch);
7797 if let Some(auth_header) = this
7798 .client
7799 .token_credential()
7800 .http_authorization_header(&this.client.scopes())
7801 .await?
7802 {
7803 req.insert_header(
7804 azure_core::http::headers::AUTHORIZATION,
7805 auth_header,
7806 );
7807 }
7808 req.insert_header("content-type", "application/json");
7809 let req_body = azure_core::json::to_json(&this.body)?;
7810 req.set_body(req_body);
7811 Ok(Response(this.client.send(&mut req).await?.into()))
7812 }
7813 })
7814 }
7815 fn url(&self) -> azure_core::Result<azure_core::http::Url> {
7816 let mut url = azure_core::http::Url::parse(&format!(
7817 "{}/{}/{}/{}/_apis/work/teamsettings/teamfieldvalues",
7818 self.client.endpoint(),
7819 &self.organization,
7820 &self.project,
7821 &self.team
7822 ))?;
7823 let has_api_version_already = url
7824 .query_pairs()
7825 .any(|(k, _)| k == azure_core::http::headers::query_param::API_VERSION);
7826 if !has_api_version_already {
7827 url.query_pairs_mut().append_pair(
7828 azure_core::http::headers::query_param::API_VERSION,
7829 "7.1-preview",
7830 );
7831 }
7832 Ok(url)
7833 }
7834 }
7835 impl std::future::IntoFuture for RequestBuilder {
7836 type Output = azure_core::Result<models::TeamFieldValues>;
7837 type IntoFuture = BoxFuture<'static, azure_core::Result<models::TeamFieldValues>>;
7838 #[doc = "Returns a future that sends the request and returns the parsed response body."]
7839 #[doc = ""]
7840 #[doc = "You should not normally call this method directly, simply invoke `.await` which implicitly calls `IntoFuture::into_future`."]
7841 #[doc = ""]
7842 #[doc = "See [IntoFuture documentation](https://doc.rust-lang.org/std/future/trait.IntoFuture.html) for more details."]
7843 fn into_future(self) -> Self::IntoFuture {
7844 Box::pin(async move { self.send().await?.into_body().await })
7845 }
7846 }
7847 }
7848}