1pub mod operations {
4 use oxide::*;
9 pub struct DeviceAuthRequestWhen(::httpmock::When);
10 impl DeviceAuthRequestWhen {
11 pub fn new(inner: ::httpmock::When) -> Self {
12 Self(
13 inner
14 .method(::httpmock::Method::POST)
15 .path_matches(regex::Regex::new("^/device/auth$").unwrap()),
16 )
17 }
18
19 pub fn into_inner(self) -> ::httpmock::When {
20 self.0
21 }
22
23 pub fn body(self, value: &types::DeviceAuthRequest) -> Self {
24 Self(self.0.json_body_obj(value))
25 }
26 }
27
28 pub struct DeviceAuthRequestThen(::httpmock::Then);
29 impl DeviceAuthRequestThen {
30 pub fn new(inner: ::httpmock::Then) -> Self {
31 Self(inner)
32 }
33
34 pub fn into_inner(self) -> ::httpmock::Then {
35 self.0
36 }
37
38 pub fn default_response(self, status: u16, value: ::serde_json::Value) -> Self {
39 Self(
40 self.0
41 .status(status)
42 .header("content-type", "application/json")
43 .json_body(value),
44 )
45 }
46 }
47
48 pub struct DeviceAuthConfirmWhen(::httpmock::When);
49 impl DeviceAuthConfirmWhen {
50 pub fn new(inner: ::httpmock::When) -> Self {
51 Self(
52 inner
53 .method(::httpmock::Method::POST)
54 .path_matches(regex::Regex::new("^/device/confirm$").unwrap()),
55 )
56 }
57
58 pub fn into_inner(self) -> ::httpmock::When {
59 self.0
60 }
61
62 pub fn body(self, value: &types::DeviceAuthVerify) -> Self {
63 Self(self.0.json_body_obj(value))
64 }
65 }
66
67 pub struct DeviceAuthConfirmThen(::httpmock::Then);
68 impl DeviceAuthConfirmThen {
69 pub fn new(inner: ::httpmock::Then) -> Self {
70 Self(inner)
71 }
72
73 pub fn into_inner(self) -> ::httpmock::Then {
74 self.0
75 }
76
77 pub fn no_content(self) -> Self {
78 Self(self.0.status(204u16))
79 }
80
81 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
82 assert_eq!(status / 100u16, 4u16);
83 Self(
84 self.0
85 .status(status)
86 .header("content-type", "application/json")
87 .json_body_obj(value),
88 )
89 }
90
91 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
92 assert_eq!(status / 100u16, 5u16);
93 Self(
94 self.0
95 .status(status)
96 .header("content-type", "application/json")
97 .json_body_obj(value),
98 )
99 }
100 }
101
102 pub struct DeviceAccessTokenWhen(::httpmock::When);
103 impl DeviceAccessTokenWhen {
104 pub fn new(inner: ::httpmock::When) -> Self {
105 Self(
106 inner
107 .method(::httpmock::Method::POST)
108 .path_matches(regex::Regex::new("^/device/token$").unwrap()),
109 )
110 }
111
112 pub fn into_inner(self) -> ::httpmock::When {
113 self.0
114 }
115
116 pub fn body(self, value: &types::DeviceAccessTokenRequest) -> Self {
117 Self(self.0.json_body_obj(value))
118 }
119 }
120
121 pub struct DeviceAccessTokenThen(::httpmock::Then);
122 impl DeviceAccessTokenThen {
123 pub fn new(inner: ::httpmock::Then) -> Self {
124 Self(inner)
125 }
126
127 pub fn into_inner(self) -> ::httpmock::Then {
128 self.0
129 }
130
131 pub fn default_response(self, status: u16, value: ::serde_json::Value) -> Self {
132 Self(
133 self.0
134 .status(status)
135 .header("content-type", "application/json")
136 .json_body(value),
137 )
138 }
139 }
140
141 pub struct ProbeListWhen(::httpmock::When);
142 impl ProbeListWhen {
143 pub fn new(inner: ::httpmock::When) -> Self {
144 Self(
145 inner
146 .method(::httpmock::Method::GET)
147 .path_matches(regex::Regex::new("^/experimental/v1/probes$").unwrap()),
148 )
149 }
150
151 pub fn into_inner(self) -> ::httpmock::When {
152 self.0
153 }
154
155 pub fn limit<T>(self, value: T) -> Self
156 where
157 T: Into<Option<::std::num::NonZeroU32>>,
158 {
159 if let Some(value) = value.into() {
160 Self(self.0.query_param("limit", value.to_string()))
161 } else {
162 Self(self.0.query_param_missing("limit"))
163 }
164 }
165
166 pub fn page_token<'a, T>(self, value: T) -> Self
167 where
168 T: Into<Option<&'a str>>,
169 {
170 if let Some(value) = value.into() {
171 Self(self.0.query_param("page_token", value.to_string()))
172 } else {
173 Self(self.0.query_param_missing("page_token"))
174 }
175 }
176
177 pub fn project<'a, T>(self, value: T) -> Self
178 where
179 T: Into<Option<&'a types::NameOrId>>,
180 {
181 if let Some(value) = value.into() {
182 Self(self.0.query_param("project", value.to_string()))
183 } else {
184 Self(self.0.query_param_missing("project"))
185 }
186 }
187
188 pub fn sort_by<T>(self, value: T) -> Self
189 where
190 T: Into<Option<types::NameOrIdSortMode>>,
191 {
192 if let Some(value) = value.into() {
193 Self(self.0.query_param("sort_by", value.to_string()))
194 } else {
195 Self(self.0.query_param_missing("sort_by"))
196 }
197 }
198 }
199
200 pub struct ProbeListThen(::httpmock::Then);
201 impl ProbeListThen {
202 pub fn new(inner: ::httpmock::Then) -> Self {
203 Self(inner)
204 }
205
206 pub fn into_inner(self) -> ::httpmock::Then {
207 self.0
208 }
209
210 pub fn ok(self, value: &types::ProbeInfoResultsPage) -> Self {
211 Self(
212 self.0
213 .status(200u16)
214 .header("content-type", "application/json")
215 .json_body_obj(value),
216 )
217 }
218
219 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
220 assert_eq!(status / 100u16, 4u16);
221 Self(
222 self.0
223 .status(status)
224 .header("content-type", "application/json")
225 .json_body_obj(value),
226 )
227 }
228
229 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
230 assert_eq!(status / 100u16, 5u16);
231 Self(
232 self.0
233 .status(status)
234 .header("content-type", "application/json")
235 .json_body_obj(value),
236 )
237 }
238 }
239
240 pub struct ProbeCreateWhen(::httpmock::When);
241 impl ProbeCreateWhen {
242 pub fn new(inner: ::httpmock::When) -> Self {
243 Self(
244 inner
245 .method(::httpmock::Method::POST)
246 .path_matches(regex::Regex::new("^/experimental/v1/probes$").unwrap()),
247 )
248 }
249
250 pub fn into_inner(self) -> ::httpmock::When {
251 self.0
252 }
253
254 pub fn project(self, value: &types::NameOrId) -> Self {
255 Self(self.0.query_param("project", value.to_string()))
256 }
257
258 pub fn body(self, value: &types::ProbeCreate) -> Self {
259 Self(self.0.json_body_obj(value))
260 }
261 }
262
263 pub struct ProbeCreateThen(::httpmock::Then);
264 impl ProbeCreateThen {
265 pub fn new(inner: ::httpmock::Then) -> Self {
266 Self(inner)
267 }
268
269 pub fn into_inner(self) -> ::httpmock::Then {
270 self.0
271 }
272
273 pub fn created(self, value: &types::Probe) -> Self {
274 Self(
275 self.0
276 .status(201u16)
277 .header("content-type", "application/json")
278 .json_body_obj(value),
279 )
280 }
281
282 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
283 assert_eq!(status / 100u16, 4u16);
284 Self(
285 self.0
286 .status(status)
287 .header("content-type", "application/json")
288 .json_body_obj(value),
289 )
290 }
291
292 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
293 assert_eq!(status / 100u16, 5u16);
294 Self(
295 self.0
296 .status(status)
297 .header("content-type", "application/json")
298 .json_body_obj(value),
299 )
300 }
301 }
302
303 pub struct ProbeViewWhen(::httpmock::When);
304 impl ProbeViewWhen {
305 pub fn new(inner: ::httpmock::When) -> Self {
306 Self(
307 inner
308 .method(::httpmock::Method::GET)
309 .path_matches(regex::Regex::new("^/experimental/v1/probes/[^/]*$").unwrap()),
310 )
311 }
312
313 pub fn into_inner(self) -> ::httpmock::When {
314 self.0
315 }
316
317 pub fn probe(self, value: &types::NameOrId) -> Self {
318 let re = regex::Regex::new(&format!("^/experimental/v1/probes/{}$", value.to_string()))
319 .unwrap();
320 Self(self.0.path_matches(re))
321 }
322
323 pub fn project(self, value: &types::NameOrId) -> Self {
324 Self(self.0.query_param("project", value.to_string()))
325 }
326 }
327
328 pub struct ProbeViewThen(::httpmock::Then);
329 impl ProbeViewThen {
330 pub fn new(inner: ::httpmock::Then) -> Self {
331 Self(inner)
332 }
333
334 pub fn into_inner(self) -> ::httpmock::Then {
335 self.0
336 }
337
338 pub fn ok(self, value: &types::ProbeInfo) -> Self {
339 Self(
340 self.0
341 .status(200u16)
342 .header("content-type", "application/json")
343 .json_body_obj(value),
344 )
345 }
346
347 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
348 assert_eq!(status / 100u16, 4u16);
349 Self(
350 self.0
351 .status(status)
352 .header("content-type", "application/json")
353 .json_body_obj(value),
354 )
355 }
356
357 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
358 assert_eq!(status / 100u16, 5u16);
359 Self(
360 self.0
361 .status(status)
362 .header("content-type", "application/json")
363 .json_body_obj(value),
364 )
365 }
366 }
367
368 pub struct ProbeDeleteWhen(::httpmock::When);
369 impl ProbeDeleteWhen {
370 pub fn new(inner: ::httpmock::When) -> Self {
371 Self(
372 inner
373 .method(::httpmock::Method::DELETE)
374 .path_matches(regex::Regex::new("^/experimental/v1/probes/[^/]*$").unwrap()),
375 )
376 }
377
378 pub fn into_inner(self) -> ::httpmock::When {
379 self.0
380 }
381
382 pub fn probe(self, value: &types::NameOrId) -> Self {
383 let re = regex::Regex::new(&format!("^/experimental/v1/probes/{}$", value.to_string()))
384 .unwrap();
385 Self(self.0.path_matches(re))
386 }
387
388 pub fn project(self, value: &types::NameOrId) -> Self {
389 Self(self.0.query_param("project", value.to_string()))
390 }
391 }
392
393 pub struct ProbeDeleteThen(::httpmock::Then);
394 impl ProbeDeleteThen {
395 pub fn new(inner: ::httpmock::Then) -> Self {
396 Self(inner)
397 }
398
399 pub fn into_inner(self) -> ::httpmock::Then {
400 self.0
401 }
402
403 pub fn no_content(self) -> Self {
404 Self(self.0.status(204u16))
405 }
406
407 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
408 assert_eq!(status / 100u16, 4u16);
409 Self(
410 self.0
411 .status(status)
412 .header("content-type", "application/json")
413 .json_body_obj(value),
414 )
415 }
416
417 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
418 assert_eq!(status / 100u16, 5u16);
419 Self(
420 self.0
421 .status(status)
422 .header("content-type", "application/json")
423 .json_body_obj(value),
424 )
425 }
426 }
427
428 pub struct SupportBundleListWhen(::httpmock::When);
429 impl SupportBundleListWhen {
430 pub fn new(inner: ::httpmock::When) -> Self {
431 Self(inner.method(::httpmock::Method::GET).path_matches(
432 regex::Regex::new("^/experimental/v1/system/support-bundles$").unwrap(),
433 ))
434 }
435
436 pub fn into_inner(self) -> ::httpmock::When {
437 self.0
438 }
439
440 pub fn limit<T>(self, value: T) -> Self
441 where
442 T: Into<Option<::std::num::NonZeroU32>>,
443 {
444 if let Some(value) = value.into() {
445 Self(self.0.query_param("limit", value.to_string()))
446 } else {
447 Self(self.0.query_param_missing("limit"))
448 }
449 }
450
451 pub fn page_token<'a, T>(self, value: T) -> Self
452 where
453 T: Into<Option<&'a str>>,
454 {
455 if let Some(value) = value.into() {
456 Self(self.0.query_param("page_token", value.to_string()))
457 } else {
458 Self(self.0.query_param_missing("page_token"))
459 }
460 }
461
462 pub fn sort_by<T>(self, value: T) -> Self
463 where
464 T: Into<Option<types::TimeAndIdSortMode>>,
465 {
466 if let Some(value) = value.into() {
467 Self(self.0.query_param("sort_by", value.to_string()))
468 } else {
469 Self(self.0.query_param_missing("sort_by"))
470 }
471 }
472 }
473
474 pub struct SupportBundleListThen(::httpmock::Then);
475 impl SupportBundleListThen {
476 pub fn new(inner: ::httpmock::Then) -> Self {
477 Self(inner)
478 }
479
480 pub fn into_inner(self) -> ::httpmock::Then {
481 self.0
482 }
483
484 pub fn ok(self, value: &types::SupportBundleInfoResultsPage) -> Self {
485 Self(
486 self.0
487 .status(200u16)
488 .header("content-type", "application/json")
489 .json_body_obj(value),
490 )
491 }
492
493 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
494 assert_eq!(status / 100u16, 4u16);
495 Self(
496 self.0
497 .status(status)
498 .header("content-type", "application/json")
499 .json_body_obj(value),
500 )
501 }
502
503 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
504 assert_eq!(status / 100u16, 5u16);
505 Self(
506 self.0
507 .status(status)
508 .header("content-type", "application/json")
509 .json_body_obj(value),
510 )
511 }
512 }
513
514 pub struct SupportBundleCreateWhen(::httpmock::When);
515 impl SupportBundleCreateWhen {
516 pub fn new(inner: ::httpmock::When) -> Self {
517 Self(inner.method(::httpmock::Method::POST).path_matches(
518 regex::Regex::new("^/experimental/v1/system/support-bundles$").unwrap(),
519 ))
520 }
521
522 pub fn into_inner(self) -> ::httpmock::When {
523 self.0
524 }
525
526 pub fn body(self, value: &types::SupportBundleCreate) -> Self {
527 Self(self.0.json_body_obj(value))
528 }
529 }
530
531 pub struct SupportBundleCreateThen(::httpmock::Then);
532 impl SupportBundleCreateThen {
533 pub fn new(inner: ::httpmock::Then) -> Self {
534 Self(inner)
535 }
536
537 pub fn into_inner(self) -> ::httpmock::Then {
538 self.0
539 }
540
541 pub fn created(self, value: &types::SupportBundleInfo) -> Self {
542 Self(
543 self.0
544 .status(201u16)
545 .header("content-type", "application/json")
546 .json_body_obj(value),
547 )
548 }
549
550 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
551 assert_eq!(status / 100u16, 4u16);
552 Self(
553 self.0
554 .status(status)
555 .header("content-type", "application/json")
556 .json_body_obj(value),
557 )
558 }
559
560 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
561 assert_eq!(status / 100u16, 5u16);
562 Self(
563 self.0
564 .status(status)
565 .header("content-type", "application/json")
566 .json_body_obj(value),
567 )
568 }
569 }
570
571 pub struct SupportBundleViewWhen(::httpmock::When);
572 impl SupportBundleViewWhen {
573 pub fn new(inner: ::httpmock::When) -> Self {
574 Self(inner.method(::httpmock::Method::GET).path_matches(
575 regex::Regex::new("^/experimental/v1/system/support-bundles/[^/]*$").unwrap(),
576 ))
577 }
578
579 pub fn into_inner(self) -> ::httpmock::When {
580 self.0
581 }
582
583 pub fn bundle_id(self, value: &::uuid::Uuid) -> Self {
584 let re = regex::Regex::new(&format!(
585 "^/experimental/v1/system/support-bundles/{}$",
586 value.to_string()
587 ))
588 .unwrap();
589 Self(self.0.path_matches(re))
590 }
591 }
592
593 pub struct SupportBundleViewThen(::httpmock::Then);
594 impl SupportBundleViewThen {
595 pub fn new(inner: ::httpmock::Then) -> Self {
596 Self(inner)
597 }
598
599 pub fn into_inner(self) -> ::httpmock::Then {
600 self.0
601 }
602
603 pub fn ok(self, value: &types::SupportBundleInfo) -> Self {
604 Self(
605 self.0
606 .status(200u16)
607 .header("content-type", "application/json")
608 .json_body_obj(value),
609 )
610 }
611
612 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
613 assert_eq!(status / 100u16, 4u16);
614 Self(
615 self.0
616 .status(status)
617 .header("content-type", "application/json")
618 .json_body_obj(value),
619 )
620 }
621
622 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
623 assert_eq!(status / 100u16, 5u16);
624 Self(
625 self.0
626 .status(status)
627 .header("content-type", "application/json")
628 .json_body_obj(value),
629 )
630 }
631 }
632
633 pub struct SupportBundleUpdateWhen(::httpmock::When);
634 impl SupportBundleUpdateWhen {
635 pub fn new(inner: ::httpmock::When) -> Self {
636 Self(inner.method(::httpmock::Method::PUT).path_matches(
637 regex::Regex::new("^/experimental/v1/system/support-bundles/[^/]*$").unwrap(),
638 ))
639 }
640
641 pub fn into_inner(self) -> ::httpmock::When {
642 self.0
643 }
644
645 pub fn bundle_id(self, value: &::uuid::Uuid) -> Self {
646 let re = regex::Regex::new(&format!(
647 "^/experimental/v1/system/support-bundles/{}$",
648 value.to_string()
649 ))
650 .unwrap();
651 Self(self.0.path_matches(re))
652 }
653
654 pub fn body(self, value: &types::SupportBundleUpdate) -> Self {
655 Self(self.0.json_body_obj(value))
656 }
657 }
658
659 pub struct SupportBundleUpdateThen(::httpmock::Then);
660 impl SupportBundleUpdateThen {
661 pub fn new(inner: ::httpmock::Then) -> Self {
662 Self(inner)
663 }
664
665 pub fn into_inner(self) -> ::httpmock::Then {
666 self.0
667 }
668
669 pub fn ok(self, value: &types::SupportBundleInfo) -> Self {
670 Self(
671 self.0
672 .status(200u16)
673 .header("content-type", "application/json")
674 .json_body_obj(value),
675 )
676 }
677
678 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
679 assert_eq!(status / 100u16, 4u16);
680 Self(
681 self.0
682 .status(status)
683 .header("content-type", "application/json")
684 .json_body_obj(value),
685 )
686 }
687
688 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
689 assert_eq!(status / 100u16, 5u16);
690 Self(
691 self.0
692 .status(status)
693 .header("content-type", "application/json")
694 .json_body_obj(value),
695 )
696 }
697 }
698
699 pub struct SupportBundleDeleteWhen(::httpmock::When);
700 impl SupportBundleDeleteWhen {
701 pub fn new(inner: ::httpmock::When) -> Self {
702 Self(inner.method(::httpmock::Method::DELETE).path_matches(
703 regex::Regex::new("^/experimental/v1/system/support-bundles/[^/]*$").unwrap(),
704 ))
705 }
706
707 pub fn into_inner(self) -> ::httpmock::When {
708 self.0
709 }
710
711 pub fn bundle_id(self, value: &::uuid::Uuid) -> Self {
712 let re = regex::Regex::new(&format!(
713 "^/experimental/v1/system/support-bundles/{}$",
714 value.to_string()
715 ))
716 .unwrap();
717 Self(self.0.path_matches(re))
718 }
719 }
720
721 pub struct SupportBundleDeleteThen(::httpmock::Then);
722 impl SupportBundleDeleteThen {
723 pub fn new(inner: ::httpmock::Then) -> Self {
724 Self(inner)
725 }
726
727 pub fn into_inner(self) -> ::httpmock::Then {
728 self.0
729 }
730
731 pub fn no_content(self) -> Self {
732 Self(self.0.status(204u16))
733 }
734
735 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
736 assert_eq!(status / 100u16, 4u16);
737 Self(
738 self.0
739 .status(status)
740 .header("content-type", "application/json")
741 .json_body_obj(value),
742 )
743 }
744
745 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
746 assert_eq!(status / 100u16, 5u16);
747 Self(
748 self.0
749 .status(status)
750 .header("content-type", "application/json")
751 .json_body_obj(value),
752 )
753 }
754 }
755
756 pub struct SupportBundleDownloadWhen(::httpmock::When);
757 impl SupportBundleDownloadWhen {
758 pub fn new(inner: ::httpmock::When) -> Self {
759 Self(
760 inner.method(::httpmock::Method::GET).path_matches(
761 regex::Regex::new("^/experimental/v1/system/support-bundles/[^/]*/download$")
762 .unwrap(),
763 ),
764 )
765 }
766
767 pub fn into_inner(self) -> ::httpmock::When {
768 self.0
769 }
770
771 pub fn bundle_id(self, value: &::uuid::Uuid) -> Self {
772 let re = regex::Regex::new(&format!(
773 "^/experimental/v1/system/support-bundles/{}/download$",
774 value.to_string()
775 ))
776 .unwrap();
777 Self(self.0.path_matches(re))
778 }
779
780 pub fn range<'a, T>(self, value: T) -> Self
781 where
782 T: Into<Option<&'a str>>,
783 {
784 if let Some(value) = value.into() {
785 Self(self.0.header("range", value.to_string()))
786 } else {
787 Self(self.0.header_missing("range"))
788 }
789 }
790 }
791
792 pub struct SupportBundleDownloadThen(::httpmock::Then);
793 impl SupportBundleDownloadThen {
794 pub fn new(inner: ::httpmock::Then) -> Self {
795 Self(inner)
796 }
797
798 pub fn into_inner(self) -> ::httpmock::Then {
799 self.0
800 }
801
802 pub fn default_response(self, status: u16, value: ::serde_json::Value) -> Self {
803 Self(
804 self.0
805 .status(status)
806 .header("content-type", "application/json")
807 .json_body(value),
808 )
809 }
810 }
811
812 pub struct SupportBundleHeadWhen(::httpmock::When);
813 impl SupportBundleHeadWhen {
814 pub fn new(inner: ::httpmock::When) -> Self {
815 Self(
816 inner.method(::httpmock::Method::HEAD).path_matches(
817 regex::Regex::new("^/experimental/v1/system/support-bundles/[^/]*/download$")
818 .unwrap(),
819 ),
820 )
821 }
822
823 pub fn into_inner(self) -> ::httpmock::When {
824 self.0
825 }
826
827 pub fn bundle_id(self, value: &::uuid::Uuid) -> Self {
828 let re = regex::Regex::new(&format!(
829 "^/experimental/v1/system/support-bundles/{}/download$",
830 value.to_string()
831 ))
832 .unwrap();
833 Self(self.0.path_matches(re))
834 }
835
836 pub fn range<'a, T>(self, value: T) -> Self
837 where
838 T: Into<Option<&'a str>>,
839 {
840 if let Some(value) = value.into() {
841 Self(self.0.header("range", value.to_string()))
842 } else {
843 Self(self.0.header_missing("range"))
844 }
845 }
846 }
847
848 pub struct SupportBundleHeadThen(::httpmock::Then);
849 impl SupportBundleHeadThen {
850 pub fn new(inner: ::httpmock::Then) -> Self {
851 Self(inner)
852 }
853
854 pub fn into_inner(self) -> ::httpmock::Then {
855 self.0
856 }
857
858 pub fn default_response(self, status: u16, value: ::serde_json::Value) -> Self {
859 Self(
860 self.0
861 .status(status)
862 .header("content-type", "application/json")
863 .json_body(value),
864 )
865 }
866 }
867
868 pub struct SupportBundleDownloadFileWhen(::httpmock::When);
869 impl SupportBundleDownloadFileWhen {
870 pub fn new(inner: ::httpmock::When) -> Self {
871 Self(
872 inner.method(::httpmock::Method::GET).path_matches(
873 regex::Regex::new(
874 "^/experimental/v1/system/support-bundles/[^/]*/download/[^/]*$",
875 )
876 .unwrap(),
877 ),
878 )
879 }
880
881 pub fn into_inner(self) -> ::httpmock::When {
882 self.0
883 }
884
885 pub fn bundle_id(self, value: &::uuid::Uuid) -> Self {
886 let re = regex::Regex::new(&format!(
887 "^/experimental/v1/system/support-bundles/{}/download/.*$",
888 value.to_string()
889 ))
890 .unwrap();
891 Self(self.0.path_matches(re))
892 }
893
894 pub fn file(self, value: &str) -> Self {
895 let re = regex::Regex::new(&format!(
896 "^/experimental/v1/system/support-bundles/.*/download/{}$",
897 value.to_string()
898 ))
899 .unwrap();
900 Self(self.0.path_matches(re))
901 }
902
903 pub fn range<'a, T>(self, value: T) -> Self
904 where
905 T: Into<Option<&'a str>>,
906 {
907 if let Some(value) = value.into() {
908 Self(self.0.header("range", value.to_string()))
909 } else {
910 Self(self.0.header_missing("range"))
911 }
912 }
913 }
914
915 pub struct SupportBundleDownloadFileThen(::httpmock::Then);
916 impl SupportBundleDownloadFileThen {
917 pub fn new(inner: ::httpmock::Then) -> Self {
918 Self(inner)
919 }
920
921 pub fn into_inner(self) -> ::httpmock::Then {
922 self.0
923 }
924
925 pub fn default_response(self, status: u16, value: ::serde_json::Value) -> Self {
926 Self(
927 self.0
928 .status(status)
929 .header("content-type", "application/json")
930 .json_body(value),
931 )
932 }
933 }
934
935 pub struct SupportBundleHeadFileWhen(::httpmock::When);
936 impl SupportBundleHeadFileWhen {
937 pub fn new(inner: ::httpmock::When) -> Self {
938 Self(
939 inner.method(::httpmock::Method::HEAD).path_matches(
940 regex::Regex::new(
941 "^/experimental/v1/system/support-bundles/[^/]*/download/[^/]*$",
942 )
943 .unwrap(),
944 ),
945 )
946 }
947
948 pub fn into_inner(self) -> ::httpmock::When {
949 self.0
950 }
951
952 pub fn bundle_id(self, value: &::uuid::Uuid) -> Self {
953 let re = regex::Regex::new(&format!(
954 "^/experimental/v1/system/support-bundles/{}/download/.*$",
955 value.to_string()
956 ))
957 .unwrap();
958 Self(self.0.path_matches(re))
959 }
960
961 pub fn file(self, value: &str) -> Self {
962 let re = regex::Regex::new(&format!(
963 "^/experimental/v1/system/support-bundles/.*/download/{}$",
964 value.to_string()
965 ))
966 .unwrap();
967 Self(self.0.path_matches(re))
968 }
969
970 pub fn range<'a, T>(self, value: T) -> Self
971 where
972 T: Into<Option<&'a str>>,
973 {
974 if let Some(value) = value.into() {
975 Self(self.0.header("range", value.to_string()))
976 } else {
977 Self(self.0.header_missing("range"))
978 }
979 }
980 }
981
982 pub struct SupportBundleHeadFileThen(::httpmock::Then);
983 impl SupportBundleHeadFileThen {
984 pub fn new(inner: ::httpmock::Then) -> Self {
985 Self(inner)
986 }
987
988 pub fn into_inner(self) -> ::httpmock::Then {
989 self.0
990 }
991
992 pub fn default_response(self, status: u16, value: ::serde_json::Value) -> Self {
993 Self(
994 self.0
995 .status(status)
996 .header("content-type", "application/json")
997 .json_body(value),
998 )
999 }
1000 }
1001
1002 pub struct SupportBundleIndexWhen(::httpmock::When);
1003 impl SupportBundleIndexWhen {
1004 pub fn new(inner: ::httpmock::When) -> Self {
1005 Self(inner.method(::httpmock::Method::GET).path_matches(
1006 regex::Regex::new("^/experimental/v1/system/support-bundles/[^/]*/index$").unwrap(),
1007 ))
1008 }
1009
1010 pub fn into_inner(self) -> ::httpmock::When {
1011 self.0
1012 }
1013
1014 pub fn bundle_id(self, value: &::uuid::Uuid) -> Self {
1015 let re = regex::Regex::new(&format!(
1016 "^/experimental/v1/system/support-bundles/{}/index$",
1017 value.to_string()
1018 ))
1019 .unwrap();
1020 Self(self.0.path_matches(re))
1021 }
1022
1023 pub fn range<'a, T>(self, value: T) -> Self
1024 where
1025 T: Into<Option<&'a str>>,
1026 {
1027 if let Some(value) = value.into() {
1028 Self(self.0.header("range", value.to_string()))
1029 } else {
1030 Self(self.0.header_missing("range"))
1031 }
1032 }
1033 }
1034
1035 pub struct SupportBundleIndexThen(::httpmock::Then);
1036 impl SupportBundleIndexThen {
1037 pub fn new(inner: ::httpmock::Then) -> Self {
1038 Self(inner)
1039 }
1040
1041 pub fn into_inner(self) -> ::httpmock::Then {
1042 self.0
1043 }
1044
1045 pub fn default_response(self, status: u16, value: ::serde_json::Value) -> Self {
1046 Self(
1047 self.0
1048 .status(status)
1049 .header("content-type", "application/json")
1050 .json_body(value),
1051 )
1052 }
1053 }
1054
1055 pub struct LoginSamlWhen(::httpmock::When);
1056 impl LoginSamlWhen {
1057 pub fn new(inner: ::httpmock::When) -> Self {
1058 Self(
1059 inner
1060 .method(::httpmock::Method::POST)
1061 .path_matches(regex::Regex::new("^/login/[^/]*/saml/[^/]*$").unwrap()),
1062 )
1063 }
1064
1065 pub fn into_inner(self) -> ::httpmock::When {
1066 self.0
1067 }
1068
1069 pub fn silo_name(self, value: &types::Name) -> Self {
1070 let re = regex::Regex::new(&format!("^/login/{}/saml/.*$", value.to_string())).unwrap();
1071 Self(self.0.path_matches(re))
1072 }
1073
1074 pub fn provider_name(self, value: &types::Name) -> Self {
1075 let re = regex::Regex::new(&format!("^/login/.*/saml/{}$", value.to_string())).unwrap();
1076 Self(self.0.path_matches(re))
1077 }
1078
1079 pub fn body(self, value: ::serde_json::Value) -> Self {
1080 Self(self.0.json_body(value))
1081 }
1082 }
1083
1084 pub struct LoginSamlThen(::httpmock::Then);
1085 impl LoginSamlThen {
1086 pub fn new(inner: ::httpmock::Then) -> Self {
1087 Self(inner)
1088 }
1089
1090 pub fn into_inner(self) -> ::httpmock::Then {
1091 self.0
1092 }
1093
1094 pub fn see_other(self) -> Self {
1095 Self(self.0.status(303u16))
1096 }
1097
1098 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
1099 assert_eq!(status / 100u16, 4u16);
1100 Self(
1101 self.0
1102 .status(status)
1103 .header("content-type", "application/json")
1104 .json_body_obj(value),
1105 )
1106 }
1107
1108 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
1109 assert_eq!(status / 100u16, 5u16);
1110 Self(
1111 self.0
1112 .status(status)
1113 .header("content-type", "application/json")
1114 .json_body_obj(value),
1115 )
1116 }
1117
1118 pub fn success(self, status: u16, value: ::serde_json::Value) -> Self {
1119 assert_eq!(status / 100u16, 2u16);
1120 Self(
1121 self.0
1122 .status(status)
1123 .header("content-type", "application/json")
1124 .json_body(value),
1125 )
1126 }
1127 }
1128
1129 pub struct AffinityGroupListWhen(::httpmock::When);
1130 impl AffinityGroupListWhen {
1131 pub fn new(inner: ::httpmock::When) -> Self {
1132 Self(
1133 inner
1134 .method(::httpmock::Method::GET)
1135 .path_matches(regex::Regex::new("^/v1/affinity-groups$").unwrap()),
1136 )
1137 }
1138
1139 pub fn into_inner(self) -> ::httpmock::When {
1140 self.0
1141 }
1142
1143 pub fn limit<T>(self, value: T) -> Self
1144 where
1145 T: Into<Option<::std::num::NonZeroU32>>,
1146 {
1147 if let Some(value) = value.into() {
1148 Self(self.0.query_param("limit", value.to_string()))
1149 } else {
1150 Self(self.0.query_param_missing("limit"))
1151 }
1152 }
1153
1154 pub fn page_token<'a, T>(self, value: T) -> Self
1155 where
1156 T: Into<Option<&'a str>>,
1157 {
1158 if let Some(value) = value.into() {
1159 Self(self.0.query_param("page_token", value.to_string()))
1160 } else {
1161 Self(self.0.query_param_missing("page_token"))
1162 }
1163 }
1164
1165 pub fn project<'a, T>(self, value: T) -> Self
1166 where
1167 T: Into<Option<&'a types::NameOrId>>,
1168 {
1169 if let Some(value) = value.into() {
1170 Self(self.0.query_param("project", value.to_string()))
1171 } else {
1172 Self(self.0.query_param_missing("project"))
1173 }
1174 }
1175
1176 pub fn sort_by<T>(self, value: T) -> Self
1177 where
1178 T: Into<Option<types::NameOrIdSortMode>>,
1179 {
1180 if let Some(value) = value.into() {
1181 Self(self.0.query_param("sort_by", value.to_string()))
1182 } else {
1183 Self(self.0.query_param_missing("sort_by"))
1184 }
1185 }
1186 }
1187
1188 pub struct AffinityGroupListThen(::httpmock::Then);
1189 impl AffinityGroupListThen {
1190 pub fn new(inner: ::httpmock::Then) -> Self {
1191 Self(inner)
1192 }
1193
1194 pub fn into_inner(self) -> ::httpmock::Then {
1195 self.0
1196 }
1197
1198 pub fn ok(self, value: &types::AffinityGroupResultsPage) -> Self {
1199 Self(
1200 self.0
1201 .status(200u16)
1202 .header("content-type", "application/json")
1203 .json_body_obj(value),
1204 )
1205 }
1206
1207 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
1208 assert_eq!(status / 100u16, 4u16);
1209 Self(
1210 self.0
1211 .status(status)
1212 .header("content-type", "application/json")
1213 .json_body_obj(value),
1214 )
1215 }
1216
1217 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
1218 assert_eq!(status / 100u16, 5u16);
1219 Self(
1220 self.0
1221 .status(status)
1222 .header("content-type", "application/json")
1223 .json_body_obj(value),
1224 )
1225 }
1226 }
1227
1228 pub struct AffinityGroupCreateWhen(::httpmock::When);
1229 impl AffinityGroupCreateWhen {
1230 pub fn new(inner: ::httpmock::When) -> Self {
1231 Self(
1232 inner
1233 .method(::httpmock::Method::POST)
1234 .path_matches(regex::Regex::new("^/v1/affinity-groups$").unwrap()),
1235 )
1236 }
1237
1238 pub fn into_inner(self) -> ::httpmock::When {
1239 self.0
1240 }
1241
1242 pub fn project(self, value: &types::NameOrId) -> Self {
1243 Self(self.0.query_param("project", value.to_string()))
1244 }
1245
1246 pub fn body(self, value: &types::AffinityGroupCreate) -> Self {
1247 Self(self.0.json_body_obj(value))
1248 }
1249 }
1250
1251 pub struct AffinityGroupCreateThen(::httpmock::Then);
1252 impl AffinityGroupCreateThen {
1253 pub fn new(inner: ::httpmock::Then) -> Self {
1254 Self(inner)
1255 }
1256
1257 pub fn into_inner(self) -> ::httpmock::Then {
1258 self.0
1259 }
1260
1261 pub fn created(self, value: &types::AffinityGroup) -> Self {
1262 Self(
1263 self.0
1264 .status(201u16)
1265 .header("content-type", "application/json")
1266 .json_body_obj(value),
1267 )
1268 }
1269
1270 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
1271 assert_eq!(status / 100u16, 4u16);
1272 Self(
1273 self.0
1274 .status(status)
1275 .header("content-type", "application/json")
1276 .json_body_obj(value),
1277 )
1278 }
1279
1280 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
1281 assert_eq!(status / 100u16, 5u16);
1282 Self(
1283 self.0
1284 .status(status)
1285 .header("content-type", "application/json")
1286 .json_body_obj(value),
1287 )
1288 }
1289 }
1290
1291 pub struct AffinityGroupViewWhen(::httpmock::When);
1292 impl AffinityGroupViewWhen {
1293 pub fn new(inner: ::httpmock::When) -> Self {
1294 Self(
1295 inner
1296 .method(::httpmock::Method::GET)
1297 .path_matches(regex::Regex::new("^/v1/affinity-groups/[^/]*$").unwrap()),
1298 )
1299 }
1300
1301 pub fn into_inner(self) -> ::httpmock::When {
1302 self.0
1303 }
1304
1305 pub fn affinity_group(self, value: &types::NameOrId) -> Self {
1306 let re =
1307 regex::Regex::new(&format!("^/v1/affinity-groups/{}$", value.to_string())).unwrap();
1308 Self(self.0.path_matches(re))
1309 }
1310
1311 pub fn project<'a, T>(self, value: T) -> Self
1312 where
1313 T: Into<Option<&'a types::NameOrId>>,
1314 {
1315 if let Some(value) = value.into() {
1316 Self(self.0.query_param("project", value.to_string()))
1317 } else {
1318 Self(self.0.query_param_missing("project"))
1319 }
1320 }
1321 }
1322
1323 pub struct AffinityGroupViewThen(::httpmock::Then);
1324 impl AffinityGroupViewThen {
1325 pub fn new(inner: ::httpmock::Then) -> Self {
1326 Self(inner)
1327 }
1328
1329 pub fn into_inner(self) -> ::httpmock::Then {
1330 self.0
1331 }
1332
1333 pub fn ok(self, value: &types::AffinityGroup) -> Self {
1334 Self(
1335 self.0
1336 .status(200u16)
1337 .header("content-type", "application/json")
1338 .json_body_obj(value),
1339 )
1340 }
1341
1342 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
1343 assert_eq!(status / 100u16, 4u16);
1344 Self(
1345 self.0
1346 .status(status)
1347 .header("content-type", "application/json")
1348 .json_body_obj(value),
1349 )
1350 }
1351
1352 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
1353 assert_eq!(status / 100u16, 5u16);
1354 Self(
1355 self.0
1356 .status(status)
1357 .header("content-type", "application/json")
1358 .json_body_obj(value),
1359 )
1360 }
1361 }
1362
1363 pub struct AffinityGroupUpdateWhen(::httpmock::When);
1364 impl AffinityGroupUpdateWhen {
1365 pub fn new(inner: ::httpmock::When) -> Self {
1366 Self(
1367 inner
1368 .method(::httpmock::Method::PUT)
1369 .path_matches(regex::Regex::new("^/v1/affinity-groups/[^/]*$").unwrap()),
1370 )
1371 }
1372
1373 pub fn into_inner(self) -> ::httpmock::When {
1374 self.0
1375 }
1376
1377 pub fn affinity_group(self, value: &types::NameOrId) -> Self {
1378 let re =
1379 regex::Regex::new(&format!("^/v1/affinity-groups/{}$", value.to_string())).unwrap();
1380 Self(self.0.path_matches(re))
1381 }
1382
1383 pub fn project<'a, T>(self, value: T) -> Self
1384 where
1385 T: Into<Option<&'a types::NameOrId>>,
1386 {
1387 if let Some(value) = value.into() {
1388 Self(self.0.query_param("project", value.to_string()))
1389 } else {
1390 Self(self.0.query_param_missing("project"))
1391 }
1392 }
1393
1394 pub fn body(self, value: &types::AffinityGroupUpdate) -> Self {
1395 Self(self.0.json_body_obj(value))
1396 }
1397 }
1398
1399 pub struct AffinityGroupUpdateThen(::httpmock::Then);
1400 impl AffinityGroupUpdateThen {
1401 pub fn new(inner: ::httpmock::Then) -> Self {
1402 Self(inner)
1403 }
1404
1405 pub fn into_inner(self) -> ::httpmock::Then {
1406 self.0
1407 }
1408
1409 pub fn ok(self, value: &types::AffinityGroup) -> Self {
1410 Self(
1411 self.0
1412 .status(200u16)
1413 .header("content-type", "application/json")
1414 .json_body_obj(value),
1415 )
1416 }
1417
1418 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
1419 assert_eq!(status / 100u16, 4u16);
1420 Self(
1421 self.0
1422 .status(status)
1423 .header("content-type", "application/json")
1424 .json_body_obj(value),
1425 )
1426 }
1427
1428 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
1429 assert_eq!(status / 100u16, 5u16);
1430 Self(
1431 self.0
1432 .status(status)
1433 .header("content-type", "application/json")
1434 .json_body_obj(value),
1435 )
1436 }
1437 }
1438
1439 pub struct AffinityGroupDeleteWhen(::httpmock::When);
1440 impl AffinityGroupDeleteWhen {
1441 pub fn new(inner: ::httpmock::When) -> Self {
1442 Self(
1443 inner
1444 .method(::httpmock::Method::DELETE)
1445 .path_matches(regex::Regex::new("^/v1/affinity-groups/[^/]*$").unwrap()),
1446 )
1447 }
1448
1449 pub fn into_inner(self) -> ::httpmock::When {
1450 self.0
1451 }
1452
1453 pub fn affinity_group(self, value: &types::NameOrId) -> Self {
1454 let re =
1455 regex::Regex::new(&format!("^/v1/affinity-groups/{}$", value.to_string())).unwrap();
1456 Self(self.0.path_matches(re))
1457 }
1458
1459 pub fn project<'a, T>(self, value: T) -> Self
1460 where
1461 T: Into<Option<&'a types::NameOrId>>,
1462 {
1463 if let Some(value) = value.into() {
1464 Self(self.0.query_param("project", value.to_string()))
1465 } else {
1466 Self(self.0.query_param_missing("project"))
1467 }
1468 }
1469 }
1470
1471 pub struct AffinityGroupDeleteThen(::httpmock::Then);
1472 impl AffinityGroupDeleteThen {
1473 pub fn new(inner: ::httpmock::Then) -> Self {
1474 Self(inner)
1475 }
1476
1477 pub fn into_inner(self) -> ::httpmock::Then {
1478 self.0
1479 }
1480
1481 pub fn no_content(self) -> Self {
1482 Self(self.0.status(204u16))
1483 }
1484
1485 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
1486 assert_eq!(status / 100u16, 4u16);
1487 Self(
1488 self.0
1489 .status(status)
1490 .header("content-type", "application/json")
1491 .json_body_obj(value),
1492 )
1493 }
1494
1495 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
1496 assert_eq!(status / 100u16, 5u16);
1497 Self(
1498 self.0
1499 .status(status)
1500 .header("content-type", "application/json")
1501 .json_body_obj(value),
1502 )
1503 }
1504 }
1505
1506 pub struct AffinityGroupMemberListWhen(::httpmock::When);
1507 impl AffinityGroupMemberListWhen {
1508 pub fn new(inner: ::httpmock::When) -> Self {
1509 Self(
1510 inner.method(::httpmock::Method::GET).path_matches(
1511 regex::Regex::new("^/v1/affinity-groups/[^/]*/members$").unwrap(),
1512 ),
1513 )
1514 }
1515
1516 pub fn into_inner(self) -> ::httpmock::When {
1517 self.0
1518 }
1519
1520 pub fn affinity_group(self, value: &types::NameOrId) -> Self {
1521 let re = regex::Regex::new(&format!(
1522 "^/v1/affinity-groups/{}/members$",
1523 value.to_string()
1524 ))
1525 .unwrap();
1526 Self(self.0.path_matches(re))
1527 }
1528
1529 pub fn limit<T>(self, value: T) -> Self
1530 where
1531 T: Into<Option<::std::num::NonZeroU32>>,
1532 {
1533 if let Some(value) = value.into() {
1534 Self(self.0.query_param("limit", value.to_string()))
1535 } else {
1536 Self(self.0.query_param_missing("limit"))
1537 }
1538 }
1539
1540 pub fn page_token<'a, T>(self, value: T) -> Self
1541 where
1542 T: Into<Option<&'a str>>,
1543 {
1544 if let Some(value) = value.into() {
1545 Self(self.0.query_param("page_token", value.to_string()))
1546 } else {
1547 Self(self.0.query_param_missing("page_token"))
1548 }
1549 }
1550
1551 pub fn project<'a, T>(self, value: T) -> Self
1552 where
1553 T: Into<Option<&'a types::NameOrId>>,
1554 {
1555 if let Some(value) = value.into() {
1556 Self(self.0.query_param("project", value.to_string()))
1557 } else {
1558 Self(self.0.query_param_missing("project"))
1559 }
1560 }
1561
1562 pub fn sort_by<T>(self, value: T) -> Self
1563 where
1564 T: Into<Option<types::NameOrIdSortMode>>,
1565 {
1566 if let Some(value) = value.into() {
1567 Self(self.0.query_param("sort_by", value.to_string()))
1568 } else {
1569 Self(self.0.query_param_missing("sort_by"))
1570 }
1571 }
1572 }
1573
1574 pub struct AffinityGroupMemberListThen(::httpmock::Then);
1575 impl AffinityGroupMemberListThen {
1576 pub fn new(inner: ::httpmock::Then) -> Self {
1577 Self(inner)
1578 }
1579
1580 pub fn into_inner(self) -> ::httpmock::Then {
1581 self.0
1582 }
1583
1584 pub fn ok(self, value: &types::AffinityGroupMemberResultsPage) -> Self {
1585 Self(
1586 self.0
1587 .status(200u16)
1588 .header("content-type", "application/json")
1589 .json_body_obj(value),
1590 )
1591 }
1592
1593 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
1594 assert_eq!(status / 100u16, 4u16);
1595 Self(
1596 self.0
1597 .status(status)
1598 .header("content-type", "application/json")
1599 .json_body_obj(value),
1600 )
1601 }
1602
1603 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
1604 assert_eq!(status / 100u16, 5u16);
1605 Self(
1606 self.0
1607 .status(status)
1608 .header("content-type", "application/json")
1609 .json_body_obj(value),
1610 )
1611 }
1612 }
1613
1614 pub struct AffinityGroupMemberInstanceViewWhen(::httpmock::When);
1615 impl AffinityGroupMemberInstanceViewWhen {
1616 pub fn new(inner: ::httpmock::When) -> Self {
1617 Self(inner.method(::httpmock::Method::GET).path_matches(
1618 regex::Regex::new("^/v1/affinity-groups/[^/]*/members/instance/[^/]*$").unwrap(),
1619 ))
1620 }
1621
1622 pub fn into_inner(self) -> ::httpmock::When {
1623 self.0
1624 }
1625
1626 pub fn affinity_group(self, value: &types::NameOrId) -> Self {
1627 let re = regex::Regex::new(&format!(
1628 "^/v1/affinity-groups/{}/members/instance/.*$",
1629 value.to_string()
1630 ))
1631 .unwrap();
1632 Self(self.0.path_matches(re))
1633 }
1634
1635 pub fn instance(self, value: &types::NameOrId) -> Self {
1636 let re = regex::Regex::new(&format!(
1637 "^/v1/affinity-groups/.*/members/instance/{}$",
1638 value.to_string()
1639 ))
1640 .unwrap();
1641 Self(self.0.path_matches(re))
1642 }
1643
1644 pub fn project<'a, T>(self, value: T) -> Self
1645 where
1646 T: Into<Option<&'a types::NameOrId>>,
1647 {
1648 if let Some(value) = value.into() {
1649 Self(self.0.query_param("project", value.to_string()))
1650 } else {
1651 Self(self.0.query_param_missing("project"))
1652 }
1653 }
1654 }
1655
1656 pub struct AffinityGroupMemberInstanceViewThen(::httpmock::Then);
1657 impl AffinityGroupMemberInstanceViewThen {
1658 pub fn new(inner: ::httpmock::Then) -> Self {
1659 Self(inner)
1660 }
1661
1662 pub fn into_inner(self) -> ::httpmock::Then {
1663 self.0
1664 }
1665
1666 pub fn ok(self, value: &types::AffinityGroupMember) -> Self {
1667 Self(
1668 self.0
1669 .status(200u16)
1670 .header("content-type", "application/json")
1671 .json_body_obj(value),
1672 )
1673 }
1674
1675 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
1676 assert_eq!(status / 100u16, 4u16);
1677 Self(
1678 self.0
1679 .status(status)
1680 .header("content-type", "application/json")
1681 .json_body_obj(value),
1682 )
1683 }
1684
1685 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
1686 assert_eq!(status / 100u16, 5u16);
1687 Self(
1688 self.0
1689 .status(status)
1690 .header("content-type", "application/json")
1691 .json_body_obj(value),
1692 )
1693 }
1694 }
1695
1696 pub struct AffinityGroupMemberInstanceAddWhen(::httpmock::When);
1697 impl AffinityGroupMemberInstanceAddWhen {
1698 pub fn new(inner: ::httpmock::When) -> Self {
1699 Self(inner.method(::httpmock::Method::POST).path_matches(
1700 regex::Regex::new("^/v1/affinity-groups/[^/]*/members/instance/[^/]*$").unwrap(),
1701 ))
1702 }
1703
1704 pub fn into_inner(self) -> ::httpmock::When {
1705 self.0
1706 }
1707
1708 pub fn affinity_group(self, value: &types::NameOrId) -> Self {
1709 let re = regex::Regex::new(&format!(
1710 "^/v1/affinity-groups/{}/members/instance/.*$",
1711 value.to_string()
1712 ))
1713 .unwrap();
1714 Self(self.0.path_matches(re))
1715 }
1716
1717 pub fn instance(self, value: &types::NameOrId) -> Self {
1718 let re = regex::Regex::new(&format!(
1719 "^/v1/affinity-groups/.*/members/instance/{}$",
1720 value.to_string()
1721 ))
1722 .unwrap();
1723 Self(self.0.path_matches(re))
1724 }
1725
1726 pub fn project<'a, T>(self, value: T) -> Self
1727 where
1728 T: Into<Option<&'a types::NameOrId>>,
1729 {
1730 if let Some(value) = value.into() {
1731 Self(self.0.query_param("project", value.to_string()))
1732 } else {
1733 Self(self.0.query_param_missing("project"))
1734 }
1735 }
1736 }
1737
1738 pub struct AffinityGroupMemberInstanceAddThen(::httpmock::Then);
1739 impl AffinityGroupMemberInstanceAddThen {
1740 pub fn new(inner: ::httpmock::Then) -> Self {
1741 Self(inner)
1742 }
1743
1744 pub fn into_inner(self) -> ::httpmock::Then {
1745 self.0
1746 }
1747
1748 pub fn created(self, value: &types::AffinityGroupMember) -> Self {
1749 Self(
1750 self.0
1751 .status(201u16)
1752 .header("content-type", "application/json")
1753 .json_body_obj(value),
1754 )
1755 }
1756
1757 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
1758 assert_eq!(status / 100u16, 4u16);
1759 Self(
1760 self.0
1761 .status(status)
1762 .header("content-type", "application/json")
1763 .json_body_obj(value),
1764 )
1765 }
1766
1767 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
1768 assert_eq!(status / 100u16, 5u16);
1769 Self(
1770 self.0
1771 .status(status)
1772 .header("content-type", "application/json")
1773 .json_body_obj(value),
1774 )
1775 }
1776 }
1777
1778 pub struct AffinityGroupMemberInstanceDeleteWhen(::httpmock::When);
1779 impl AffinityGroupMemberInstanceDeleteWhen {
1780 pub fn new(inner: ::httpmock::When) -> Self {
1781 Self(inner.method(::httpmock::Method::DELETE).path_matches(
1782 regex::Regex::new("^/v1/affinity-groups/[^/]*/members/instance/[^/]*$").unwrap(),
1783 ))
1784 }
1785
1786 pub fn into_inner(self) -> ::httpmock::When {
1787 self.0
1788 }
1789
1790 pub fn affinity_group(self, value: &types::NameOrId) -> Self {
1791 let re = regex::Regex::new(&format!(
1792 "^/v1/affinity-groups/{}/members/instance/.*$",
1793 value.to_string()
1794 ))
1795 .unwrap();
1796 Self(self.0.path_matches(re))
1797 }
1798
1799 pub fn instance(self, value: &types::NameOrId) -> Self {
1800 let re = regex::Regex::new(&format!(
1801 "^/v1/affinity-groups/.*/members/instance/{}$",
1802 value.to_string()
1803 ))
1804 .unwrap();
1805 Self(self.0.path_matches(re))
1806 }
1807
1808 pub fn project<'a, T>(self, value: T) -> Self
1809 where
1810 T: Into<Option<&'a types::NameOrId>>,
1811 {
1812 if let Some(value) = value.into() {
1813 Self(self.0.query_param("project", value.to_string()))
1814 } else {
1815 Self(self.0.query_param_missing("project"))
1816 }
1817 }
1818 }
1819
1820 pub struct AffinityGroupMemberInstanceDeleteThen(::httpmock::Then);
1821 impl AffinityGroupMemberInstanceDeleteThen {
1822 pub fn new(inner: ::httpmock::Then) -> Self {
1823 Self(inner)
1824 }
1825
1826 pub fn into_inner(self) -> ::httpmock::Then {
1827 self.0
1828 }
1829
1830 pub fn no_content(self) -> Self {
1831 Self(self.0.status(204u16))
1832 }
1833
1834 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
1835 assert_eq!(status / 100u16, 4u16);
1836 Self(
1837 self.0
1838 .status(status)
1839 .header("content-type", "application/json")
1840 .json_body_obj(value),
1841 )
1842 }
1843
1844 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
1845 assert_eq!(status / 100u16, 5u16);
1846 Self(
1847 self.0
1848 .status(status)
1849 .header("content-type", "application/json")
1850 .json_body_obj(value),
1851 )
1852 }
1853 }
1854
1855 pub struct AlertClassListWhen(::httpmock::When);
1856 impl AlertClassListWhen {
1857 pub fn new(inner: ::httpmock::When) -> Self {
1858 Self(
1859 inner
1860 .method(::httpmock::Method::GET)
1861 .path_matches(regex::Regex::new("^/v1/alert-classes$").unwrap()),
1862 )
1863 }
1864
1865 pub fn into_inner(self) -> ::httpmock::When {
1866 self.0
1867 }
1868
1869 pub fn filter<'a, T>(self, value: T) -> Self
1870 where
1871 T: Into<Option<&'a types::AlertSubscription>>,
1872 {
1873 if let Some(value) = value.into() {
1874 Self(self.0.query_param("filter", value.to_string()))
1875 } else {
1876 Self(self.0.query_param_missing("filter"))
1877 }
1878 }
1879
1880 pub fn limit<T>(self, value: T) -> Self
1881 where
1882 T: Into<Option<::std::num::NonZeroU32>>,
1883 {
1884 if let Some(value) = value.into() {
1885 Self(self.0.query_param("limit", value.to_string()))
1886 } else {
1887 Self(self.0.query_param_missing("limit"))
1888 }
1889 }
1890
1891 pub fn page_token<'a, T>(self, value: T) -> Self
1892 where
1893 T: Into<Option<&'a str>>,
1894 {
1895 if let Some(value) = value.into() {
1896 Self(self.0.query_param("page_token", value.to_string()))
1897 } else {
1898 Self(self.0.query_param_missing("page_token"))
1899 }
1900 }
1901 }
1902
1903 pub struct AlertClassListThen(::httpmock::Then);
1904 impl AlertClassListThen {
1905 pub fn new(inner: ::httpmock::Then) -> Self {
1906 Self(inner)
1907 }
1908
1909 pub fn into_inner(self) -> ::httpmock::Then {
1910 self.0
1911 }
1912
1913 pub fn ok(self, value: &types::AlertClassResultsPage) -> Self {
1914 Self(
1915 self.0
1916 .status(200u16)
1917 .header("content-type", "application/json")
1918 .json_body_obj(value),
1919 )
1920 }
1921
1922 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
1923 assert_eq!(status / 100u16, 4u16);
1924 Self(
1925 self.0
1926 .status(status)
1927 .header("content-type", "application/json")
1928 .json_body_obj(value),
1929 )
1930 }
1931
1932 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
1933 assert_eq!(status / 100u16, 5u16);
1934 Self(
1935 self.0
1936 .status(status)
1937 .header("content-type", "application/json")
1938 .json_body_obj(value),
1939 )
1940 }
1941 }
1942
1943 pub struct AlertReceiverListWhen(::httpmock::When);
1944 impl AlertReceiverListWhen {
1945 pub fn new(inner: ::httpmock::When) -> Self {
1946 Self(
1947 inner
1948 .method(::httpmock::Method::GET)
1949 .path_matches(regex::Regex::new("^/v1/alert-receivers$").unwrap()),
1950 )
1951 }
1952
1953 pub fn into_inner(self) -> ::httpmock::When {
1954 self.0
1955 }
1956
1957 pub fn limit<T>(self, value: T) -> Self
1958 where
1959 T: Into<Option<::std::num::NonZeroU32>>,
1960 {
1961 if let Some(value) = value.into() {
1962 Self(self.0.query_param("limit", value.to_string()))
1963 } else {
1964 Self(self.0.query_param_missing("limit"))
1965 }
1966 }
1967
1968 pub fn page_token<'a, T>(self, value: T) -> Self
1969 where
1970 T: Into<Option<&'a str>>,
1971 {
1972 if let Some(value) = value.into() {
1973 Self(self.0.query_param("page_token", value.to_string()))
1974 } else {
1975 Self(self.0.query_param_missing("page_token"))
1976 }
1977 }
1978
1979 pub fn sort_by<T>(self, value: T) -> Self
1980 where
1981 T: Into<Option<types::NameOrIdSortMode>>,
1982 {
1983 if let Some(value) = value.into() {
1984 Self(self.0.query_param("sort_by", value.to_string()))
1985 } else {
1986 Self(self.0.query_param_missing("sort_by"))
1987 }
1988 }
1989 }
1990
1991 pub struct AlertReceiverListThen(::httpmock::Then);
1992 impl AlertReceiverListThen {
1993 pub fn new(inner: ::httpmock::Then) -> Self {
1994 Self(inner)
1995 }
1996
1997 pub fn into_inner(self) -> ::httpmock::Then {
1998 self.0
1999 }
2000
2001 pub fn ok(self, value: &types::AlertReceiverResultsPage) -> Self {
2002 Self(
2003 self.0
2004 .status(200u16)
2005 .header("content-type", "application/json")
2006 .json_body_obj(value),
2007 )
2008 }
2009
2010 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
2011 assert_eq!(status / 100u16, 4u16);
2012 Self(
2013 self.0
2014 .status(status)
2015 .header("content-type", "application/json")
2016 .json_body_obj(value),
2017 )
2018 }
2019
2020 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
2021 assert_eq!(status / 100u16, 5u16);
2022 Self(
2023 self.0
2024 .status(status)
2025 .header("content-type", "application/json")
2026 .json_body_obj(value),
2027 )
2028 }
2029 }
2030
2031 pub struct AlertReceiverViewWhen(::httpmock::When);
2032 impl AlertReceiverViewWhen {
2033 pub fn new(inner: ::httpmock::When) -> Self {
2034 Self(
2035 inner
2036 .method(::httpmock::Method::GET)
2037 .path_matches(regex::Regex::new("^/v1/alert-receivers/[^/]*$").unwrap()),
2038 )
2039 }
2040
2041 pub fn into_inner(self) -> ::httpmock::When {
2042 self.0
2043 }
2044
2045 pub fn receiver(self, value: &types::NameOrId) -> Self {
2046 let re =
2047 regex::Regex::new(&format!("^/v1/alert-receivers/{}$", value.to_string())).unwrap();
2048 Self(self.0.path_matches(re))
2049 }
2050 }
2051
2052 pub struct AlertReceiverViewThen(::httpmock::Then);
2053 impl AlertReceiverViewThen {
2054 pub fn new(inner: ::httpmock::Then) -> Self {
2055 Self(inner)
2056 }
2057
2058 pub fn into_inner(self) -> ::httpmock::Then {
2059 self.0
2060 }
2061
2062 pub fn ok(self, value: &types::AlertReceiver) -> Self {
2063 Self(
2064 self.0
2065 .status(200u16)
2066 .header("content-type", "application/json")
2067 .json_body_obj(value),
2068 )
2069 }
2070
2071 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
2072 assert_eq!(status / 100u16, 4u16);
2073 Self(
2074 self.0
2075 .status(status)
2076 .header("content-type", "application/json")
2077 .json_body_obj(value),
2078 )
2079 }
2080
2081 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
2082 assert_eq!(status / 100u16, 5u16);
2083 Self(
2084 self.0
2085 .status(status)
2086 .header("content-type", "application/json")
2087 .json_body_obj(value),
2088 )
2089 }
2090 }
2091
2092 pub struct AlertReceiverDeleteWhen(::httpmock::When);
2093 impl AlertReceiverDeleteWhen {
2094 pub fn new(inner: ::httpmock::When) -> Self {
2095 Self(
2096 inner
2097 .method(::httpmock::Method::DELETE)
2098 .path_matches(regex::Regex::new("^/v1/alert-receivers/[^/]*$").unwrap()),
2099 )
2100 }
2101
2102 pub fn into_inner(self) -> ::httpmock::When {
2103 self.0
2104 }
2105
2106 pub fn receiver(self, value: &types::NameOrId) -> Self {
2107 let re =
2108 regex::Regex::new(&format!("^/v1/alert-receivers/{}$", value.to_string())).unwrap();
2109 Self(self.0.path_matches(re))
2110 }
2111 }
2112
2113 pub struct AlertReceiverDeleteThen(::httpmock::Then);
2114 impl AlertReceiverDeleteThen {
2115 pub fn new(inner: ::httpmock::Then) -> Self {
2116 Self(inner)
2117 }
2118
2119 pub fn into_inner(self) -> ::httpmock::Then {
2120 self.0
2121 }
2122
2123 pub fn no_content(self) -> Self {
2124 Self(self.0.status(204u16))
2125 }
2126
2127 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
2128 assert_eq!(status / 100u16, 4u16);
2129 Self(
2130 self.0
2131 .status(status)
2132 .header("content-type", "application/json")
2133 .json_body_obj(value),
2134 )
2135 }
2136
2137 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
2138 assert_eq!(status / 100u16, 5u16);
2139 Self(
2140 self.0
2141 .status(status)
2142 .header("content-type", "application/json")
2143 .json_body_obj(value),
2144 )
2145 }
2146 }
2147
2148 pub struct AlertDeliveryListWhen(::httpmock::When);
2149 impl AlertDeliveryListWhen {
2150 pub fn new(inner: ::httpmock::When) -> Self {
2151 Self(
2152 inner.method(::httpmock::Method::GET).path_matches(
2153 regex::Regex::new("^/v1/alert-receivers/[^/]*/deliveries$").unwrap(),
2154 ),
2155 )
2156 }
2157
2158 pub fn into_inner(self) -> ::httpmock::When {
2159 self.0
2160 }
2161
2162 pub fn receiver(self, value: &types::NameOrId) -> Self {
2163 let re = regex::Regex::new(&format!(
2164 "^/v1/alert-receivers/{}/deliveries$",
2165 value.to_string()
2166 ))
2167 .unwrap();
2168 Self(self.0.path_matches(re))
2169 }
2170
2171 pub fn delivered<T>(self, value: T) -> Self
2172 where
2173 T: Into<Option<bool>>,
2174 {
2175 if let Some(value) = value.into() {
2176 Self(self.0.query_param("delivered", value.to_string()))
2177 } else {
2178 Self(self.0.query_param_missing("delivered"))
2179 }
2180 }
2181
2182 pub fn failed<T>(self, value: T) -> Self
2183 where
2184 T: Into<Option<bool>>,
2185 {
2186 if let Some(value) = value.into() {
2187 Self(self.0.query_param("failed", value.to_string()))
2188 } else {
2189 Self(self.0.query_param_missing("failed"))
2190 }
2191 }
2192
2193 pub fn limit<T>(self, value: T) -> Self
2194 where
2195 T: Into<Option<::std::num::NonZeroU32>>,
2196 {
2197 if let Some(value) = value.into() {
2198 Self(self.0.query_param("limit", value.to_string()))
2199 } else {
2200 Self(self.0.query_param_missing("limit"))
2201 }
2202 }
2203
2204 pub fn page_token<'a, T>(self, value: T) -> Self
2205 where
2206 T: Into<Option<&'a str>>,
2207 {
2208 if let Some(value) = value.into() {
2209 Self(self.0.query_param("page_token", value.to_string()))
2210 } else {
2211 Self(self.0.query_param_missing("page_token"))
2212 }
2213 }
2214
2215 pub fn pending<T>(self, value: T) -> Self
2216 where
2217 T: Into<Option<bool>>,
2218 {
2219 if let Some(value) = value.into() {
2220 Self(self.0.query_param("pending", value.to_string()))
2221 } else {
2222 Self(self.0.query_param_missing("pending"))
2223 }
2224 }
2225
2226 pub fn sort_by<T>(self, value: T) -> Self
2227 where
2228 T: Into<Option<types::TimeAndIdSortMode>>,
2229 {
2230 if let Some(value) = value.into() {
2231 Self(self.0.query_param("sort_by", value.to_string()))
2232 } else {
2233 Self(self.0.query_param_missing("sort_by"))
2234 }
2235 }
2236 }
2237
2238 pub struct AlertDeliveryListThen(::httpmock::Then);
2239 impl AlertDeliveryListThen {
2240 pub fn new(inner: ::httpmock::Then) -> Self {
2241 Self(inner)
2242 }
2243
2244 pub fn into_inner(self) -> ::httpmock::Then {
2245 self.0
2246 }
2247
2248 pub fn ok(self, value: &types::AlertDeliveryResultsPage) -> Self {
2249 Self(
2250 self.0
2251 .status(200u16)
2252 .header("content-type", "application/json")
2253 .json_body_obj(value),
2254 )
2255 }
2256
2257 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
2258 assert_eq!(status / 100u16, 4u16);
2259 Self(
2260 self.0
2261 .status(status)
2262 .header("content-type", "application/json")
2263 .json_body_obj(value),
2264 )
2265 }
2266
2267 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
2268 assert_eq!(status / 100u16, 5u16);
2269 Self(
2270 self.0
2271 .status(status)
2272 .header("content-type", "application/json")
2273 .json_body_obj(value),
2274 )
2275 }
2276 }
2277
2278 pub struct AlertReceiverProbeWhen(::httpmock::When);
2279 impl AlertReceiverProbeWhen {
2280 pub fn new(inner: ::httpmock::When) -> Self {
2281 Self(
2282 inner
2283 .method(::httpmock::Method::POST)
2284 .path_matches(regex::Regex::new("^/v1/alert-receivers/[^/]*/probe$").unwrap()),
2285 )
2286 }
2287
2288 pub fn into_inner(self) -> ::httpmock::When {
2289 self.0
2290 }
2291
2292 pub fn receiver(self, value: &types::NameOrId) -> Self {
2293 let re = regex::Regex::new(&format!(
2294 "^/v1/alert-receivers/{}/probe$",
2295 value.to_string()
2296 ))
2297 .unwrap();
2298 Self(self.0.path_matches(re))
2299 }
2300
2301 pub fn resend<T>(self, value: T) -> Self
2302 where
2303 T: Into<Option<bool>>,
2304 {
2305 if let Some(value) = value.into() {
2306 Self(self.0.query_param("resend", value.to_string()))
2307 } else {
2308 Self(self.0.query_param_missing("resend"))
2309 }
2310 }
2311 }
2312
2313 pub struct AlertReceiverProbeThen(::httpmock::Then);
2314 impl AlertReceiverProbeThen {
2315 pub fn new(inner: ::httpmock::Then) -> Self {
2316 Self(inner)
2317 }
2318
2319 pub fn into_inner(self) -> ::httpmock::Then {
2320 self.0
2321 }
2322
2323 pub fn ok(self, value: &types::AlertProbeResult) -> Self {
2324 Self(
2325 self.0
2326 .status(200u16)
2327 .header("content-type", "application/json")
2328 .json_body_obj(value),
2329 )
2330 }
2331
2332 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
2333 assert_eq!(status / 100u16, 4u16);
2334 Self(
2335 self.0
2336 .status(status)
2337 .header("content-type", "application/json")
2338 .json_body_obj(value),
2339 )
2340 }
2341
2342 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
2343 assert_eq!(status / 100u16, 5u16);
2344 Self(
2345 self.0
2346 .status(status)
2347 .header("content-type", "application/json")
2348 .json_body_obj(value),
2349 )
2350 }
2351 }
2352
2353 pub struct AlertReceiverSubscriptionAddWhen(::httpmock::When);
2354 impl AlertReceiverSubscriptionAddWhen {
2355 pub fn new(inner: ::httpmock::When) -> Self {
2356 Self(inner.method(::httpmock::Method::POST).path_matches(
2357 regex::Regex::new("^/v1/alert-receivers/[^/]*/subscriptions$").unwrap(),
2358 ))
2359 }
2360
2361 pub fn into_inner(self) -> ::httpmock::When {
2362 self.0
2363 }
2364
2365 pub fn receiver(self, value: &types::NameOrId) -> Self {
2366 let re = regex::Regex::new(&format!(
2367 "^/v1/alert-receivers/{}/subscriptions$",
2368 value.to_string()
2369 ))
2370 .unwrap();
2371 Self(self.0.path_matches(re))
2372 }
2373
2374 pub fn body(self, value: &types::AlertSubscriptionCreate) -> Self {
2375 Self(self.0.json_body_obj(value))
2376 }
2377 }
2378
2379 pub struct AlertReceiverSubscriptionAddThen(::httpmock::Then);
2380 impl AlertReceiverSubscriptionAddThen {
2381 pub fn new(inner: ::httpmock::Then) -> Self {
2382 Self(inner)
2383 }
2384
2385 pub fn into_inner(self) -> ::httpmock::Then {
2386 self.0
2387 }
2388
2389 pub fn created(self, value: &types::AlertSubscriptionCreated) -> Self {
2390 Self(
2391 self.0
2392 .status(201u16)
2393 .header("content-type", "application/json")
2394 .json_body_obj(value),
2395 )
2396 }
2397
2398 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
2399 assert_eq!(status / 100u16, 4u16);
2400 Self(
2401 self.0
2402 .status(status)
2403 .header("content-type", "application/json")
2404 .json_body_obj(value),
2405 )
2406 }
2407
2408 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
2409 assert_eq!(status / 100u16, 5u16);
2410 Self(
2411 self.0
2412 .status(status)
2413 .header("content-type", "application/json")
2414 .json_body_obj(value),
2415 )
2416 }
2417 }
2418
2419 pub struct AlertReceiverSubscriptionRemoveWhen(::httpmock::When);
2420 impl AlertReceiverSubscriptionRemoveWhen {
2421 pub fn new(inner: ::httpmock::When) -> Self {
2422 Self(inner.method(::httpmock::Method::DELETE).path_matches(
2423 regex::Regex::new("^/v1/alert-receivers/[^/]*/subscriptions/[^/]*$").unwrap(),
2424 ))
2425 }
2426
2427 pub fn into_inner(self) -> ::httpmock::When {
2428 self.0
2429 }
2430
2431 pub fn receiver(self, value: &types::NameOrId) -> Self {
2432 let re = regex::Regex::new(&format!(
2433 "^/v1/alert-receivers/{}/subscriptions/.*$",
2434 value.to_string()
2435 ))
2436 .unwrap();
2437 Self(self.0.path_matches(re))
2438 }
2439
2440 pub fn subscription(self, value: &types::AlertSubscription) -> Self {
2441 let re = regex::Regex::new(&format!(
2442 "^/v1/alert-receivers/.*/subscriptions/{}$",
2443 value.to_string()
2444 ))
2445 .unwrap();
2446 Self(self.0.path_matches(re))
2447 }
2448 }
2449
2450 pub struct AlertReceiverSubscriptionRemoveThen(::httpmock::Then);
2451 impl AlertReceiverSubscriptionRemoveThen {
2452 pub fn new(inner: ::httpmock::Then) -> Self {
2453 Self(inner)
2454 }
2455
2456 pub fn into_inner(self) -> ::httpmock::Then {
2457 self.0
2458 }
2459
2460 pub fn no_content(self) -> Self {
2461 Self(self.0.status(204u16))
2462 }
2463
2464 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
2465 assert_eq!(status / 100u16, 4u16);
2466 Self(
2467 self.0
2468 .status(status)
2469 .header("content-type", "application/json")
2470 .json_body_obj(value),
2471 )
2472 }
2473
2474 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
2475 assert_eq!(status / 100u16, 5u16);
2476 Self(
2477 self.0
2478 .status(status)
2479 .header("content-type", "application/json")
2480 .json_body_obj(value),
2481 )
2482 }
2483 }
2484
2485 pub struct AlertDeliveryResendWhen(::httpmock::When);
2486 impl AlertDeliveryResendWhen {
2487 pub fn new(inner: ::httpmock::When) -> Self {
2488 Self(
2489 inner
2490 .method(::httpmock::Method::POST)
2491 .path_matches(regex::Regex::new("^/v1/alerts/[^/]*/resend$").unwrap()),
2492 )
2493 }
2494
2495 pub fn into_inner(self) -> ::httpmock::When {
2496 self.0
2497 }
2498
2499 pub fn alert_id(self, value: &::uuid::Uuid) -> Self {
2500 let re =
2501 regex::Regex::new(&format!("^/v1/alerts/{}/resend$", value.to_string())).unwrap();
2502 Self(self.0.path_matches(re))
2503 }
2504
2505 pub fn receiver(self, value: &types::NameOrId) -> Self {
2506 Self(self.0.query_param("receiver", value.to_string()))
2507 }
2508 }
2509
2510 pub struct AlertDeliveryResendThen(::httpmock::Then);
2511 impl AlertDeliveryResendThen {
2512 pub fn new(inner: ::httpmock::Then) -> Self {
2513 Self(inner)
2514 }
2515
2516 pub fn into_inner(self) -> ::httpmock::Then {
2517 self.0
2518 }
2519
2520 pub fn created(self, value: &types::AlertDeliveryId) -> Self {
2521 Self(
2522 self.0
2523 .status(201u16)
2524 .header("content-type", "application/json")
2525 .json_body_obj(value),
2526 )
2527 }
2528
2529 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
2530 assert_eq!(status / 100u16, 4u16);
2531 Self(
2532 self.0
2533 .status(status)
2534 .header("content-type", "application/json")
2535 .json_body_obj(value),
2536 )
2537 }
2538
2539 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
2540 assert_eq!(status / 100u16, 5u16);
2541 Self(
2542 self.0
2543 .status(status)
2544 .header("content-type", "application/json")
2545 .json_body_obj(value),
2546 )
2547 }
2548 }
2549
2550 pub struct AntiAffinityGroupListWhen(::httpmock::When);
2551 impl AntiAffinityGroupListWhen {
2552 pub fn new(inner: ::httpmock::When) -> Self {
2553 Self(
2554 inner
2555 .method(::httpmock::Method::GET)
2556 .path_matches(regex::Regex::new("^/v1/anti-affinity-groups$").unwrap()),
2557 )
2558 }
2559
2560 pub fn into_inner(self) -> ::httpmock::When {
2561 self.0
2562 }
2563
2564 pub fn limit<T>(self, value: T) -> Self
2565 where
2566 T: Into<Option<::std::num::NonZeroU32>>,
2567 {
2568 if let Some(value) = value.into() {
2569 Self(self.0.query_param("limit", value.to_string()))
2570 } else {
2571 Self(self.0.query_param_missing("limit"))
2572 }
2573 }
2574
2575 pub fn page_token<'a, T>(self, value: T) -> Self
2576 where
2577 T: Into<Option<&'a str>>,
2578 {
2579 if let Some(value) = value.into() {
2580 Self(self.0.query_param("page_token", value.to_string()))
2581 } else {
2582 Self(self.0.query_param_missing("page_token"))
2583 }
2584 }
2585
2586 pub fn project<'a, T>(self, value: T) -> Self
2587 where
2588 T: Into<Option<&'a types::NameOrId>>,
2589 {
2590 if let Some(value) = value.into() {
2591 Self(self.0.query_param("project", value.to_string()))
2592 } else {
2593 Self(self.0.query_param_missing("project"))
2594 }
2595 }
2596
2597 pub fn sort_by<T>(self, value: T) -> Self
2598 where
2599 T: Into<Option<types::NameOrIdSortMode>>,
2600 {
2601 if let Some(value) = value.into() {
2602 Self(self.0.query_param("sort_by", value.to_string()))
2603 } else {
2604 Self(self.0.query_param_missing("sort_by"))
2605 }
2606 }
2607 }
2608
2609 pub struct AntiAffinityGroupListThen(::httpmock::Then);
2610 impl AntiAffinityGroupListThen {
2611 pub fn new(inner: ::httpmock::Then) -> Self {
2612 Self(inner)
2613 }
2614
2615 pub fn into_inner(self) -> ::httpmock::Then {
2616 self.0
2617 }
2618
2619 pub fn ok(self, value: &types::AntiAffinityGroupResultsPage) -> Self {
2620 Self(
2621 self.0
2622 .status(200u16)
2623 .header("content-type", "application/json")
2624 .json_body_obj(value),
2625 )
2626 }
2627
2628 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
2629 assert_eq!(status / 100u16, 4u16);
2630 Self(
2631 self.0
2632 .status(status)
2633 .header("content-type", "application/json")
2634 .json_body_obj(value),
2635 )
2636 }
2637
2638 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
2639 assert_eq!(status / 100u16, 5u16);
2640 Self(
2641 self.0
2642 .status(status)
2643 .header("content-type", "application/json")
2644 .json_body_obj(value),
2645 )
2646 }
2647 }
2648
2649 pub struct AntiAffinityGroupCreateWhen(::httpmock::When);
2650 impl AntiAffinityGroupCreateWhen {
2651 pub fn new(inner: ::httpmock::When) -> Self {
2652 Self(
2653 inner
2654 .method(::httpmock::Method::POST)
2655 .path_matches(regex::Regex::new("^/v1/anti-affinity-groups$").unwrap()),
2656 )
2657 }
2658
2659 pub fn into_inner(self) -> ::httpmock::When {
2660 self.0
2661 }
2662
2663 pub fn project(self, value: &types::NameOrId) -> Self {
2664 Self(self.0.query_param("project", value.to_string()))
2665 }
2666
2667 pub fn body(self, value: &types::AntiAffinityGroupCreate) -> Self {
2668 Self(self.0.json_body_obj(value))
2669 }
2670 }
2671
2672 pub struct AntiAffinityGroupCreateThen(::httpmock::Then);
2673 impl AntiAffinityGroupCreateThen {
2674 pub fn new(inner: ::httpmock::Then) -> Self {
2675 Self(inner)
2676 }
2677
2678 pub fn into_inner(self) -> ::httpmock::Then {
2679 self.0
2680 }
2681
2682 pub fn created(self, value: &types::AntiAffinityGroup) -> Self {
2683 Self(
2684 self.0
2685 .status(201u16)
2686 .header("content-type", "application/json")
2687 .json_body_obj(value),
2688 )
2689 }
2690
2691 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
2692 assert_eq!(status / 100u16, 4u16);
2693 Self(
2694 self.0
2695 .status(status)
2696 .header("content-type", "application/json")
2697 .json_body_obj(value),
2698 )
2699 }
2700
2701 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
2702 assert_eq!(status / 100u16, 5u16);
2703 Self(
2704 self.0
2705 .status(status)
2706 .header("content-type", "application/json")
2707 .json_body_obj(value),
2708 )
2709 }
2710 }
2711
2712 pub struct AntiAffinityGroupViewWhen(::httpmock::When);
2713 impl AntiAffinityGroupViewWhen {
2714 pub fn new(inner: ::httpmock::When) -> Self {
2715 Self(
2716 inner
2717 .method(::httpmock::Method::GET)
2718 .path_matches(regex::Regex::new("^/v1/anti-affinity-groups/[^/]*$").unwrap()),
2719 )
2720 }
2721
2722 pub fn into_inner(self) -> ::httpmock::When {
2723 self.0
2724 }
2725
2726 pub fn anti_affinity_group(self, value: &types::NameOrId) -> Self {
2727 let re =
2728 regex::Regex::new(&format!("^/v1/anti-affinity-groups/{}$", value.to_string()))
2729 .unwrap();
2730 Self(self.0.path_matches(re))
2731 }
2732
2733 pub fn project<'a, T>(self, value: T) -> Self
2734 where
2735 T: Into<Option<&'a types::NameOrId>>,
2736 {
2737 if let Some(value) = value.into() {
2738 Self(self.0.query_param("project", value.to_string()))
2739 } else {
2740 Self(self.0.query_param_missing("project"))
2741 }
2742 }
2743 }
2744
2745 pub struct AntiAffinityGroupViewThen(::httpmock::Then);
2746 impl AntiAffinityGroupViewThen {
2747 pub fn new(inner: ::httpmock::Then) -> Self {
2748 Self(inner)
2749 }
2750
2751 pub fn into_inner(self) -> ::httpmock::Then {
2752 self.0
2753 }
2754
2755 pub fn ok(self, value: &types::AntiAffinityGroup) -> Self {
2756 Self(
2757 self.0
2758 .status(200u16)
2759 .header("content-type", "application/json")
2760 .json_body_obj(value),
2761 )
2762 }
2763
2764 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
2765 assert_eq!(status / 100u16, 4u16);
2766 Self(
2767 self.0
2768 .status(status)
2769 .header("content-type", "application/json")
2770 .json_body_obj(value),
2771 )
2772 }
2773
2774 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
2775 assert_eq!(status / 100u16, 5u16);
2776 Self(
2777 self.0
2778 .status(status)
2779 .header("content-type", "application/json")
2780 .json_body_obj(value),
2781 )
2782 }
2783 }
2784
2785 pub struct AntiAffinityGroupUpdateWhen(::httpmock::When);
2786 impl AntiAffinityGroupUpdateWhen {
2787 pub fn new(inner: ::httpmock::When) -> Self {
2788 Self(
2789 inner
2790 .method(::httpmock::Method::PUT)
2791 .path_matches(regex::Regex::new("^/v1/anti-affinity-groups/[^/]*$").unwrap()),
2792 )
2793 }
2794
2795 pub fn into_inner(self) -> ::httpmock::When {
2796 self.0
2797 }
2798
2799 pub fn anti_affinity_group(self, value: &types::NameOrId) -> Self {
2800 let re =
2801 regex::Regex::new(&format!("^/v1/anti-affinity-groups/{}$", value.to_string()))
2802 .unwrap();
2803 Self(self.0.path_matches(re))
2804 }
2805
2806 pub fn project<'a, T>(self, value: T) -> Self
2807 where
2808 T: Into<Option<&'a types::NameOrId>>,
2809 {
2810 if let Some(value) = value.into() {
2811 Self(self.0.query_param("project", value.to_string()))
2812 } else {
2813 Self(self.0.query_param_missing("project"))
2814 }
2815 }
2816
2817 pub fn body(self, value: &types::AntiAffinityGroupUpdate) -> Self {
2818 Self(self.0.json_body_obj(value))
2819 }
2820 }
2821
2822 pub struct AntiAffinityGroupUpdateThen(::httpmock::Then);
2823 impl AntiAffinityGroupUpdateThen {
2824 pub fn new(inner: ::httpmock::Then) -> Self {
2825 Self(inner)
2826 }
2827
2828 pub fn into_inner(self) -> ::httpmock::Then {
2829 self.0
2830 }
2831
2832 pub fn ok(self, value: &types::AntiAffinityGroup) -> Self {
2833 Self(
2834 self.0
2835 .status(200u16)
2836 .header("content-type", "application/json")
2837 .json_body_obj(value),
2838 )
2839 }
2840
2841 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
2842 assert_eq!(status / 100u16, 4u16);
2843 Self(
2844 self.0
2845 .status(status)
2846 .header("content-type", "application/json")
2847 .json_body_obj(value),
2848 )
2849 }
2850
2851 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
2852 assert_eq!(status / 100u16, 5u16);
2853 Self(
2854 self.0
2855 .status(status)
2856 .header("content-type", "application/json")
2857 .json_body_obj(value),
2858 )
2859 }
2860 }
2861
2862 pub struct AntiAffinityGroupDeleteWhen(::httpmock::When);
2863 impl AntiAffinityGroupDeleteWhen {
2864 pub fn new(inner: ::httpmock::When) -> Self {
2865 Self(
2866 inner
2867 .method(::httpmock::Method::DELETE)
2868 .path_matches(regex::Regex::new("^/v1/anti-affinity-groups/[^/]*$").unwrap()),
2869 )
2870 }
2871
2872 pub fn into_inner(self) -> ::httpmock::When {
2873 self.0
2874 }
2875
2876 pub fn anti_affinity_group(self, value: &types::NameOrId) -> Self {
2877 let re =
2878 regex::Regex::new(&format!("^/v1/anti-affinity-groups/{}$", value.to_string()))
2879 .unwrap();
2880 Self(self.0.path_matches(re))
2881 }
2882
2883 pub fn project<'a, T>(self, value: T) -> Self
2884 where
2885 T: Into<Option<&'a types::NameOrId>>,
2886 {
2887 if let Some(value) = value.into() {
2888 Self(self.0.query_param("project", value.to_string()))
2889 } else {
2890 Self(self.0.query_param_missing("project"))
2891 }
2892 }
2893 }
2894
2895 pub struct AntiAffinityGroupDeleteThen(::httpmock::Then);
2896 impl AntiAffinityGroupDeleteThen {
2897 pub fn new(inner: ::httpmock::Then) -> Self {
2898 Self(inner)
2899 }
2900
2901 pub fn into_inner(self) -> ::httpmock::Then {
2902 self.0
2903 }
2904
2905 pub fn no_content(self) -> Self {
2906 Self(self.0.status(204u16))
2907 }
2908
2909 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
2910 assert_eq!(status / 100u16, 4u16);
2911 Self(
2912 self.0
2913 .status(status)
2914 .header("content-type", "application/json")
2915 .json_body_obj(value),
2916 )
2917 }
2918
2919 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
2920 assert_eq!(status / 100u16, 5u16);
2921 Self(
2922 self.0
2923 .status(status)
2924 .header("content-type", "application/json")
2925 .json_body_obj(value),
2926 )
2927 }
2928 }
2929
2930 pub struct AntiAffinityGroupMemberListWhen(::httpmock::When);
2931 impl AntiAffinityGroupMemberListWhen {
2932 pub fn new(inner: ::httpmock::When) -> Self {
2933 Self(inner.method(::httpmock::Method::GET).path_matches(
2934 regex::Regex::new("^/v1/anti-affinity-groups/[^/]*/members$").unwrap(),
2935 ))
2936 }
2937
2938 pub fn into_inner(self) -> ::httpmock::When {
2939 self.0
2940 }
2941
2942 pub fn anti_affinity_group(self, value: &types::NameOrId) -> Self {
2943 let re = regex::Regex::new(&format!(
2944 "^/v1/anti-affinity-groups/{}/members$",
2945 value.to_string()
2946 ))
2947 .unwrap();
2948 Self(self.0.path_matches(re))
2949 }
2950
2951 pub fn limit<T>(self, value: T) -> Self
2952 where
2953 T: Into<Option<::std::num::NonZeroU32>>,
2954 {
2955 if let Some(value) = value.into() {
2956 Self(self.0.query_param("limit", value.to_string()))
2957 } else {
2958 Self(self.0.query_param_missing("limit"))
2959 }
2960 }
2961
2962 pub fn page_token<'a, T>(self, value: T) -> Self
2963 where
2964 T: Into<Option<&'a str>>,
2965 {
2966 if let Some(value) = value.into() {
2967 Self(self.0.query_param("page_token", value.to_string()))
2968 } else {
2969 Self(self.0.query_param_missing("page_token"))
2970 }
2971 }
2972
2973 pub fn project<'a, T>(self, value: T) -> Self
2974 where
2975 T: Into<Option<&'a types::NameOrId>>,
2976 {
2977 if let Some(value) = value.into() {
2978 Self(self.0.query_param("project", value.to_string()))
2979 } else {
2980 Self(self.0.query_param_missing("project"))
2981 }
2982 }
2983
2984 pub fn sort_by<T>(self, value: T) -> Self
2985 where
2986 T: Into<Option<types::NameOrIdSortMode>>,
2987 {
2988 if let Some(value) = value.into() {
2989 Self(self.0.query_param("sort_by", value.to_string()))
2990 } else {
2991 Self(self.0.query_param_missing("sort_by"))
2992 }
2993 }
2994 }
2995
2996 pub struct AntiAffinityGroupMemberListThen(::httpmock::Then);
2997 impl AntiAffinityGroupMemberListThen {
2998 pub fn new(inner: ::httpmock::Then) -> Self {
2999 Self(inner)
3000 }
3001
3002 pub fn into_inner(self) -> ::httpmock::Then {
3003 self.0
3004 }
3005
3006 pub fn ok(self, value: &types::AntiAffinityGroupMemberResultsPage) -> Self {
3007 Self(
3008 self.0
3009 .status(200u16)
3010 .header("content-type", "application/json")
3011 .json_body_obj(value),
3012 )
3013 }
3014
3015 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
3016 assert_eq!(status / 100u16, 4u16);
3017 Self(
3018 self.0
3019 .status(status)
3020 .header("content-type", "application/json")
3021 .json_body_obj(value),
3022 )
3023 }
3024
3025 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
3026 assert_eq!(status / 100u16, 5u16);
3027 Self(
3028 self.0
3029 .status(status)
3030 .header("content-type", "application/json")
3031 .json_body_obj(value),
3032 )
3033 }
3034 }
3035
3036 pub struct AntiAffinityGroupMemberInstanceViewWhen(::httpmock::When);
3037 impl AntiAffinityGroupMemberInstanceViewWhen {
3038 pub fn new(inner: ::httpmock::When) -> Self {
3039 Self(
3040 inner.method(::httpmock::Method::GET).path_matches(
3041 regex::Regex::new("^/v1/anti-affinity-groups/[^/]*/members/instance/[^/]*$")
3042 .unwrap(),
3043 ),
3044 )
3045 }
3046
3047 pub fn into_inner(self) -> ::httpmock::When {
3048 self.0
3049 }
3050
3051 pub fn anti_affinity_group(self, value: &types::NameOrId) -> Self {
3052 let re = regex::Regex::new(&format!(
3053 "^/v1/anti-affinity-groups/{}/members/instance/.*$",
3054 value.to_string()
3055 ))
3056 .unwrap();
3057 Self(self.0.path_matches(re))
3058 }
3059
3060 pub fn instance(self, value: &types::NameOrId) -> Self {
3061 let re = regex::Regex::new(&format!(
3062 "^/v1/anti-affinity-groups/.*/members/instance/{}$",
3063 value.to_string()
3064 ))
3065 .unwrap();
3066 Self(self.0.path_matches(re))
3067 }
3068
3069 pub fn project<'a, T>(self, value: T) -> Self
3070 where
3071 T: Into<Option<&'a types::NameOrId>>,
3072 {
3073 if let Some(value) = value.into() {
3074 Self(self.0.query_param("project", value.to_string()))
3075 } else {
3076 Self(self.0.query_param_missing("project"))
3077 }
3078 }
3079 }
3080
3081 pub struct AntiAffinityGroupMemberInstanceViewThen(::httpmock::Then);
3082 impl AntiAffinityGroupMemberInstanceViewThen {
3083 pub fn new(inner: ::httpmock::Then) -> Self {
3084 Self(inner)
3085 }
3086
3087 pub fn into_inner(self) -> ::httpmock::Then {
3088 self.0
3089 }
3090
3091 pub fn ok(self, value: &types::AntiAffinityGroupMember) -> Self {
3092 Self(
3093 self.0
3094 .status(200u16)
3095 .header("content-type", "application/json")
3096 .json_body_obj(value),
3097 )
3098 }
3099
3100 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
3101 assert_eq!(status / 100u16, 4u16);
3102 Self(
3103 self.0
3104 .status(status)
3105 .header("content-type", "application/json")
3106 .json_body_obj(value),
3107 )
3108 }
3109
3110 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
3111 assert_eq!(status / 100u16, 5u16);
3112 Self(
3113 self.0
3114 .status(status)
3115 .header("content-type", "application/json")
3116 .json_body_obj(value),
3117 )
3118 }
3119 }
3120
3121 pub struct AntiAffinityGroupMemberInstanceAddWhen(::httpmock::When);
3122 impl AntiAffinityGroupMemberInstanceAddWhen {
3123 pub fn new(inner: ::httpmock::When) -> Self {
3124 Self(
3125 inner.method(::httpmock::Method::POST).path_matches(
3126 regex::Regex::new("^/v1/anti-affinity-groups/[^/]*/members/instance/[^/]*$")
3127 .unwrap(),
3128 ),
3129 )
3130 }
3131
3132 pub fn into_inner(self) -> ::httpmock::When {
3133 self.0
3134 }
3135
3136 pub fn anti_affinity_group(self, value: &types::NameOrId) -> Self {
3137 let re = regex::Regex::new(&format!(
3138 "^/v1/anti-affinity-groups/{}/members/instance/.*$",
3139 value.to_string()
3140 ))
3141 .unwrap();
3142 Self(self.0.path_matches(re))
3143 }
3144
3145 pub fn instance(self, value: &types::NameOrId) -> Self {
3146 let re = regex::Regex::new(&format!(
3147 "^/v1/anti-affinity-groups/.*/members/instance/{}$",
3148 value.to_string()
3149 ))
3150 .unwrap();
3151 Self(self.0.path_matches(re))
3152 }
3153
3154 pub fn project<'a, T>(self, value: T) -> Self
3155 where
3156 T: Into<Option<&'a types::NameOrId>>,
3157 {
3158 if let Some(value) = value.into() {
3159 Self(self.0.query_param("project", value.to_string()))
3160 } else {
3161 Self(self.0.query_param_missing("project"))
3162 }
3163 }
3164 }
3165
3166 pub struct AntiAffinityGroupMemberInstanceAddThen(::httpmock::Then);
3167 impl AntiAffinityGroupMemberInstanceAddThen {
3168 pub fn new(inner: ::httpmock::Then) -> Self {
3169 Self(inner)
3170 }
3171
3172 pub fn into_inner(self) -> ::httpmock::Then {
3173 self.0
3174 }
3175
3176 pub fn created(self, value: &types::AntiAffinityGroupMember) -> Self {
3177 Self(
3178 self.0
3179 .status(201u16)
3180 .header("content-type", "application/json")
3181 .json_body_obj(value),
3182 )
3183 }
3184
3185 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
3186 assert_eq!(status / 100u16, 4u16);
3187 Self(
3188 self.0
3189 .status(status)
3190 .header("content-type", "application/json")
3191 .json_body_obj(value),
3192 )
3193 }
3194
3195 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
3196 assert_eq!(status / 100u16, 5u16);
3197 Self(
3198 self.0
3199 .status(status)
3200 .header("content-type", "application/json")
3201 .json_body_obj(value),
3202 )
3203 }
3204 }
3205
3206 pub struct AntiAffinityGroupMemberInstanceDeleteWhen(::httpmock::When);
3207 impl AntiAffinityGroupMemberInstanceDeleteWhen {
3208 pub fn new(inner: ::httpmock::When) -> Self {
3209 Self(
3210 inner.method(::httpmock::Method::DELETE).path_matches(
3211 regex::Regex::new("^/v1/anti-affinity-groups/[^/]*/members/instance/[^/]*$")
3212 .unwrap(),
3213 ),
3214 )
3215 }
3216
3217 pub fn into_inner(self) -> ::httpmock::When {
3218 self.0
3219 }
3220
3221 pub fn anti_affinity_group(self, value: &types::NameOrId) -> Self {
3222 let re = regex::Regex::new(&format!(
3223 "^/v1/anti-affinity-groups/{}/members/instance/.*$",
3224 value.to_string()
3225 ))
3226 .unwrap();
3227 Self(self.0.path_matches(re))
3228 }
3229
3230 pub fn instance(self, value: &types::NameOrId) -> Self {
3231 let re = regex::Regex::new(&format!(
3232 "^/v1/anti-affinity-groups/.*/members/instance/{}$",
3233 value.to_string()
3234 ))
3235 .unwrap();
3236 Self(self.0.path_matches(re))
3237 }
3238
3239 pub fn project<'a, T>(self, value: T) -> Self
3240 where
3241 T: Into<Option<&'a types::NameOrId>>,
3242 {
3243 if let Some(value) = value.into() {
3244 Self(self.0.query_param("project", value.to_string()))
3245 } else {
3246 Self(self.0.query_param_missing("project"))
3247 }
3248 }
3249 }
3250
3251 pub struct AntiAffinityGroupMemberInstanceDeleteThen(::httpmock::Then);
3252 impl AntiAffinityGroupMemberInstanceDeleteThen {
3253 pub fn new(inner: ::httpmock::Then) -> Self {
3254 Self(inner)
3255 }
3256
3257 pub fn into_inner(self) -> ::httpmock::Then {
3258 self.0
3259 }
3260
3261 pub fn no_content(self) -> Self {
3262 Self(self.0.status(204u16))
3263 }
3264
3265 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
3266 assert_eq!(status / 100u16, 4u16);
3267 Self(
3268 self.0
3269 .status(status)
3270 .header("content-type", "application/json")
3271 .json_body_obj(value),
3272 )
3273 }
3274
3275 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
3276 assert_eq!(status / 100u16, 5u16);
3277 Self(
3278 self.0
3279 .status(status)
3280 .header("content-type", "application/json")
3281 .json_body_obj(value),
3282 )
3283 }
3284 }
3285
3286 pub struct AuthSettingsViewWhen(::httpmock::When);
3287 impl AuthSettingsViewWhen {
3288 pub fn new(inner: ::httpmock::When) -> Self {
3289 Self(
3290 inner
3291 .method(::httpmock::Method::GET)
3292 .path_matches(regex::Regex::new("^/v1/auth-settings$").unwrap()),
3293 )
3294 }
3295
3296 pub fn into_inner(self) -> ::httpmock::When {
3297 self.0
3298 }
3299 }
3300
3301 pub struct AuthSettingsViewThen(::httpmock::Then);
3302 impl AuthSettingsViewThen {
3303 pub fn new(inner: ::httpmock::Then) -> Self {
3304 Self(inner)
3305 }
3306
3307 pub fn into_inner(self) -> ::httpmock::Then {
3308 self.0
3309 }
3310
3311 pub fn ok(self, value: &types::SiloAuthSettings) -> Self {
3312 Self(
3313 self.0
3314 .status(200u16)
3315 .header("content-type", "application/json")
3316 .json_body_obj(value),
3317 )
3318 }
3319
3320 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
3321 assert_eq!(status / 100u16, 4u16);
3322 Self(
3323 self.0
3324 .status(status)
3325 .header("content-type", "application/json")
3326 .json_body_obj(value),
3327 )
3328 }
3329
3330 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
3331 assert_eq!(status / 100u16, 5u16);
3332 Self(
3333 self.0
3334 .status(status)
3335 .header("content-type", "application/json")
3336 .json_body_obj(value),
3337 )
3338 }
3339 }
3340
3341 pub struct AuthSettingsUpdateWhen(::httpmock::When);
3342 impl AuthSettingsUpdateWhen {
3343 pub fn new(inner: ::httpmock::When) -> Self {
3344 Self(
3345 inner
3346 .method(::httpmock::Method::PUT)
3347 .path_matches(regex::Regex::new("^/v1/auth-settings$").unwrap()),
3348 )
3349 }
3350
3351 pub fn into_inner(self) -> ::httpmock::When {
3352 self.0
3353 }
3354
3355 pub fn body(self, value: &types::SiloAuthSettingsUpdate) -> Self {
3356 Self(self.0.json_body_obj(value))
3357 }
3358 }
3359
3360 pub struct AuthSettingsUpdateThen(::httpmock::Then);
3361 impl AuthSettingsUpdateThen {
3362 pub fn new(inner: ::httpmock::Then) -> Self {
3363 Self(inner)
3364 }
3365
3366 pub fn into_inner(self) -> ::httpmock::Then {
3367 self.0
3368 }
3369
3370 pub fn ok(self, value: &types::SiloAuthSettings) -> Self {
3371 Self(
3372 self.0
3373 .status(200u16)
3374 .header("content-type", "application/json")
3375 .json_body_obj(value),
3376 )
3377 }
3378
3379 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
3380 assert_eq!(status / 100u16, 4u16);
3381 Self(
3382 self.0
3383 .status(status)
3384 .header("content-type", "application/json")
3385 .json_body_obj(value),
3386 )
3387 }
3388
3389 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
3390 assert_eq!(status / 100u16, 5u16);
3391 Self(
3392 self.0
3393 .status(status)
3394 .header("content-type", "application/json")
3395 .json_body_obj(value),
3396 )
3397 }
3398 }
3399
3400 pub struct CertificateListWhen(::httpmock::When);
3401 impl CertificateListWhen {
3402 pub fn new(inner: ::httpmock::When) -> Self {
3403 Self(
3404 inner
3405 .method(::httpmock::Method::GET)
3406 .path_matches(regex::Regex::new("^/v1/certificates$").unwrap()),
3407 )
3408 }
3409
3410 pub fn into_inner(self) -> ::httpmock::When {
3411 self.0
3412 }
3413
3414 pub fn limit<T>(self, value: T) -> Self
3415 where
3416 T: Into<Option<::std::num::NonZeroU32>>,
3417 {
3418 if let Some(value) = value.into() {
3419 Self(self.0.query_param("limit", value.to_string()))
3420 } else {
3421 Self(self.0.query_param_missing("limit"))
3422 }
3423 }
3424
3425 pub fn page_token<'a, T>(self, value: T) -> Self
3426 where
3427 T: Into<Option<&'a str>>,
3428 {
3429 if let Some(value) = value.into() {
3430 Self(self.0.query_param("page_token", value.to_string()))
3431 } else {
3432 Self(self.0.query_param_missing("page_token"))
3433 }
3434 }
3435
3436 pub fn sort_by<T>(self, value: T) -> Self
3437 where
3438 T: Into<Option<types::NameOrIdSortMode>>,
3439 {
3440 if let Some(value) = value.into() {
3441 Self(self.0.query_param("sort_by", value.to_string()))
3442 } else {
3443 Self(self.0.query_param_missing("sort_by"))
3444 }
3445 }
3446 }
3447
3448 pub struct CertificateListThen(::httpmock::Then);
3449 impl CertificateListThen {
3450 pub fn new(inner: ::httpmock::Then) -> Self {
3451 Self(inner)
3452 }
3453
3454 pub fn into_inner(self) -> ::httpmock::Then {
3455 self.0
3456 }
3457
3458 pub fn ok(self, value: &types::CertificateResultsPage) -> Self {
3459 Self(
3460 self.0
3461 .status(200u16)
3462 .header("content-type", "application/json")
3463 .json_body_obj(value),
3464 )
3465 }
3466
3467 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
3468 assert_eq!(status / 100u16, 4u16);
3469 Self(
3470 self.0
3471 .status(status)
3472 .header("content-type", "application/json")
3473 .json_body_obj(value),
3474 )
3475 }
3476
3477 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
3478 assert_eq!(status / 100u16, 5u16);
3479 Self(
3480 self.0
3481 .status(status)
3482 .header("content-type", "application/json")
3483 .json_body_obj(value),
3484 )
3485 }
3486 }
3487
3488 pub struct CertificateCreateWhen(::httpmock::When);
3489 impl CertificateCreateWhen {
3490 pub fn new(inner: ::httpmock::When) -> Self {
3491 Self(
3492 inner
3493 .method(::httpmock::Method::POST)
3494 .path_matches(regex::Regex::new("^/v1/certificates$").unwrap()),
3495 )
3496 }
3497
3498 pub fn into_inner(self) -> ::httpmock::When {
3499 self.0
3500 }
3501
3502 pub fn body(self, value: &types::CertificateCreate) -> Self {
3503 Self(self.0.json_body_obj(value))
3504 }
3505 }
3506
3507 pub struct CertificateCreateThen(::httpmock::Then);
3508 impl CertificateCreateThen {
3509 pub fn new(inner: ::httpmock::Then) -> Self {
3510 Self(inner)
3511 }
3512
3513 pub fn into_inner(self) -> ::httpmock::Then {
3514 self.0
3515 }
3516
3517 pub fn created(self, value: &types::Certificate) -> Self {
3518 Self(
3519 self.0
3520 .status(201u16)
3521 .header("content-type", "application/json")
3522 .json_body_obj(value),
3523 )
3524 }
3525
3526 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
3527 assert_eq!(status / 100u16, 4u16);
3528 Self(
3529 self.0
3530 .status(status)
3531 .header("content-type", "application/json")
3532 .json_body_obj(value),
3533 )
3534 }
3535
3536 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
3537 assert_eq!(status / 100u16, 5u16);
3538 Self(
3539 self.0
3540 .status(status)
3541 .header("content-type", "application/json")
3542 .json_body_obj(value),
3543 )
3544 }
3545 }
3546
3547 pub struct CertificateViewWhen(::httpmock::When);
3548 impl CertificateViewWhen {
3549 pub fn new(inner: ::httpmock::When) -> Self {
3550 Self(
3551 inner
3552 .method(::httpmock::Method::GET)
3553 .path_matches(regex::Regex::new("^/v1/certificates/[^/]*$").unwrap()),
3554 )
3555 }
3556
3557 pub fn into_inner(self) -> ::httpmock::When {
3558 self.0
3559 }
3560
3561 pub fn certificate(self, value: &types::NameOrId) -> Self {
3562 let re =
3563 regex::Regex::new(&format!("^/v1/certificates/{}$", value.to_string())).unwrap();
3564 Self(self.0.path_matches(re))
3565 }
3566 }
3567
3568 pub struct CertificateViewThen(::httpmock::Then);
3569 impl CertificateViewThen {
3570 pub fn new(inner: ::httpmock::Then) -> Self {
3571 Self(inner)
3572 }
3573
3574 pub fn into_inner(self) -> ::httpmock::Then {
3575 self.0
3576 }
3577
3578 pub fn ok(self, value: &types::Certificate) -> Self {
3579 Self(
3580 self.0
3581 .status(200u16)
3582 .header("content-type", "application/json")
3583 .json_body_obj(value),
3584 )
3585 }
3586
3587 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
3588 assert_eq!(status / 100u16, 4u16);
3589 Self(
3590 self.0
3591 .status(status)
3592 .header("content-type", "application/json")
3593 .json_body_obj(value),
3594 )
3595 }
3596
3597 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
3598 assert_eq!(status / 100u16, 5u16);
3599 Self(
3600 self.0
3601 .status(status)
3602 .header("content-type", "application/json")
3603 .json_body_obj(value),
3604 )
3605 }
3606 }
3607
3608 pub struct CertificateDeleteWhen(::httpmock::When);
3609 impl CertificateDeleteWhen {
3610 pub fn new(inner: ::httpmock::When) -> Self {
3611 Self(
3612 inner
3613 .method(::httpmock::Method::DELETE)
3614 .path_matches(regex::Regex::new("^/v1/certificates/[^/]*$").unwrap()),
3615 )
3616 }
3617
3618 pub fn into_inner(self) -> ::httpmock::When {
3619 self.0
3620 }
3621
3622 pub fn certificate(self, value: &types::NameOrId) -> Self {
3623 let re =
3624 regex::Regex::new(&format!("^/v1/certificates/{}$", value.to_string())).unwrap();
3625 Self(self.0.path_matches(re))
3626 }
3627 }
3628
3629 pub struct CertificateDeleteThen(::httpmock::Then);
3630 impl CertificateDeleteThen {
3631 pub fn new(inner: ::httpmock::Then) -> Self {
3632 Self(inner)
3633 }
3634
3635 pub fn into_inner(self) -> ::httpmock::Then {
3636 self.0
3637 }
3638
3639 pub fn no_content(self) -> Self {
3640 Self(self.0.status(204u16))
3641 }
3642
3643 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
3644 assert_eq!(status / 100u16, 4u16);
3645 Self(
3646 self.0
3647 .status(status)
3648 .header("content-type", "application/json")
3649 .json_body_obj(value),
3650 )
3651 }
3652
3653 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
3654 assert_eq!(status / 100u16, 5u16);
3655 Self(
3656 self.0
3657 .status(status)
3658 .header("content-type", "application/json")
3659 .json_body_obj(value),
3660 )
3661 }
3662 }
3663
3664 pub struct DiskListWhen(::httpmock::When);
3665 impl DiskListWhen {
3666 pub fn new(inner: ::httpmock::When) -> Self {
3667 Self(
3668 inner
3669 .method(::httpmock::Method::GET)
3670 .path_matches(regex::Regex::new("^/v1/disks$").unwrap()),
3671 )
3672 }
3673
3674 pub fn into_inner(self) -> ::httpmock::When {
3675 self.0
3676 }
3677
3678 pub fn limit<T>(self, value: T) -> Self
3679 where
3680 T: Into<Option<::std::num::NonZeroU32>>,
3681 {
3682 if let Some(value) = value.into() {
3683 Self(self.0.query_param("limit", value.to_string()))
3684 } else {
3685 Self(self.0.query_param_missing("limit"))
3686 }
3687 }
3688
3689 pub fn page_token<'a, T>(self, value: T) -> Self
3690 where
3691 T: Into<Option<&'a str>>,
3692 {
3693 if let Some(value) = value.into() {
3694 Self(self.0.query_param("page_token", value.to_string()))
3695 } else {
3696 Self(self.0.query_param_missing("page_token"))
3697 }
3698 }
3699
3700 pub fn project<'a, T>(self, value: T) -> Self
3701 where
3702 T: Into<Option<&'a types::NameOrId>>,
3703 {
3704 if let Some(value) = value.into() {
3705 Self(self.0.query_param("project", value.to_string()))
3706 } else {
3707 Self(self.0.query_param_missing("project"))
3708 }
3709 }
3710
3711 pub fn sort_by<T>(self, value: T) -> Self
3712 where
3713 T: Into<Option<types::NameOrIdSortMode>>,
3714 {
3715 if let Some(value) = value.into() {
3716 Self(self.0.query_param("sort_by", value.to_string()))
3717 } else {
3718 Self(self.0.query_param_missing("sort_by"))
3719 }
3720 }
3721 }
3722
3723 pub struct DiskListThen(::httpmock::Then);
3724 impl DiskListThen {
3725 pub fn new(inner: ::httpmock::Then) -> Self {
3726 Self(inner)
3727 }
3728
3729 pub fn into_inner(self) -> ::httpmock::Then {
3730 self.0
3731 }
3732
3733 pub fn ok(self, value: &types::DiskResultsPage) -> Self {
3734 Self(
3735 self.0
3736 .status(200u16)
3737 .header("content-type", "application/json")
3738 .json_body_obj(value),
3739 )
3740 }
3741
3742 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
3743 assert_eq!(status / 100u16, 4u16);
3744 Self(
3745 self.0
3746 .status(status)
3747 .header("content-type", "application/json")
3748 .json_body_obj(value),
3749 )
3750 }
3751
3752 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
3753 assert_eq!(status / 100u16, 5u16);
3754 Self(
3755 self.0
3756 .status(status)
3757 .header("content-type", "application/json")
3758 .json_body_obj(value),
3759 )
3760 }
3761 }
3762
3763 pub struct DiskCreateWhen(::httpmock::When);
3764 impl DiskCreateWhen {
3765 pub fn new(inner: ::httpmock::When) -> Self {
3766 Self(
3767 inner
3768 .method(::httpmock::Method::POST)
3769 .path_matches(regex::Regex::new("^/v1/disks$").unwrap()),
3770 )
3771 }
3772
3773 pub fn into_inner(self) -> ::httpmock::When {
3774 self.0
3775 }
3776
3777 pub fn project(self, value: &types::NameOrId) -> Self {
3778 Self(self.0.query_param("project", value.to_string()))
3779 }
3780
3781 pub fn body(self, value: &types::DiskCreate) -> Self {
3782 Self(self.0.json_body_obj(value))
3783 }
3784 }
3785
3786 pub struct DiskCreateThen(::httpmock::Then);
3787 impl DiskCreateThen {
3788 pub fn new(inner: ::httpmock::Then) -> Self {
3789 Self(inner)
3790 }
3791
3792 pub fn into_inner(self) -> ::httpmock::Then {
3793 self.0
3794 }
3795
3796 pub fn created(self, value: &types::Disk) -> Self {
3797 Self(
3798 self.0
3799 .status(201u16)
3800 .header("content-type", "application/json")
3801 .json_body_obj(value),
3802 )
3803 }
3804
3805 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
3806 assert_eq!(status / 100u16, 4u16);
3807 Self(
3808 self.0
3809 .status(status)
3810 .header("content-type", "application/json")
3811 .json_body_obj(value),
3812 )
3813 }
3814
3815 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
3816 assert_eq!(status / 100u16, 5u16);
3817 Self(
3818 self.0
3819 .status(status)
3820 .header("content-type", "application/json")
3821 .json_body_obj(value),
3822 )
3823 }
3824 }
3825
3826 pub struct DiskViewWhen(::httpmock::When);
3827 impl DiskViewWhen {
3828 pub fn new(inner: ::httpmock::When) -> Self {
3829 Self(
3830 inner
3831 .method(::httpmock::Method::GET)
3832 .path_matches(regex::Regex::new("^/v1/disks/[^/]*$").unwrap()),
3833 )
3834 }
3835
3836 pub fn into_inner(self) -> ::httpmock::When {
3837 self.0
3838 }
3839
3840 pub fn disk(self, value: &types::NameOrId) -> Self {
3841 let re = regex::Regex::new(&format!("^/v1/disks/{}$", value.to_string())).unwrap();
3842 Self(self.0.path_matches(re))
3843 }
3844
3845 pub fn project<'a, T>(self, value: T) -> Self
3846 where
3847 T: Into<Option<&'a types::NameOrId>>,
3848 {
3849 if let Some(value) = value.into() {
3850 Self(self.0.query_param("project", value.to_string()))
3851 } else {
3852 Self(self.0.query_param_missing("project"))
3853 }
3854 }
3855 }
3856
3857 pub struct DiskViewThen(::httpmock::Then);
3858 impl DiskViewThen {
3859 pub fn new(inner: ::httpmock::Then) -> Self {
3860 Self(inner)
3861 }
3862
3863 pub fn into_inner(self) -> ::httpmock::Then {
3864 self.0
3865 }
3866
3867 pub fn ok(self, value: &types::Disk) -> Self {
3868 Self(
3869 self.0
3870 .status(200u16)
3871 .header("content-type", "application/json")
3872 .json_body_obj(value),
3873 )
3874 }
3875
3876 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
3877 assert_eq!(status / 100u16, 4u16);
3878 Self(
3879 self.0
3880 .status(status)
3881 .header("content-type", "application/json")
3882 .json_body_obj(value),
3883 )
3884 }
3885
3886 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
3887 assert_eq!(status / 100u16, 5u16);
3888 Self(
3889 self.0
3890 .status(status)
3891 .header("content-type", "application/json")
3892 .json_body_obj(value),
3893 )
3894 }
3895 }
3896
3897 pub struct DiskDeleteWhen(::httpmock::When);
3898 impl DiskDeleteWhen {
3899 pub fn new(inner: ::httpmock::When) -> Self {
3900 Self(
3901 inner
3902 .method(::httpmock::Method::DELETE)
3903 .path_matches(regex::Regex::new("^/v1/disks/[^/]*$").unwrap()),
3904 )
3905 }
3906
3907 pub fn into_inner(self) -> ::httpmock::When {
3908 self.0
3909 }
3910
3911 pub fn disk(self, value: &types::NameOrId) -> Self {
3912 let re = regex::Regex::new(&format!("^/v1/disks/{}$", value.to_string())).unwrap();
3913 Self(self.0.path_matches(re))
3914 }
3915
3916 pub fn project<'a, T>(self, value: T) -> Self
3917 where
3918 T: Into<Option<&'a types::NameOrId>>,
3919 {
3920 if let Some(value) = value.into() {
3921 Self(self.0.query_param("project", value.to_string()))
3922 } else {
3923 Self(self.0.query_param_missing("project"))
3924 }
3925 }
3926 }
3927
3928 pub struct DiskDeleteThen(::httpmock::Then);
3929 impl DiskDeleteThen {
3930 pub fn new(inner: ::httpmock::Then) -> Self {
3931 Self(inner)
3932 }
3933
3934 pub fn into_inner(self) -> ::httpmock::Then {
3935 self.0
3936 }
3937
3938 pub fn no_content(self) -> Self {
3939 Self(self.0.status(204u16))
3940 }
3941
3942 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
3943 assert_eq!(status / 100u16, 4u16);
3944 Self(
3945 self.0
3946 .status(status)
3947 .header("content-type", "application/json")
3948 .json_body_obj(value),
3949 )
3950 }
3951
3952 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
3953 assert_eq!(status / 100u16, 5u16);
3954 Self(
3955 self.0
3956 .status(status)
3957 .header("content-type", "application/json")
3958 .json_body_obj(value),
3959 )
3960 }
3961 }
3962
3963 pub struct DiskBulkWriteImportWhen(::httpmock::When);
3964 impl DiskBulkWriteImportWhen {
3965 pub fn new(inner: ::httpmock::When) -> Self {
3966 Self(
3967 inner
3968 .method(::httpmock::Method::POST)
3969 .path_matches(regex::Regex::new("^/v1/disks/[^/]*/bulk-write$").unwrap()),
3970 )
3971 }
3972
3973 pub fn into_inner(self) -> ::httpmock::When {
3974 self.0
3975 }
3976
3977 pub fn disk(self, value: &types::NameOrId) -> Self {
3978 let re = regex::Regex::new(&format!("^/v1/disks/{}/bulk-write$", value.to_string()))
3979 .unwrap();
3980 Self(self.0.path_matches(re))
3981 }
3982
3983 pub fn project<'a, T>(self, value: T) -> Self
3984 where
3985 T: Into<Option<&'a types::NameOrId>>,
3986 {
3987 if let Some(value) = value.into() {
3988 Self(self.0.query_param("project", value.to_string()))
3989 } else {
3990 Self(self.0.query_param_missing("project"))
3991 }
3992 }
3993
3994 pub fn body(self, value: &types::ImportBlocksBulkWrite) -> Self {
3995 Self(self.0.json_body_obj(value))
3996 }
3997 }
3998
3999 pub struct DiskBulkWriteImportThen(::httpmock::Then);
4000 impl DiskBulkWriteImportThen {
4001 pub fn new(inner: ::httpmock::Then) -> Self {
4002 Self(inner)
4003 }
4004
4005 pub fn into_inner(self) -> ::httpmock::Then {
4006 self.0
4007 }
4008
4009 pub fn no_content(self) -> Self {
4010 Self(self.0.status(204u16))
4011 }
4012
4013 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
4014 assert_eq!(status / 100u16, 4u16);
4015 Self(
4016 self.0
4017 .status(status)
4018 .header("content-type", "application/json")
4019 .json_body_obj(value),
4020 )
4021 }
4022
4023 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
4024 assert_eq!(status / 100u16, 5u16);
4025 Self(
4026 self.0
4027 .status(status)
4028 .header("content-type", "application/json")
4029 .json_body_obj(value),
4030 )
4031 }
4032 }
4033
4034 pub struct DiskBulkWriteImportStartWhen(::httpmock::When);
4035 impl DiskBulkWriteImportStartWhen {
4036 pub fn new(inner: ::httpmock::When) -> Self {
4037 Self(
4038 inner
4039 .method(::httpmock::Method::POST)
4040 .path_matches(regex::Regex::new("^/v1/disks/[^/]*/bulk-write-start$").unwrap()),
4041 )
4042 }
4043
4044 pub fn into_inner(self) -> ::httpmock::When {
4045 self.0
4046 }
4047
4048 pub fn disk(self, value: &types::NameOrId) -> Self {
4049 let re = regex::Regex::new(&format!(
4050 "^/v1/disks/{}/bulk-write-start$",
4051 value.to_string()
4052 ))
4053 .unwrap();
4054 Self(self.0.path_matches(re))
4055 }
4056
4057 pub fn project<'a, T>(self, value: T) -> Self
4058 where
4059 T: Into<Option<&'a types::NameOrId>>,
4060 {
4061 if let Some(value) = value.into() {
4062 Self(self.0.query_param("project", value.to_string()))
4063 } else {
4064 Self(self.0.query_param_missing("project"))
4065 }
4066 }
4067 }
4068
4069 pub struct DiskBulkWriteImportStartThen(::httpmock::Then);
4070 impl DiskBulkWriteImportStartThen {
4071 pub fn new(inner: ::httpmock::Then) -> Self {
4072 Self(inner)
4073 }
4074
4075 pub fn into_inner(self) -> ::httpmock::Then {
4076 self.0
4077 }
4078
4079 pub fn no_content(self) -> Self {
4080 Self(self.0.status(204u16))
4081 }
4082
4083 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
4084 assert_eq!(status / 100u16, 4u16);
4085 Self(
4086 self.0
4087 .status(status)
4088 .header("content-type", "application/json")
4089 .json_body_obj(value),
4090 )
4091 }
4092
4093 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
4094 assert_eq!(status / 100u16, 5u16);
4095 Self(
4096 self.0
4097 .status(status)
4098 .header("content-type", "application/json")
4099 .json_body_obj(value),
4100 )
4101 }
4102 }
4103
4104 pub struct DiskBulkWriteImportStopWhen(::httpmock::When);
4105 impl DiskBulkWriteImportStopWhen {
4106 pub fn new(inner: ::httpmock::When) -> Self {
4107 Self(
4108 inner
4109 .method(::httpmock::Method::POST)
4110 .path_matches(regex::Regex::new("^/v1/disks/[^/]*/bulk-write-stop$").unwrap()),
4111 )
4112 }
4113
4114 pub fn into_inner(self) -> ::httpmock::When {
4115 self.0
4116 }
4117
4118 pub fn disk(self, value: &types::NameOrId) -> Self {
4119 let re = regex::Regex::new(&format!(
4120 "^/v1/disks/{}/bulk-write-stop$",
4121 value.to_string()
4122 ))
4123 .unwrap();
4124 Self(self.0.path_matches(re))
4125 }
4126
4127 pub fn project<'a, T>(self, value: T) -> Self
4128 where
4129 T: Into<Option<&'a types::NameOrId>>,
4130 {
4131 if let Some(value) = value.into() {
4132 Self(self.0.query_param("project", value.to_string()))
4133 } else {
4134 Self(self.0.query_param_missing("project"))
4135 }
4136 }
4137 }
4138
4139 pub struct DiskBulkWriteImportStopThen(::httpmock::Then);
4140 impl DiskBulkWriteImportStopThen {
4141 pub fn new(inner: ::httpmock::Then) -> Self {
4142 Self(inner)
4143 }
4144
4145 pub fn into_inner(self) -> ::httpmock::Then {
4146 self.0
4147 }
4148
4149 pub fn no_content(self) -> Self {
4150 Self(self.0.status(204u16))
4151 }
4152
4153 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
4154 assert_eq!(status / 100u16, 4u16);
4155 Self(
4156 self.0
4157 .status(status)
4158 .header("content-type", "application/json")
4159 .json_body_obj(value),
4160 )
4161 }
4162
4163 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
4164 assert_eq!(status / 100u16, 5u16);
4165 Self(
4166 self.0
4167 .status(status)
4168 .header("content-type", "application/json")
4169 .json_body_obj(value),
4170 )
4171 }
4172 }
4173
4174 pub struct DiskFinalizeImportWhen(::httpmock::When);
4175 impl DiskFinalizeImportWhen {
4176 pub fn new(inner: ::httpmock::When) -> Self {
4177 Self(
4178 inner
4179 .method(::httpmock::Method::POST)
4180 .path_matches(regex::Regex::new("^/v1/disks/[^/]*/finalize$").unwrap()),
4181 )
4182 }
4183
4184 pub fn into_inner(self) -> ::httpmock::When {
4185 self.0
4186 }
4187
4188 pub fn disk(self, value: &types::NameOrId) -> Self {
4189 let re =
4190 regex::Regex::new(&format!("^/v1/disks/{}/finalize$", value.to_string())).unwrap();
4191 Self(self.0.path_matches(re))
4192 }
4193
4194 pub fn project<'a, T>(self, value: T) -> Self
4195 where
4196 T: Into<Option<&'a types::NameOrId>>,
4197 {
4198 if let Some(value) = value.into() {
4199 Self(self.0.query_param("project", value.to_string()))
4200 } else {
4201 Self(self.0.query_param_missing("project"))
4202 }
4203 }
4204
4205 pub fn body(self, value: &types::FinalizeDisk) -> Self {
4206 Self(self.0.json_body_obj(value))
4207 }
4208 }
4209
4210 pub struct DiskFinalizeImportThen(::httpmock::Then);
4211 impl DiskFinalizeImportThen {
4212 pub fn new(inner: ::httpmock::Then) -> Self {
4213 Self(inner)
4214 }
4215
4216 pub fn into_inner(self) -> ::httpmock::Then {
4217 self.0
4218 }
4219
4220 pub fn no_content(self) -> Self {
4221 Self(self.0.status(204u16))
4222 }
4223
4224 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
4225 assert_eq!(status / 100u16, 4u16);
4226 Self(
4227 self.0
4228 .status(status)
4229 .header("content-type", "application/json")
4230 .json_body_obj(value),
4231 )
4232 }
4233
4234 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
4235 assert_eq!(status / 100u16, 5u16);
4236 Self(
4237 self.0
4238 .status(status)
4239 .header("content-type", "application/json")
4240 .json_body_obj(value),
4241 )
4242 }
4243 }
4244
4245 pub struct ExternalSubnetListWhen(::httpmock::When);
4246 impl ExternalSubnetListWhen {
4247 pub fn new(inner: ::httpmock::When) -> Self {
4248 Self(
4249 inner
4250 .method(::httpmock::Method::GET)
4251 .path_matches(regex::Regex::new("^/v1/external-subnets$").unwrap()),
4252 )
4253 }
4254
4255 pub fn into_inner(self) -> ::httpmock::When {
4256 self.0
4257 }
4258
4259 pub fn limit<T>(self, value: T) -> Self
4260 where
4261 T: Into<Option<::std::num::NonZeroU32>>,
4262 {
4263 if let Some(value) = value.into() {
4264 Self(self.0.query_param("limit", value.to_string()))
4265 } else {
4266 Self(self.0.query_param_missing("limit"))
4267 }
4268 }
4269
4270 pub fn page_token<'a, T>(self, value: T) -> Self
4271 where
4272 T: Into<Option<&'a str>>,
4273 {
4274 if let Some(value) = value.into() {
4275 Self(self.0.query_param("page_token", value.to_string()))
4276 } else {
4277 Self(self.0.query_param_missing("page_token"))
4278 }
4279 }
4280
4281 pub fn project<'a, T>(self, value: T) -> Self
4282 where
4283 T: Into<Option<&'a types::NameOrId>>,
4284 {
4285 if let Some(value) = value.into() {
4286 Self(self.0.query_param("project", value.to_string()))
4287 } else {
4288 Self(self.0.query_param_missing("project"))
4289 }
4290 }
4291
4292 pub fn sort_by<T>(self, value: T) -> Self
4293 where
4294 T: Into<Option<types::NameOrIdSortMode>>,
4295 {
4296 if let Some(value) = value.into() {
4297 Self(self.0.query_param("sort_by", value.to_string()))
4298 } else {
4299 Self(self.0.query_param_missing("sort_by"))
4300 }
4301 }
4302 }
4303
4304 pub struct ExternalSubnetListThen(::httpmock::Then);
4305 impl ExternalSubnetListThen {
4306 pub fn new(inner: ::httpmock::Then) -> Self {
4307 Self(inner)
4308 }
4309
4310 pub fn into_inner(self) -> ::httpmock::Then {
4311 self.0
4312 }
4313
4314 pub fn ok(self, value: &types::ExternalSubnetResultsPage) -> Self {
4315 Self(
4316 self.0
4317 .status(200u16)
4318 .header("content-type", "application/json")
4319 .json_body_obj(value),
4320 )
4321 }
4322
4323 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
4324 assert_eq!(status / 100u16, 4u16);
4325 Self(
4326 self.0
4327 .status(status)
4328 .header("content-type", "application/json")
4329 .json_body_obj(value),
4330 )
4331 }
4332
4333 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
4334 assert_eq!(status / 100u16, 5u16);
4335 Self(
4336 self.0
4337 .status(status)
4338 .header("content-type", "application/json")
4339 .json_body_obj(value),
4340 )
4341 }
4342 }
4343
4344 pub struct ExternalSubnetCreateWhen(::httpmock::When);
4345 impl ExternalSubnetCreateWhen {
4346 pub fn new(inner: ::httpmock::When) -> Self {
4347 Self(
4348 inner
4349 .method(::httpmock::Method::POST)
4350 .path_matches(regex::Regex::new("^/v1/external-subnets$").unwrap()),
4351 )
4352 }
4353
4354 pub fn into_inner(self) -> ::httpmock::When {
4355 self.0
4356 }
4357
4358 pub fn project(self, value: &types::NameOrId) -> Self {
4359 Self(self.0.query_param("project", value.to_string()))
4360 }
4361
4362 pub fn body(self, value: &types::ExternalSubnetCreate) -> Self {
4363 Self(self.0.json_body_obj(value))
4364 }
4365 }
4366
4367 pub struct ExternalSubnetCreateThen(::httpmock::Then);
4368 impl ExternalSubnetCreateThen {
4369 pub fn new(inner: ::httpmock::Then) -> Self {
4370 Self(inner)
4371 }
4372
4373 pub fn into_inner(self) -> ::httpmock::Then {
4374 self.0
4375 }
4376
4377 pub fn created(self, value: &types::ExternalSubnet) -> Self {
4378 Self(
4379 self.0
4380 .status(201u16)
4381 .header("content-type", "application/json")
4382 .json_body_obj(value),
4383 )
4384 }
4385
4386 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
4387 assert_eq!(status / 100u16, 4u16);
4388 Self(
4389 self.0
4390 .status(status)
4391 .header("content-type", "application/json")
4392 .json_body_obj(value),
4393 )
4394 }
4395
4396 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
4397 assert_eq!(status / 100u16, 5u16);
4398 Self(
4399 self.0
4400 .status(status)
4401 .header("content-type", "application/json")
4402 .json_body_obj(value),
4403 )
4404 }
4405 }
4406
4407 pub struct ExternalSubnetViewWhen(::httpmock::When);
4408 impl ExternalSubnetViewWhen {
4409 pub fn new(inner: ::httpmock::When) -> Self {
4410 Self(
4411 inner
4412 .method(::httpmock::Method::GET)
4413 .path_matches(regex::Regex::new("^/v1/external-subnets/[^/]*$").unwrap()),
4414 )
4415 }
4416
4417 pub fn into_inner(self) -> ::httpmock::When {
4418 self.0
4419 }
4420
4421 pub fn external_subnet(self, value: &types::NameOrId) -> Self {
4422 let re = regex::Regex::new(&format!("^/v1/external-subnets/{}$", value.to_string()))
4423 .unwrap();
4424 Self(self.0.path_matches(re))
4425 }
4426
4427 pub fn project<'a, T>(self, value: T) -> Self
4428 where
4429 T: Into<Option<&'a types::NameOrId>>,
4430 {
4431 if let Some(value) = value.into() {
4432 Self(self.0.query_param("project", value.to_string()))
4433 } else {
4434 Self(self.0.query_param_missing("project"))
4435 }
4436 }
4437 }
4438
4439 pub struct ExternalSubnetViewThen(::httpmock::Then);
4440 impl ExternalSubnetViewThen {
4441 pub fn new(inner: ::httpmock::Then) -> Self {
4442 Self(inner)
4443 }
4444
4445 pub fn into_inner(self) -> ::httpmock::Then {
4446 self.0
4447 }
4448
4449 pub fn ok(self, value: &types::ExternalSubnet) -> Self {
4450 Self(
4451 self.0
4452 .status(200u16)
4453 .header("content-type", "application/json")
4454 .json_body_obj(value),
4455 )
4456 }
4457
4458 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
4459 assert_eq!(status / 100u16, 4u16);
4460 Self(
4461 self.0
4462 .status(status)
4463 .header("content-type", "application/json")
4464 .json_body_obj(value),
4465 )
4466 }
4467
4468 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
4469 assert_eq!(status / 100u16, 5u16);
4470 Self(
4471 self.0
4472 .status(status)
4473 .header("content-type", "application/json")
4474 .json_body_obj(value),
4475 )
4476 }
4477 }
4478
4479 pub struct ExternalSubnetUpdateWhen(::httpmock::When);
4480 impl ExternalSubnetUpdateWhen {
4481 pub fn new(inner: ::httpmock::When) -> Self {
4482 Self(
4483 inner
4484 .method(::httpmock::Method::PUT)
4485 .path_matches(regex::Regex::new("^/v1/external-subnets/[^/]*$").unwrap()),
4486 )
4487 }
4488
4489 pub fn into_inner(self) -> ::httpmock::When {
4490 self.0
4491 }
4492
4493 pub fn external_subnet(self, value: &types::NameOrId) -> Self {
4494 let re = regex::Regex::new(&format!("^/v1/external-subnets/{}$", value.to_string()))
4495 .unwrap();
4496 Self(self.0.path_matches(re))
4497 }
4498
4499 pub fn project<'a, T>(self, value: T) -> Self
4500 where
4501 T: Into<Option<&'a types::NameOrId>>,
4502 {
4503 if let Some(value) = value.into() {
4504 Self(self.0.query_param("project", value.to_string()))
4505 } else {
4506 Self(self.0.query_param_missing("project"))
4507 }
4508 }
4509
4510 pub fn body(self, value: &types::ExternalSubnetUpdate) -> Self {
4511 Self(self.0.json_body_obj(value))
4512 }
4513 }
4514
4515 pub struct ExternalSubnetUpdateThen(::httpmock::Then);
4516 impl ExternalSubnetUpdateThen {
4517 pub fn new(inner: ::httpmock::Then) -> Self {
4518 Self(inner)
4519 }
4520
4521 pub fn into_inner(self) -> ::httpmock::Then {
4522 self.0
4523 }
4524
4525 pub fn ok(self, value: &types::ExternalSubnet) -> Self {
4526 Self(
4527 self.0
4528 .status(200u16)
4529 .header("content-type", "application/json")
4530 .json_body_obj(value),
4531 )
4532 }
4533
4534 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
4535 assert_eq!(status / 100u16, 4u16);
4536 Self(
4537 self.0
4538 .status(status)
4539 .header("content-type", "application/json")
4540 .json_body_obj(value),
4541 )
4542 }
4543
4544 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
4545 assert_eq!(status / 100u16, 5u16);
4546 Self(
4547 self.0
4548 .status(status)
4549 .header("content-type", "application/json")
4550 .json_body_obj(value),
4551 )
4552 }
4553 }
4554
4555 pub struct ExternalSubnetDeleteWhen(::httpmock::When);
4556 impl ExternalSubnetDeleteWhen {
4557 pub fn new(inner: ::httpmock::When) -> Self {
4558 Self(
4559 inner
4560 .method(::httpmock::Method::DELETE)
4561 .path_matches(regex::Regex::new("^/v1/external-subnets/[^/]*$").unwrap()),
4562 )
4563 }
4564
4565 pub fn into_inner(self) -> ::httpmock::When {
4566 self.0
4567 }
4568
4569 pub fn external_subnet(self, value: &types::NameOrId) -> Self {
4570 let re = regex::Regex::new(&format!("^/v1/external-subnets/{}$", value.to_string()))
4571 .unwrap();
4572 Self(self.0.path_matches(re))
4573 }
4574
4575 pub fn project<'a, T>(self, value: T) -> Self
4576 where
4577 T: Into<Option<&'a types::NameOrId>>,
4578 {
4579 if let Some(value) = value.into() {
4580 Self(self.0.query_param("project", value.to_string()))
4581 } else {
4582 Self(self.0.query_param_missing("project"))
4583 }
4584 }
4585 }
4586
4587 pub struct ExternalSubnetDeleteThen(::httpmock::Then);
4588 impl ExternalSubnetDeleteThen {
4589 pub fn new(inner: ::httpmock::Then) -> Self {
4590 Self(inner)
4591 }
4592
4593 pub fn into_inner(self) -> ::httpmock::Then {
4594 self.0
4595 }
4596
4597 pub fn no_content(self) -> Self {
4598 Self(self.0.status(204u16))
4599 }
4600
4601 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
4602 assert_eq!(status / 100u16, 4u16);
4603 Self(
4604 self.0
4605 .status(status)
4606 .header("content-type", "application/json")
4607 .json_body_obj(value),
4608 )
4609 }
4610
4611 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
4612 assert_eq!(status / 100u16, 5u16);
4613 Self(
4614 self.0
4615 .status(status)
4616 .header("content-type", "application/json")
4617 .json_body_obj(value),
4618 )
4619 }
4620 }
4621
4622 pub struct ExternalSubnetAttachWhen(::httpmock::When);
4623 impl ExternalSubnetAttachWhen {
4624 pub fn new(inner: ::httpmock::When) -> Self {
4625 Self(
4626 inner.method(::httpmock::Method::POST).path_matches(
4627 regex::Regex::new("^/v1/external-subnets/[^/]*/attach$").unwrap(),
4628 ),
4629 )
4630 }
4631
4632 pub fn into_inner(self) -> ::httpmock::When {
4633 self.0
4634 }
4635
4636 pub fn external_subnet(self, value: &types::NameOrId) -> Self {
4637 let re = regex::Regex::new(&format!(
4638 "^/v1/external-subnets/{}/attach$",
4639 value.to_string()
4640 ))
4641 .unwrap();
4642 Self(self.0.path_matches(re))
4643 }
4644
4645 pub fn project<'a, T>(self, value: T) -> Self
4646 where
4647 T: Into<Option<&'a types::NameOrId>>,
4648 {
4649 if let Some(value) = value.into() {
4650 Self(self.0.query_param("project", value.to_string()))
4651 } else {
4652 Self(self.0.query_param_missing("project"))
4653 }
4654 }
4655
4656 pub fn body(self, value: &types::ExternalSubnetAttach) -> Self {
4657 Self(self.0.json_body_obj(value))
4658 }
4659 }
4660
4661 pub struct ExternalSubnetAttachThen(::httpmock::Then);
4662 impl ExternalSubnetAttachThen {
4663 pub fn new(inner: ::httpmock::Then) -> Self {
4664 Self(inner)
4665 }
4666
4667 pub fn into_inner(self) -> ::httpmock::Then {
4668 self.0
4669 }
4670
4671 pub fn accepted(self, value: &types::ExternalSubnet) -> Self {
4672 Self(
4673 self.0
4674 .status(202u16)
4675 .header("content-type", "application/json")
4676 .json_body_obj(value),
4677 )
4678 }
4679
4680 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
4681 assert_eq!(status / 100u16, 4u16);
4682 Self(
4683 self.0
4684 .status(status)
4685 .header("content-type", "application/json")
4686 .json_body_obj(value),
4687 )
4688 }
4689
4690 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
4691 assert_eq!(status / 100u16, 5u16);
4692 Self(
4693 self.0
4694 .status(status)
4695 .header("content-type", "application/json")
4696 .json_body_obj(value),
4697 )
4698 }
4699 }
4700
4701 pub struct ExternalSubnetDetachWhen(::httpmock::When);
4702 impl ExternalSubnetDetachWhen {
4703 pub fn new(inner: ::httpmock::When) -> Self {
4704 Self(
4705 inner.method(::httpmock::Method::POST).path_matches(
4706 regex::Regex::new("^/v1/external-subnets/[^/]*/detach$").unwrap(),
4707 ),
4708 )
4709 }
4710
4711 pub fn into_inner(self) -> ::httpmock::When {
4712 self.0
4713 }
4714
4715 pub fn external_subnet(self, value: &types::NameOrId) -> Self {
4716 let re = regex::Regex::new(&format!(
4717 "^/v1/external-subnets/{}/detach$",
4718 value.to_string()
4719 ))
4720 .unwrap();
4721 Self(self.0.path_matches(re))
4722 }
4723
4724 pub fn project<'a, T>(self, value: T) -> Self
4725 where
4726 T: Into<Option<&'a types::NameOrId>>,
4727 {
4728 if let Some(value) = value.into() {
4729 Self(self.0.query_param("project", value.to_string()))
4730 } else {
4731 Self(self.0.query_param_missing("project"))
4732 }
4733 }
4734 }
4735
4736 pub struct ExternalSubnetDetachThen(::httpmock::Then);
4737 impl ExternalSubnetDetachThen {
4738 pub fn new(inner: ::httpmock::Then) -> Self {
4739 Self(inner)
4740 }
4741
4742 pub fn into_inner(self) -> ::httpmock::Then {
4743 self.0
4744 }
4745
4746 pub fn accepted(self, value: &types::ExternalSubnet) -> Self {
4747 Self(
4748 self.0
4749 .status(202u16)
4750 .header("content-type", "application/json")
4751 .json_body_obj(value),
4752 )
4753 }
4754
4755 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
4756 assert_eq!(status / 100u16, 4u16);
4757 Self(
4758 self.0
4759 .status(status)
4760 .header("content-type", "application/json")
4761 .json_body_obj(value),
4762 )
4763 }
4764
4765 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
4766 assert_eq!(status / 100u16, 5u16);
4767 Self(
4768 self.0
4769 .status(status)
4770 .header("content-type", "application/json")
4771 .json_body_obj(value),
4772 )
4773 }
4774 }
4775
4776 pub struct FloatingIpListWhen(::httpmock::When);
4777 impl FloatingIpListWhen {
4778 pub fn new(inner: ::httpmock::When) -> Self {
4779 Self(
4780 inner
4781 .method(::httpmock::Method::GET)
4782 .path_matches(regex::Regex::new("^/v1/floating-ips$").unwrap()),
4783 )
4784 }
4785
4786 pub fn into_inner(self) -> ::httpmock::When {
4787 self.0
4788 }
4789
4790 pub fn limit<T>(self, value: T) -> Self
4791 where
4792 T: Into<Option<::std::num::NonZeroU32>>,
4793 {
4794 if let Some(value) = value.into() {
4795 Self(self.0.query_param("limit", value.to_string()))
4796 } else {
4797 Self(self.0.query_param_missing("limit"))
4798 }
4799 }
4800
4801 pub fn page_token<'a, T>(self, value: T) -> Self
4802 where
4803 T: Into<Option<&'a str>>,
4804 {
4805 if let Some(value) = value.into() {
4806 Self(self.0.query_param("page_token", value.to_string()))
4807 } else {
4808 Self(self.0.query_param_missing("page_token"))
4809 }
4810 }
4811
4812 pub fn project<'a, T>(self, value: T) -> Self
4813 where
4814 T: Into<Option<&'a types::NameOrId>>,
4815 {
4816 if let Some(value) = value.into() {
4817 Self(self.0.query_param("project", value.to_string()))
4818 } else {
4819 Self(self.0.query_param_missing("project"))
4820 }
4821 }
4822
4823 pub fn sort_by<T>(self, value: T) -> Self
4824 where
4825 T: Into<Option<types::NameOrIdSortMode>>,
4826 {
4827 if let Some(value) = value.into() {
4828 Self(self.0.query_param("sort_by", value.to_string()))
4829 } else {
4830 Self(self.0.query_param_missing("sort_by"))
4831 }
4832 }
4833 }
4834
4835 pub struct FloatingIpListThen(::httpmock::Then);
4836 impl FloatingIpListThen {
4837 pub fn new(inner: ::httpmock::Then) -> Self {
4838 Self(inner)
4839 }
4840
4841 pub fn into_inner(self) -> ::httpmock::Then {
4842 self.0
4843 }
4844
4845 pub fn ok(self, value: &types::FloatingIpResultsPage) -> Self {
4846 Self(
4847 self.0
4848 .status(200u16)
4849 .header("content-type", "application/json")
4850 .json_body_obj(value),
4851 )
4852 }
4853
4854 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
4855 assert_eq!(status / 100u16, 4u16);
4856 Self(
4857 self.0
4858 .status(status)
4859 .header("content-type", "application/json")
4860 .json_body_obj(value),
4861 )
4862 }
4863
4864 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
4865 assert_eq!(status / 100u16, 5u16);
4866 Self(
4867 self.0
4868 .status(status)
4869 .header("content-type", "application/json")
4870 .json_body_obj(value),
4871 )
4872 }
4873 }
4874
4875 pub struct FloatingIpCreateWhen(::httpmock::When);
4876 impl FloatingIpCreateWhen {
4877 pub fn new(inner: ::httpmock::When) -> Self {
4878 Self(
4879 inner
4880 .method(::httpmock::Method::POST)
4881 .path_matches(regex::Regex::new("^/v1/floating-ips$").unwrap()),
4882 )
4883 }
4884
4885 pub fn into_inner(self) -> ::httpmock::When {
4886 self.0
4887 }
4888
4889 pub fn project(self, value: &types::NameOrId) -> Self {
4890 Self(self.0.query_param("project", value.to_string()))
4891 }
4892
4893 pub fn body(self, value: &types::FloatingIpCreate) -> Self {
4894 Self(self.0.json_body_obj(value))
4895 }
4896 }
4897
4898 pub struct FloatingIpCreateThen(::httpmock::Then);
4899 impl FloatingIpCreateThen {
4900 pub fn new(inner: ::httpmock::Then) -> Self {
4901 Self(inner)
4902 }
4903
4904 pub fn into_inner(self) -> ::httpmock::Then {
4905 self.0
4906 }
4907
4908 pub fn created(self, value: &types::FloatingIp) -> Self {
4909 Self(
4910 self.0
4911 .status(201u16)
4912 .header("content-type", "application/json")
4913 .json_body_obj(value),
4914 )
4915 }
4916
4917 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
4918 assert_eq!(status / 100u16, 4u16);
4919 Self(
4920 self.0
4921 .status(status)
4922 .header("content-type", "application/json")
4923 .json_body_obj(value),
4924 )
4925 }
4926
4927 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
4928 assert_eq!(status / 100u16, 5u16);
4929 Self(
4930 self.0
4931 .status(status)
4932 .header("content-type", "application/json")
4933 .json_body_obj(value),
4934 )
4935 }
4936 }
4937
4938 pub struct FloatingIpViewWhen(::httpmock::When);
4939 impl FloatingIpViewWhen {
4940 pub fn new(inner: ::httpmock::When) -> Self {
4941 Self(
4942 inner
4943 .method(::httpmock::Method::GET)
4944 .path_matches(regex::Regex::new("^/v1/floating-ips/[^/]*$").unwrap()),
4945 )
4946 }
4947
4948 pub fn into_inner(self) -> ::httpmock::When {
4949 self.0
4950 }
4951
4952 pub fn floating_ip(self, value: &types::NameOrId) -> Self {
4953 let re =
4954 regex::Regex::new(&format!("^/v1/floating-ips/{}$", value.to_string())).unwrap();
4955 Self(self.0.path_matches(re))
4956 }
4957
4958 pub fn project<'a, T>(self, value: T) -> Self
4959 where
4960 T: Into<Option<&'a types::NameOrId>>,
4961 {
4962 if let Some(value) = value.into() {
4963 Self(self.0.query_param("project", value.to_string()))
4964 } else {
4965 Self(self.0.query_param_missing("project"))
4966 }
4967 }
4968 }
4969
4970 pub struct FloatingIpViewThen(::httpmock::Then);
4971 impl FloatingIpViewThen {
4972 pub fn new(inner: ::httpmock::Then) -> Self {
4973 Self(inner)
4974 }
4975
4976 pub fn into_inner(self) -> ::httpmock::Then {
4977 self.0
4978 }
4979
4980 pub fn ok(self, value: &types::FloatingIp) -> Self {
4981 Self(
4982 self.0
4983 .status(200u16)
4984 .header("content-type", "application/json")
4985 .json_body_obj(value),
4986 )
4987 }
4988
4989 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
4990 assert_eq!(status / 100u16, 4u16);
4991 Self(
4992 self.0
4993 .status(status)
4994 .header("content-type", "application/json")
4995 .json_body_obj(value),
4996 )
4997 }
4998
4999 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
5000 assert_eq!(status / 100u16, 5u16);
5001 Self(
5002 self.0
5003 .status(status)
5004 .header("content-type", "application/json")
5005 .json_body_obj(value),
5006 )
5007 }
5008 }
5009
5010 pub struct FloatingIpUpdateWhen(::httpmock::When);
5011 impl FloatingIpUpdateWhen {
5012 pub fn new(inner: ::httpmock::When) -> Self {
5013 Self(
5014 inner
5015 .method(::httpmock::Method::PUT)
5016 .path_matches(regex::Regex::new("^/v1/floating-ips/[^/]*$").unwrap()),
5017 )
5018 }
5019
5020 pub fn into_inner(self) -> ::httpmock::When {
5021 self.0
5022 }
5023
5024 pub fn floating_ip(self, value: &types::NameOrId) -> Self {
5025 let re =
5026 regex::Regex::new(&format!("^/v1/floating-ips/{}$", value.to_string())).unwrap();
5027 Self(self.0.path_matches(re))
5028 }
5029
5030 pub fn project<'a, T>(self, value: T) -> Self
5031 where
5032 T: Into<Option<&'a types::NameOrId>>,
5033 {
5034 if let Some(value) = value.into() {
5035 Self(self.0.query_param("project", value.to_string()))
5036 } else {
5037 Self(self.0.query_param_missing("project"))
5038 }
5039 }
5040
5041 pub fn body(self, value: &types::FloatingIpUpdate) -> Self {
5042 Self(self.0.json_body_obj(value))
5043 }
5044 }
5045
5046 pub struct FloatingIpUpdateThen(::httpmock::Then);
5047 impl FloatingIpUpdateThen {
5048 pub fn new(inner: ::httpmock::Then) -> Self {
5049 Self(inner)
5050 }
5051
5052 pub fn into_inner(self) -> ::httpmock::Then {
5053 self.0
5054 }
5055
5056 pub fn ok(self, value: &types::FloatingIp) -> Self {
5057 Self(
5058 self.0
5059 .status(200u16)
5060 .header("content-type", "application/json")
5061 .json_body_obj(value),
5062 )
5063 }
5064
5065 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
5066 assert_eq!(status / 100u16, 4u16);
5067 Self(
5068 self.0
5069 .status(status)
5070 .header("content-type", "application/json")
5071 .json_body_obj(value),
5072 )
5073 }
5074
5075 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
5076 assert_eq!(status / 100u16, 5u16);
5077 Self(
5078 self.0
5079 .status(status)
5080 .header("content-type", "application/json")
5081 .json_body_obj(value),
5082 )
5083 }
5084 }
5085
5086 pub struct FloatingIpDeleteWhen(::httpmock::When);
5087 impl FloatingIpDeleteWhen {
5088 pub fn new(inner: ::httpmock::When) -> Self {
5089 Self(
5090 inner
5091 .method(::httpmock::Method::DELETE)
5092 .path_matches(regex::Regex::new("^/v1/floating-ips/[^/]*$").unwrap()),
5093 )
5094 }
5095
5096 pub fn into_inner(self) -> ::httpmock::When {
5097 self.0
5098 }
5099
5100 pub fn floating_ip(self, value: &types::NameOrId) -> Self {
5101 let re =
5102 regex::Regex::new(&format!("^/v1/floating-ips/{}$", value.to_string())).unwrap();
5103 Self(self.0.path_matches(re))
5104 }
5105
5106 pub fn project<'a, T>(self, value: T) -> Self
5107 where
5108 T: Into<Option<&'a types::NameOrId>>,
5109 {
5110 if let Some(value) = value.into() {
5111 Self(self.0.query_param("project", value.to_string()))
5112 } else {
5113 Self(self.0.query_param_missing("project"))
5114 }
5115 }
5116 }
5117
5118 pub struct FloatingIpDeleteThen(::httpmock::Then);
5119 impl FloatingIpDeleteThen {
5120 pub fn new(inner: ::httpmock::Then) -> Self {
5121 Self(inner)
5122 }
5123
5124 pub fn into_inner(self) -> ::httpmock::Then {
5125 self.0
5126 }
5127
5128 pub fn no_content(self) -> Self {
5129 Self(self.0.status(204u16))
5130 }
5131
5132 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
5133 assert_eq!(status / 100u16, 4u16);
5134 Self(
5135 self.0
5136 .status(status)
5137 .header("content-type", "application/json")
5138 .json_body_obj(value),
5139 )
5140 }
5141
5142 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
5143 assert_eq!(status / 100u16, 5u16);
5144 Self(
5145 self.0
5146 .status(status)
5147 .header("content-type", "application/json")
5148 .json_body_obj(value),
5149 )
5150 }
5151 }
5152
5153 pub struct FloatingIpAttachWhen(::httpmock::When);
5154 impl FloatingIpAttachWhen {
5155 pub fn new(inner: ::httpmock::When) -> Self {
5156 Self(
5157 inner
5158 .method(::httpmock::Method::POST)
5159 .path_matches(regex::Regex::new("^/v1/floating-ips/[^/]*/attach$").unwrap()),
5160 )
5161 }
5162
5163 pub fn into_inner(self) -> ::httpmock::When {
5164 self.0
5165 }
5166
5167 pub fn floating_ip(self, value: &types::NameOrId) -> Self {
5168 let re = regex::Regex::new(&format!("^/v1/floating-ips/{}/attach$", value.to_string()))
5169 .unwrap();
5170 Self(self.0.path_matches(re))
5171 }
5172
5173 pub fn project<'a, T>(self, value: T) -> Self
5174 where
5175 T: Into<Option<&'a types::NameOrId>>,
5176 {
5177 if let Some(value) = value.into() {
5178 Self(self.0.query_param("project", value.to_string()))
5179 } else {
5180 Self(self.0.query_param_missing("project"))
5181 }
5182 }
5183
5184 pub fn body(self, value: &types::FloatingIpAttach) -> Self {
5185 Self(self.0.json_body_obj(value))
5186 }
5187 }
5188
5189 pub struct FloatingIpAttachThen(::httpmock::Then);
5190 impl FloatingIpAttachThen {
5191 pub fn new(inner: ::httpmock::Then) -> Self {
5192 Self(inner)
5193 }
5194
5195 pub fn into_inner(self) -> ::httpmock::Then {
5196 self.0
5197 }
5198
5199 pub fn accepted(self, value: &types::FloatingIp) -> Self {
5200 Self(
5201 self.0
5202 .status(202u16)
5203 .header("content-type", "application/json")
5204 .json_body_obj(value),
5205 )
5206 }
5207
5208 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
5209 assert_eq!(status / 100u16, 4u16);
5210 Self(
5211 self.0
5212 .status(status)
5213 .header("content-type", "application/json")
5214 .json_body_obj(value),
5215 )
5216 }
5217
5218 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
5219 assert_eq!(status / 100u16, 5u16);
5220 Self(
5221 self.0
5222 .status(status)
5223 .header("content-type", "application/json")
5224 .json_body_obj(value),
5225 )
5226 }
5227 }
5228
5229 pub struct FloatingIpDetachWhen(::httpmock::When);
5230 impl FloatingIpDetachWhen {
5231 pub fn new(inner: ::httpmock::When) -> Self {
5232 Self(
5233 inner
5234 .method(::httpmock::Method::POST)
5235 .path_matches(regex::Regex::new("^/v1/floating-ips/[^/]*/detach$").unwrap()),
5236 )
5237 }
5238
5239 pub fn into_inner(self) -> ::httpmock::When {
5240 self.0
5241 }
5242
5243 pub fn floating_ip(self, value: &types::NameOrId) -> Self {
5244 let re = regex::Regex::new(&format!("^/v1/floating-ips/{}/detach$", value.to_string()))
5245 .unwrap();
5246 Self(self.0.path_matches(re))
5247 }
5248
5249 pub fn project<'a, T>(self, value: T) -> Self
5250 where
5251 T: Into<Option<&'a types::NameOrId>>,
5252 {
5253 if let Some(value) = value.into() {
5254 Self(self.0.query_param("project", value.to_string()))
5255 } else {
5256 Self(self.0.query_param_missing("project"))
5257 }
5258 }
5259 }
5260
5261 pub struct FloatingIpDetachThen(::httpmock::Then);
5262 impl FloatingIpDetachThen {
5263 pub fn new(inner: ::httpmock::Then) -> Self {
5264 Self(inner)
5265 }
5266
5267 pub fn into_inner(self) -> ::httpmock::Then {
5268 self.0
5269 }
5270
5271 pub fn accepted(self, value: &types::FloatingIp) -> Self {
5272 Self(
5273 self.0
5274 .status(202u16)
5275 .header("content-type", "application/json")
5276 .json_body_obj(value),
5277 )
5278 }
5279
5280 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
5281 assert_eq!(status / 100u16, 4u16);
5282 Self(
5283 self.0
5284 .status(status)
5285 .header("content-type", "application/json")
5286 .json_body_obj(value),
5287 )
5288 }
5289
5290 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
5291 assert_eq!(status / 100u16, 5u16);
5292 Self(
5293 self.0
5294 .status(status)
5295 .header("content-type", "application/json")
5296 .json_body_obj(value),
5297 )
5298 }
5299 }
5300
5301 pub struct GroupListWhen(::httpmock::When);
5302 impl GroupListWhen {
5303 pub fn new(inner: ::httpmock::When) -> Self {
5304 Self(
5305 inner
5306 .method(::httpmock::Method::GET)
5307 .path_matches(regex::Regex::new("^/v1/groups$").unwrap()),
5308 )
5309 }
5310
5311 pub fn into_inner(self) -> ::httpmock::When {
5312 self.0
5313 }
5314
5315 pub fn limit<T>(self, value: T) -> Self
5316 where
5317 T: Into<Option<::std::num::NonZeroU32>>,
5318 {
5319 if let Some(value) = value.into() {
5320 Self(self.0.query_param("limit", value.to_string()))
5321 } else {
5322 Self(self.0.query_param_missing("limit"))
5323 }
5324 }
5325
5326 pub fn page_token<'a, T>(self, value: T) -> Self
5327 where
5328 T: Into<Option<&'a str>>,
5329 {
5330 if let Some(value) = value.into() {
5331 Self(self.0.query_param("page_token", value.to_string()))
5332 } else {
5333 Self(self.0.query_param_missing("page_token"))
5334 }
5335 }
5336
5337 pub fn sort_by<T>(self, value: T) -> Self
5338 where
5339 T: Into<Option<types::IdSortMode>>,
5340 {
5341 if let Some(value) = value.into() {
5342 Self(self.0.query_param("sort_by", value.to_string()))
5343 } else {
5344 Self(self.0.query_param_missing("sort_by"))
5345 }
5346 }
5347 }
5348
5349 pub struct GroupListThen(::httpmock::Then);
5350 impl GroupListThen {
5351 pub fn new(inner: ::httpmock::Then) -> Self {
5352 Self(inner)
5353 }
5354
5355 pub fn into_inner(self) -> ::httpmock::Then {
5356 self.0
5357 }
5358
5359 pub fn ok(self, value: &types::GroupResultsPage) -> Self {
5360 Self(
5361 self.0
5362 .status(200u16)
5363 .header("content-type", "application/json")
5364 .json_body_obj(value),
5365 )
5366 }
5367
5368 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
5369 assert_eq!(status / 100u16, 4u16);
5370 Self(
5371 self.0
5372 .status(status)
5373 .header("content-type", "application/json")
5374 .json_body_obj(value),
5375 )
5376 }
5377
5378 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
5379 assert_eq!(status / 100u16, 5u16);
5380 Self(
5381 self.0
5382 .status(status)
5383 .header("content-type", "application/json")
5384 .json_body_obj(value),
5385 )
5386 }
5387 }
5388
5389 pub struct GroupViewWhen(::httpmock::When);
5390 impl GroupViewWhen {
5391 pub fn new(inner: ::httpmock::When) -> Self {
5392 Self(
5393 inner
5394 .method(::httpmock::Method::GET)
5395 .path_matches(regex::Regex::new("^/v1/groups/[^/]*$").unwrap()),
5396 )
5397 }
5398
5399 pub fn into_inner(self) -> ::httpmock::When {
5400 self.0
5401 }
5402
5403 pub fn group_id(self, value: &::uuid::Uuid) -> Self {
5404 let re = regex::Regex::new(&format!("^/v1/groups/{}$", value.to_string())).unwrap();
5405 Self(self.0.path_matches(re))
5406 }
5407 }
5408
5409 pub struct GroupViewThen(::httpmock::Then);
5410 impl GroupViewThen {
5411 pub fn new(inner: ::httpmock::Then) -> Self {
5412 Self(inner)
5413 }
5414
5415 pub fn into_inner(self) -> ::httpmock::Then {
5416 self.0
5417 }
5418
5419 pub fn ok(self, value: &types::Group) -> Self {
5420 Self(
5421 self.0
5422 .status(200u16)
5423 .header("content-type", "application/json")
5424 .json_body_obj(value),
5425 )
5426 }
5427
5428 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
5429 assert_eq!(status / 100u16, 4u16);
5430 Self(
5431 self.0
5432 .status(status)
5433 .header("content-type", "application/json")
5434 .json_body_obj(value),
5435 )
5436 }
5437
5438 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
5439 assert_eq!(status / 100u16, 5u16);
5440 Self(
5441 self.0
5442 .status(status)
5443 .header("content-type", "application/json")
5444 .json_body_obj(value),
5445 )
5446 }
5447 }
5448
5449 pub struct ImageListWhen(::httpmock::When);
5450 impl ImageListWhen {
5451 pub fn new(inner: ::httpmock::When) -> Self {
5452 Self(
5453 inner
5454 .method(::httpmock::Method::GET)
5455 .path_matches(regex::Regex::new("^/v1/images$").unwrap()),
5456 )
5457 }
5458
5459 pub fn into_inner(self) -> ::httpmock::When {
5460 self.0
5461 }
5462
5463 pub fn limit<T>(self, value: T) -> Self
5464 where
5465 T: Into<Option<::std::num::NonZeroU32>>,
5466 {
5467 if let Some(value) = value.into() {
5468 Self(self.0.query_param("limit", value.to_string()))
5469 } else {
5470 Self(self.0.query_param_missing("limit"))
5471 }
5472 }
5473
5474 pub fn page_token<'a, T>(self, value: T) -> Self
5475 where
5476 T: Into<Option<&'a str>>,
5477 {
5478 if let Some(value) = value.into() {
5479 Self(self.0.query_param("page_token", value.to_string()))
5480 } else {
5481 Self(self.0.query_param_missing("page_token"))
5482 }
5483 }
5484
5485 pub fn project<'a, T>(self, value: T) -> Self
5486 where
5487 T: Into<Option<&'a types::NameOrId>>,
5488 {
5489 if let Some(value) = value.into() {
5490 Self(self.0.query_param("project", value.to_string()))
5491 } else {
5492 Self(self.0.query_param_missing("project"))
5493 }
5494 }
5495
5496 pub fn sort_by<T>(self, value: T) -> Self
5497 where
5498 T: Into<Option<types::NameOrIdSortMode>>,
5499 {
5500 if let Some(value) = value.into() {
5501 Self(self.0.query_param("sort_by", value.to_string()))
5502 } else {
5503 Self(self.0.query_param_missing("sort_by"))
5504 }
5505 }
5506 }
5507
5508 pub struct ImageListThen(::httpmock::Then);
5509 impl ImageListThen {
5510 pub fn new(inner: ::httpmock::Then) -> Self {
5511 Self(inner)
5512 }
5513
5514 pub fn into_inner(self) -> ::httpmock::Then {
5515 self.0
5516 }
5517
5518 pub fn ok(self, value: &types::ImageResultsPage) -> Self {
5519 Self(
5520 self.0
5521 .status(200u16)
5522 .header("content-type", "application/json")
5523 .json_body_obj(value),
5524 )
5525 }
5526
5527 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
5528 assert_eq!(status / 100u16, 4u16);
5529 Self(
5530 self.0
5531 .status(status)
5532 .header("content-type", "application/json")
5533 .json_body_obj(value),
5534 )
5535 }
5536
5537 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
5538 assert_eq!(status / 100u16, 5u16);
5539 Self(
5540 self.0
5541 .status(status)
5542 .header("content-type", "application/json")
5543 .json_body_obj(value),
5544 )
5545 }
5546 }
5547
5548 pub struct ImageCreateWhen(::httpmock::When);
5549 impl ImageCreateWhen {
5550 pub fn new(inner: ::httpmock::When) -> Self {
5551 Self(
5552 inner
5553 .method(::httpmock::Method::POST)
5554 .path_matches(regex::Regex::new("^/v1/images$").unwrap()),
5555 )
5556 }
5557
5558 pub fn into_inner(self) -> ::httpmock::When {
5559 self.0
5560 }
5561
5562 pub fn project<'a, T>(self, value: T) -> Self
5563 where
5564 T: Into<Option<&'a types::NameOrId>>,
5565 {
5566 if let Some(value) = value.into() {
5567 Self(self.0.query_param("project", value.to_string()))
5568 } else {
5569 Self(self.0.query_param_missing("project"))
5570 }
5571 }
5572
5573 pub fn body(self, value: &types::ImageCreate) -> Self {
5574 Self(self.0.json_body_obj(value))
5575 }
5576 }
5577
5578 pub struct ImageCreateThen(::httpmock::Then);
5579 impl ImageCreateThen {
5580 pub fn new(inner: ::httpmock::Then) -> Self {
5581 Self(inner)
5582 }
5583
5584 pub fn into_inner(self) -> ::httpmock::Then {
5585 self.0
5586 }
5587
5588 pub fn created(self, value: &types::Image) -> Self {
5589 Self(
5590 self.0
5591 .status(201u16)
5592 .header("content-type", "application/json")
5593 .json_body_obj(value),
5594 )
5595 }
5596
5597 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
5598 assert_eq!(status / 100u16, 4u16);
5599 Self(
5600 self.0
5601 .status(status)
5602 .header("content-type", "application/json")
5603 .json_body_obj(value),
5604 )
5605 }
5606
5607 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
5608 assert_eq!(status / 100u16, 5u16);
5609 Self(
5610 self.0
5611 .status(status)
5612 .header("content-type", "application/json")
5613 .json_body_obj(value),
5614 )
5615 }
5616 }
5617
5618 pub struct ImageViewWhen(::httpmock::When);
5619 impl ImageViewWhen {
5620 pub fn new(inner: ::httpmock::When) -> Self {
5621 Self(
5622 inner
5623 .method(::httpmock::Method::GET)
5624 .path_matches(regex::Regex::new("^/v1/images/[^/]*$").unwrap()),
5625 )
5626 }
5627
5628 pub fn into_inner(self) -> ::httpmock::When {
5629 self.0
5630 }
5631
5632 pub fn image(self, value: &types::NameOrId) -> Self {
5633 let re = regex::Regex::new(&format!("^/v1/images/{}$", value.to_string())).unwrap();
5634 Self(self.0.path_matches(re))
5635 }
5636
5637 pub fn project<'a, T>(self, value: T) -> Self
5638 where
5639 T: Into<Option<&'a types::NameOrId>>,
5640 {
5641 if let Some(value) = value.into() {
5642 Self(self.0.query_param("project", value.to_string()))
5643 } else {
5644 Self(self.0.query_param_missing("project"))
5645 }
5646 }
5647 }
5648
5649 pub struct ImageViewThen(::httpmock::Then);
5650 impl ImageViewThen {
5651 pub fn new(inner: ::httpmock::Then) -> Self {
5652 Self(inner)
5653 }
5654
5655 pub fn into_inner(self) -> ::httpmock::Then {
5656 self.0
5657 }
5658
5659 pub fn ok(self, value: &types::Image) -> Self {
5660 Self(
5661 self.0
5662 .status(200u16)
5663 .header("content-type", "application/json")
5664 .json_body_obj(value),
5665 )
5666 }
5667
5668 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
5669 assert_eq!(status / 100u16, 4u16);
5670 Self(
5671 self.0
5672 .status(status)
5673 .header("content-type", "application/json")
5674 .json_body_obj(value),
5675 )
5676 }
5677
5678 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
5679 assert_eq!(status / 100u16, 5u16);
5680 Self(
5681 self.0
5682 .status(status)
5683 .header("content-type", "application/json")
5684 .json_body_obj(value),
5685 )
5686 }
5687 }
5688
5689 pub struct ImageDeleteWhen(::httpmock::When);
5690 impl ImageDeleteWhen {
5691 pub fn new(inner: ::httpmock::When) -> Self {
5692 Self(
5693 inner
5694 .method(::httpmock::Method::DELETE)
5695 .path_matches(regex::Regex::new("^/v1/images/[^/]*$").unwrap()),
5696 )
5697 }
5698
5699 pub fn into_inner(self) -> ::httpmock::When {
5700 self.0
5701 }
5702
5703 pub fn image(self, value: &types::NameOrId) -> Self {
5704 let re = regex::Regex::new(&format!("^/v1/images/{}$", value.to_string())).unwrap();
5705 Self(self.0.path_matches(re))
5706 }
5707
5708 pub fn project<'a, T>(self, value: T) -> Self
5709 where
5710 T: Into<Option<&'a types::NameOrId>>,
5711 {
5712 if let Some(value) = value.into() {
5713 Self(self.0.query_param("project", value.to_string()))
5714 } else {
5715 Self(self.0.query_param_missing("project"))
5716 }
5717 }
5718 }
5719
5720 pub struct ImageDeleteThen(::httpmock::Then);
5721 impl ImageDeleteThen {
5722 pub fn new(inner: ::httpmock::Then) -> Self {
5723 Self(inner)
5724 }
5725
5726 pub fn into_inner(self) -> ::httpmock::Then {
5727 self.0
5728 }
5729
5730 pub fn no_content(self) -> Self {
5731 Self(self.0.status(204u16))
5732 }
5733
5734 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
5735 assert_eq!(status / 100u16, 4u16);
5736 Self(
5737 self.0
5738 .status(status)
5739 .header("content-type", "application/json")
5740 .json_body_obj(value),
5741 )
5742 }
5743
5744 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
5745 assert_eq!(status / 100u16, 5u16);
5746 Self(
5747 self.0
5748 .status(status)
5749 .header("content-type", "application/json")
5750 .json_body_obj(value),
5751 )
5752 }
5753 }
5754
5755 pub struct ImageDemoteWhen(::httpmock::When);
5756 impl ImageDemoteWhen {
5757 pub fn new(inner: ::httpmock::When) -> Self {
5758 Self(
5759 inner
5760 .method(::httpmock::Method::POST)
5761 .path_matches(regex::Regex::new("^/v1/images/[^/]*/demote$").unwrap()),
5762 )
5763 }
5764
5765 pub fn into_inner(self) -> ::httpmock::When {
5766 self.0
5767 }
5768
5769 pub fn image(self, value: &types::NameOrId) -> Self {
5770 let re =
5771 regex::Regex::new(&format!("^/v1/images/{}/demote$", value.to_string())).unwrap();
5772 Self(self.0.path_matches(re))
5773 }
5774
5775 pub fn project(self, value: &types::NameOrId) -> Self {
5776 Self(self.0.query_param("project", value.to_string()))
5777 }
5778 }
5779
5780 pub struct ImageDemoteThen(::httpmock::Then);
5781 impl ImageDemoteThen {
5782 pub fn new(inner: ::httpmock::Then) -> Self {
5783 Self(inner)
5784 }
5785
5786 pub fn into_inner(self) -> ::httpmock::Then {
5787 self.0
5788 }
5789
5790 pub fn accepted(self, value: &types::Image) -> Self {
5791 Self(
5792 self.0
5793 .status(202u16)
5794 .header("content-type", "application/json")
5795 .json_body_obj(value),
5796 )
5797 }
5798
5799 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
5800 assert_eq!(status / 100u16, 4u16);
5801 Self(
5802 self.0
5803 .status(status)
5804 .header("content-type", "application/json")
5805 .json_body_obj(value),
5806 )
5807 }
5808
5809 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
5810 assert_eq!(status / 100u16, 5u16);
5811 Self(
5812 self.0
5813 .status(status)
5814 .header("content-type", "application/json")
5815 .json_body_obj(value),
5816 )
5817 }
5818 }
5819
5820 pub struct ImagePromoteWhen(::httpmock::When);
5821 impl ImagePromoteWhen {
5822 pub fn new(inner: ::httpmock::When) -> Self {
5823 Self(
5824 inner
5825 .method(::httpmock::Method::POST)
5826 .path_matches(regex::Regex::new("^/v1/images/[^/]*/promote$").unwrap()),
5827 )
5828 }
5829
5830 pub fn into_inner(self) -> ::httpmock::When {
5831 self.0
5832 }
5833
5834 pub fn image(self, value: &types::NameOrId) -> Self {
5835 let re =
5836 regex::Regex::new(&format!("^/v1/images/{}/promote$", value.to_string())).unwrap();
5837 Self(self.0.path_matches(re))
5838 }
5839
5840 pub fn project<'a, T>(self, value: T) -> Self
5841 where
5842 T: Into<Option<&'a types::NameOrId>>,
5843 {
5844 if let Some(value) = value.into() {
5845 Self(self.0.query_param("project", value.to_string()))
5846 } else {
5847 Self(self.0.query_param_missing("project"))
5848 }
5849 }
5850 }
5851
5852 pub struct ImagePromoteThen(::httpmock::Then);
5853 impl ImagePromoteThen {
5854 pub fn new(inner: ::httpmock::Then) -> Self {
5855 Self(inner)
5856 }
5857
5858 pub fn into_inner(self) -> ::httpmock::Then {
5859 self.0
5860 }
5861
5862 pub fn accepted(self, value: &types::Image) -> Self {
5863 Self(
5864 self.0
5865 .status(202u16)
5866 .header("content-type", "application/json")
5867 .json_body_obj(value),
5868 )
5869 }
5870
5871 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
5872 assert_eq!(status / 100u16, 4u16);
5873 Self(
5874 self.0
5875 .status(status)
5876 .header("content-type", "application/json")
5877 .json_body_obj(value),
5878 )
5879 }
5880
5881 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
5882 assert_eq!(status / 100u16, 5u16);
5883 Self(
5884 self.0
5885 .status(status)
5886 .header("content-type", "application/json")
5887 .json_body_obj(value),
5888 )
5889 }
5890 }
5891
5892 pub struct InstanceListWhen(::httpmock::When);
5893 impl InstanceListWhen {
5894 pub fn new(inner: ::httpmock::When) -> Self {
5895 Self(
5896 inner
5897 .method(::httpmock::Method::GET)
5898 .path_matches(regex::Regex::new("^/v1/instances$").unwrap()),
5899 )
5900 }
5901
5902 pub fn into_inner(self) -> ::httpmock::When {
5903 self.0
5904 }
5905
5906 pub fn limit<T>(self, value: T) -> Self
5907 where
5908 T: Into<Option<::std::num::NonZeroU32>>,
5909 {
5910 if let Some(value) = value.into() {
5911 Self(self.0.query_param("limit", value.to_string()))
5912 } else {
5913 Self(self.0.query_param_missing("limit"))
5914 }
5915 }
5916
5917 pub fn page_token<'a, T>(self, value: T) -> Self
5918 where
5919 T: Into<Option<&'a str>>,
5920 {
5921 if let Some(value) = value.into() {
5922 Self(self.0.query_param("page_token", value.to_string()))
5923 } else {
5924 Self(self.0.query_param_missing("page_token"))
5925 }
5926 }
5927
5928 pub fn project<'a, T>(self, value: T) -> Self
5929 where
5930 T: Into<Option<&'a types::NameOrId>>,
5931 {
5932 if let Some(value) = value.into() {
5933 Self(self.0.query_param("project", value.to_string()))
5934 } else {
5935 Self(self.0.query_param_missing("project"))
5936 }
5937 }
5938
5939 pub fn sort_by<T>(self, value: T) -> Self
5940 where
5941 T: Into<Option<types::NameOrIdSortMode>>,
5942 {
5943 if let Some(value) = value.into() {
5944 Self(self.0.query_param("sort_by", value.to_string()))
5945 } else {
5946 Self(self.0.query_param_missing("sort_by"))
5947 }
5948 }
5949 }
5950
5951 pub struct InstanceListThen(::httpmock::Then);
5952 impl InstanceListThen {
5953 pub fn new(inner: ::httpmock::Then) -> Self {
5954 Self(inner)
5955 }
5956
5957 pub fn into_inner(self) -> ::httpmock::Then {
5958 self.0
5959 }
5960
5961 pub fn ok(self, value: &types::InstanceResultsPage) -> Self {
5962 Self(
5963 self.0
5964 .status(200u16)
5965 .header("content-type", "application/json")
5966 .json_body_obj(value),
5967 )
5968 }
5969
5970 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
5971 assert_eq!(status / 100u16, 4u16);
5972 Self(
5973 self.0
5974 .status(status)
5975 .header("content-type", "application/json")
5976 .json_body_obj(value),
5977 )
5978 }
5979
5980 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
5981 assert_eq!(status / 100u16, 5u16);
5982 Self(
5983 self.0
5984 .status(status)
5985 .header("content-type", "application/json")
5986 .json_body_obj(value),
5987 )
5988 }
5989 }
5990
5991 pub struct InstanceCreateWhen(::httpmock::When);
5992 impl InstanceCreateWhen {
5993 pub fn new(inner: ::httpmock::When) -> Self {
5994 Self(
5995 inner
5996 .method(::httpmock::Method::POST)
5997 .path_matches(regex::Regex::new("^/v1/instances$").unwrap()),
5998 )
5999 }
6000
6001 pub fn into_inner(self) -> ::httpmock::When {
6002 self.0
6003 }
6004
6005 pub fn project(self, value: &types::NameOrId) -> Self {
6006 Self(self.0.query_param("project", value.to_string()))
6007 }
6008
6009 pub fn body(self, value: &types::InstanceCreate) -> Self {
6010 Self(self.0.json_body_obj(value))
6011 }
6012 }
6013
6014 pub struct InstanceCreateThen(::httpmock::Then);
6015 impl InstanceCreateThen {
6016 pub fn new(inner: ::httpmock::Then) -> Self {
6017 Self(inner)
6018 }
6019
6020 pub fn into_inner(self) -> ::httpmock::Then {
6021 self.0
6022 }
6023
6024 pub fn created(self, value: &types::Instance) -> Self {
6025 Self(
6026 self.0
6027 .status(201u16)
6028 .header("content-type", "application/json")
6029 .json_body_obj(value),
6030 )
6031 }
6032
6033 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
6034 assert_eq!(status / 100u16, 4u16);
6035 Self(
6036 self.0
6037 .status(status)
6038 .header("content-type", "application/json")
6039 .json_body_obj(value),
6040 )
6041 }
6042
6043 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
6044 assert_eq!(status / 100u16, 5u16);
6045 Self(
6046 self.0
6047 .status(status)
6048 .header("content-type", "application/json")
6049 .json_body_obj(value),
6050 )
6051 }
6052 }
6053
6054 pub struct InstanceViewWhen(::httpmock::When);
6055 impl InstanceViewWhen {
6056 pub fn new(inner: ::httpmock::When) -> Self {
6057 Self(
6058 inner
6059 .method(::httpmock::Method::GET)
6060 .path_matches(regex::Regex::new("^/v1/instances/[^/]*$").unwrap()),
6061 )
6062 }
6063
6064 pub fn into_inner(self) -> ::httpmock::When {
6065 self.0
6066 }
6067
6068 pub fn instance(self, value: &types::NameOrId) -> Self {
6069 let re = regex::Regex::new(&format!("^/v1/instances/{}$", value.to_string())).unwrap();
6070 Self(self.0.path_matches(re))
6071 }
6072
6073 pub fn project<'a, T>(self, value: T) -> Self
6074 where
6075 T: Into<Option<&'a types::NameOrId>>,
6076 {
6077 if let Some(value) = value.into() {
6078 Self(self.0.query_param("project", value.to_string()))
6079 } else {
6080 Self(self.0.query_param_missing("project"))
6081 }
6082 }
6083 }
6084
6085 pub struct InstanceViewThen(::httpmock::Then);
6086 impl InstanceViewThen {
6087 pub fn new(inner: ::httpmock::Then) -> Self {
6088 Self(inner)
6089 }
6090
6091 pub fn into_inner(self) -> ::httpmock::Then {
6092 self.0
6093 }
6094
6095 pub fn ok(self, value: &types::Instance) -> Self {
6096 Self(
6097 self.0
6098 .status(200u16)
6099 .header("content-type", "application/json")
6100 .json_body_obj(value),
6101 )
6102 }
6103
6104 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
6105 assert_eq!(status / 100u16, 4u16);
6106 Self(
6107 self.0
6108 .status(status)
6109 .header("content-type", "application/json")
6110 .json_body_obj(value),
6111 )
6112 }
6113
6114 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
6115 assert_eq!(status / 100u16, 5u16);
6116 Self(
6117 self.0
6118 .status(status)
6119 .header("content-type", "application/json")
6120 .json_body_obj(value),
6121 )
6122 }
6123 }
6124
6125 pub struct InstanceUpdateWhen(::httpmock::When);
6126 impl InstanceUpdateWhen {
6127 pub fn new(inner: ::httpmock::When) -> Self {
6128 Self(
6129 inner
6130 .method(::httpmock::Method::PUT)
6131 .path_matches(regex::Regex::new("^/v1/instances/[^/]*$").unwrap()),
6132 )
6133 }
6134
6135 pub fn into_inner(self) -> ::httpmock::When {
6136 self.0
6137 }
6138
6139 pub fn instance(self, value: &types::NameOrId) -> Self {
6140 let re = regex::Regex::new(&format!("^/v1/instances/{}$", value.to_string())).unwrap();
6141 Self(self.0.path_matches(re))
6142 }
6143
6144 pub fn project<'a, T>(self, value: T) -> Self
6145 where
6146 T: Into<Option<&'a types::NameOrId>>,
6147 {
6148 if let Some(value) = value.into() {
6149 Self(self.0.query_param("project", value.to_string()))
6150 } else {
6151 Self(self.0.query_param_missing("project"))
6152 }
6153 }
6154
6155 pub fn body(self, value: &types::InstanceUpdate) -> Self {
6156 Self(self.0.json_body_obj(value))
6157 }
6158 }
6159
6160 pub struct InstanceUpdateThen(::httpmock::Then);
6161 impl InstanceUpdateThen {
6162 pub fn new(inner: ::httpmock::Then) -> Self {
6163 Self(inner)
6164 }
6165
6166 pub fn into_inner(self) -> ::httpmock::Then {
6167 self.0
6168 }
6169
6170 pub fn ok(self, value: &types::Instance) -> Self {
6171 Self(
6172 self.0
6173 .status(200u16)
6174 .header("content-type", "application/json")
6175 .json_body_obj(value),
6176 )
6177 }
6178
6179 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
6180 assert_eq!(status / 100u16, 4u16);
6181 Self(
6182 self.0
6183 .status(status)
6184 .header("content-type", "application/json")
6185 .json_body_obj(value),
6186 )
6187 }
6188
6189 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
6190 assert_eq!(status / 100u16, 5u16);
6191 Self(
6192 self.0
6193 .status(status)
6194 .header("content-type", "application/json")
6195 .json_body_obj(value),
6196 )
6197 }
6198 }
6199
6200 pub struct InstanceDeleteWhen(::httpmock::When);
6201 impl InstanceDeleteWhen {
6202 pub fn new(inner: ::httpmock::When) -> Self {
6203 Self(
6204 inner
6205 .method(::httpmock::Method::DELETE)
6206 .path_matches(regex::Regex::new("^/v1/instances/[^/]*$").unwrap()),
6207 )
6208 }
6209
6210 pub fn into_inner(self) -> ::httpmock::When {
6211 self.0
6212 }
6213
6214 pub fn instance(self, value: &types::NameOrId) -> Self {
6215 let re = regex::Regex::new(&format!("^/v1/instances/{}$", value.to_string())).unwrap();
6216 Self(self.0.path_matches(re))
6217 }
6218
6219 pub fn project<'a, T>(self, value: T) -> Self
6220 where
6221 T: Into<Option<&'a types::NameOrId>>,
6222 {
6223 if let Some(value) = value.into() {
6224 Self(self.0.query_param("project", value.to_string()))
6225 } else {
6226 Self(self.0.query_param_missing("project"))
6227 }
6228 }
6229 }
6230
6231 pub struct InstanceDeleteThen(::httpmock::Then);
6232 impl InstanceDeleteThen {
6233 pub fn new(inner: ::httpmock::Then) -> Self {
6234 Self(inner)
6235 }
6236
6237 pub fn into_inner(self) -> ::httpmock::Then {
6238 self.0
6239 }
6240
6241 pub fn no_content(self) -> Self {
6242 Self(self.0.status(204u16))
6243 }
6244
6245 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
6246 assert_eq!(status / 100u16, 4u16);
6247 Self(
6248 self.0
6249 .status(status)
6250 .header("content-type", "application/json")
6251 .json_body_obj(value),
6252 )
6253 }
6254
6255 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
6256 assert_eq!(status / 100u16, 5u16);
6257 Self(
6258 self.0
6259 .status(status)
6260 .header("content-type", "application/json")
6261 .json_body_obj(value),
6262 )
6263 }
6264 }
6265
6266 pub struct InstanceAffinityGroupListWhen(::httpmock::When);
6267 impl InstanceAffinityGroupListWhen {
6268 pub fn new(inner: ::httpmock::When) -> Self {
6269 Self(
6270 inner.method(::httpmock::Method::GET).path_matches(
6271 regex::Regex::new("^/v1/instances/[^/]*/affinity-groups$").unwrap(),
6272 ),
6273 )
6274 }
6275
6276 pub fn into_inner(self) -> ::httpmock::When {
6277 self.0
6278 }
6279
6280 pub fn instance(self, value: &types::NameOrId) -> Self {
6281 let re = regex::Regex::new(&format!(
6282 "^/v1/instances/{}/affinity-groups$",
6283 value.to_string()
6284 ))
6285 .unwrap();
6286 Self(self.0.path_matches(re))
6287 }
6288
6289 pub fn limit<T>(self, value: T) -> Self
6290 where
6291 T: Into<Option<::std::num::NonZeroU32>>,
6292 {
6293 if let Some(value) = value.into() {
6294 Self(self.0.query_param("limit", value.to_string()))
6295 } else {
6296 Self(self.0.query_param_missing("limit"))
6297 }
6298 }
6299
6300 pub fn page_token<'a, T>(self, value: T) -> Self
6301 where
6302 T: Into<Option<&'a str>>,
6303 {
6304 if let Some(value) = value.into() {
6305 Self(self.0.query_param("page_token", value.to_string()))
6306 } else {
6307 Self(self.0.query_param_missing("page_token"))
6308 }
6309 }
6310
6311 pub fn project<'a, T>(self, value: T) -> Self
6312 where
6313 T: Into<Option<&'a types::NameOrId>>,
6314 {
6315 if let Some(value) = value.into() {
6316 Self(self.0.query_param("project", value.to_string()))
6317 } else {
6318 Self(self.0.query_param_missing("project"))
6319 }
6320 }
6321
6322 pub fn sort_by<T>(self, value: T) -> Self
6323 where
6324 T: Into<Option<types::NameOrIdSortMode>>,
6325 {
6326 if let Some(value) = value.into() {
6327 Self(self.0.query_param("sort_by", value.to_string()))
6328 } else {
6329 Self(self.0.query_param_missing("sort_by"))
6330 }
6331 }
6332 }
6333
6334 pub struct InstanceAffinityGroupListThen(::httpmock::Then);
6335 impl InstanceAffinityGroupListThen {
6336 pub fn new(inner: ::httpmock::Then) -> Self {
6337 Self(inner)
6338 }
6339
6340 pub fn into_inner(self) -> ::httpmock::Then {
6341 self.0
6342 }
6343
6344 pub fn ok(self, value: &types::AffinityGroupResultsPage) -> Self {
6345 Self(
6346 self.0
6347 .status(200u16)
6348 .header("content-type", "application/json")
6349 .json_body_obj(value),
6350 )
6351 }
6352
6353 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
6354 assert_eq!(status / 100u16, 4u16);
6355 Self(
6356 self.0
6357 .status(status)
6358 .header("content-type", "application/json")
6359 .json_body_obj(value),
6360 )
6361 }
6362
6363 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
6364 assert_eq!(status / 100u16, 5u16);
6365 Self(
6366 self.0
6367 .status(status)
6368 .header("content-type", "application/json")
6369 .json_body_obj(value),
6370 )
6371 }
6372 }
6373
6374 pub struct InstanceAntiAffinityGroupListWhen(::httpmock::When);
6375 impl InstanceAntiAffinityGroupListWhen {
6376 pub fn new(inner: ::httpmock::When) -> Self {
6377 Self(inner.method(::httpmock::Method::GET).path_matches(
6378 regex::Regex::new("^/v1/instances/[^/]*/anti-affinity-groups$").unwrap(),
6379 ))
6380 }
6381
6382 pub fn into_inner(self) -> ::httpmock::When {
6383 self.0
6384 }
6385
6386 pub fn instance(self, value: &types::NameOrId) -> Self {
6387 let re = regex::Regex::new(&format!(
6388 "^/v1/instances/{}/anti-affinity-groups$",
6389 value.to_string()
6390 ))
6391 .unwrap();
6392 Self(self.0.path_matches(re))
6393 }
6394
6395 pub fn limit<T>(self, value: T) -> Self
6396 where
6397 T: Into<Option<::std::num::NonZeroU32>>,
6398 {
6399 if let Some(value) = value.into() {
6400 Self(self.0.query_param("limit", value.to_string()))
6401 } else {
6402 Self(self.0.query_param_missing("limit"))
6403 }
6404 }
6405
6406 pub fn page_token<'a, T>(self, value: T) -> Self
6407 where
6408 T: Into<Option<&'a str>>,
6409 {
6410 if let Some(value) = value.into() {
6411 Self(self.0.query_param("page_token", value.to_string()))
6412 } else {
6413 Self(self.0.query_param_missing("page_token"))
6414 }
6415 }
6416
6417 pub fn project<'a, T>(self, value: T) -> Self
6418 where
6419 T: Into<Option<&'a types::NameOrId>>,
6420 {
6421 if let Some(value) = value.into() {
6422 Self(self.0.query_param("project", value.to_string()))
6423 } else {
6424 Self(self.0.query_param_missing("project"))
6425 }
6426 }
6427
6428 pub fn sort_by<T>(self, value: T) -> Self
6429 where
6430 T: Into<Option<types::NameOrIdSortMode>>,
6431 {
6432 if let Some(value) = value.into() {
6433 Self(self.0.query_param("sort_by", value.to_string()))
6434 } else {
6435 Self(self.0.query_param_missing("sort_by"))
6436 }
6437 }
6438 }
6439
6440 pub struct InstanceAntiAffinityGroupListThen(::httpmock::Then);
6441 impl InstanceAntiAffinityGroupListThen {
6442 pub fn new(inner: ::httpmock::Then) -> Self {
6443 Self(inner)
6444 }
6445
6446 pub fn into_inner(self) -> ::httpmock::Then {
6447 self.0
6448 }
6449
6450 pub fn ok(self, value: &types::AntiAffinityGroupResultsPage) -> Self {
6451 Self(
6452 self.0
6453 .status(200u16)
6454 .header("content-type", "application/json")
6455 .json_body_obj(value),
6456 )
6457 }
6458
6459 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
6460 assert_eq!(status / 100u16, 4u16);
6461 Self(
6462 self.0
6463 .status(status)
6464 .header("content-type", "application/json")
6465 .json_body_obj(value),
6466 )
6467 }
6468
6469 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
6470 assert_eq!(status / 100u16, 5u16);
6471 Self(
6472 self.0
6473 .status(status)
6474 .header("content-type", "application/json")
6475 .json_body_obj(value),
6476 )
6477 }
6478 }
6479
6480 pub struct InstanceDiskListWhen(::httpmock::When);
6481 impl InstanceDiskListWhen {
6482 pub fn new(inner: ::httpmock::When) -> Self {
6483 Self(
6484 inner
6485 .method(::httpmock::Method::GET)
6486 .path_matches(regex::Regex::new("^/v1/instances/[^/]*/disks$").unwrap()),
6487 )
6488 }
6489
6490 pub fn into_inner(self) -> ::httpmock::When {
6491 self.0
6492 }
6493
6494 pub fn instance(self, value: &types::NameOrId) -> Self {
6495 let re =
6496 regex::Regex::new(&format!("^/v1/instances/{}/disks$", value.to_string())).unwrap();
6497 Self(self.0.path_matches(re))
6498 }
6499
6500 pub fn limit<T>(self, value: T) -> Self
6501 where
6502 T: Into<Option<::std::num::NonZeroU32>>,
6503 {
6504 if let Some(value) = value.into() {
6505 Self(self.0.query_param("limit", value.to_string()))
6506 } else {
6507 Self(self.0.query_param_missing("limit"))
6508 }
6509 }
6510
6511 pub fn page_token<'a, T>(self, value: T) -> Self
6512 where
6513 T: Into<Option<&'a str>>,
6514 {
6515 if let Some(value) = value.into() {
6516 Self(self.0.query_param("page_token", value.to_string()))
6517 } else {
6518 Self(self.0.query_param_missing("page_token"))
6519 }
6520 }
6521
6522 pub fn project<'a, T>(self, value: T) -> Self
6523 where
6524 T: Into<Option<&'a types::NameOrId>>,
6525 {
6526 if let Some(value) = value.into() {
6527 Self(self.0.query_param("project", value.to_string()))
6528 } else {
6529 Self(self.0.query_param_missing("project"))
6530 }
6531 }
6532
6533 pub fn sort_by<T>(self, value: T) -> Self
6534 where
6535 T: Into<Option<types::NameOrIdSortMode>>,
6536 {
6537 if let Some(value) = value.into() {
6538 Self(self.0.query_param("sort_by", value.to_string()))
6539 } else {
6540 Self(self.0.query_param_missing("sort_by"))
6541 }
6542 }
6543 }
6544
6545 pub struct InstanceDiskListThen(::httpmock::Then);
6546 impl InstanceDiskListThen {
6547 pub fn new(inner: ::httpmock::Then) -> Self {
6548 Self(inner)
6549 }
6550
6551 pub fn into_inner(self) -> ::httpmock::Then {
6552 self.0
6553 }
6554
6555 pub fn ok(self, value: &types::DiskResultsPage) -> Self {
6556 Self(
6557 self.0
6558 .status(200u16)
6559 .header("content-type", "application/json")
6560 .json_body_obj(value),
6561 )
6562 }
6563
6564 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
6565 assert_eq!(status / 100u16, 4u16);
6566 Self(
6567 self.0
6568 .status(status)
6569 .header("content-type", "application/json")
6570 .json_body_obj(value),
6571 )
6572 }
6573
6574 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
6575 assert_eq!(status / 100u16, 5u16);
6576 Self(
6577 self.0
6578 .status(status)
6579 .header("content-type", "application/json")
6580 .json_body_obj(value),
6581 )
6582 }
6583 }
6584
6585 pub struct InstanceDiskAttachWhen(::httpmock::When);
6586 impl InstanceDiskAttachWhen {
6587 pub fn new(inner: ::httpmock::When) -> Self {
6588 Self(
6589 inner
6590 .method(::httpmock::Method::POST)
6591 .path_matches(regex::Regex::new("^/v1/instances/[^/]*/disks/attach$").unwrap()),
6592 )
6593 }
6594
6595 pub fn into_inner(self) -> ::httpmock::When {
6596 self.0
6597 }
6598
6599 pub fn instance(self, value: &types::NameOrId) -> Self {
6600 let re = regex::Regex::new(&format!(
6601 "^/v1/instances/{}/disks/attach$",
6602 value.to_string()
6603 ))
6604 .unwrap();
6605 Self(self.0.path_matches(re))
6606 }
6607
6608 pub fn project<'a, T>(self, value: T) -> Self
6609 where
6610 T: Into<Option<&'a types::NameOrId>>,
6611 {
6612 if let Some(value) = value.into() {
6613 Self(self.0.query_param("project", value.to_string()))
6614 } else {
6615 Self(self.0.query_param_missing("project"))
6616 }
6617 }
6618
6619 pub fn body(self, value: &types::DiskPath) -> Self {
6620 Self(self.0.json_body_obj(value))
6621 }
6622 }
6623
6624 pub struct InstanceDiskAttachThen(::httpmock::Then);
6625 impl InstanceDiskAttachThen {
6626 pub fn new(inner: ::httpmock::Then) -> Self {
6627 Self(inner)
6628 }
6629
6630 pub fn into_inner(self) -> ::httpmock::Then {
6631 self.0
6632 }
6633
6634 pub fn accepted(self, value: &types::Disk) -> Self {
6635 Self(
6636 self.0
6637 .status(202u16)
6638 .header("content-type", "application/json")
6639 .json_body_obj(value),
6640 )
6641 }
6642
6643 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
6644 assert_eq!(status / 100u16, 4u16);
6645 Self(
6646 self.0
6647 .status(status)
6648 .header("content-type", "application/json")
6649 .json_body_obj(value),
6650 )
6651 }
6652
6653 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
6654 assert_eq!(status / 100u16, 5u16);
6655 Self(
6656 self.0
6657 .status(status)
6658 .header("content-type", "application/json")
6659 .json_body_obj(value),
6660 )
6661 }
6662 }
6663
6664 pub struct InstanceDiskDetachWhen(::httpmock::When);
6665 impl InstanceDiskDetachWhen {
6666 pub fn new(inner: ::httpmock::When) -> Self {
6667 Self(
6668 inner
6669 .method(::httpmock::Method::POST)
6670 .path_matches(regex::Regex::new("^/v1/instances/[^/]*/disks/detach$").unwrap()),
6671 )
6672 }
6673
6674 pub fn into_inner(self) -> ::httpmock::When {
6675 self.0
6676 }
6677
6678 pub fn instance(self, value: &types::NameOrId) -> Self {
6679 let re = regex::Regex::new(&format!(
6680 "^/v1/instances/{}/disks/detach$",
6681 value.to_string()
6682 ))
6683 .unwrap();
6684 Self(self.0.path_matches(re))
6685 }
6686
6687 pub fn project<'a, T>(self, value: T) -> Self
6688 where
6689 T: Into<Option<&'a types::NameOrId>>,
6690 {
6691 if let Some(value) = value.into() {
6692 Self(self.0.query_param("project", value.to_string()))
6693 } else {
6694 Self(self.0.query_param_missing("project"))
6695 }
6696 }
6697
6698 pub fn body(self, value: &types::DiskPath) -> Self {
6699 Self(self.0.json_body_obj(value))
6700 }
6701 }
6702
6703 pub struct InstanceDiskDetachThen(::httpmock::Then);
6704 impl InstanceDiskDetachThen {
6705 pub fn new(inner: ::httpmock::Then) -> Self {
6706 Self(inner)
6707 }
6708
6709 pub fn into_inner(self) -> ::httpmock::Then {
6710 self.0
6711 }
6712
6713 pub fn accepted(self, value: &types::Disk) -> Self {
6714 Self(
6715 self.0
6716 .status(202u16)
6717 .header("content-type", "application/json")
6718 .json_body_obj(value),
6719 )
6720 }
6721
6722 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
6723 assert_eq!(status / 100u16, 4u16);
6724 Self(
6725 self.0
6726 .status(status)
6727 .header("content-type", "application/json")
6728 .json_body_obj(value),
6729 )
6730 }
6731
6732 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
6733 assert_eq!(status / 100u16, 5u16);
6734 Self(
6735 self.0
6736 .status(status)
6737 .header("content-type", "application/json")
6738 .json_body_obj(value),
6739 )
6740 }
6741 }
6742
6743 pub struct InstanceExternalIpListWhen(::httpmock::When);
6744 impl InstanceExternalIpListWhen {
6745 pub fn new(inner: ::httpmock::When) -> Self {
6746 Self(
6747 inner
6748 .method(::httpmock::Method::GET)
6749 .path_matches(regex::Regex::new("^/v1/instances/[^/]*/external-ips$").unwrap()),
6750 )
6751 }
6752
6753 pub fn into_inner(self) -> ::httpmock::When {
6754 self.0
6755 }
6756
6757 pub fn instance(self, value: &types::NameOrId) -> Self {
6758 let re = regex::Regex::new(&format!(
6759 "^/v1/instances/{}/external-ips$",
6760 value.to_string()
6761 ))
6762 .unwrap();
6763 Self(self.0.path_matches(re))
6764 }
6765
6766 pub fn project<'a, T>(self, value: T) -> Self
6767 where
6768 T: Into<Option<&'a types::NameOrId>>,
6769 {
6770 if let Some(value) = value.into() {
6771 Self(self.0.query_param("project", value.to_string()))
6772 } else {
6773 Self(self.0.query_param_missing("project"))
6774 }
6775 }
6776 }
6777
6778 pub struct InstanceExternalIpListThen(::httpmock::Then);
6779 impl InstanceExternalIpListThen {
6780 pub fn new(inner: ::httpmock::Then) -> Self {
6781 Self(inner)
6782 }
6783
6784 pub fn into_inner(self) -> ::httpmock::Then {
6785 self.0
6786 }
6787
6788 pub fn ok(self, value: &types::ExternalIpResultsPage) -> Self {
6789 Self(
6790 self.0
6791 .status(200u16)
6792 .header("content-type", "application/json")
6793 .json_body_obj(value),
6794 )
6795 }
6796
6797 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
6798 assert_eq!(status / 100u16, 4u16);
6799 Self(
6800 self.0
6801 .status(status)
6802 .header("content-type", "application/json")
6803 .json_body_obj(value),
6804 )
6805 }
6806
6807 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
6808 assert_eq!(status / 100u16, 5u16);
6809 Self(
6810 self.0
6811 .status(status)
6812 .header("content-type", "application/json")
6813 .json_body_obj(value),
6814 )
6815 }
6816 }
6817
6818 pub struct InstanceEphemeralIpAttachWhen(::httpmock::When);
6819 impl InstanceEphemeralIpAttachWhen {
6820 pub fn new(inner: ::httpmock::When) -> Self {
6821 Self(inner.method(::httpmock::Method::POST).path_matches(
6822 regex::Regex::new("^/v1/instances/[^/]*/external-ips/ephemeral$").unwrap(),
6823 ))
6824 }
6825
6826 pub fn into_inner(self) -> ::httpmock::When {
6827 self.0
6828 }
6829
6830 pub fn instance(self, value: &types::NameOrId) -> Self {
6831 let re = regex::Regex::new(&format!(
6832 "^/v1/instances/{}/external-ips/ephemeral$",
6833 value.to_string()
6834 ))
6835 .unwrap();
6836 Self(self.0.path_matches(re))
6837 }
6838
6839 pub fn project<'a, T>(self, value: T) -> Self
6840 where
6841 T: Into<Option<&'a types::NameOrId>>,
6842 {
6843 if let Some(value) = value.into() {
6844 Self(self.0.query_param("project", value.to_string()))
6845 } else {
6846 Self(self.0.query_param_missing("project"))
6847 }
6848 }
6849
6850 pub fn body(self, value: &types::EphemeralIpCreate) -> Self {
6851 Self(self.0.json_body_obj(value))
6852 }
6853 }
6854
6855 pub struct InstanceEphemeralIpAttachThen(::httpmock::Then);
6856 impl InstanceEphemeralIpAttachThen {
6857 pub fn new(inner: ::httpmock::Then) -> Self {
6858 Self(inner)
6859 }
6860
6861 pub fn into_inner(self) -> ::httpmock::Then {
6862 self.0
6863 }
6864
6865 pub fn accepted(self, value: &types::ExternalIp) -> Self {
6866 Self(
6867 self.0
6868 .status(202u16)
6869 .header("content-type", "application/json")
6870 .json_body_obj(value),
6871 )
6872 }
6873
6874 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
6875 assert_eq!(status / 100u16, 4u16);
6876 Self(
6877 self.0
6878 .status(status)
6879 .header("content-type", "application/json")
6880 .json_body_obj(value),
6881 )
6882 }
6883
6884 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
6885 assert_eq!(status / 100u16, 5u16);
6886 Self(
6887 self.0
6888 .status(status)
6889 .header("content-type", "application/json")
6890 .json_body_obj(value),
6891 )
6892 }
6893 }
6894
6895 pub struct InstanceEphemeralIpDetachWhen(::httpmock::When);
6896 impl InstanceEphemeralIpDetachWhen {
6897 pub fn new(inner: ::httpmock::When) -> Self {
6898 Self(inner.method(::httpmock::Method::DELETE).path_matches(
6899 regex::Regex::new("^/v1/instances/[^/]*/external-ips/ephemeral$").unwrap(),
6900 ))
6901 }
6902
6903 pub fn into_inner(self) -> ::httpmock::When {
6904 self.0
6905 }
6906
6907 pub fn instance(self, value: &types::NameOrId) -> Self {
6908 let re = regex::Regex::new(&format!(
6909 "^/v1/instances/{}/external-ips/ephemeral$",
6910 value.to_string()
6911 ))
6912 .unwrap();
6913 Self(self.0.path_matches(re))
6914 }
6915
6916 pub fn ip_version<T>(self, value: T) -> Self
6917 where
6918 T: Into<Option<types::IpVersion>>,
6919 {
6920 if let Some(value) = value.into() {
6921 Self(self.0.query_param("ip_version", value.to_string()))
6922 } else {
6923 Self(self.0.query_param_missing("ip_version"))
6924 }
6925 }
6926
6927 pub fn project<'a, T>(self, value: T) -> Self
6928 where
6929 T: Into<Option<&'a types::NameOrId>>,
6930 {
6931 if let Some(value) = value.into() {
6932 Self(self.0.query_param("project", value.to_string()))
6933 } else {
6934 Self(self.0.query_param_missing("project"))
6935 }
6936 }
6937 }
6938
6939 pub struct InstanceEphemeralIpDetachThen(::httpmock::Then);
6940 impl InstanceEphemeralIpDetachThen {
6941 pub fn new(inner: ::httpmock::Then) -> Self {
6942 Self(inner)
6943 }
6944
6945 pub fn into_inner(self) -> ::httpmock::Then {
6946 self.0
6947 }
6948
6949 pub fn no_content(self) -> Self {
6950 Self(self.0.status(204u16))
6951 }
6952
6953 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
6954 assert_eq!(status / 100u16, 4u16);
6955 Self(
6956 self.0
6957 .status(status)
6958 .header("content-type", "application/json")
6959 .json_body_obj(value),
6960 )
6961 }
6962
6963 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
6964 assert_eq!(status / 100u16, 5u16);
6965 Self(
6966 self.0
6967 .status(status)
6968 .header("content-type", "application/json")
6969 .json_body_obj(value),
6970 )
6971 }
6972 }
6973
6974 pub struct InstanceExternalSubnetListWhen(::httpmock::When);
6975 impl InstanceExternalSubnetListWhen {
6976 pub fn new(inner: ::httpmock::When) -> Self {
6977 Self(
6978 inner.method(::httpmock::Method::GET).path_matches(
6979 regex::Regex::new("^/v1/instances/[^/]*/external-subnets$").unwrap(),
6980 ),
6981 )
6982 }
6983
6984 pub fn into_inner(self) -> ::httpmock::When {
6985 self.0
6986 }
6987
6988 pub fn instance(self, value: &types::NameOrId) -> Self {
6989 let re = regex::Regex::new(&format!(
6990 "^/v1/instances/{}/external-subnets$",
6991 value.to_string()
6992 ))
6993 .unwrap();
6994 Self(self.0.path_matches(re))
6995 }
6996
6997 pub fn project<'a, T>(self, value: T) -> Self
6998 where
6999 T: Into<Option<&'a types::NameOrId>>,
7000 {
7001 if let Some(value) = value.into() {
7002 Self(self.0.query_param("project", value.to_string()))
7003 } else {
7004 Self(self.0.query_param_missing("project"))
7005 }
7006 }
7007 }
7008
7009 pub struct InstanceExternalSubnetListThen(::httpmock::Then);
7010 impl InstanceExternalSubnetListThen {
7011 pub fn new(inner: ::httpmock::Then) -> Self {
7012 Self(inner)
7013 }
7014
7015 pub fn into_inner(self) -> ::httpmock::Then {
7016 self.0
7017 }
7018
7019 pub fn ok(self, value: &types::ExternalSubnetResultsPage) -> Self {
7020 Self(
7021 self.0
7022 .status(200u16)
7023 .header("content-type", "application/json")
7024 .json_body_obj(value),
7025 )
7026 }
7027
7028 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
7029 assert_eq!(status / 100u16, 4u16);
7030 Self(
7031 self.0
7032 .status(status)
7033 .header("content-type", "application/json")
7034 .json_body_obj(value),
7035 )
7036 }
7037
7038 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
7039 assert_eq!(status / 100u16, 5u16);
7040 Self(
7041 self.0
7042 .status(status)
7043 .header("content-type", "application/json")
7044 .json_body_obj(value),
7045 )
7046 }
7047 }
7048
7049 pub struct InstanceMulticastGroupListWhen(::httpmock::When);
7050 impl InstanceMulticastGroupListWhen {
7051 pub fn new(inner: ::httpmock::When) -> Self {
7052 Self(
7053 inner.method(::httpmock::Method::GET).path_matches(
7054 regex::Regex::new("^/v1/instances/[^/]*/multicast-groups$").unwrap(),
7055 ),
7056 )
7057 }
7058
7059 pub fn into_inner(self) -> ::httpmock::When {
7060 self.0
7061 }
7062
7063 pub fn instance(self, value: &types::NameOrId) -> Self {
7064 let re = regex::Regex::new(&format!(
7065 "^/v1/instances/{}/multicast-groups$",
7066 value.to_string()
7067 ))
7068 .unwrap();
7069 Self(self.0.path_matches(re))
7070 }
7071
7072 pub fn limit<T>(self, value: T) -> Self
7073 where
7074 T: Into<Option<::std::num::NonZeroU32>>,
7075 {
7076 if let Some(value) = value.into() {
7077 Self(self.0.query_param("limit", value.to_string()))
7078 } else {
7079 Self(self.0.query_param_missing("limit"))
7080 }
7081 }
7082
7083 pub fn page_token<'a, T>(self, value: T) -> Self
7084 where
7085 T: Into<Option<&'a str>>,
7086 {
7087 if let Some(value) = value.into() {
7088 Self(self.0.query_param("page_token", value.to_string()))
7089 } else {
7090 Self(self.0.query_param_missing("page_token"))
7091 }
7092 }
7093
7094 pub fn project<'a, T>(self, value: T) -> Self
7095 where
7096 T: Into<Option<&'a types::NameOrId>>,
7097 {
7098 if let Some(value) = value.into() {
7099 Self(self.0.query_param("project", value.to_string()))
7100 } else {
7101 Self(self.0.query_param_missing("project"))
7102 }
7103 }
7104
7105 pub fn sort_by<T>(self, value: T) -> Self
7106 where
7107 T: Into<Option<types::IdSortMode>>,
7108 {
7109 if let Some(value) = value.into() {
7110 Self(self.0.query_param("sort_by", value.to_string()))
7111 } else {
7112 Self(self.0.query_param_missing("sort_by"))
7113 }
7114 }
7115 }
7116
7117 pub struct InstanceMulticastGroupListThen(::httpmock::Then);
7118 impl InstanceMulticastGroupListThen {
7119 pub fn new(inner: ::httpmock::Then) -> Self {
7120 Self(inner)
7121 }
7122
7123 pub fn into_inner(self) -> ::httpmock::Then {
7124 self.0
7125 }
7126
7127 pub fn ok(self, value: &types::MulticastGroupMemberResultsPage) -> Self {
7128 Self(
7129 self.0
7130 .status(200u16)
7131 .header("content-type", "application/json")
7132 .json_body_obj(value),
7133 )
7134 }
7135
7136 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
7137 assert_eq!(status / 100u16, 4u16);
7138 Self(
7139 self.0
7140 .status(status)
7141 .header("content-type", "application/json")
7142 .json_body_obj(value),
7143 )
7144 }
7145
7146 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
7147 assert_eq!(status / 100u16, 5u16);
7148 Self(
7149 self.0
7150 .status(status)
7151 .header("content-type", "application/json")
7152 .json_body_obj(value),
7153 )
7154 }
7155 }
7156
7157 pub struct InstanceMulticastGroupJoinWhen(::httpmock::When);
7158 impl InstanceMulticastGroupJoinWhen {
7159 pub fn new(inner: ::httpmock::When) -> Self {
7160 Self(inner.method(::httpmock::Method::PUT).path_matches(
7161 regex::Regex::new("^/v1/instances/[^/]*/multicast-groups/[^/]*$").unwrap(),
7162 ))
7163 }
7164
7165 pub fn into_inner(self) -> ::httpmock::When {
7166 self.0
7167 }
7168
7169 pub fn instance(self, value: &types::NameOrId) -> Self {
7170 let re = regex::Regex::new(&format!(
7171 "^/v1/instances/{}/multicast-groups/.*$",
7172 value.to_string()
7173 ))
7174 .unwrap();
7175 Self(self.0.path_matches(re))
7176 }
7177
7178 pub fn multicast_group(self, value: &types::MulticastGroupIdentifier) -> Self {
7179 let re = regex::Regex::new(&format!(
7180 "^/v1/instances/.*/multicast-groups/{}$",
7181 value.to_string()
7182 ))
7183 .unwrap();
7184 Self(self.0.path_matches(re))
7185 }
7186
7187 pub fn project<'a, T>(self, value: T) -> Self
7188 where
7189 T: Into<Option<&'a types::NameOrId>>,
7190 {
7191 if let Some(value) = value.into() {
7192 Self(self.0.query_param("project", value.to_string()))
7193 } else {
7194 Self(self.0.query_param_missing("project"))
7195 }
7196 }
7197
7198 pub fn body(self, value: &types::InstanceMulticastGroupJoin) -> Self {
7199 Self(self.0.json_body_obj(value))
7200 }
7201 }
7202
7203 pub struct InstanceMulticastGroupJoinThen(::httpmock::Then);
7204 impl InstanceMulticastGroupJoinThen {
7205 pub fn new(inner: ::httpmock::Then) -> Self {
7206 Self(inner)
7207 }
7208
7209 pub fn into_inner(self) -> ::httpmock::Then {
7210 self.0
7211 }
7212
7213 pub fn created(self, value: &types::MulticastGroupMember) -> Self {
7214 Self(
7215 self.0
7216 .status(201u16)
7217 .header("content-type", "application/json")
7218 .json_body_obj(value),
7219 )
7220 }
7221
7222 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
7223 assert_eq!(status / 100u16, 4u16);
7224 Self(
7225 self.0
7226 .status(status)
7227 .header("content-type", "application/json")
7228 .json_body_obj(value),
7229 )
7230 }
7231
7232 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
7233 assert_eq!(status / 100u16, 5u16);
7234 Self(
7235 self.0
7236 .status(status)
7237 .header("content-type", "application/json")
7238 .json_body_obj(value),
7239 )
7240 }
7241 }
7242
7243 pub struct InstanceMulticastGroupLeaveWhen(::httpmock::When);
7244 impl InstanceMulticastGroupLeaveWhen {
7245 pub fn new(inner: ::httpmock::When) -> Self {
7246 Self(inner.method(::httpmock::Method::DELETE).path_matches(
7247 regex::Regex::new("^/v1/instances/[^/]*/multicast-groups/[^/]*$").unwrap(),
7248 ))
7249 }
7250
7251 pub fn into_inner(self) -> ::httpmock::When {
7252 self.0
7253 }
7254
7255 pub fn instance(self, value: &types::NameOrId) -> Self {
7256 let re = regex::Regex::new(&format!(
7257 "^/v1/instances/{}/multicast-groups/.*$",
7258 value.to_string()
7259 ))
7260 .unwrap();
7261 Self(self.0.path_matches(re))
7262 }
7263
7264 pub fn multicast_group(self, value: &types::MulticastGroupIdentifier) -> Self {
7265 let re = regex::Regex::new(&format!(
7266 "^/v1/instances/.*/multicast-groups/{}$",
7267 value.to_string()
7268 ))
7269 .unwrap();
7270 Self(self.0.path_matches(re))
7271 }
7272
7273 pub fn project<'a, T>(self, value: T) -> Self
7274 where
7275 T: Into<Option<&'a types::NameOrId>>,
7276 {
7277 if let Some(value) = value.into() {
7278 Self(self.0.query_param("project", value.to_string()))
7279 } else {
7280 Self(self.0.query_param_missing("project"))
7281 }
7282 }
7283 }
7284
7285 pub struct InstanceMulticastGroupLeaveThen(::httpmock::Then);
7286 impl InstanceMulticastGroupLeaveThen {
7287 pub fn new(inner: ::httpmock::Then) -> Self {
7288 Self(inner)
7289 }
7290
7291 pub fn into_inner(self) -> ::httpmock::Then {
7292 self.0
7293 }
7294
7295 pub fn no_content(self) -> Self {
7296 Self(self.0.status(204u16))
7297 }
7298
7299 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
7300 assert_eq!(status / 100u16, 4u16);
7301 Self(
7302 self.0
7303 .status(status)
7304 .header("content-type", "application/json")
7305 .json_body_obj(value),
7306 )
7307 }
7308
7309 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
7310 assert_eq!(status / 100u16, 5u16);
7311 Self(
7312 self.0
7313 .status(status)
7314 .header("content-type", "application/json")
7315 .json_body_obj(value),
7316 )
7317 }
7318 }
7319
7320 pub struct InstanceRebootWhen(::httpmock::When);
7321 impl InstanceRebootWhen {
7322 pub fn new(inner: ::httpmock::When) -> Self {
7323 Self(
7324 inner
7325 .method(::httpmock::Method::POST)
7326 .path_matches(regex::Regex::new("^/v1/instances/[^/]*/reboot$").unwrap()),
7327 )
7328 }
7329
7330 pub fn into_inner(self) -> ::httpmock::When {
7331 self.0
7332 }
7333
7334 pub fn instance(self, value: &types::NameOrId) -> Self {
7335 let re = regex::Regex::new(&format!("^/v1/instances/{}/reboot$", value.to_string()))
7336 .unwrap();
7337 Self(self.0.path_matches(re))
7338 }
7339
7340 pub fn project<'a, T>(self, value: T) -> Self
7341 where
7342 T: Into<Option<&'a types::NameOrId>>,
7343 {
7344 if let Some(value) = value.into() {
7345 Self(self.0.query_param("project", value.to_string()))
7346 } else {
7347 Self(self.0.query_param_missing("project"))
7348 }
7349 }
7350 }
7351
7352 pub struct InstanceRebootThen(::httpmock::Then);
7353 impl InstanceRebootThen {
7354 pub fn new(inner: ::httpmock::Then) -> Self {
7355 Self(inner)
7356 }
7357
7358 pub fn into_inner(self) -> ::httpmock::Then {
7359 self.0
7360 }
7361
7362 pub fn accepted(self, value: &types::Instance) -> Self {
7363 Self(
7364 self.0
7365 .status(202u16)
7366 .header("content-type", "application/json")
7367 .json_body_obj(value),
7368 )
7369 }
7370
7371 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
7372 assert_eq!(status / 100u16, 4u16);
7373 Self(
7374 self.0
7375 .status(status)
7376 .header("content-type", "application/json")
7377 .json_body_obj(value),
7378 )
7379 }
7380
7381 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
7382 assert_eq!(status / 100u16, 5u16);
7383 Self(
7384 self.0
7385 .status(status)
7386 .header("content-type", "application/json")
7387 .json_body_obj(value),
7388 )
7389 }
7390 }
7391
7392 pub struct InstanceSerialConsoleWhen(::httpmock::When);
7393 impl InstanceSerialConsoleWhen {
7394 pub fn new(inner: ::httpmock::When) -> Self {
7395 Self(
7396 inner.method(::httpmock::Method::GET).path_matches(
7397 regex::Regex::new("^/v1/instances/[^/]*/serial-console$").unwrap(),
7398 ),
7399 )
7400 }
7401
7402 pub fn into_inner(self) -> ::httpmock::When {
7403 self.0
7404 }
7405
7406 pub fn instance(self, value: &types::NameOrId) -> Self {
7407 let re = regex::Regex::new(&format!(
7408 "^/v1/instances/{}/serial-console$",
7409 value.to_string()
7410 ))
7411 .unwrap();
7412 Self(self.0.path_matches(re))
7413 }
7414
7415 pub fn from_start<T>(self, value: T) -> Self
7416 where
7417 T: Into<Option<u64>>,
7418 {
7419 if let Some(value) = value.into() {
7420 Self(self.0.query_param("from_start", value.to_string()))
7421 } else {
7422 Self(self.0.query_param_missing("from_start"))
7423 }
7424 }
7425
7426 pub fn max_bytes<T>(self, value: T) -> Self
7427 where
7428 T: Into<Option<u64>>,
7429 {
7430 if let Some(value) = value.into() {
7431 Self(self.0.query_param("max_bytes", value.to_string()))
7432 } else {
7433 Self(self.0.query_param_missing("max_bytes"))
7434 }
7435 }
7436
7437 pub fn most_recent<T>(self, value: T) -> Self
7438 where
7439 T: Into<Option<u64>>,
7440 {
7441 if let Some(value) = value.into() {
7442 Self(self.0.query_param("most_recent", value.to_string()))
7443 } else {
7444 Self(self.0.query_param_missing("most_recent"))
7445 }
7446 }
7447
7448 pub fn project<'a, T>(self, value: T) -> Self
7449 where
7450 T: Into<Option<&'a types::NameOrId>>,
7451 {
7452 if let Some(value) = value.into() {
7453 Self(self.0.query_param("project", value.to_string()))
7454 } else {
7455 Self(self.0.query_param_missing("project"))
7456 }
7457 }
7458 }
7459
7460 pub struct InstanceSerialConsoleThen(::httpmock::Then);
7461 impl InstanceSerialConsoleThen {
7462 pub fn new(inner: ::httpmock::Then) -> Self {
7463 Self(inner)
7464 }
7465
7466 pub fn into_inner(self) -> ::httpmock::Then {
7467 self.0
7468 }
7469
7470 pub fn ok(self, value: &types::InstanceSerialConsoleData) -> Self {
7471 Self(
7472 self.0
7473 .status(200u16)
7474 .header("content-type", "application/json")
7475 .json_body_obj(value),
7476 )
7477 }
7478
7479 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
7480 assert_eq!(status / 100u16, 4u16);
7481 Self(
7482 self.0
7483 .status(status)
7484 .header("content-type", "application/json")
7485 .json_body_obj(value),
7486 )
7487 }
7488
7489 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
7490 assert_eq!(status / 100u16, 5u16);
7491 Self(
7492 self.0
7493 .status(status)
7494 .header("content-type", "application/json")
7495 .json_body_obj(value),
7496 )
7497 }
7498 }
7499
7500 pub struct InstanceSerialConsoleStreamWhen(::httpmock::When);
7501 impl InstanceSerialConsoleStreamWhen {
7502 pub fn new(inner: ::httpmock::When) -> Self {
7503 Self(inner.method(::httpmock::Method::GET).path_matches(
7504 regex::Regex::new("^/v1/instances/[^/]*/serial-console/stream$").unwrap(),
7505 ))
7506 }
7507
7508 pub fn into_inner(self) -> ::httpmock::When {
7509 self.0
7510 }
7511
7512 pub fn instance(self, value: &types::NameOrId) -> Self {
7513 let re = regex::Regex::new(&format!(
7514 "^/v1/instances/{}/serial-console/stream$",
7515 value.to_string()
7516 ))
7517 .unwrap();
7518 Self(self.0.path_matches(re))
7519 }
7520
7521 pub fn most_recent<T>(self, value: T) -> Self
7522 where
7523 T: Into<Option<u64>>,
7524 {
7525 if let Some(value) = value.into() {
7526 Self(self.0.query_param("most_recent", value.to_string()))
7527 } else {
7528 Self(self.0.query_param_missing("most_recent"))
7529 }
7530 }
7531
7532 pub fn project<'a, T>(self, value: T) -> Self
7533 where
7534 T: Into<Option<&'a types::NameOrId>>,
7535 {
7536 if let Some(value) = value.into() {
7537 Self(self.0.query_param("project", value.to_string()))
7538 } else {
7539 Self(self.0.query_param_missing("project"))
7540 }
7541 }
7542 }
7543
7544 pub struct InstanceSerialConsoleStreamThen(::httpmock::Then);
7545 impl InstanceSerialConsoleStreamThen {
7546 pub fn new(inner: ::httpmock::Then) -> Self {
7547 Self(inner)
7548 }
7549
7550 pub fn into_inner(self) -> ::httpmock::Then {
7551 self.0
7552 }
7553
7554 pub fn default_response(self, status: u16) -> Self {
7555 Self(self.0.status(status))
7556 }
7557
7558 pub fn switching_protocols(self) -> Self {
7559 Self(self.0.status(101u16))
7560 }
7561 }
7562
7563 pub struct InstanceSshPublicKeyListWhen(::httpmock::When);
7564 impl InstanceSshPublicKeyListWhen {
7565 pub fn new(inner: ::httpmock::When) -> Self {
7566 Self(
7567 inner.method(::httpmock::Method::GET).path_matches(
7568 regex::Regex::new("^/v1/instances/[^/]*/ssh-public-keys$").unwrap(),
7569 ),
7570 )
7571 }
7572
7573 pub fn into_inner(self) -> ::httpmock::When {
7574 self.0
7575 }
7576
7577 pub fn instance(self, value: &types::NameOrId) -> Self {
7578 let re = regex::Regex::new(&format!(
7579 "^/v1/instances/{}/ssh-public-keys$",
7580 value.to_string()
7581 ))
7582 .unwrap();
7583 Self(self.0.path_matches(re))
7584 }
7585
7586 pub fn limit<T>(self, value: T) -> Self
7587 where
7588 T: Into<Option<::std::num::NonZeroU32>>,
7589 {
7590 if let Some(value) = value.into() {
7591 Self(self.0.query_param("limit", value.to_string()))
7592 } else {
7593 Self(self.0.query_param_missing("limit"))
7594 }
7595 }
7596
7597 pub fn page_token<'a, T>(self, value: T) -> Self
7598 where
7599 T: Into<Option<&'a str>>,
7600 {
7601 if let Some(value) = value.into() {
7602 Self(self.0.query_param("page_token", value.to_string()))
7603 } else {
7604 Self(self.0.query_param_missing("page_token"))
7605 }
7606 }
7607
7608 pub fn project<'a, T>(self, value: T) -> Self
7609 where
7610 T: Into<Option<&'a types::NameOrId>>,
7611 {
7612 if let Some(value) = value.into() {
7613 Self(self.0.query_param("project", value.to_string()))
7614 } else {
7615 Self(self.0.query_param_missing("project"))
7616 }
7617 }
7618
7619 pub fn sort_by<T>(self, value: T) -> Self
7620 where
7621 T: Into<Option<types::NameOrIdSortMode>>,
7622 {
7623 if let Some(value) = value.into() {
7624 Self(self.0.query_param("sort_by", value.to_string()))
7625 } else {
7626 Self(self.0.query_param_missing("sort_by"))
7627 }
7628 }
7629 }
7630
7631 pub struct InstanceSshPublicKeyListThen(::httpmock::Then);
7632 impl InstanceSshPublicKeyListThen {
7633 pub fn new(inner: ::httpmock::Then) -> Self {
7634 Self(inner)
7635 }
7636
7637 pub fn into_inner(self) -> ::httpmock::Then {
7638 self.0
7639 }
7640
7641 pub fn ok(self, value: &types::SshKeyResultsPage) -> Self {
7642 Self(
7643 self.0
7644 .status(200u16)
7645 .header("content-type", "application/json")
7646 .json_body_obj(value),
7647 )
7648 }
7649
7650 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
7651 assert_eq!(status / 100u16, 4u16);
7652 Self(
7653 self.0
7654 .status(status)
7655 .header("content-type", "application/json")
7656 .json_body_obj(value),
7657 )
7658 }
7659
7660 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
7661 assert_eq!(status / 100u16, 5u16);
7662 Self(
7663 self.0
7664 .status(status)
7665 .header("content-type", "application/json")
7666 .json_body_obj(value),
7667 )
7668 }
7669 }
7670
7671 pub struct InstanceStartWhen(::httpmock::When);
7672 impl InstanceStartWhen {
7673 pub fn new(inner: ::httpmock::When) -> Self {
7674 Self(
7675 inner
7676 .method(::httpmock::Method::POST)
7677 .path_matches(regex::Regex::new("^/v1/instances/[^/]*/start$").unwrap()),
7678 )
7679 }
7680
7681 pub fn into_inner(self) -> ::httpmock::When {
7682 self.0
7683 }
7684
7685 pub fn instance(self, value: &types::NameOrId) -> Self {
7686 let re =
7687 regex::Regex::new(&format!("^/v1/instances/{}/start$", value.to_string())).unwrap();
7688 Self(self.0.path_matches(re))
7689 }
7690
7691 pub fn project<'a, T>(self, value: T) -> Self
7692 where
7693 T: Into<Option<&'a types::NameOrId>>,
7694 {
7695 if let Some(value) = value.into() {
7696 Self(self.0.query_param("project", value.to_string()))
7697 } else {
7698 Self(self.0.query_param_missing("project"))
7699 }
7700 }
7701 }
7702
7703 pub struct InstanceStartThen(::httpmock::Then);
7704 impl InstanceStartThen {
7705 pub fn new(inner: ::httpmock::Then) -> Self {
7706 Self(inner)
7707 }
7708
7709 pub fn into_inner(self) -> ::httpmock::Then {
7710 self.0
7711 }
7712
7713 pub fn accepted(self, value: &types::Instance) -> Self {
7714 Self(
7715 self.0
7716 .status(202u16)
7717 .header("content-type", "application/json")
7718 .json_body_obj(value),
7719 )
7720 }
7721
7722 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
7723 assert_eq!(status / 100u16, 4u16);
7724 Self(
7725 self.0
7726 .status(status)
7727 .header("content-type", "application/json")
7728 .json_body_obj(value),
7729 )
7730 }
7731
7732 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
7733 assert_eq!(status / 100u16, 5u16);
7734 Self(
7735 self.0
7736 .status(status)
7737 .header("content-type", "application/json")
7738 .json_body_obj(value),
7739 )
7740 }
7741 }
7742
7743 pub struct InstanceStopWhen(::httpmock::When);
7744 impl InstanceStopWhen {
7745 pub fn new(inner: ::httpmock::When) -> Self {
7746 Self(
7747 inner
7748 .method(::httpmock::Method::POST)
7749 .path_matches(regex::Regex::new("^/v1/instances/[^/]*/stop$").unwrap()),
7750 )
7751 }
7752
7753 pub fn into_inner(self) -> ::httpmock::When {
7754 self.0
7755 }
7756
7757 pub fn instance(self, value: &types::NameOrId) -> Self {
7758 let re =
7759 regex::Regex::new(&format!("^/v1/instances/{}/stop$", value.to_string())).unwrap();
7760 Self(self.0.path_matches(re))
7761 }
7762
7763 pub fn project<'a, T>(self, value: T) -> Self
7764 where
7765 T: Into<Option<&'a types::NameOrId>>,
7766 {
7767 if let Some(value) = value.into() {
7768 Self(self.0.query_param("project", value.to_string()))
7769 } else {
7770 Self(self.0.query_param_missing("project"))
7771 }
7772 }
7773 }
7774
7775 pub struct InstanceStopThen(::httpmock::Then);
7776 impl InstanceStopThen {
7777 pub fn new(inner: ::httpmock::Then) -> Self {
7778 Self(inner)
7779 }
7780
7781 pub fn into_inner(self) -> ::httpmock::Then {
7782 self.0
7783 }
7784
7785 pub fn accepted(self, value: &types::Instance) -> Self {
7786 Self(
7787 self.0
7788 .status(202u16)
7789 .header("content-type", "application/json")
7790 .json_body_obj(value),
7791 )
7792 }
7793
7794 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
7795 assert_eq!(status / 100u16, 4u16);
7796 Self(
7797 self.0
7798 .status(status)
7799 .header("content-type", "application/json")
7800 .json_body_obj(value),
7801 )
7802 }
7803
7804 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
7805 assert_eq!(status / 100u16, 5u16);
7806 Self(
7807 self.0
7808 .status(status)
7809 .header("content-type", "application/json")
7810 .json_body_obj(value),
7811 )
7812 }
7813 }
7814
7815 pub struct InternetGatewayIpAddressListWhen(::httpmock::When);
7816 impl InternetGatewayIpAddressListWhen {
7817 pub fn new(inner: ::httpmock::When) -> Self {
7818 Self(
7819 inner.method(::httpmock::Method::GET).path_matches(
7820 regex::Regex::new("^/v1/internet-gateway-ip-addresses$").unwrap(),
7821 ),
7822 )
7823 }
7824
7825 pub fn into_inner(self) -> ::httpmock::When {
7826 self.0
7827 }
7828
7829 pub fn gateway<'a, T>(self, value: T) -> Self
7830 where
7831 T: Into<Option<&'a types::NameOrId>>,
7832 {
7833 if let Some(value) = value.into() {
7834 Self(self.0.query_param("gateway", value.to_string()))
7835 } else {
7836 Self(self.0.query_param_missing("gateway"))
7837 }
7838 }
7839
7840 pub fn limit<T>(self, value: T) -> Self
7841 where
7842 T: Into<Option<::std::num::NonZeroU32>>,
7843 {
7844 if let Some(value) = value.into() {
7845 Self(self.0.query_param("limit", value.to_string()))
7846 } else {
7847 Self(self.0.query_param_missing("limit"))
7848 }
7849 }
7850
7851 pub fn page_token<'a, T>(self, value: T) -> Self
7852 where
7853 T: Into<Option<&'a str>>,
7854 {
7855 if let Some(value) = value.into() {
7856 Self(self.0.query_param("page_token", value.to_string()))
7857 } else {
7858 Self(self.0.query_param_missing("page_token"))
7859 }
7860 }
7861
7862 pub fn project<'a, T>(self, value: T) -> Self
7863 where
7864 T: Into<Option<&'a types::NameOrId>>,
7865 {
7866 if let Some(value) = value.into() {
7867 Self(self.0.query_param("project", value.to_string()))
7868 } else {
7869 Self(self.0.query_param_missing("project"))
7870 }
7871 }
7872
7873 pub fn sort_by<T>(self, value: T) -> Self
7874 where
7875 T: Into<Option<types::NameOrIdSortMode>>,
7876 {
7877 if let Some(value) = value.into() {
7878 Self(self.0.query_param("sort_by", value.to_string()))
7879 } else {
7880 Self(self.0.query_param_missing("sort_by"))
7881 }
7882 }
7883
7884 pub fn vpc<'a, T>(self, value: T) -> Self
7885 where
7886 T: Into<Option<&'a types::NameOrId>>,
7887 {
7888 if let Some(value) = value.into() {
7889 Self(self.0.query_param("vpc", value.to_string()))
7890 } else {
7891 Self(self.0.query_param_missing("vpc"))
7892 }
7893 }
7894 }
7895
7896 pub struct InternetGatewayIpAddressListThen(::httpmock::Then);
7897 impl InternetGatewayIpAddressListThen {
7898 pub fn new(inner: ::httpmock::Then) -> Self {
7899 Self(inner)
7900 }
7901
7902 pub fn into_inner(self) -> ::httpmock::Then {
7903 self.0
7904 }
7905
7906 pub fn ok(self, value: &types::InternetGatewayIpAddressResultsPage) -> Self {
7907 Self(
7908 self.0
7909 .status(200u16)
7910 .header("content-type", "application/json")
7911 .json_body_obj(value),
7912 )
7913 }
7914
7915 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
7916 assert_eq!(status / 100u16, 4u16);
7917 Self(
7918 self.0
7919 .status(status)
7920 .header("content-type", "application/json")
7921 .json_body_obj(value),
7922 )
7923 }
7924
7925 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
7926 assert_eq!(status / 100u16, 5u16);
7927 Self(
7928 self.0
7929 .status(status)
7930 .header("content-type", "application/json")
7931 .json_body_obj(value),
7932 )
7933 }
7934 }
7935
7936 pub struct InternetGatewayIpAddressCreateWhen(::httpmock::When);
7937 impl InternetGatewayIpAddressCreateWhen {
7938 pub fn new(inner: ::httpmock::When) -> Self {
7939 Self(
7940 inner.method(::httpmock::Method::POST).path_matches(
7941 regex::Regex::new("^/v1/internet-gateway-ip-addresses$").unwrap(),
7942 ),
7943 )
7944 }
7945
7946 pub fn into_inner(self) -> ::httpmock::When {
7947 self.0
7948 }
7949
7950 pub fn gateway(self, value: &types::NameOrId) -> Self {
7951 Self(self.0.query_param("gateway", value.to_string()))
7952 }
7953
7954 pub fn project<'a, T>(self, value: T) -> Self
7955 where
7956 T: Into<Option<&'a types::NameOrId>>,
7957 {
7958 if let Some(value) = value.into() {
7959 Self(self.0.query_param("project", value.to_string()))
7960 } else {
7961 Self(self.0.query_param_missing("project"))
7962 }
7963 }
7964
7965 pub fn vpc<'a, T>(self, value: T) -> Self
7966 where
7967 T: Into<Option<&'a types::NameOrId>>,
7968 {
7969 if let Some(value) = value.into() {
7970 Self(self.0.query_param("vpc", value.to_string()))
7971 } else {
7972 Self(self.0.query_param_missing("vpc"))
7973 }
7974 }
7975
7976 pub fn body(self, value: &types::InternetGatewayIpAddressCreate) -> Self {
7977 Self(self.0.json_body_obj(value))
7978 }
7979 }
7980
7981 pub struct InternetGatewayIpAddressCreateThen(::httpmock::Then);
7982 impl InternetGatewayIpAddressCreateThen {
7983 pub fn new(inner: ::httpmock::Then) -> Self {
7984 Self(inner)
7985 }
7986
7987 pub fn into_inner(self) -> ::httpmock::Then {
7988 self.0
7989 }
7990
7991 pub fn created(self, value: &types::InternetGatewayIpAddress) -> Self {
7992 Self(
7993 self.0
7994 .status(201u16)
7995 .header("content-type", "application/json")
7996 .json_body_obj(value),
7997 )
7998 }
7999
8000 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
8001 assert_eq!(status / 100u16, 4u16);
8002 Self(
8003 self.0
8004 .status(status)
8005 .header("content-type", "application/json")
8006 .json_body_obj(value),
8007 )
8008 }
8009
8010 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
8011 assert_eq!(status / 100u16, 5u16);
8012 Self(
8013 self.0
8014 .status(status)
8015 .header("content-type", "application/json")
8016 .json_body_obj(value),
8017 )
8018 }
8019 }
8020
8021 pub struct InternetGatewayIpAddressDeleteWhen(::httpmock::When);
8022 impl InternetGatewayIpAddressDeleteWhen {
8023 pub fn new(inner: ::httpmock::When) -> Self {
8024 Self(inner.method(::httpmock::Method::DELETE).path_matches(
8025 regex::Regex::new("^/v1/internet-gateway-ip-addresses/[^/]*$").unwrap(),
8026 ))
8027 }
8028
8029 pub fn into_inner(self) -> ::httpmock::When {
8030 self.0
8031 }
8032
8033 pub fn address(self, value: &types::NameOrId) -> Self {
8034 let re = regex::Regex::new(&format!(
8035 "^/v1/internet-gateway-ip-addresses/{}$",
8036 value.to_string()
8037 ))
8038 .unwrap();
8039 Self(self.0.path_matches(re))
8040 }
8041
8042 pub fn cascade<T>(self, value: T) -> Self
8043 where
8044 T: Into<Option<bool>>,
8045 {
8046 if let Some(value) = value.into() {
8047 Self(self.0.query_param("cascade", value.to_string()))
8048 } else {
8049 Self(self.0.query_param_missing("cascade"))
8050 }
8051 }
8052
8053 pub fn gateway<'a, T>(self, value: T) -> Self
8054 where
8055 T: Into<Option<&'a types::NameOrId>>,
8056 {
8057 if let Some(value) = value.into() {
8058 Self(self.0.query_param("gateway", value.to_string()))
8059 } else {
8060 Self(self.0.query_param_missing("gateway"))
8061 }
8062 }
8063
8064 pub fn project<'a, T>(self, value: T) -> Self
8065 where
8066 T: Into<Option<&'a types::NameOrId>>,
8067 {
8068 if let Some(value) = value.into() {
8069 Self(self.0.query_param("project", value.to_string()))
8070 } else {
8071 Self(self.0.query_param_missing("project"))
8072 }
8073 }
8074
8075 pub fn vpc<'a, T>(self, value: T) -> Self
8076 where
8077 T: Into<Option<&'a types::NameOrId>>,
8078 {
8079 if let Some(value) = value.into() {
8080 Self(self.0.query_param("vpc", value.to_string()))
8081 } else {
8082 Self(self.0.query_param_missing("vpc"))
8083 }
8084 }
8085 }
8086
8087 pub struct InternetGatewayIpAddressDeleteThen(::httpmock::Then);
8088 impl InternetGatewayIpAddressDeleteThen {
8089 pub fn new(inner: ::httpmock::Then) -> Self {
8090 Self(inner)
8091 }
8092
8093 pub fn into_inner(self) -> ::httpmock::Then {
8094 self.0
8095 }
8096
8097 pub fn no_content(self) -> Self {
8098 Self(self.0.status(204u16))
8099 }
8100
8101 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
8102 assert_eq!(status / 100u16, 4u16);
8103 Self(
8104 self.0
8105 .status(status)
8106 .header("content-type", "application/json")
8107 .json_body_obj(value),
8108 )
8109 }
8110
8111 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
8112 assert_eq!(status / 100u16, 5u16);
8113 Self(
8114 self.0
8115 .status(status)
8116 .header("content-type", "application/json")
8117 .json_body_obj(value),
8118 )
8119 }
8120 }
8121
8122 pub struct InternetGatewayIpPoolListWhen(::httpmock::When);
8123 impl InternetGatewayIpPoolListWhen {
8124 pub fn new(inner: ::httpmock::When) -> Self {
8125 Self(
8126 inner
8127 .method(::httpmock::Method::GET)
8128 .path_matches(regex::Regex::new("^/v1/internet-gateway-ip-pools$").unwrap()),
8129 )
8130 }
8131
8132 pub fn into_inner(self) -> ::httpmock::When {
8133 self.0
8134 }
8135
8136 pub fn gateway<'a, T>(self, value: T) -> Self
8137 where
8138 T: Into<Option<&'a types::NameOrId>>,
8139 {
8140 if let Some(value) = value.into() {
8141 Self(self.0.query_param("gateway", value.to_string()))
8142 } else {
8143 Self(self.0.query_param_missing("gateway"))
8144 }
8145 }
8146
8147 pub fn limit<T>(self, value: T) -> Self
8148 where
8149 T: Into<Option<::std::num::NonZeroU32>>,
8150 {
8151 if let Some(value) = value.into() {
8152 Self(self.0.query_param("limit", value.to_string()))
8153 } else {
8154 Self(self.0.query_param_missing("limit"))
8155 }
8156 }
8157
8158 pub fn page_token<'a, T>(self, value: T) -> Self
8159 where
8160 T: Into<Option<&'a str>>,
8161 {
8162 if let Some(value) = value.into() {
8163 Self(self.0.query_param("page_token", value.to_string()))
8164 } else {
8165 Self(self.0.query_param_missing("page_token"))
8166 }
8167 }
8168
8169 pub fn project<'a, T>(self, value: T) -> Self
8170 where
8171 T: Into<Option<&'a types::NameOrId>>,
8172 {
8173 if let Some(value) = value.into() {
8174 Self(self.0.query_param("project", value.to_string()))
8175 } else {
8176 Self(self.0.query_param_missing("project"))
8177 }
8178 }
8179
8180 pub fn sort_by<T>(self, value: T) -> Self
8181 where
8182 T: Into<Option<types::NameOrIdSortMode>>,
8183 {
8184 if let Some(value) = value.into() {
8185 Self(self.0.query_param("sort_by", value.to_string()))
8186 } else {
8187 Self(self.0.query_param_missing("sort_by"))
8188 }
8189 }
8190
8191 pub fn vpc<'a, T>(self, value: T) -> Self
8192 where
8193 T: Into<Option<&'a types::NameOrId>>,
8194 {
8195 if let Some(value) = value.into() {
8196 Self(self.0.query_param("vpc", value.to_string()))
8197 } else {
8198 Self(self.0.query_param_missing("vpc"))
8199 }
8200 }
8201 }
8202
8203 pub struct InternetGatewayIpPoolListThen(::httpmock::Then);
8204 impl InternetGatewayIpPoolListThen {
8205 pub fn new(inner: ::httpmock::Then) -> Self {
8206 Self(inner)
8207 }
8208
8209 pub fn into_inner(self) -> ::httpmock::Then {
8210 self.0
8211 }
8212
8213 pub fn ok(self, value: &types::InternetGatewayIpPoolResultsPage) -> Self {
8214 Self(
8215 self.0
8216 .status(200u16)
8217 .header("content-type", "application/json")
8218 .json_body_obj(value),
8219 )
8220 }
8221
8222 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
8223 assert_eq!(status / 100u16, 4u16);
8224 Self(
8225 self.0
8226 .status(status)
8227 .header("content-type", "application/json")
8228 .json_body_obj(value),
8229 )
8230 }
8231
8232 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
8233 assert_eq!(status / 100u16, 5u16);
8234 Self(
8235 self.0
8236 .status(status)
8237 .header("content-type", "application/json")
8238 .json_body_obj(value),
8239 )
8240 }
8241 }
8242
8243 pub struct InternetGatewayIpPoolCreateWhen(::httpmock::When);
8244 impl InternetGatewayIpPoolCreateWhen {
8245 pub fn new(inner: ::httpmock::When) -> Self {
8246 Self(
8247 inner
8248 .method(::httpmock::Method::POST)
8249 .path_matches(regex::Regex::new("^/v1/internet-gateway-ip-pools$").unwrap()),
8250 )
8251 }
8252
8253 pub fn into_inner(self) -> ::httpmock::When {
8254 self.0
8255 }
8256
8257 pub fn gateway(self, value: &types::NameOrId) -> Self {
8258 Self(self.0.query_param("gateway", value.to_string()))
8259 }
8260
8261 pub fn project<'a, T>(self, value: T) -> Self
8262 where
8263 T: Into<Option<&'a types::NameOrId>>,
8264 {
8265 if let Some(value) = value.into() {
8266 Self(self.0.query_param("project", value.to_string()))
8267 } else {
8268 Self(self.0.query_param_missing("project"))
8269 }
8270 }
8271
8272 pub fn vpc<'a, T>(self, value: T) -> Self
8273 where
8274 T: Into<Option<&'a types::NameOrId>>,
8275 {
8276 if let Some(value) = value.into() {
8277 Self(self.0.query_param("vpc", value.to_string()))
8278 } else {
8279 Self(self.0.query_param_missing("vpc"))
8280 }
8281 }
8282
8283 pub fn body(self, value: &types::InternetGatewayIpPoolCreate) -> Self {
8284 Self(self.0.json_body_obj(value))
8285 }
8286 }
8287
8288 pub struct InternetGatewayIpPoolCreateThen(::httpmock::Then);
8289 impl InternetGatewayIpPoolCreateThen {
8290 pub fn new(inner: ::httpmock::Then) -> Self {
8291 Self(inner)
8292 }
8293
8294 pub fn into_inner(self) -> ::httpmock::Then {
8295 self.0
8296 }
8297
8298 pub fn created(self, value: &types::InternetGatewayIpPool) -> Self {
8299 Self(
8300 self.0
8301 .status(201u16)
8302 .header("content-type", "application/json")
8303 .json_body_obj(value),
8304 )
8305 }
8306
8307 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
8308 assert_eq!(status / 100u16, 4u16);
8309 Self(
8310 self.0
8311 .status(status)
8312 .header("content-type", "application/json")
8313 .json_body_obj(value),
8314 )
8315 }
8316
8317 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
8318 assert_eq!(status / 100u16, 5u16);
8319 Self(
8320 self.0
8321 .status(status)
8322 .header("content-type", "application/json")
8323 .json_body_obj(value),
8324 )
8325 }
8326 }
8327
8328 pub struct InternetGatewayIpPoolDeleteWhen(::httpmock::When);
8329 impl InternetGatewayIpPoolDeleteWhen {
8330 pub fn new(inner: ::httpmock::When) -> Self {
8331 Self(
8332 inner.method(::httpmock::Method::DELETE).path_matches(
8333 regex::Regex::new("^/v1/internet-gateway-ip-pools/[^/]*$").unwrap(),
8334 ),
8335 )
8336 }
8337
8338 pub fn into_inner(self) -> ::httpmock::When {
8339 self.0
8340 }
8341
8342 pub fn pool(self, value: &types::NameOrId) -> Self {
8343 let re = regex::Regex::new(&format!(
8344 "^/v1/internet-gateway-ip-pools/{}$",
8345 value.to_string()
8346 ))
8347 .unwrap();
8348 Self(self.0.path_matches(re))
8349 }
8350
8351 pub fn cascade<T>(self, value: T) -> Self
8352 where
8353 T: Into<Option<bool>>,
8354 {
8355 if let Some(value) = value.into() {
8356 Self(self.0.query_param("cascade", value.to_string()))
8357 } else {
8358 Self(self.0.query_param_missing("cascade"))
8359 }
8360 }
8361
8362 pub fn gateway<'a, T>(self, value: T) -> Self
8363 where
8364 T: Into<Option<&'a types::NameOrId>>,
8365 {
8366 if let Some(value) = value.into() {
8367 Self(self.0.query_param("gateway", value.to_string()))
8368 } else {
8369 Self(self.0.query_param_missing("gateway"))
8370 }
8371 }
8372
8373 pub fn project<'a, T>(self, value: T) -> Self
8374 where
8375 T: Into<Option<&'a types::NameOrId>>,
8376 {
8377 if let Some(value) = value.into() {
8378 Self(self.0.query_param("project", value.to_string()))
8379 } else {
8380 Self(self.0.query_param_missing("project"))
8381 }
8382 }
8383
8384 pub fn vpc<'a, T>(self, value: T) -> Self
8385 where
8386 T: Into<Option<&'a types::NameOrId>>,
8387 {
8388 if let Some(value) = value.into() {
8389 Self(self.0.query_param("vpc", value.to_string()))
8390 } else {
8391 Self(self.0.query_param_missing("vpc"))
8392 }
8393 }
8394 }
8395
8396 pub struct InternetGatewayIpPoolDeleteThen(::httpmock::Then);
8397 impl InternetGatewayIpPoolDeleteThen {
8398 pub fn new(inner: ::httpmock::Then) -> Self {
8399 Self(inner)
8400 }
8401
8402 pub fn into_inner(self) -> ::httpmock::Then {
8403 self.0
8404 }
8405
8406 pub fn no_content(self) -> Self {
8407 Self(self.0.status(204u16))
8408 }
8409
8410 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
8411 assert_eq!(status / 100u16, 4u16);
8412 Self(
8413 self.0
8414 .status(status)
8415 .header("content-type", "application/json")
8416 .json_body_obj(value),
8417 )
8418 }
8419
8420 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
8421 assert_eq!(status / 100u16, 5u16);
8422 Self(
8423 self.0
8424 .status(status)
8425 .header("content-type", "application/json")
8426 .json_body_obj(value),
8427 )
8428 }
8429 }
8430
8431 pub struct InternetGatewayListWhen(::httpmock::When);
8432 impl InternetGatewayListWhen {
8433 pub fn new(inner: ::httpmock::When) -> Self {
8434 Self(
8435 inner
8436 .method(::httpmock::Method::GET)
8437 .path_matches(regex::Regex::new("^/v1/internet-gateways$").unwrap()),
8438 )
8439 }
8440
8441 pub fn into_inner(self) -> ::httpmock::When {
8442 self.0
8443 }
8444
8445 pub fn limit<T>(self, value: T) -> Self
8446 where
8447 T: Into<Option<::std::num::NonZeroU32>>,
8448 {
8449 if let Some(value) = value.into() {
8450 Self(self.0.query_param("limit", value.to_string()))
8451 } else {
8452 Self(self.0.query_param_missing("limit"))
8453 }
8454 }
8455
8456 pub fn page_token<'a, T>(self, value: T) -> Self
8457 where
8458 T: Into<Option<&'a str>>,
8459 {
8460 if let Some(value) = value.into() {
8461 Self(self.0.query_param("page_token", value.to_string()))
8462 } else {
8463 Self(self.0.query_param_missing("page_token"))
8464 }
8465 }
8466
8467 pub fn project<'a, T>(self, value: T) -> Self
8468 where
8469 T: Into<Option<&'a types::NameOrId>>,
8470 {
8471 if let Some(value) = value.into() {
8472 Self(self.0.query_param("project", value.to_string()))
8473 } else {
8474 Self(self.0.query_param_missing("project"))
8475 }
8476 }
8477
8478 pub fn sort_by<T>(self, value: T) -> Self
8479 where
8480 T: Into<Option<types::NameOrIdSortMode>>,
8481 {
8482 if let Some(value) = value.into() {
8483 Self(self.0.query_param("sort_by", value.to_string()))
8484 } else {
8485 Self(self.0.query_param_missing("sort_by"))
8486 }
8487 }
8488
8489 pub fn vpc<'a, T>(self, value: T) -> Self
8490 where
8491 T: Into<Option<&'a types::NameOrId>>,
8492 {
8493 if let Some(value) = value.into() {
8494 Self(self.0.query_param("vpc", value.to_string()))
8495 } else {
8496 Self(self.0.query_param_missing("vpc"))
8497 }
8498 }
8499 }
8500
8501 pub struct InternetGatewayListThen(::httpmock::Then);
8502 impl InternetGatewayListThen {
8503 pub fn new(inner: ::httpmock::Then) -> Self {
8504 Self(inner)
8505 }
8506
8507 pub fn into_inner(self) -> ::httpmock::Then {
8508 self.0
8509 }
8510
8511 pub fn ok(self, value: &types::InternetGatewayResultsPage) -> Self {
8512 Self(
8513 self.0
8514 .status(200u16)
8515 .header("content-type", "application/json")
8516 .json_body_obj(value),
8517 )
8518 }
8519
8520 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
8521 assert_eq!(status / 100u16, 4u16);
8522 Self(
8523 self.0
8524 .status(status)
8525 .header("content-type", "application/json")
8526 .json_body_obj(value),
8527 )
8528 }
8529
8530 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
8531 assert_eq!(status / 100u16, 5u16);
8532 Self(
8533 self.0
8534 .status(status)
8535 .header("content-type", "application/json")
8536 .json_body_obj(value),
8537 )
8538 }
8539 }
8540
8541 pub struct InternetGatewayCreateWhen(::httpmock::When);
8542 impl InternetGatewayCreateWhen {
8543 pub fn new(inner: ::httpmock::When) -> Self {
8544 Self(
8545 inner
8546 .method(::httpmock::Method::POST)
8547 .path_matches(regex::Regex::new("^/v1/internet-gateways$").unwrap()),
8548 )
8549 }
8550
8551 pub fn into_inner(self) -> ::httpmock::When {
8552 self.0
8553 }
8554
8555 pub fn project<'a, T>(self, value: T) -> Self
8556 where
8557 T: Into<Option<&'a types::NameOrId>>,
8558 {
8559 if let Some(value) = value.into() {
8560 Self(self.0.query_param("project", value.to_string()))
8561 } else {
8562 Self(self.0.query_param_missing("project"))
8563 }
8564 }
8565
8566 pub fn vpc(self, value: &types::NameOrId) -> Self {
8567 Self(self.0.query_param("vpc", value.to_string()))
8568 }
8569
8570 pub fn body(self, value: &types::InternetGatewayCreate) -> Self {
8571 Self(self.0.json_body_obj(value))
8572 }
8573 }
8574
8575 pub struct InternetGatewayCreateThen(::httpmock::Then);
8576 impl InternetGatewayCreateThen {
8577 pub fn new(inner: ::httpmock::Then) -> Self {
8578 Self(inner)
8579 }
8580
8581 pub fn into_inner(self) -> ::httpmock::Then {
8582 self.0
8583 }
8584
8585 pub fn created(self, value: &types::InternetGateway) -> Self {
8586 Self(
8587 self.0
8588 .status(201u16)
8589 .header("content-type", "application/json")
8590 .json_body_obj(value),
8591 )
8592 }
8593
8594 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
8595 assert_eq!(status / 100u16, 4u16);
8596 Self(
8597 self.0
8598 .status(status)
8599 .header("content-type", "application/json")
8600 .json_body_obj(value),
8601 )
8602 }
8603
8604 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
8605 assert_eq!(status / 100u16, 5u16);
8606 Self(
8607 self.0
8608 .status(status)
8609 .header("content-type", "application/json")
8610 .json_body_obj(value),
8611 )
8612 }
8613 }
8614
8615 pub struct InternetGatewayViewWhen(::httpmock::When);
8616 impl InternetGatewayViewWhen {
8617 pub fn new(inner: ::httpmock::When) -> Self {
8618 Self(
8619 inner
8620 .method(::httpmock::Method::GET)
8621 .path_matches(regex::Regex::new("^/v1/internet-gateways/[^/]*$").unwrap()),
8622 )
8623 }
8624
8625 pub fn into_inner(self) -> ::httpmock::When {
8626 self.0
8627 }
8628
8629 pub fn gateway(self, value: &types::NameOrId) -> Self {
8630 let re = regex::Regex::new(&format!("^/v1/internet-gateways/{}$", value.to_string()))
8631 .unwrap();
8632 Self(self.0.path_matches(re))
8633 }
8634
8635 pub fn project<'a, T>(self, value: T) -> Self
8636 where
8637 T: Into<Option<&'a types::NameOrId>>,
8638 {
8639 if let Some(value) = value.into() {
8640 Self(self.0.query_param("project", value.to_string()))
8641 } else {
8642 Self(self.0.query_param_missing("project"))
8643 }
8644 }
8645
8646 pub fn vpc<'a, T>(self, value: T) -> Self
8647 where
8648 T: Into<Option<&'a types::NameOrId>>,
8649 {
8650 if let Some(value) = value.into() {
8651 Self(self.0.query_param("vpc", value.to_string()))
8652 } else {
8653 Self(self.0.query_param_missing("vpc"))
8654 }
8655 }
8656 }
8657
8658 pub struct InternetGatewayViewThen(::httpmock::Then);
8659 impl InternetGatewayViewThen {
8660 pub fn new(inner: ::httpmock::Then) -> Self {
8661 Self(inner)
8662 }
8663
8664 pub fn into_inner(self) -> ::httpmock::Then {
8665 self.0
8666 }
8667
8668 pub fn ok(self, value: &types::InternetGateway) -> Self {
8669 Self(
8670 self.0
8671 .status(200u16)
8672 .header("content-type", "application/json")
8673 .json_body_obj(value),
8674 )
8675 }
8676
8677 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
8678 assert_eq!(status / 100u16, 4u16);
8679 Self(
8680 self.0
8681 .status(status)
8682 .header("content-type", "application/json")
8683 .json_body_obj(value),
8684 )
8685 }
8686
8687 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
8688 assert_eq!(status / 100u16, 5u16);
8689 Self(
8690 self.0
8691 .status(status)
8692 .header("content-type", "application/json")
8693 .json_body_obj(value),
8694 )
8695 }
8696 }
8697
8698 pub struct InternetGatewayDeleteWhen(::httpmock::When);
8699 impl InternetGatewayDeleteWhen {
8700 pub fn new(inner: ::httpmock::When) -> Self {
8701 Self(
8702 inner
8703 .method(::httpmock::Method::DELETE)
8704 .path_matches(regex::Regex::new("^/v1/internet-gateways/[^/]*$").unwrap()),
8705 )
8706 }
8707
8708 pub fn into_inner(self) -> ::httpmock::When {
8709 self.0
8710 }
8711
8712 pub fn gateway(self, value: &types::NameOrId) -> Self {
8713 let re = regex::Regex::new(&format!("^/v1/internet-gateways/{}$", value.to_string()))
8714 .unwrap();
8715 Self(self.0.path_matches(re))
8716 }
8717
8718 pub fn cascade<T>(self, value: T) -> Self
8719 where
8720 T: Into<Option<bool>>,
8721 {
8722 if let Some(value) = value.into() {
8723 Self(self.0.query_param("cascade", value.to_string()))
8724 } else {
8725 Self(self.0.query_param_missing("cascade"))
8726 }
8727 }
8728
8729 pub fn project<'a, T>(self, value: T) -> Self
8730 where
8731 T: Into<Option<&'a types::NameOrId>>,
8732 {
8733 if let Some(value) = value.into() {
8734 Self(self.0.query_param("project", value.to_string()))
8735 } else {
8736 Self(self.0.query_param_missing("project"))
8737 }
8738 }
8739
8740 pub fn vpc<'a, T>(self, value: T) -> Self
8741 where
8742 T: Into<Option<&'a types::NameOrId>>,
8743 {
8744 if let Some(value) = value.into() {
8745 Self(self.0.query_param("vpc", value.to_string()))
8746 } else {
8747 Self(self.0.query_param_missing("vpc"))
8748 }
8749 }
8750 }
8751
8752 pub struct InternetGatewayDeleteThen(::httpmock::Then);
8753 impl InternetGatewayDeleteThen {
8754 pub fn new(inner: ::httpmock::Then) -> Self {
8755 Self(inner)
8756 }
8757
8758 pub fn into_inner(self) -> ::httpmock::Then {
8759 self.0
8760 }
8761
8762 pub fn no_content(self) -> Self {
8763 Self(self.0.status(204u16))
8764 }
8765
8766 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
8767 assert_eq!(status / 100u16, 4u16);
8768 Self(
8769 self.0
8770 .status(status)
8771 .header("content-type", "application/json")
8772 .json_body_obj(value),
8773 )
8774 }
8775
8776 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
8777 assert_eq!(status / 100u16, 5u16);
8778 Self(
8779 self.0
8780 .status(status)
8781 .header("content-type", "application/json")
8782 .json_body_obj(value),
8783 )
8784 }
8785 }
8786
8787 pub struct IpPoolListWhen(::httpmock::When);
8788 impl IpPoolListWhen {
8789 pub fn new(inner: ::httpmock::When) -> Self {
8790 Self(
8791 inner
8792 .method(::httpmock::Method::GET)
8793 .path_matches(regex::Regex::new("^/v1/ip-pools$").unwrap()),
8794 )
8795 }
8796
8797 pub fn into_inner(self) -> ::httpmock::When {
8798 self.0
8799 }
8800
8801 pub fn limit<T>(self, value: T) -> Self
8802 where
8803 T: Into<Option<::std::num::NonZeroU32>>,
8804 {
8805 if let Some(value) = value.into() {
8806 Self(self.0.query_param("limit", value.to_string()))
8807 } else {
8808 Self(self.0.query_param_missing("limit"))
8809 }
8810 }
8811
8812 pub fn page_token<'a, T>(self, value: T) -> Self
8813 where
8814 T: Into<Option<&'a str>>,
8815 {
8816 if let Some(value) = value.into() {
8817 Self(self.0.query_param("page_token", value.to_string()))
8818 } else {
8819 Self(self.0.query_param_missing("page_token"))
8820 }
8821 }
8822
8823 pub fn sort_by<T>(self, value: T) -> Self
8824 where
8825 T: Into<Option<types::NameOrIdSortMode>>,
8826 {
8827 if let Some(value) = value.into() {
8828 Self(self.0.query_param("sort_by", value.to_string()))
8829 } else {
8830 Self(self.0.query_param_missing("sort_by"))
8831 }
8832 }
8833 }
8834
8835 pub struct IpPoolListThen(::httpmock::Then);
8836 impl IpPoolListThen {
8837 pub fn new(inner: ::httpmock::Then) -> Self {
8838 Self(inner)
8839 }
8840
8841 pub fn into_inner(self) -> ::httpmock::Then {
8842 self.0
8843 }
8844
8845 pub fn ok(self, value: &types::SiloIpPoolResultsPage) -> Self {
8846 Self(
8847 self.0
8848 .status(200u16)
8849 .header("content-type", "application/json")
8850 .json_body_obj(value),
8851 )
8852 }
8853
8854 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
8855 assert_eq!(status / 100u16, 4u16);
8856 Self(
8857 self.0
8858 .status(status)
8859 .header("content-type", "application/json")
8860 .json_body_obj(value),
8861 )
8862 }
8863
8864 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
8865 assert_eq!(status / 100u16, 5u16);
8866 Self(
8867 self.0
8868 .status(status)
8869 .header("content-type", "application/json")
8870 .json_body_obj(value),
8871 )
8872 }
8873 }
8874
8875 pub struct IpPoolViewWhen(::httpmock::When);
8876 impl IpPoolViewWhen {
8877 pub fn new(inner: ::httpmock::When) -> Self {
8878 Self(
8879 inner
8880 .method(::httpmock::Method::GET)
8881 .path_matches(regex::Regex::new("^/v1/ip-pools/[^/]*$").unwrap()),
8882 )
8883 }
8884
8885 pub fn into_inner(self) -> ::httpmock::When {
8886 self.0
8887 }
8888
8889 pub fn pool(self, value: &types::NameOrId) -> Self {
8890 let re = regex::Regex::new(&format!("^/v1/ip-pools/{}$", value.to_string())).unwrap();
8891 Self(self.0.path_matches(re))
8892 }
8893 }
8894
8895 pub struct IpPoolViewThen(::httpmock::Then);
8896 impl IpPoolViewThen {
8897 pub fn new(inner: ::httpmock::Then) -> Self {
8898 Self(inner)
8899 }
8900
8901 pub fn into_inner(self) -> ::httpmock::Then {
8902 self.0
8903 }
8904
8905 pub fn ok(self, value: &types::SiloIpPool) -> Self {
8906 Self(
8907 self.0
8908 .status(200u16)
8909 .header("content-type", "application/json")
8910 .json_body_obj(value),
8911 )
8912 }
8913
8914 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
8915 assert_eq!(status / 100u16, 4u16);
8916 Self(
8917 self.0
8918 .status(status)
8919 .header("content-type", "application/json")
8920 .json_body_obj(value),
8921 )
8922 }
8923
8924 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
8925 assert_eq!(status / 100u16, 5u16);
8926 Self(
8927 self.0
8928 .status(status)
8929 .header("content-type", "application/json")
8930 .json_body_obj(value),
8931 )
8932 }
8933 }
8934
8935 pub struct LoginLocalWhen(::httpmock::When);
8936 impl LoginLocalWhen {
8937 pub fn new(inner: ::httpmock::When) -> Self {
8938 Self(
8939 inner
8940 .method(::httpmock::Method::POST)
8941 .path_matches(regex::Regex::new("^/v1/login/[^/]*/local$").unwrap()),
8942 )
8943 }
8944
8945 pub fn into_inner(self) -> ::httpmock::When {
8946 self.0
8947 }
8948
8949 pub fn silo_name(self, value: &types::Name) -> Self {
8950 let re =
8951 regex::Regex::new(&format!("^/v1/login/{}/local$", value.to_string())).unwrap();
8952 Self(self.0.path_matches(re))
8953 }
8954
8955 pub fn body(self, value: &types::UsernamePasswordCredentials) -> Self {
8956 Self(self.0.json_body_obj(value))
8957 }
8958 }
8959
8960 pub struct LoginLocalThen(::httpmock::Then);
8961 impl LoginLocalThen {
8962 pub fn new(inner: ::httpmock::Then) -> Self {
8963 Self(inner)
8964 }
8965
8966 pub fn into_inner(self) -> ::httpmock::Then {
8967 self.0
8968 }
8969
8970 pub fn no_content(self) -> Self {
8971 Self(self.0.status(204u16))
8972 }
8973
8974 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
8975 assert_eq!(status / 100u16, 4u16);
8976 Self(
8977 self.0
8978 .status(status)
8979 .header("content-type", "application/json")
8980 .json_body_obj(value),
8981 )
8982 }
8983
8984 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
8985 assert_eq!(status / 100u16, 5u16);
8986 Self(
8987 self.0
8988 .status(status)
8989 .header("content-type", "application/json")
8990 .json_body_obj(value),
8991 )
8992 }
8993 }
8994
8995 pub struct LogoutWhen(::httpmock::When);
8996 impl LogoutWhen {
8997 pub fn new(inner: ::httpmock::When) -> Self {
8998 Self(
8999 inner
9000 .method(::httpmock::Method::POST)
9001 .path_matches(regex::Regex::new("^/v1/logout$").unwrap()),
9002 )
9003 }
9004
9005 pub fn into_inner(self) -> ::httpmock::When {
9006 self.0
9007 }
9008 }
9009
9010 pub struct LogoutThen(::httpmock::Then);
9011 impl LogoutThen {
9012 pub fn new(inner: ::httpmock::Then) -> Self {
9013 Self(inner)
9014 }
9015
9016 pub fn into_inner(self) -> ::httpmock::Then {
9017 self.0
9018 }
9019
9020 pub fn no_content(self) -> Self {
9021 Self(self.0.status(204u16))
9022 }
9023
9024 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
9025 assert_eq!(status / 100u16, 4u16);
9026 Self(
9027 self.0
9028 .status(status)
9029 .header("content-type", "application/json")
9030 .json_body_obj(value),
9031 )
9032 }
9033
9034 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
9035 assert_eq!(status / 100u16, 5u16);
9036 Self(
9037 self.0
9038 .status(status)
9039 .header("content-type", "application/json")
9040 .json_body_obj(value),
9041 )
9042 }
9043 }
9044
9045 pub struct CurrentUserViewWhen(::httpmock::When);
9046 impl CurrentUserViewWhen {
9047 pub fn new(inner: ::httpmock::When) -> Self {
9048 Self(
9049 inner
9050 .method(::httpmock::Method::GET)
9051 .path_matches(regex::Regex::new("^/v1/me$").unwrap()),
9052 )
9053 }
9054
9055 pub fn into_inner(self) -> ::httpmock::When {
9056 self.0
9057 }
9058 }
9059
9060 pub struct CurrentUserViewThen(::httpmock::Then);
9061 impl CurrentUserViewThen {
9062 pub fn new(inner: ::httpmock::Then) -> Self {
9063 Self(inner)
9064 }
9065
9066 pub fn into_inner(self) -> ::httpmock::Then {
9067 self.0
9068 }
9069
9070 pub fn ok(self, value: &types::CurrentUser) -> Self {
9071 Self(
9072 self.0
9073 .status(200u16)
9074 .header("content-type", "application/json")
9075 .json_body_obj(value),
9076 )
9077 }
9078
9079 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
9080 assert_eq!(status / 100u16, 4u16);
9081 Self(
9082 self.0
9083 .status(status)
9084 .header("content-type", "application/json")
9085 .json_body_obj(value),
9086 )
9087 }
9088
9089 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
9090 assert_eq!(status / 100u16, 5u16);
9091 Self(
9092 self.0
9093 .status(status)
9094 .header("content-type", "application/json")
9095 .json_body_obj(value),
9096 )
9097 }
9098 }
9099
9100 pub struct CurrentUserAccessTokenListWhen(::httpmock::When);
9101 impl CurrentUserAccessTokenListWhen {
9102 pub fn new(inner: ::httpmock::When) -> Self {
9103 Self(
9104 inner
9105 .method(::httpmock::Method::GET)
9106 .path_matches(regex::Regex::new("^/v1/me/access-tokens$").unwrap()),
9107 )
9108 }
9109
9110 pub fn into_inner(self) -> ::httpmock::When {
9111 self.0
9112 }
9113
9114 pub fn limit<T>(self, value: T) -> Self
9115 where
9116 T: Into<Option<::std::num::NonZeroU32>>,
9117 {
9118 if let Some(value) = value.into() {
9119 Self(self.0.query_param("limit", value.to_string()))
9120 } else {
9121 Self(self.0.query_param_missing("limit"))
9122 }
9123 }
9124
9125 pub fn page_token<'a, T>(self, value: T) -> Self
9126 where
9127 T: Into<Option<&'a str>>,
9128 {
9129 if let Some(value) = value.into() {
9130 Self(self.0.query_param("page_token", value.to_string()))
9131 } else {
9132 Self(self.0.query_param_missing("page_token"))
9133 }
9134 }
9135
9136 pub fn sort_by<T>(self, value: T) -> Self
9137 where
9138 T: Into<Option<types::IdSortMode>>,
9139 {
9140 if let Some(value) = value.into() {
9141 Self(self.0.query_param("sort_by", value.to_string()))
9142 } else {
9143 Self(self.0.query_param_missing("sort_by"))
9144 }
9145 }
9146 }
9147
9148 pub struct CurrentUserAccessTokenListThen(::httpmock::Then);
9149 impl CurrentUserAccessTokenListThen {
9150 pub fn new(inner: ::httpmock::Then) -> Self {
9151 Self(inner)
9152 }
9153
9154 pub fn into_inner(self) -> ::httpmock::Then {
9155 self.0
9156 }
9157
9158 pub fn ok(self, value: &types::DeviceAccessTokenResultsPage) -> Self {
9159 Self(
9160 self.0
9161 .status(200u16)
9162 .header("content-type", "application/json")
9163 .json_body_obj(value),
9164 )
9165 }
9166
9167 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
9168 assert_eq!(status / 100u16, 4u16);
9169 Self(
9170 self.0
9171 .status(status)
9172 .header("content-type", "application/json")
9173 .json_body_obj(value),
9174 )
9175 }
9176
9177 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
9178 assert_eq!(status / 100u16, 5u16);
9179 Self(
9180 self.0
9181 .status(status)
9182 .header("content-type", "application/json")
9183 .json_body_obj(value),
9184 )
9185 }
9186 }
9187
9188 pub struct CurrentUserAccessTokenDeleteWhen(::httpmock::When);
9189 impl CurrentUserAccessTokenDeleteWhen {
9190 pub fn new(inner: ::httpmock::When) -> Self {
9191 Self(
9192 inner
9193 .method(::httpmock::Method::DELETE)
9194 .path_matches(regex::Regex::new("^/v1/me/access-tokens/[^/]*$").unwrap()),
9195 )
9196 }
9197
9198 pub fn into_inner(self) -> ::httpmock::When {
9199 self.0
9200 }
9201
9202 pub fn token_id(self, value: &::uuid::Uuid) -> Self {
9203 let re = regex::Regex::new(&format!("^/v1/me/access-tokens/{}$", value.to_string()))
9204 .unwrap();
9205 Self(self.0.path_matches(re))
9206 }
9207 }
9208
9209 pub struct CurrentUserAccessTokenDeleteThen(::httpmock::Then);
9210 impl CurrentUserAccessTokenDeleteThen {
9211 pub fn new(inner: ::httpmock::Then) -> Self {
9212 Self(inner)
9213 }
9214
9215 pub fn into_inner(self) -> ::httpmock::Then {
9216 self.0
9217 }
9218
9219 pub fn no_content(self) -> Self {
9220 Self(self.0.status(204u16))
9221 }
9222
9223 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
9224 assert_eq!(status / 100u16, 4u16);
9225 Self(
9226 self.0
9227 .status(status)
9228 .header("content-type", "application/json")
9229 .json_body_obj(value),
9230 )
9231 }
9232
9233 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
9234 assert_eq!(status / 100u16, 5u16);
9235 Self(
9236 self.0
9237 .status(status)
9238 .header("content-type", "application/json")
9239 .json_body_obj(value),
9240 )
9241 }
9242 }
9243
9244 pub struct CurrentUserGroupsWhen(::httpmock::When);
9245 impl CurrentUserGroupsWhen {
9246 pub fn new(inner: ::httpmock::When) -> Self {
9247 Self(
9248 inner
9249 .method(::httpmock::Method::GET)
9250 .path_matches(regex::Regex::new("^/v1/me/groups$").unwrap()),
9251 )
9252 }
9253
9254 pub fn into_inner(self) -> ::httpmock::When {
9255 self.0
9256 }
9257
9258 pub fn limit<T>(self, value: T) -> Self
9259 where
9260 T: Into<Option<::std::num::NonZeroU32>>,
9261 {
9262 if let Some(value) = value.into() {
9263 Self(self.0.query_param("limit", value.to_string()))
9264 } else {
9265 Self(self.0.query_param_missing("limit"))
9266 }
9267 }
9268
9269 pub fn page_token<'a, T>(self, value: T) -> Self
9270 where
9271 T: Into<Option<&'a str>>,
9272 {
9273 if let Some(value) = value.into() {
9274 Self(self.0.query_param("page_token", value.to_string()))
9275 } else {
9276 Self(self.0.query_param_missing("page_token"))
9277 }
9278 }
9279
9280 pub fn sort_by<T>(self, value: T) -> Self
9281 where
9282 T: Into<Option<types::IdSortMode>>,
9283 {
9284 if let Some(value) = value.into() {
9285 Self(self.0.query_param("sort_by", value.to_string()))
9286 } else {
9287 Self(self.0.query_param_missing("sort_by"))
9288 }
9289 }
9290 }
9291
9292 pub struct CurrentUserGroupsThen(::httpmock::Then);
9293 impl CurrentUserGroupsThen {
9294 pub fn new(inner: ::httpmock::Then) -> Self {
9295 Self(inner)
9296 }
9297
9298 pub fn into_inner(self) -> ::httpmock::Then {
9299 self.0
9300 }
9301
9302 pub fn ok(self, value: &types::GroupResultsPage) -> Self {
9303 Self(
9304 self.0
9305 .status(200u16)
9306 .header("content-type", "application/json")
9307 .json_body_obj(value),
9308 )
9309 }
9310
9311 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
9312 assert_eq!(status / 100u16, 4u16);
9313 Self(
9314 self.0
9315 .status(status)
9316 .header("content-type", "application/json")
9317 .json_body_obj(value),
9318 )
9319 }
9320
9321 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
9322 assert_eq!(status / 100u16, 5u16);
9323 Self(
9324 self.0
9325 .status(status)
9326 .header("content-type", "application/json")
9327 .json_body_obj(value),
9328 )
9329 }
9330 }
9331
9332 pub struct CurrentUserSshKeyListWhen(::httpmock::When);
9333 impl CurrentUserSshKeyListWhen {
9334 pub fn new(inner: ::httpmock::When) -> Self {
9335 Self(
9336 inner
9337 .method(::httpmock::Method::GET)
9338 .path_matches(regex::Regex::new("^/v1/me/ssh-keys$").unwrap()),
9339 )
9340 }
9341
9342 pub fn into_inner(self) -> ::httpmock::When {
9343 self.0
9344 }
9345
9346 pub fn limit<T>(self, value: T) -> Self
9347 where
9348 T: Into<Option<::std::num::NonZeroU32>>,
9349 {
9350 if let Some(value) = value.into() {
9351 Self(self.0.query_param("limit", value.to_string()))
9352 } else {
9353 Self(self.0.query_param_missing("limit"))
9354 }
9355 }
9356
9357 pub fn page_token<'a, T>(self, value: T) -> Self
9358 where
9359 T: Into<Option<&'a str>>,
9360 {
9361 if let Some(value) = value.into() {
9362 Self(self.0.query_param("page_token", value.to_string()))
9363 } else {
9364 Self(self.0.query_param_missing("page_token"))
9365 }
9366 }
9367
9368 pub fn sort_by<T>(self, value: T) -> Self
9369 where
9370 T: Into<Option<types::NameOrIdSortMode>>,
9371 {
9372 if let Some(value) = value.into() {
9373 Self(self.0.query_param("sort_by", value.to_string()))
9374 } else {
9375 Self(self.0.query_param_missing("sort_by"))
9376 }
9377 }
9378 }
9379
9380 pub struct CurrentUserSshKeyListThen(::httpmock::Then);
9381 impl CurrentUserSshKeyListThen {
9382 pub fn new(inner: ::httpmock::Then) -> Self {
9383 Self(inner)
9384 }
9385
9386 pub fn into_inner(self) -> ::httpmock::Then {
9387 self.0
9388 }
9389
9390 pub fn ok(self, value: &types::SshKeyResultsPage) -> Self {
9391 Self(
9392 self.0
9393 .status(200u16)
9394 .header("content-type", "application/json")
9395 .json_body_obj(value),
9396 )
9397 }
9398
9399 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
9400 assert_eq!(status / 100u16, 4u16);
9401 Self(
9402 self.0
9403 .status(status)
9404 .header("content-type", "application/json")
9405 .json_body_obj(value),
9406 )
9407 }
9408
9409 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
9410 assert_eq!(status / 100u16, 5u16);
9411 Self(
9412 self.0
9413 .status(status)
9414 .header("content-type", "application/json")
9415 .json_body_obj(value),
9416 )
9417 }
9418 }
9419
9420 pub struct CurrentUserSshKeyCreateWhen(::httpmock::When);
9421 impl CurrentUserSshKeyCreateWhen {
9422 pub fn new(inner: ::httpmock::When) -> Self {
9423 Self(
9424 inner
9425 .method(::httpmock::Method::POST)
9426 .path_matches(regex::Regex::new("^/v1/me/ssh-keys$").unwrap()),
9427 )
9428 }
9429
9430 pub fn into_inner(self) -> ::httpmock::When {
9431 self.0
9432 }
9433
9434 pub fn body(self, value: &types::SshKeyCreate) -> Self {
9435 Self(self.0.json_body_obj(value))
9436 }
9437 }
9438
9439 pub struct CurrentUserSshKeyCreateThen(::httpmock::Then);
9440 impl CurrentUserSshKeyCreateThen {
9441 pub fn new(inner: ::httpmock::Then) -> Self {
9442 Self(inner)
9443 }
9444
9445 pub fn into_inner(self) -> ::httpmock::Then {
9446 self.0
9447 }
9448
9449 pub fn created(self, value: &types::SshKey) -> Self {
9450 Self(
9451 self.0
9452 .status(201u16)
9453 .header("content-type", "application/json")
9454 .json_body_obj(value),
9455 )
9456 }
9457
9458 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
9459 assert_eq!(status / 100u16, 4u16);
9460 Self(
9461 self.0
9462 .status(status)
9463 .header("content-type", "application/json")
9464 .json_body_obj(value),
9465 )
9466 }
9467
9468 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
9469 assert_eq!(status / 100u16, 5u16);
9470 Self(
9471 self.0
9472 .status(status)
9473 .header("content-type", "application/json")
9474 .json_body_obj(value),
9475 )
9476 }
9477 }
9478
9479 pub struct CurrentUserSshKeyViewWhen(::httpmock::When);
9480 impl CurrentUserSshKeyViewWhen {
9481 pub fn new(inner: ::httpmock::When) -> Self {
9482 Self(
9483 inner
9484 .method(::httpmock::Method::GET)
9485 .path_matches(regex::Regex::new("^/v1/me/ssh-keys/[^/]*$").unwrap()),
9486 )
9487 }
9488
9489 pub fn into_inner(self) -> ::httpmock::When {
9490 self.0
9491 }
9492
9493 pub fn ssh_key(self, value: &types::NameOrId) -> Self {
9494 let re =
9495 regex::Regex::new(&format!("^/v1/me/ssh-keys/{}$", value.to_string())).unwrap();
9496 Self(self.0.path_matches(re))
9497 }
9498 }
9499
9500 pub struct CurrentUserSshKeyViewThen(::httpmock::Then);
9501 impl CurrentUserSshKeyViewThen {
9502 pub fn new(inner: ::httpmock::Then) -> Self {
9503 Self(inner)
9504 }
9505
9506 pub fn into_inner(self) -> ::httpmock::Then {
9507 self.0
9508 }
9509
9510 pub fn ok(self, value: &types::SshKey) -> Self {
9511 Self(
9512 self.0
9513 .status(200u16)
9514 .header("content-type", "application/json")
9515 .json_body_obj(value),
9516 )
9517 }
9518
9519 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
9520 assert_eq!(status / 100u16, 4u16);
9521 Self(
9522 self.0
9523 .status(status)
9524 .header("content-type", "application/json")
9525 .json_body_obj(value),
9526 )
9527 }
9528
9529 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
9530 assert_eq!(status / 100u16, 5u16);
9531 Self(
9532 self.0
9533 .status(status)
9534 .header("content-type", "application/json")
9535 .json_body_obj(value),
9536 )
9537 }
9538 }
9539
9540 pub struct CurrentUserSshKeyDeleteWhen(::httpmock::When);
9541 impl CurrentUserSshKeyDeleteWhen {
9542 pub fn new(inner: ::httpmock::When) -> Self {
9543 Self(
9544 inner
9545 .method(::httpmock::Method::DELETE)
9546 .path_matches(regex::Regex::new("^/v1/me/ssh-keys/[^/]*$").unwrap()),
9547 )
9548 }
9549
9550 pub fn into_inner(self) -> ::httpmock::When {
9551 self.0
9552 }
9553
9554 pub fn ssh_key(self, value: &types::NameOrId) -> Self {
9555 let re =
9556 regex::Regex::new(&format!("^/v1/me/ssh-keys/{}$", value.to_string())).unwrap();
9557 Self(self.0.path_matches(re))
9558 }
9559 }
9560
9561 pub struct CurrentUserSshKeyDeleteThen(::httpmock::Then);
9562 impl CurrentUserSshKeyDeleteThen {
9563 pub fn new(inner: ::httpmock::Then) -> Self {
9564 Self(inner)
9565 }
9566
9567 pub fn into_inner(self) -> ::httpmock::Then {
9568 self.0
9569 }
9570
9571 pub fn no_content(self) -> Self {
9572 Self(self.0.status(204u16))
9573 }
9574
9575 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
9576 assert_eq!(status / 100u16, 4u16);
9577 Self(
9578 self.0
9579 .status(status)
9580 .header("content-type", "application/json")
9581 .json_body_obj(value),
9582 )
9583 }
9584
9585 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
9586 assert_eq!(status / 100u16, 5u16);
9587 Self(
9588 self.0
9589 .status(status)
9590 .header("content-type", "application/json")
9591 .json_body_obj(value),
9592 )
9593 }
9594 }
9595
9596 pub struct SiloMetricWhen(::httpmock::When);
9597 impl SiloMetricWhen {
9598 pub fn new(inner: ::httpmock::When) -> Self {
9599 Self(
9600 inner
9601 .method(::httpmock::Method::GET)
9602 .path_matches(regex::Regex::new("^/v1/metrics/[^/]*$").unwrap()),
9603 )
9604 }
9605
9606 pub fn into_inner(self) -> ::httpmock::When {
9607 self.0
9608 }
9609
9610 pub fn metric_name(self, value: types::SystemMetricName) -> Self {
9611 let re = regex::Regex::new(&format!("^/v1/metrics/{}$", value.to_string())).unwrap();
9612 Self(self.0.path_matches(re))
9613 }
9614
9615 pub fn end_time<'a, T>(self, value: T) -> Self
9616 where
9617 T: Into<Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>>,
9618 {
9619 if let Some(value) = value.into() {
9620 Self(self.0.query_param("end_time", value.to_string()))
9621 } else {
9622 Self(self.0.query_param_missing("end_time"))
9623 }
9624 }
9625
9626 pub fn limit<T>(self, value: T) -> Self
9627 where
9628 T: Into<Option<::std::num::NonZeroU32>>,
9629 {
9630 if let Some(value) = value.into() {
9631 Self(self.0.query_param("limit", value.to_string()))
9632 } else {
9633 Self(self.0.query_param_missing("limit"))
9634 }
9635 }
9636
9637 pub fn order<T>(self, value: T) -> Self
9638 where
9639 T: Into<Option<types::PaginationOrder>>,
9640 {
9641 if let Some(value) = value.into() {
9642 Self(self.0.query_param("order", value.to_string()))
9643 } else {
9644 Self(self.0.query_param_missing("order"))
9645 }
9646 }
9647
9648 pub fn page_token<'a, T>(self, value: T) -> Self
9649 where
9650 T: Into<Option<&'a str>>,
9651 {
9652 if let Some(value) = value.into() {
9653 Self(self.0.query_param("page_token", value.to_string()))
9654 } else {
9655 Self(self.0.query_param_missing("page_token"))
9656 }
9657 }
9658
9659 pub fn project<'a, T>(self, value: T) -> Self
9660 where
9661 T: Into<Option<&'a types::NameOrId>>,
9662 {
9663 if let Some(value) = value.into() {
9664 Self(self.0.query_param("project", value.to_string()))
9665 } else {
9666 Self(self.0.query_param_missing("project"))
9667 }
9668 }
9669
9670 pub fn start_time<'a, T>(self, value: T) -> Self
9671 where
9672 T: Into<Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>>,
9673 {
9674 if let Some(value) = value.into() {
9675 Self(self.0.query_param("start_time", value.to_string()))
9676 } else {
9677 Self(self.0.query_param_missing("start_time"))
9678 }
9679 }
9680 }
9681
9682 pub struct SiloMetricThen(::httpmock::Then);
9683 impl SiloMetricThen {
9684 pub fn new(inner: ::httpmock::Then) -> Self {
9685 Self(inner)
9686 }
9687
9688 pub fn into_inner(self) -> ::httpmock::Then {
9689 self.0
9690 }
9691
9692 pub fn ok(self, value: &types::MeasurementResultsPage) -> Self {
9693 Self(
9694 self.0
9695 .status(200u16)
9696 .header("content-type", "application/json")
9697 .json_body_obj(value),
9698 )
9699 }
9700
9701 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
9702 assert_eq!(status / 100u16, 4u16);
9703 Self(
9704 self.0
9705 .status(status)
9706 .header("content-type", "application/json")
9707 .json_body_obj(value),
9708 )
9709 }
9710
9711 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
9712 assert_eq!(status / 100u16, 5u16);
9713 Self(
9714 self.0
9715 .status(status)
9716 .header("content-type", "application/json")
9717 .json_body_obj(value),
9718 )
9719 }
9720 }
9721
9722 pub struct MulticastGroupListWhen(::httpmock::When);
9723 impl MulticastGroupListWhen {
9724 pub fn new(inner: ::httpmock::When) -> Self {
9725 Self(
9726 inner
9727 .method(::httpmock::Method::GET)
9728 .path_matches(regex::Regex::new("^/v1/multicast-groups$").unwrap()),
9729 )
9730 }
9731
9732 pub fn into_inner(self) -> ::httpmock::When {
9733 self.0
9734 }
9735
9736 pub fn limit<T>(self, value: T) -> Self
9737 where
9738 T: Into<Option<::std::num::NonZeroU32>>,
9739 {
9740 if let Some(value) = value.into() {
9741 Self(self.0.query_param("limit", value.to_string()))
9742 } else {
9743 Self(self.0.query_param_missing("limit"))
9744 }
9745 }
9746
9747 pub fn page_token<'a, T>(self, value: T) -> Self
9748 where
9749 T: Into<Option<&'a str>>,
9750 {
9751 if let Some(value) = value.into() {
9752 Self(self.0.query_param("page_token", value.to_string()))
9753 } else {
9754 Self(self.0.query_param_missing("page_token"))
9755 }
9756 }
9757
9758 pub fn sort_by<T>(self, value: T) -> Self
9759 where
9760 T: Into<Option<types::NameOrIdSortMode>>,
9761 {
9762 if let Some(value) = value.into() {
9763 Self(self.0.query_param("sort_by", value.to_string()))
9764 } else {
9765 Self(self.0.query_param_missing("sort_by"))
9766 }
9767 }
9768 }
9769
9770 pub struct MulticastGroupListThen(::httpmock::Then);
9771 impl MulticastGroupListThen {
9772 pub fn new(inner: ::httpmock::Then) -> Self {
9773 Self(inner)
9774 }
9775
9776 pub fn into_inner(self) -> ::httpmock::Then {
9777 self.0
9778 }
9779
9780 pub fn ok(self, value: &types::MulticastGroupResultsPage) -> Self {
9781 Self(
9782 self.0
9783 .status(200u16)
9784 .header("content-type", "application/json")
9785 .json_body_obj(value),
9786 )
9787 }
9788
9789 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
9790 assert_eq!(status / 100u16, 4u16);
9791 Self(
9792 self.0
9793 .status(status)
9794 .header("content-type", "application/json")
9795 .json_body_obj(value),
9796 )
9797 }
9798
9799 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
9800 assert_eq!(status / 100u16, 5u16);
9801 Self(
9802 self.0
9803 .status(status)
9804 .header("content-type", "application/json")
9805 .json_body_obj(value),
9806 )
9807 }
9808 }
9809
9810 pub struct MulticastGroupViewWhen(::httpmock::When);
9811 impl MulticastGroupViewWhen {
9812 pub fn new(inner: ::httpmock::When) -> Self {
9813 Self(
9814 inner
9815 .method(::httpmock::Method::GET)
9816 .path_matches(regex::Regex::new("^/v1/multicast-groups/[^/]*$").unwrap()),
9817 )
9818 }
9819
9820 pub fn into_inner(self) -> ::httpmock::When {
9821 self.0
9822 }
9823
9824 pub fn multicast_group(self, value: &types::MulticastGroupIdentifier) -> Self {
9825 let re = regex::Regex::new(&format!("^/v1/multicast-groups/{}$", value.to_string()))
9826 .unwrap();
9827 Self(self.0.path_matches(re))
9828 }
9829 }
9830
9831 pub struct MulticastGroupViewThen(::httpmock::Then);
9832 impl MulticastGroupViewThen {
9833 pub fn new(inner: ::httpmock::Then) -> Self {
9834 Self(inner)
9835 }
9836
9837 pub fn into_inner(self) -> ::httpmock::Then {
9838 self.0
9839 }
9840
9841 pub fn ok(self, value: &types::MulticastGroup) -> Self {
9842 Self(
9843 self.0
9844 .status(200u16)
9845 .header("content-type", "application/json")
9846 .json_body_obj(value),
9847 )
9848 }
9849
9850 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
9851 assert_eq!(status / 100u16, 4u16);
9852 Self(
9853 self.0
9854 .status(status)
9855 .header("content-type", "application/json")
9856 .json_body_obj(value),
9857 )
9858 }
9859
9860 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
9861 assert_eq!(status / 100u16, 5u16);
9862 Self(
9863 self.0
9864 .status(status)
9865 .header("content-type", "application/json")
9866 .json_body_obj(value),
9867 )
9868 }
9869 }
9870
9871 pub struct MulticastGroupMemberListWhen(::httpmock::When);
9872 impl MulticastGroupMemberListWhen {
9873 pub fn new(inner: ::httpmock::When) -> Self {
9874 Self(
9875 inner.method(::httpmock::Method::GET).path_matches(
9876 regex::Regex::new("^/v1/multicast-groups/[^/]*/members$").unwrap(),
9877 ),
9878 )
9879 }
9880
9881 pub fn into_inner(self) -> ::httpmock::When {
9882 self.0
9883 }
9884
9885 pub fn multicast_group(self, value: &types::MulticastGroupIdentifier) -> Self {
9886 let re = regex::Regex::new(&format!(
9887 "^/v1/multicast-groups/{}/members$",
9888 value.to_string()
9889 ))
9890 .unwrap();
9891 Self(self.0.path_matches(re))
9892 }
9893
9894 pub fn limit<T>(self, value: T) -> Self
9895 where
9896 T: Into<Option<::std::num::NonZeroU32>>,
9897 {
9898 if let Some(value) = value.into() {
9899 Self(self.0.query_param("limit", value.to_string()))
9900 } else {
9901 Self(self.0.query_param_missing("limit"))
9902 }
9903 }
9904
9905 pub fn page_token<'a, T>(self, value: T) -> Self
9906 where
9907 T: Into<Option<&'a str>>,
9908 {
9909 if let Some(value) = value.into() {
9910 Self(self.0.query_param("page_token", value.to_string()))
9911 } else {
9912 Self(self.0.query_param_missing("page_token"))
9913 }
9914 }
9915
9916 pub fn sort_by<T>(self, value: T) -> Self
9917 where
9918 T: Into<Option<types::IdSortMode>>,
9919 {
9920 if let Some(value) = value.into() {
9921 Self(self.0.query_param("sort_by", value.to_string()))
9922 } else {
9923 Self(self.0.query_param_missing("sort_by"))
9924 }
9925 }
9926 }
9927
9928 pub struct MulticastGroupMemberListThen(::httpmock::Then);
9929 impl MulticastGroupMemberListThen {
9930 pub fn new(inner: ::httpmock::Then) -> Self {
9931 Self(inner)
9932 }
9933
9934 pub fn into_inner(self) -> ::httpmock::Then {
9935 self.0
9936 }
9937
9938 pub fn ok(self, value: &types::MulticastGroupMemberResultsPage) -> Self {
9939 Self(
9940 self.0
9941 .status(200u16)
9942 .header("content-type", "application/json")
9943 .json_body_obj(value),
9944 )
9945 }
9946
9947 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
9948 assert_eq!(status / 100u16, 4u16);
9949 Self(
9950 self.0
9951 .status(status)
9952 .header("content-type", "application/json")
9953 .json_body_obj(value),
9954 )
9955 }
9956
9957 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
9958 assert_eq!(status / 100u16, 5u16);
9959 Self(
9960 self.0
9961 .status(status)
9962 .header("content-type", "application/json")
9963 .json_body_obj(value),
9964 )
9965 }
9966 }
9967
9968 pub struct InstanceNetworkInterfaceListWhen(::httpmock::When);
9969 impl InstanceNetworkInterfaceListWhen {
9970 pub fn new(inner: ::httpmock::When) -> Self {
9971 Self(
9972 inner
9973 .method(::httpmock::Method::GET)
9974 .path_matches(regex::Regex::new("^/v1/network-interfaces$").unwrap()),
9975 )
9976 }
9977
9978 pub fn into_inner(self) -> ::httpmock::When {
9979 self.0
9980 }
9981
9982 pub fn instance<'a, T>(self, value: T) -> Self
9983 where
9984 T: Into<Option<&'a types::NameOrId>>,
9985 {
9986 if let Some(value) = value.into() {
9987 Self(self.0.query_param("instance", value.to_string()))
9988 } else {
9989 Self(self.0.query_param_missing("instance"))
9990 }
9991 }
9992
9993 pub fn limit<T>(self, value: T) -> Self
9994 where
9995 T: Into<Option<::std::num::NonZeroU32>>,
9996 {
9997 if let Some(value) = value.into() {
9998 Self(self.0.query_param("limit", value.to_string()))
9999 } else {
10000 Self(self.0.query_param_missing("limit"))
10001 }
10002 }
10003
10004 pub fn page_token<'a, T>(self, value: T) -> Self
10005 where
10006 T: Into<Option<&'a str>>,
10007 {
10008 if let Some(value) = value.into() {
10009 Self(self.0.query_param("page_token", value.to_string()))
10010 } else {
10011 Self(self.0.query_param_missing("page_token"))
10012 }
10013 }
10014
10015 pub fn project<'a, T>(self, value: T) -> Self
10016 where
10017 T: Into<Option<&'a types::NameOrId>>,
10018 {
10019 if let Some(value) = value.into() {
10020 Self(self.0.query_param("project", value.to_string()))
10021 } else {
10022 Self(self.0.query_param_missing("project"))
10023 }
10024 }
10025
10026 pub fn sort_by<T>(self, value: T) -> Self
10027 where
10028 T: Into<Option<types::NameOrIdSortMode>>,
10029 {
10030 if let Some(value) = value.into() {
10031 Self(self.0.query_param("sort_by", value.to_string()))
10032 } else {
10033 Self(self.0.query_param_missing("sort_by"))
10034 }
10035 }
10036 }
10037
10038 pub struct InstanceNetworkInterfaceListThen(::httpmock::Then);
10039 impl InstanceNetworkInterfaceListThen {
10040 pub fn new(inner: ::httpmock::Then) -> Self {
10041 Self(inner)
10042 }
10043
10044 pub fn into_inner(self) -> ::httpmock::Then {
10045 self.0
10046 }
10047
10048 pub fn ok(self, value: &types::InstanceNetworkInterfaceResultsPage) -> Self {
10049 Self(
10050 self.0
10051 .status(200u16)
10052 .header("content-type", "application/json")
10053 .json_body_obj(value),
10054 )
10055 }
10056
10057 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
10058 assert_eq!(status / 100u16, 4u16);
10059 Self(
10060 self.0
10061 .status(status)
10062 .header("content-type", "application/json")
10063 .json_body_obj(value),
10064 )
10065 }
10066
10067 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
10068 assert_eq!(status / 100u16, 5u16);
10069 Self(
10070 self.0
10071 .status(status)
10072 .header("content-type", "application/json")
10073 .json_body_obj(value),
10074 )
10075 }
10076 }
10077
10078 pub struct InstanceNetworkInterfaceCreateWhen(::httpmock::When);
10079 impl InstanceNetworkInterfaceCreateWhen {
10080 pub fn new(inner: ::httpmock::When) -> Self {
10081 Self(
10082 inner
10083 .method(::httpmock::Method::POST)
10084 .path_matches(regex::Regex::new("^/v1/network-interfaces$").unwrap()),
10085 )
10086 }
10087
10088 pub fn into_inner(self) -> ::httpmock::When {
10089 self.0
10090 }
10091
10092 pub fn instance(self, value: &types::NameOrId) -> Self {
10093 Self(self.0.query_param("instance", value.to_string()))
10094 }
10095
10096 pub fn project<'a, T>(self, value: T) -> Self
10097 where
10098 T: Into<Option<&'a types::NameOrId>>,
10099 {
10100 if let Some(value) = value.into() {
10101 Self(self.0.query_param("project", value.to_string()))
10102 } else {
10103 Self(self.0.query_param_missing("project"))
10104 }
10105 }
10106
10107 pub fn body(self, value: &types::InstanceNetworkInterfaceCreate) -> Self {
10108 Self(self.0.json_body_obj(value))
10109 }
10110 }
10111
10112 pub struct InstanceNetworkInterfaceCreateThen(::httpmock::Then);
10113 impl InstanceNetworkInterfaceCreateThen {
10114 pub fn new(inner: ::httpmock::Then) -> Self {
10115 Self(inner)
10116 }
10117
10118 pub fn into_inner(self) -> ::httpmock::Then {
10119 self.0
10120 }
10121
10122 pub fn created(self, value: &types::InstanceNetworkInterface) -> Self {
10123 Self(
10124 self.0
10125 .status(201u16)
10126 .header("content-type", "application/json")
10127 .json_body_obj(value),
10128 )
10129 }
10130
10131 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
10132 assert_eq!(status / 100u16, 4u16);
10133 Self(
10134 self.0
10135 .status(status)
10136 .header("content-type", "application/json")
10137 .json_body_obj(value),
10138 )
10139 }
10140
10141 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
10142 assert_eq!(status / 100u16, 5u16);
10143 Self(
10144 self.0
10145 .status(status)
10146 .header("content-type", "application/json")
10147 .json_body_obj(value),
10148 )
10149 }
10150 }
10151
10152 pub struct InstanceNetworkInterfaceViewWhen(::httpmock::When);
10153 impl InstanceNetworkInterfaceViewWhen {
10154 pub fn new(inner: ::httpmock::When) -> Self {
10155 Self(
10156 inner
10157 .method(::httpmock::Method::GET)
10158 .path_matches(regex::Regex::new("^/v1/network-interfaces/[^/]*$").unwrap()),
10159 )
10160 }
10161
10162 pub fn into_inner(self) -> ::httpmock::When {
10163 self.0
10164 }
10165
10166 pub fn interface(self, value: &types::NameOrId) -> Self {
10167 let re = regex::Regex::new(&format!("^/v1/network-interfaces/{}$", value.to_string()))
10168 .unwrap();
10169 Self(self.0.path_matches(re))
10170 }
10171
10172 pub fn instance<'a, T>(self, value: T) -> Self
10173 where
10174 T: Into<Option<&'a types::NameOrId>>,
10175 {
10176 if let Some(value) = value.into() {
10177 Self(self.0.query_param("instance", value.to_string()))
10178 } else {
10179 Self(self.0.query_param_missing("instance"))
10180 }
10181 }
10182
10183 pub fn project<'a, T>(self, value: T) -> Self
10184 where
10185 T: Into<Option<&'a types::NameOrId>>,
10186 {
10187 if let Some(value) = value.into() {
10188 Self(self.0.query_param("project", value.to_string()))
10189 } else {
10190 Self(self.0.query_param_missing("project"))
10191 }
10192 }
10193 }
10194
10195 pub struct InstanceNetworkInterfaceViewThen(::httpmock::Then);
10196 impl InstanceNetworkInterfaceViewThen {
10197 pub fn new(inner: ::httpmock::Then) -> Self {
10198 Self(inner)
10199 }
10200
10201 pub fn into_inner(self) -> ::httpmock::Then {
10202 self.0
10203 }
10204
10205 pub fn ok(self, value: &types::InstanceNetworkInterface) -> Self {
10206 Self(
10207 self.0
10208 .status(200u16)
10209 .header("content-type", "application/json")
10210 .json_body_obj(value),
10211 )
10212 }
10213
10214 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
10215 assert_eq!(status / 100u16, 4u16);
10216 Self(
10217 self.0
10218 .status(status)
10219 .header("content-type", "application/json")
10220 .json_body_obj(value),
10221 )
10222 }
10223
10224 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
10225 assert_eq!(status / 100u16, 5u16);
10226 Self(
10227 self.0
10228 .status(status)
10229 .header("content-type", "application/json")
10230 .json_body_obj(value),
10231 )
10232 }
10233 }
10234
10235 pub struct InstanceNetworkInterfaceUpdateWhen(::httpmock::When);
10236 impl InstanceNetworkInterfaceUpdateWhen {
10237 pub fn new(inner: ::httpmock::When) -> Self {
10238 Self(
10239 inner
10240 .method(::httpmock::Method::PUT)
10241 .path_matches(regex::Regex::new("^/v1/network-interfaces/[^/]*$").unwrap()),
10242 )
10243 }
10244
10245 pub fn into_inner(self) -> ::httpmock::When {
10246 self.0
10247 }
10248
10249 pub fn interface(self, value: &types::NameOrId) -> Self {
10250 let re = regex::Regex::new(&format!("^/v1/network-interfaces/{}$", value.to_string()))
10251 .unwrap();
10252 Self(self.0.path_matches(re))
10253 }
10254
10255 pub fn instance<'a, T>(self, value: T) -> Self
10256 where
10257 T: Into<Option<&'a types::NameOrId>>,
10258 {
10259 if let Some(value) = value.into() {
10260 Self(self.0.query_param("instance", value.to_string()))
10261 } else {
10262 Self(self.0.query_param_missing("instance"))
10263 }
10264 }
10265
10266 pub fn project<'a, T>(self, value: T) -> Self
10267 where
10268 T: Into<Option<&'a types::NameOrId>>,
10269 {
10270 if let Some(value) = value.into() {
10271 Self(self.0.query_param("project", value.to_string()))
10272 } else {
10273 Self(self.0.query_param_missing("project"))
10274 }
10275 }
10276
10277 pub fn body(self, value: &types::InstanceNetworkInterfaceUpdate) -> Self {
10278 Self(self.0.json_body_obj(value))
10279 }
10280 }
10281
10282 pub struct InstanceNetworkInterfaceUpdateThen(::httpmock::Then);
10283 impl InstanceNetworkInterfaceUpdateThen {
10284 pub fn new(inner: ::httpmock::Then) -> Self {
10285 Self(inner)
10286 }
10287
10288 pub fn into_inner(self) -> ::httpmock::Then {
10289 self.0
10290 }
10291
10292 pub fn ok(self, value: &types::InstanceNetworkInterface) -> Self {
10293 Self(
10294 self.0
10295 .status(200u16)
10296 .header("content-type", "application/json")
10297 .json_body_obj(value),
10298 )
10299 }
10300
10301 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
10302 assert_eq!(status / 100u16, 4u16);
10303 Self(
10304 self.0
10305 .status(status)
10306 .header("content-type", "application/json")
10307 .json_body_obj(value),
10308 )
10309 }
10310
10311 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
10312 assert_eq!(status / 100u16, 5u16);
10313 Self(
10314 self.0
10315 .status(status)
10316 .header("content-type", "application/json")
10317 .json_body_obj(value),
10318 )
10319 }
10320 }
10321
10322 pub struct InstanceNetworkInterfaceDeleteWhen(::httpmock::When);
10323 impl InstanceNetworkInterfaceDeleteWhen {
10324 pub fn new(inner: ::httpmock::When) -> Self {
10325 Self(
10326 inner
10327 .method(::httpmock::Method::DELETE)
10328 .path_matches(regex::Regex::new("^/v1/network-interfaces/[^/]*$").unwrap()),
10329 )
10330 }
10331
10332 pub fn into_inner(self) -> ::httpmock::When {
10333 self.0
10334 }
10335
10336 pub fn interface(self, value: &types::NameOrId) -> Self {
10337 let re = regex::Regex::new(&format!("^/v1/network-interfaces/{}$", value.to_string()))
10338 .unwrap();
10339 Self(self.0.path_matches(re))
10340 }
10341
10342 pub fn instance<'a, T>(self, value: T) -> Self
10343 where
10344 T: Into<Option<&'a types::NameOrId>>,
10345 {
10346 if let Some(value) = value.into() {
10347 Self(self.0.query_param("instance", value.to_string()))
10348 } else {
10349 Self(self.0.query_param_missing("instance"))
10350 }
10351 }
10352
10353 pub fn project<'a, T>(self, value: T) -> Self
10354 where
10355 T: Into<Option<&'a types::NameOrId>>,
10356 {
10357 if let Some(value) = value.into() {
10358 Self(self.0.query_param("project", value.to_string()))
10359 } else {
10360 Self(self.0.query_param_missing("project"))
10361 }
10362 }
10363 }
10364
10365 pub struct InstanceNetworkInterfaceDeleteThen(::httpmock::Then);
10366 impl InstanceNetworkInterfaceDeleteThen {
10367 pub fn new(inner: ::httpmock::Then) -> Self {
10368 Self(inner)
10369 }
10370
10371 pub fn into_inner(self) -> ::httpmock::Then {
10372 self.0
10373 }
10374
10375 pub fn no_content(self) -> Self {
10376 Self(self.0.status(204u16))
10377 }
10378
10379 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
10380 assert_eq!(status / 100u16, 4u16);
10381 Self(
10382 self.0
10383 .status(status)
10384 .header("content-type", "application/json")
10385 .json_body_obj(value),
10386 )
10387 }
10388
10389 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
10390 assert_eq!(status / 100u16, 5u16);
10391 Self(
10392 self.0
10393 .status(status)
10394 .header("content-type", "application/json")
10395 .json_body_obj(value),
10396 )
10397 }
10398 }
10399
10400 pub struct PingWhen(::httpmock::When);
10401 impl PingWhen {
10402 pub fn new(inner: ::httpmock::When) -> Self {
10403 Self(
10404 inner
10405 .method(::httpmock::Method::GET)
10406 .path_matches(regex::Regex::new("^/v1/ping$").unwrap()),
10407 )
10408 }
10409
10410 pub fn into_inner(self) -> ::httpmock::When {
10411 self.0
10412 }
10413 }
10414
10415 pub struct PingThen(::httpmock::Then);
10416 impl PingThen {
10417 pub fn new(inner: ::httpmock::Then) -> Self {
10418 Self(inner)
10419 }
10420
10421 pub fn into_inner(self) -> ::httpmock::Then {
10422 self.0
10423 }
10424
10425 pub fn ok(self, value: &types::Ping) -> Self {
10426 Self(
10427 self.0
10428 .status(200u16)
10429 .header("content-type", "application/json")
10430 .json_body_obj(value),
10431 )
10432 }
10433
10434 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
10435 assert_eq!(status / 100u16, 4u16);
10436 Self(
10437 self.0
10438 .status(status)
10439 .header("content-type", "application/json")
10440 .json_body_obj(value),
10441 )
10442 }
10443
10444 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
10445 assert_eq!(status / 100u16, 5u16);
10446 Self(
10447 self.0
10448 .status(status)
10449 .header("content-type", "application/json")
10450 .json_body_obj(value),
10451 )
10452 }
10453 }
10454
10455 pub struct PolicyViewWhen(::httpmock::When);
10456 impl PolicyViewWhen {
10457 pub fn new(inner: ::httpmock::When) -> Self {
10458 Self(
10459 inner
10460 .method(::httpmock::Method::GET)
10461 .path_matches(regex::Regex::new("^/v1/policy$").unwrap()),
10462 )
10463 }
10464
10465 pub fn into_inner(self) -> ::httpmock::When {
10466 self.0
10467 }
10468 }
10469
10470 pub struct PolicyViewThen(::httpmock::Then);
10471 impl PolicyViewThen {
10472 pub fn new(inner: ::httpmock::Then) -> Self {
10473 Self(inner)
10474 }
10475
10476 pub fn into_inner(self) -> ::httpmock::Then {
10477 self.0
10478 }
10479
10480 pub fn ok(self, value: &types::SiloRolePolicy) -> Self {
10481 Self(
10482 self.0
10483 .status(200u16)
10484 .header("content-type", "application/json")
10485 .json_body_obj(value),
10486 )
10487 }
10488
10489 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
10490 assert_eq!(status / 100u16, 4u16);
10491 Self(
10492 self.0
10493 .status(status)
10494 .header("content-type", "application/json")
10495 .json_body_obj(value),
10496 )
10497 }
10498
10499 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
10500 assert_eq!(status / 100u16, 5u16);
10501 Self(
10502 self.0
10503 .status(status)
10504 .header("content-type", "application/json")
10505 .json_body_obj(value),
10506 )
10507 }
10508 }
10509
10510 pub struct PolicyUpdateWhen(::httpmock::When);
10511 impl PolicyUpdateWhen {
10512 pub fn new(inner: ::httpmock::When) -> Self {
10513 Self(
10514 inner
10515 .method(::httpmock::Method::PUT)
10516 .path_matches(regex::Regex::new("^/v1/policy$").unwrap()),
10517 )
10518 }
10519
10520 pub fn into_inner(self) -> ::httpmock::When {
10521 self.0
10522 }
10523
10524 pub fn body(self, value: &types::SiloRolePolicy) -> Self {
10525 Self(self.0.json_body_obj(value))
10526 }
10527 }
10528
10529 pub struct PolicyUpdateThen(::httpmock::Then);
10530 impl PolicyUpdateThen {
10531 pub fn new(inner: ::httpmock::Then) -> Self {
10532 Self(inner)
10533 }
10534
10535 pub fn into_inner(self) -> ::httpmock::Then {
10536 self.0
10537 }
10538
10539 pub fn ok(self, value: &types::SiloRolePolicy) -> Self {
10540 Self(
10541 self.0
10542 .status(200u16)
10543 .header("content-type", "application/json")
10544 .json_body_obj(value),
10545 )
10546 }
10547
10548 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
10549 assert_eq!(status / 100u16, 4u16);
10550 Self(
10551 self.0
10552 .status(status)
10553 .header("content-type", "application/json")
10554 .json_body_obj(value),
10555 )
10556 }
10557
10558 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
10559 assert_eq!(status / 100u16, 5u16);
10560 Self(
10561 self.0
10562 .status(status)
10563 .header("content-type", "application/json")
10564 .json_body_obj(value),
10565 )
10566 }
10567 }
10568
10569 pub struct ProjectListWhen(::httpmock::When);
10570 impl ProjectListWhen {
10571 pub fn new(inner: ::httpmock::When) -> Self {
10572 Self(
10573 inner
10574 .method(::httpmock::Method::GET)
10575 .path_matches(regex::Regex::new("^/v1/projects$").unwrap()),
10576 )
10577 }
10578
10579 pub fn into_inner(self) -> ::httpmock::When {
10580 self.0
10581 }
10582
10583 pub fn limit<T>(self, value: T) -> Self
10584 where
10585 T: Into<Option<::std::num::NonZeroU32>>,
10586 {
10587 if let Some(value) = value.into() {
10588 Self(self.0.query_param("limit", value.to_string()))
10589 } else {
10590 Self(self.0.query_param_missing("limit"))
10591 }
10592 }
10593
10594 pub fn page_token<'a, T>(self, value: T) -> Self
10595 where
10596 T: Into<Option<&'a str>>,
10597 {
10598 if let Some(value) = value.into() {
10599 Self(self.0.query_param("page_token", value.to_string()))
10600 } else {
10601 Self(self.0.query_param_missing("page_token"))
10602 }
10603 }
10604
10605 pub fn sort_by<T>(self, value: T) -> Self
10606 where
10607 T: Into<Option<types::NameOrIdSortMode>>,
10608 {
10609 if let Some(value) = value.into() {
10610 Self(self.0.query_param("sort_by", value.to_string()))
10611 } else {
10612 Self(self.0.query_param_missing("sort_by"))
10613 }
10614 }
10615 }
10616
10617 pub struct ProjectListThen(::httpmock::Then);
10618 impl ProjectListThen {
10619 pub fn new(inner: ::httpmock::Then) -> Self {
10620 Self(inner)
10621 }
10622
10623 pub fn into_inner(self) -> ::httpmock::Then {
10624 self.0
10625 }
10626
10627 pub fn ok(self, value: &types::ProjectResultsPage) -> Self {
10628 Self(
10629 self.0
10630 .status(200u16)
10631 .header("content-type", "application/json")
10632 .json_body_obj(value),
10633 )
10634 }
10635
10636 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
10637 assert_eq!(status / 100u16, 4u16);
10638 Self(
10639 self.0
10640 .status(status)
10641 .header("content-type", "application/json")
10642 .json_body_obj(value),
10643 )
10644 }
10645
10646 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
10647 assert_eq!(status / 100u16, 5u16);
10648 Self(
10649 self.0
10650 .status(status)
10651 .header("content-type", "application/json")
10652 .json_body_obj(value),
10653 )
10654 }
10655 }
10656
10657 pub struct ProjectCreateWhen(::httpmock::When);
10658 impl ProjectCreateWhen {
10659 pub fn new(inner: ::httpmock::When) -> Self {
10660 Self(
10661 inner
10662 .method(::httpmock::Method::POST)
10663 .path_matches(regex::Regex::new("^/v1/projects$").unwrap()),
10664 )
10665 }
10666
10667 pub fn into_inner(self) -> ::httpmock::When {
10668 self.0
10669 }
10670
10671 pub fn body(self, value: &types::ProjectCreate) -> Self {
10672 Self(self.0.json_body_obj(value))
10673 }
10674 }
10675
10676 pub struct ProjectCreateThen(::httpmock::Then);
10677 impl ProjectCreateThen {
10678 pub fn new(inner: ::httpmock::Then) -> Self {
10679 Self(inner)
10680 }
10681
10682 pub fn into_inner(self) -> ::httpmock::Then {
10683 self.0
10684 }
10685
10686 pub fn created(self, value: &types::Project) -> Self {
10687 Self(
10688 self.0
10689 .status(201u16)
10690 .header("content-type", "application/json")
10691 .json_body_obj(value),
10692 )
10693 }
10694
10695 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
10696 assert_eq!(status / 100u16, 4u16);
10697 Self(
10698 self.0
10699 .status(status)
10700 .header("content-type", "application/json")
10701 .json_body_obj(value),
10702 )
10703 }
10704
10705 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
10706 assert_eq!(status / 100u16, 5u16);
10707 Self(
10708 self.0
10709 .status(status)
10710 .header("content-type", "application/json")
10711 .json_body_obj(value),
10712 )
10713 }
10714 }
10715
10716 pub struct ProjectViewWhen(::httpmock::When);
10717 impl ProjectViewWhen {
10718 pub fn new(inner: ::httpmock::When) -> Self {
10719 Self(
10720 inner
10721 .method(::httpmock::Method::GET)
10722 .path_matches(regex::Regex::new("^/v1/projects/[^/]*$").unwrap()),
10723 )
10724 }
10725
10726 pub fn into_inner(self) -> ::httpmock::When {
10727 self.0
10728 }
10729
10730 pub fn project(self, value: &types::NameOrId) -> Self {
10731 let re = regex::Regex::new(&format!("^/v1/projects/{}$", value.to_string())).unwrap();
10732 Self(self.0.path_matches(re))
10733 }
10734 }
10735
10736 pub struct ProjectViewThen(::httpmock::Then);
10737 impl ProjectViewThen {
10738 pub fn new(inner: ::httpmock::Then) -> Self {
10739 Self(inner)
10740 }
10741
10742 pub fn into_inner(self) -> ::httpmock::Then {
10743 self.0
10744 }
10745
10746 pub fn ok(self, value: &types::Project) -> Self {
10747 Self(
10748 self.0
10749 .status(200u16)
10750 .header("content-type", "application/json")
10751 .json_body_obj(value),
10752 )
10753 }
10754
10755 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
10756 assert_eq!(status / 100u16, 4u16);
10757 Self(
10758 self.0
10759 .status(status)
10760 .header("content-type", "application/json")
10761 .json_body_obj(value),
10762 )
10763 }
10764
10765 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
10766 assert_eq!(status / 100u16, 5u16);
10767 Self(
10768 self.0
10769 .status(status)
10770 .header("content-type", "application/json")
10771 .json_body_obj(value),
10772 )
10773 }
10774 }
10775
10776 pub struct ProjectUpdateWhen(::httpmock::When);
10777 impl ProjectUpdateWhen {
10778 pub fn new(inner: ::httpmock::When) -> Self {
10779 Self(
10780 inner
10781 .method(::httpmock::Method::PUT)
10782 .path_matches(regex::Regex::new("^/v1/projects/[^/]*$").unwrap()),
10783 )
10784 }
10785
10786 pub fn into_inner(self) -> ::httpmock::When {
10787 self.0
10788 }
10789
10790 pub fn project(self, value: &types::NameOrId) -> Self {
10791 let re = regex::Regex::new(&format!("^/v1/projects/{}$", value.to_string())).unwrap();
10792 Self(self.0.path_matches(re))
10793 }
10794
10795 pub fn body(self, value: &types::ProjectUpdate) -> Self {
10796 Self(self.0.json_body_obj(value))
10797 }
10798 }
10799
10800 pub struct ProjectUpdateThen(::httpmock::Then);
10801 impl ProjectUpdateThen {
10802 pub fn new(inner: ::httpmock::Then) -> Self {
10803 Self(inner)
10804 }
10805
10806 pub fn into_inner(self) -> ::httpmock::Then {
10807 self.0
10808 }
10809
10810 pub fn ok(self, value: &types::Project) -> Self {
10811 Self(
10812 self.0
10813 .status(200u16)
10814 .header("content-type", "application/json")
10815 .json_body_obj(value),
10816 )
10817 }
10818
10819 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
10820 assert_eq!(status / 100u16, 4u16);
10821 Self(
10822 self.0
10823 .status(status)
10824 .header("content-type", "application/json")
10825 .json_body_obj(value),
10826 )
10827 }
10828
10829 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
10830 assert_eq!(status / 100u16, 5u16);
10831 Self(
10832 self.0
10833 .status(status)
10834 .header("content-type", "application/json")
10835 .json_body_obj(value),
10836 )
10837 }
10838 }
10839
10840 pub struct ProjectDeleteWhen(::httpmock::When);
10841 impl ProjectDeleteWhen {
10842 pub fn new(inner: ::httpmock::When) -> Self {
10843 Self(
10844 inner
10845 .method(::httpmock::Method::DELETE)
10846 .path_matches(regex::Regex::new("^/v1/projects/[^/]*$").unwrap()),
10847 )
10848 }
10849
10850 pub fn into_inner(self) -> ::httpmock::When {
10851 self.0
10852 }
10853
10854 pub fn project(self, value: &types::NameOrId) -> Self {
10855 let re = regex::Regex::new(&format!("^/v1/projects/{}$", value.to_string())).unwrap();
10856 Self(self.0.path_matches(re))
10857 }
10858 }
10859
10860 pub struct ProjectDeleteThen(::httpmock::Then);
10861 impl ProjectDeleteThen {
10862 pub fn new(inner: ::httpmock::Then) -> Self {
10863 Self(inner)
10864 }
10865
10866 pub fn into_inner(self) -> ::httpmock::Then {
10867 self.0
10868 }
10869
10870 pub fn no_content(self) -> Self {
10871 Self(self.0.status(204u16))
10872 }
10873
10874 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
10875 assert_eq!(status / 100u16, 4u16);
10876 Self(
10877 self.0
10878 .status(status)
10879 .header("content-type", "application/json")
10880 .json_body_obj(value),
10881 )
10882 }
10883
10884 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
10885 assert_eq!(status / 100u16, 5u16);
10886 Self(
10887 self.0
10888 .status(status)
10889 .header("content-type", "application/json")
10890 .json_body_obj(value),
10891 )
10892 }
10893 }
10894
10895 pub struct ProjectPolicyViewWhen(::httpmock::When);
10896 impl ProjectPolicyViewWhen {
10897 pub fn new(inner: ::httpmock::When) -> Self {
10898 Self(
10899 inner
10900 .method(::httpmock::Method::GET)
10901 .path_matches(regex::Regex::new("^/v1/projects/[^/]*/policy$").unwrap()),
10902 )
10903 }
10904
10905 pub fn into_inner(self) -> ::httpmock::When {
10906 self.0
10907 }
10908
10909 pub fn project(self, value: &types::NameOrId) -> Self {
10910 let re =
10911 regex::Regex::new(&format!("^/v1/projects/{}/policy$", value.to_string())).unwrap();
10912 Self(self.0.path_matches(re))
10913 }
10914 }
10915
10916 pub struct ProjectPolicyViewThen(::httpmock::Then);
10917 impl ProjectPolicyViewThen {
10918 pub fn new(inner: ::httpmock::Then) -> Self {
10919 Self(inner)
10920 }
10921
10922 pub fn into_inner(self) -> ::httpmock::Then {
10923 self.0
10924 }
10925
10926 pub fn ok(self, value: &types::ProjectRolePolicy) -> Self {
10927 Self(
10928 self.0
10929 .status(200u16)
10930 .header("content-type", "application/json")
10931 .json_body_obj(value),
10932 )
10933 }
10934
10935 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
10936 assert_eq!(status / 100u16, 4u16);
10937 Self(
10938 self.0
10939 .status(status)
10940 .header("content-type", "application/json")
10941 .json_body_obj(value),
10942 )
10943 }
10944
10945 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
10946 assert_eq!(status / 100u16, 5u16);
10947 Self(
10948 self.0
10949 .status(status)
10950 .header("content-type", "application/json")
10951 .json_body_obj(value),
10952 )
10953 }
10954 }
10955
10956 pub struct ProjectPolicyUpdateWhen(::httpmock::When);
10957 impl ProjectPolicyUpdateWhen {
10958 pub fn new(inner: ::httpmock::When) -> Self {
10959 Self(
10960 inner
10961 .method(::httpmock::Method::PUT)
10962 .path_matches(regex::Regex::new("^/v1/projects/[^/]*/policy$").unwrap()),
10963 )
10964 }
10965
10966 pub fn into_inner(self) -> ::httpmock::When {
10967 self.0
10968 }
10969
10970 pub fn project(self, value: &types::NameOrId) -> Self {
10971 let re =
10972 regex::Regex::new(&format!("^/v1/projects/{}/policy$", value.to_string())).unwrap();
10973 Self(self.0.path_matches(re))
10974 }
10975
10976 pub fn body(self, value: &types::ProjectRolePolicy) -> Self {
10977 Self(self.0.json_body_obj(value))
10978 }
10979 }
10980
10981 pub struct ProjectPolicyUpdateThen(::httpmock::Then);
10982 impl ProjectPolicyUpdateThen {
10983 pub fn new(inner: ::httpmock::Then) -> Self {
10984 Self(inner)
10985 }
10986
10987 pub fn into_inner(self) -> ::httpmock::Then {
10988 self.0
10989 }
10990
10991 pub fn ok(self, value: &types::ProjectRolePolicy) -> Self {
10992 Self(
10993 self.0
10994 .status(200u16)
10995 .header("content-type", "application/json")
10996 .json_body_obj(value),
10997 )
10998 }
10999
11000 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
11001 assert_eq!(status / 100u16, 4u16);
11002 Self(
11003 self.0
11004 .status(status)
11005 .header("content-type", "application/json")
11006 .json_body_obj(value),
11007 )
11008 }
11009
11010 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
11011 assert_eq!(status / 100u16, 5u16);
11012 Self(
11013 self.0
11014 .status(status)
11015 .header("content-type", "application/json")
11016 .json_body_obj(value),
11017 )
11018 }
11019 }
11020
11021 pub struct SnapshotListWhen(::httpmock::When);
11022 impl SnapshotListWhen {
11023 pub fn new(inner: ::httpmock::When) -> Self {
11024 Self(
11025 inner
11026 .method(::httpmock::Method::GET)
11027 .path_matches(regex::Regex::new("^/v1/snapshots$").unwrap()),
11028 )
11029 }
11030
11031 pub fn into_inner(self) -> ::httpmock::When {
11032 self.0
11033 }
11034
11035 pub fn limit<T>(self, value: T) -> Self
11036 where
11037 T: Into<Option<::std::num::NonZeroU32>>,
11038 {
11039 if let Some(value) = value.into() {
11040 Self(self.0.query_param("limit", value.to_string()))
11041 } else {
11042 Self(self.0.query_param_missing("limit"))
11043 }
11044 }
11045
11046 pub fn page_token<'a, T>(self, value: T) -> Self
11047 where
11048 T: Into<Option<&'a str>>,
11049 {
11050 if let Some(value) = value.into() {
11051 Self(self.0.query_param("page_token", value.to_string()))
11052 } else {
11053 Self(self.0.query_param_missing("page_token"))
11054 }
11055 }
11056
11057 pub fn project<'a, T>(self, value: T) -> Self
11058 where
11059 T: Into<Option<&'a types::NameOrId>>,
11060 {
11061 if let Some(value) = value.into() {
11062 Self(self.0.query_param("project", value.to_string()))
11063 } else {
11064 Self(self.0.query_param_missing("project"))
11065 }
11066 }
11067
11068 pub fn sort_by<T>(self, value: T) -> Self
11069 where
11070 T: Into<Option<types::NameOrIdSortMode>>,
11071 {
11072 if let Some(value) = value.into() {
11073 Self(self.0.query_param("sort_by", value.to_string()))
11074 } else {
11075 Self(self.0.query_param_missing("sort_by"))
11076 }
11077 }
11078 }
11079
11080 pub struct SnapshotListThen(::httpmock::Then);
11081 impl SnapshotListThen {
11082 pub fn new(inner: ::httpmock::Then) -> Self {
11083 Self(inner)
11084 }
11085
11086 pub fn into_inner(self) -> ::httpmock::Then {
11087 self.0
11088 }
11089
11090 pub fn ok(self, value: &types::SnapshotResultsPage) -> Self {
11091 Self(
11092 self.0
11093 .status(200u16)
11094 .header("content-type", "application/json")
11095 .json_body_obj(value),
11096 )
11097 }
11098
11099 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
11100 assert_eq!(status / 100u16, 4u16);
11101 Self(
11102 self.0
11103 .status(status)
11104 .header("content-type", "application/json")
11105 .json_body_obj(value),
11106 )
11107 }
11108
11109 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
11110 assert_eq!(status / 100u16, 5u16);
11111 Self(
11112 self.0
11113 .status(status)
11114 .header("content-type", "application/json")
11115 .json_body_obj(value),
11116 )
11117 }
11118 }
11119
11120 pub struct SnapshotCreateWhen(::httpmock::When);
11121 impl SnapshotCreateWhen {
11122 pub fn new(inner: ::httpmock::When) -> Self {
11123 Self(
11124 inner
11125 .method(::httpmock::Method::POST)
11126 .path_matches(regex::Regex::new("^/v1/snapshots$").unwrap()),
11127 )
11128 }
11129
11130 pub fn into_inner(self) -> ::httpmock::When {
11131 self.0
11132 }
11133
11134 pub fn project(self, value: &types::NameOrId) -> Self {
11135 Self(self.0.query_param("project", value.to_string()))
11136 }
11137
11138 pub fn body(self, value: &types::SnapshotCreate) -> Self {
11139 Self(self.0.json_body_obj(value))
11140 }
11141 }
11142
11143 pub struct SnapshotCreateThen(::httpmock::Then);
11144 impl SnapshotCreateThen {
11145 pub fn new(inner: ::httpmock::Then) -> Self {
11146 Self(inner)
11147 }
11148
11149 pub fn into_inner(self) -> ::httpmock::Then {
11150 self.0
11151 }
11152
11153 pub fn created(self, value: &types::Snapshot) -> Self {
11154 Self(
11155 self.0
11156 .status(201u16)
11157 .header("content-type", "application/json")
11158 .json_body_obj(value),
11159 )
11160 }
11161
11162 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
11163 assert_eq!(status / 100u16, 4u16);
11164 Self(
11165 self.0
11166 .status(status)
11167 .header("content-type", "application/json")
11168 .json_body_obj(value),
11169 )
11170 }
11171
11172 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
11173 assert_eq!(status / 100u16, 5u16);
11174 Self(
11175 self.0
11176 .status(status)
11177 .header("content-type", "application/json")
11178 .json_body_obj(value),
11179 )
11180 }
11181 }
11182
11183 pub struct SnapshotViewWhen(::httpmock::When);
11184 impl SnapshotViewWhen {
11185 pub fn new(inner: ::httpmock::When) -> Self {
11186 Self(
11187 inner
11188 .method(::httpmock::Method::GET)
11189 .path_matches(regex::Regex::new("^/v1/snapshots/[^/]*$").unwrap()),
11190 )
11191 }
11192
11193 pub fn into_inner(self) -> ::httpmock::When {
11194 self.0
11195 }
11196
11197 pub fn snapshot(self, value: &types::NameOrId) -> Self {
11198 let re = regex::Regex::new(&format!("^/v1/snapshots/{}$", value.to_string())).unwrap();
11199 Self(self.0.path_matches(re))
11200 }
11201
11202 pub fn project<'a, T>(self, value: T) -> Self
11203 where
11204 T: Into<Option<&'a types::NameOrId>>,
11205 {
11206 if let Some(value) = value.into() {
11207 Self(self.0.query_param("project", value.to_string()))
11208 } else {
11209 Self(self.0.query_param_missing("project"))
11210 }
11211 }
11212 }
11213
11214 pub struct SnapshotViewThen(::httpmock::Then);
11215 impl SnapshotViewThen {
11216 pub fn new(inner: ::httpmock::Then) -> Self {
11217 Self(inner)
11218 }
11219
11220 pub fn into_inner(self) -> ::httpmock::Then {
11221 self.0
11222 }
11223
11224 pub fn ok(self, value: &types::Snapshot) -> Self {
11225 Self(
11226 self.0
11227 .status(200u16)
11228 .header("content-type", "application/json")
11229 .json_body_obj(value),
11230 )
11231 }
11232
11233 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
11234 assert_eq!(status / 100u16, 4u16);
11235 Self(
11236 self.0
11237 .status(status)
11238 .header("content-type", "application/json")
11239 .json_body_obj(value),
11240 )
11241 }
11242
11243 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
11244 assert_eq!(status / 100u16, 5u16);
11245 Self(
11246 self.0
11247 .status(status)
11248 .header("content-type", "application/json")
11249 .json_body_obj(value),
11250 )
11251 }
11252 }
11253
11254 pub struct SnapshotDeleteWhen(::httpmock::When);
11255 impl SnapshotDeleteWhen {
11256 pub fn new(inner: ::httpmock::When) -> Self {
11257 Self(
11258 inner
11259 .method(::httpmock::Method::DELETE)
11260 .path_matches(regex::Regex::new("^/v1/snapshots/[^/]*$").unwrap()),
11261 )
11262 }
11263
11264 pub fn into_inner(self) -> ::httpmock::When {
11265 self.0
11266 }
11267
11268 pub fn snapshot(self, value: &types::NameOrId) -> Self {
11269 let re = regex::Regex::new(&format!("^/v1/snapshots/{}$", value.to_string())).unwrap();
11270 Self(self.0.path_matches(re))
11271 }
11272
11273 pub fn project<'a, T>(self, value: T) -> Self
11274 where
11275 T: Into<Option<&'a types::NameOrId>>,
11276 {
11277 if let Some(value) = value.into() {
11278 Self(self.0.query_param("project", value.to_string()))
11279 } else {
11280 Self(self.0.query_param_missing("project"))
11281 }
11282 }
11283 }
11284
11285 pub struct SnapshotDeleteThen(::httpmock::Then);
11286 impl SnapshotDeleteThen {
11287 pub fn new(inner: ::httpmock::Then) -> Self {
11288 Self(inner)
11289 }
11290
11291 pub fn into_inner(self) -> ::httpmock::Then {
11292 self.0
11293 }
11294
11295 pub fn no_content(self) -> Self {
11296 Self(self.0.status(204u16))
11297 }
11298
11299 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
11300 assert_eq!(status / 100u16, 4u16);
11301 Self(
11302 self.0
11303 .status(status)
11304 .header("content-type", "application/json")
11305 .json_body_obj(value),
11306 )
11307 }
11308
11309 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
11310 assert_eq!(status / 100u16, 5u16);
11311 Self(
11312 self.0
11313 .status(status)
11314 .header("content-type", "application/json")
11315 .json_body_obj(value),
11316 )
11317 }
11318 }
11319
11320 pub struct SubnetPoolListWhen(::httpmock::When);
11321 impl SubnetPoolListWhen {
11322 pub fn new(inner: ::httpmock::When) -> Self {
11323 Self(
11324 inner
11325 .method(::httpmock::Method::GET)
11326 .path_matches(regex::Regex::new("^/v1/subnet-pools$").unwrap()),
11327 )
11328 }
11329
11330 pub fn into_inner(self) -> ::httpmock::When {
11331 self.0
11332 }
11333
11334 pub fn limit<T>(self, value: T) -> Self
11335 where
11336 T: Into<Option<::std::num::NonZeroU32>>,
11337 {
11338 if let Some(value) = value.into() {
11339 Self(self.0.query_param("limit", value.to_string()))
11340 } else {
11341 Self(self.0.query_param_missing("limit"))
11342 }
11343 }
11344
11345 pub fn page_token<'a, T>(self, value: T) -> Self
11346 where
11347 T: Into<Option<&'a str>>,
11348 {
11349 if let Some(value) = value.into() {
11350 Self(self.0.query_param("page_token", value.to_string()))
11351 } else {
11352 Self(self.0.query_param_missing("page_token"))
11353 }
11354 }
11355
11356 pub fn sort_by<T>(self, value: T) -> Self
11357 where
11358 T: Into<Option<types::NameOrIdSortMode>>,
11359 {
11360 if let Some(value) = value.into() {
11361 Self(self.0.query_param("sort_by", value.to_string()))
11362 } else {
11363 Self(self.0.query_param_missing("sort_by"))
11364 }
11365 }
11366 }
11367
11368 pub struct SubnetPoolListThen(::httpmock::Then);
11369 impl SubnetPoolListThen {
11370 pub fn new(inner: ::httpmock::Then) -> Self {
11371 Self(inner)
11372 }
11373
11374 pub fn into_inner(self) -> ::httpmock::Then {
11375 self.0
11376 }
11377
11378 pub fn ok(self, value: &types::SiloSubnetPoolResultsPage) -> Self {
11379 Self(
11380 self.0
11381 .status(200u16)
11382 .header("content-type", "application/json")
11383 .json_body_obj(value),
11384 )
11385 }
11386
11387 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
11388 assert_eq!(status / 100u16, 4u16);
11389 Self(
11390 self.0
11391 .status(status)
11392 .header("content-type", "application/json")
11393 .json_body_obj(value),
11394 )
11395 }
11396
11397 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
11398 assert_eq!(status / 100u16, 5u16);
11399 Self(
11400 self.0
11401 .status(status)
11402 .header("content-type", "application/json")
11403 .json_body_obj(value),
11404 )
11405 }
11406 }
11407
11408 pub struct SubnetPoolViewWhen(::httpmock::When);
11409 impl SubnetPoolViewWhen {
11410 pub fn new(inner: ::httpmock::When) -> Self {
11411 Self(
11412 inner
11413 .method(::httpmock::Method::GET)
11414 .path_matches(regex::Regex::new("^/v1/subnet-pools/[^/]*$").unwrap()),
11415 )
11416 }
11417
11418 pub fn into_inner(self) -> ::httpmock::When {
11419 self.0
11420 }
11421
11422 pub fn pool(self, value: &types::NameOrId) -> Self {
11423 let re =
11424 regex::Regex::new(&format!("^/v1/subnet-pools/{}$", value.to_string())).unwrap();
11425 Self(self.0.path_matches(re))
11426 }
11427 }
11428
11429 pub struct SubnetPoolViewThen(::httpmock::Then);
11430 impl SubnetPoolViewThen {
11431 pub fn new(inner: ::httpmock::Then) -> Self {
11432 Self(inner)
11433 }
11434
11435 pub fn into_inner(self) -> ::httpmock::Then {
11436 self.0
11437 }
11438
11439 pub fn ok(self, value: &types::SiloSubnetPool) -> Self {
11440 Self(
11441 self.0
11442 .status(200u16)
11443 .header("content-type", "application/json")
11444 .json_body_obj(value),
11445 )
11446 }
11447
11448 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
11449 assert_eq!(status / 100u16, 4u16);
11450 Self(
11451 self.0
11452 .status(status)
11453 .header("content-type", "application/json")
11454 .json_body_obj(value),
11455 )
11456 }
11457
11458 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
11459 assert_eq!(status / 100u16, 5u16);
11460 Self(
11461 self.0
11462 .status(status)
11463 .header("content-type", "application/json")
11464 .json_body_obj(value),
11465 )
11466 }
11467 }
11468
11469 pub struct AuditLogListWhen(::httpmock::When);
11470 impl AuditLogListWhen {
11471 pub fn new(inner: ::httpmock::When) -> Self {
11472 Self(
11473 inner
11474 .method(::httpmock::Method::GET)
11475 .path_matches(regex::Regex::new("^/v1/system/audit-log$").unwrap()),
11476 )
11477 }
11478
11479 pub fn into_inner(self) -> ::httpmock::When {
11480 self.0
11481 }
11482
11483 pub fn end_time<'a, T>(self, value: T) -> Self
11484 where
11485 T: Into<Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>>,
11486 {
11487 if let Some(value) = value.into() {
11488 Self(self.0.query_param("end_time", value.to_string()))
11489 } else {
11490 Self(self.0.query_param_missing("end_time"))
11491 }
11492 }
11493
11494 pub fn limit<T>(self, value: T) -> Self
11495 where
11496 T: Into<Option<::std::num::NonZeroU32>>,
11497 {
11498 if let Some(value) = value.into() {
11499 Self(self.0.query_param("limit", value.to_string()))
11500 } else {
11501 Self(self.0.query_param_missing("limit"))
11502 }
11503 }
11504
11505 pub fn page_token<'a, T>(self, value: T) -> Self
11506 where
11507 T: Into<Option<&'a str>>,
11508 {
11509 if let Some(value) = value.into() {
11510 Self(self.0.query_param("page_token", value.to_string()))
11511 } else {
11512 Self(self.0.query_param_missing("page_token"))
11513 }
11514 }
11515
11516 pub fn sort_by<T>(self, value: T) -> Self
11517 where
11518 T: Into<Option<types::TimeAndIdSortMode>>,
11519 {
11520 if let Some(value) = value.into() {
11521 Self(self.0.query_param("sort_by", value.to_string()))
11522 } else {
11523 Self(self.0.query_param_missing("sort_by"))
11524 }
11525 }
11526
11527 pub fn start_time<'a, T>(self, value: T) -> Self
11528 where
11529 T: Into<Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>>,
11530 {
11531 if let Some(value) = value.into() {
11532 Self(self.0.query_param("start_time", value.to_string()))
11533 } else {
11534 Self(self.0.query_param_missing("start_time"))
11535 }
11536 }
11537 }
11538
11539 pub struct AuditLogListThen(::httpmock::Then);
11540 impl AuditLogListThen {
11541 pub fn new(inner: ::httpmock::Then) -> Self {
11542 Self(inner)
11543 }
11544
11545 pub fn into_inner(self) -> ::httpmock::Then {
11546 self.0
11547 }
11548
11549 pub fn ok(self, value: &types::AuditLogEntryResultsPage) -> Self {
11550 Self(
11551 self.0
11552 .status(200u16)
11553 .header("content-type", "application/json")
11554 .json_body_obj(value),
11555 )
11556 }
11557
11558 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
11559 assert_eq!(status / 100u16, 4u16);
11560 Self(
11561 self.0
11562 .status(status)
11563 .header("content-type", "application/json")
11564 .json_body_obj(value),
11565 )
11566 }
11567
11568 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
11569 assert_eq!(status / 100u16, 5u16);
11570 Self(
11571 self.0
11572 .status(status)
11573 .header("content-type", "application/json")
11574 .json_body_obj(value),
11575 )
11576 }
11577 }
11578
11579 pub struct PhysicalDiskListWhen(::httpmock::When);
11580 impl PhysicalDiskListWhen {
11581 pub fn new(inner: ::httpmock::When) -> Self {
11582 Self(
11583 inner
11584 .method(::httpmock::Method::GET)
11585 .path_matches(regex::Regex::new("^/v1/system/hardware/disks$").unwrap()),
11586 )
11587 }
11588
11589 pub fn into_inner(self) -> ::httpmock::When {
11590 self.0
11591 }
11592
11593 pub fn limit<T>(self, value: T) -> Self
11594 where
11595 T: Into<Option<::std::num::NonZeroU32>>,
11596 {
11597 if let Some(value) = value.into() {
11598 Self(self.0.query_param("limit", value.to_string()))
11599 } else {
11600 Self(self.0.query_param_missing("limit"))
11601 }
11602 }
11603
11604 pub fn page_token<'a, T>(self, value: T) -> Self
11605 where
11606 T: Into<Option<&'a str>>,
11607 {
11608 if let Some(value) = value.into() {
11609 Self(self.0.query_param("page_token", value.to_string()))
11610 } else {
11611 Self(self.0.query_param_missing("page_token"))
11612 }
11613 }
11614
11615 pub fn sort_by<T>(self, value: T) -> Self
11616 where
11617 T: Into<Option<types::IdSortMode>>,
11618 {
11619 if let Some(value) = value.into() {
11620 Self(self.0.query_param("sort_by", value.to_string()))
11621 } else {
11622 Self(self.0.query_param_missing("sort_by"))
11623 }
11624 }
11625 }
11626
11627 pub struct PhysicalDiskListThen(::httpmock::Then);
11628 impl PhysicalDiskListThen {
11629 pub fn new(inner: ::httpmock::Then) -> Self {
11630 Self(inner)
11631 }
11632
11633 pub fn into_inner(self) -> ::httpmock::Then {
11634 self.0
11635 }
11636
11637 pub fn ok(self, value: &types::PhysicalDiskResultsPage) -> Self {
11638 Self(
11639 self.0
11640 .status(200u16)
11641 .header("content-type", "application/json")
11642 .json_body_obj(value),
11643 )
11644 }
11645
11646 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
11647 assert_eq!(status / 100u16, 4u16);
11648 Self(
11649 self.0
11650 .status(status)
11651 .header("content-type", "application/json")
11652 .json_body_obj(value),
11653 )
11654 }
11655
11656 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
11657 assert_eq!(status / 100u16, 5u16);
11658 Self(
11659 self.0
11660 .status(status)
11661 .header("content-type", "application/json")
11662 .json_body_obj(value),
11663 )
11664 }
11665 }
11666
11667 pub struct PhysicalDiskViewWhen(::httpmock::When);
11668 impl PhysicalDiskViewWhen {
11669 pub fn new(inner: ::httpmock::When) -> Self {
11670 Self(
11671 inner
11672 .method(::httpmock::Method::GET)
11673 .path_matches(regex::Regex::new("^/v1/system/hardware/disks/[^/]*$").unwrap()),
11674 )
11675 }
11676
11677 pub fn into_inner(self) -> ::httpmock::When {
11678 self.0
11679 }
11680
11681 pub fn disk_id(self, value: &::uuid::Uuid) -> Self {
11682 let re = regex::Regex::new(&format!(
11683 "^/v1/system/hardware/disks/{}$",
11684 value.to_string()
11685 ))
11686 .unwrap();
11687 Self(self.0.path_matches(re))
11688 }
11689 }
11690
11691 pub struct PhysicalDiskViewThen(::httpmock::Then);
11692 impl PhysicalDiskViewThen {
11693 pub fn new(inner: ::httpmock::Then) -> Self {
11694 Self(inner)
11695 }
11696
11697 pub fn into_inner(self) -> ::httpmock::Then {
11698 self.0
11699 }
11700
11701 pub fn ok(self, value: &types::PhysicalDisk) -> Self {
11702 Self(
11703 self.0
11704 .status(200u16)
11705 .header("content-type", "application/json")
11706 .json_body_obj(value),
11707 )
11708 }
11709
11710 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
11711 assert_eq!(status / 100u16, 4u16);
11712 Self(
11713 self.0
11714 .status(status)
11715 .header("content-type", "application/json")
11716 .json_body_obj(value),
11717 )
11718 }
11719
11720 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
11721 assert_eq!(status / 100u16, 5u16);
11722 Self(
11723 self.0
11724 .status(status)
11725 .header("content-type", "application/json")
11726 .json_body_obj(value),
11727 )
11728 }
11729 }
11730
11731 pub struct NetworkingSwitchPortLldpNeighborsWhen(::httpmock::When);
11732 impl NetworkingSwitchPortLldpNeighborsWhen {
11733 pub fn new(inner: ::httpmock::When) -> Self {
11734 Self(
11735 inner.method(::httpmock::Method::GET).path_matches(
11736 regex::Regex::new(
11737 "^/v1/system/hardware/rack-switch-port/[^/]*/[^/]*/[^/]*/lldp/neighbors$",
11738 )
11739 .unwrap(),
11740 ),
11741 )
11742 }
11743
11744 pub fn into_inner(self) -> ::httpmock::When {
11745 self.0
11746 }
11747
11748 pub fn rack_id(self, value: &::uuid::Uuid) -> Self {
11749 let re = regex::Regex::new(&format!(
11750 "^/v1/system/hardware/rack-switch-port/{}/.*/.*/lldp/neighbors$",
11751 value.to_string()
11752 ))
11753 .unwrap();
11754 Self(self.0.path_matches(re))
11755 }
11756
11757 pub fn switch_location(self, value: &types::Name) -> Self {
11758 let re = regex::Regex::new(&format!(
11759 "^/v1/system/hardware/rack-switch-port/.*/{}/.*/lldp/neighbors$",
11760 value.to_string()
11761 ))
11762 .unwrap();
11763 Self(self.0.path_matches(re))
11764 }
11765
11766 pub fn port(self, value: &types::Name) -> Self {
11767 let re = regex::Regex::new(&format!(
11768 "^/v1/system/hardware/rack-switch-port/.*/.*/{}/lldp/neighbors$",
11769 value.to_string()
11770 ))
11771 .unwrap();
11772 Self(self.0.path_matches(re))
11773 }
11774
11775 pub fn limit<T>(self, value: T) -> Self
11776 where
11777 T: Into<Option<::std::num::NonZeroU32>>,
11778 {
11779 if let Some(value) = value.into() {
11780 Self(self.0.query_param("limit", value.to_string()))
11781 } else {
11782 Self(self.0.query_param_missing("limit"))
11783 }
11784 }
11785
11786 pub fn page_token<'a, T>(self, value: T) -> Self
11787 where
11788 T: Into<Option<&'a str>>,
11789 {
11790 if let Some(value) = value.into() {
11791 Self(self.0.query_param("page_token", value.to_string()))
11792 } else {
11793 Self(self.0.query_param_missing("page_token"))
11794 }
11795 }
11796
11797 pub fn sort_by<T>(self, value: T) -> Self
11798 where
11799 T: Into<Option<types::IdSortMode>>,
11800 {
11801 if let Some(value) = value.into() {
11802 Self(self.0.query_param("sort_by", value.to_string()))
11803 } else {
11804 Self(self.0.query_param_missing("sort_by"))
11805 }
11806 }
11807 }
11808
11809 pub struct NetworkingSwitchPortLldpNeighborsThen(::httpmock::Then);
11810 impl NetworkingSwitchPortLldpNeighborsThen {
11811 pub fn new(inner: ::httpmock::Then) -> Self {
11812 Self(inner)
11813 }
11814
11815 pub fn into_inner(self) -> ::httpmock::Then {
11816 self.0
11817 }
11818
11819 pub fn ok(self, value: &types::LldpNeighborResultsPage) -> Self {
11820 Self(
11821 self.0
11822 .status(200u16)
11823 .header("content-type", "application/json")
11824 .json_body_obj(value),
11825 )
11826 }
11827
11828 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
11829 assert_eq!(status / 100u16, 4u16);
11830 Self(
11831 self.0
11832 .status(status)
11833 .header("content-type", "application/json")
11834 .json_body_obj(value),
11835 )
11836 }
11837
11838 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
11839 assert_eq!(status / 100u16, 5u16);
11840 Self(
11841 self.0
11842 .status(status)
11843 .header("content-type", "application/json")
11844 .json_body_obj(value),
11845 )
11846 }
11847 }
11848
11849 pub struct RackListWhen(::httpmock::When);
11850 impl RackListWhen {
11851 pub fn new(inner: ::httpmock::When) -> Self {
11852 Self(
11853 inner
11854 .method(::httpmock::Method::GET)
11855 .path_matches(regex::Regex::new("^/v1/system/hardware/racks$").unwrap()),
11856 )
11857 }
11858
11859 pub fn into_inner(self) -> ::httpmock::When {
11860 self.0
11861 }
11862
11863 pub fn limit<T>(self, value: T) -> Self
11864 where
11865 T: Into<Option<::std::num::NonZeroU32>>,
11866 {
11867 if let Some(value) = value.into() {
11868 Self(self.0.query_param("limit", value.to_string()))
11869 } else {
11870 Self(self.0.query_param_missing("limit"))
11871 }
11872 }
11873
11874 pub fn page_token<'a, T>(self, value: T) -> Self
11875 where
11876 T: Into<Option<&'a str>>,
11877 {
11878 if let Some(value) = value.into() {
11879 Self(self.0.query_param("page_token", value.to_string()))
11880 } else {
11881 Self(self.0.query_param_missing("page_token"))
11882 }
11883 }
11884
11885 pub fn sort_by<T>(self, value: T) -> Self
11886 where
11887 T: Into<Option<types::IdSortMode>>,
11888 {
11889 if let Some(value) = value.into() {
11890 Self(self.0.query_param("sort_by", value.to_string()))
11891 } else {
11892 Self(self.0.query_param_missing("sort_by"))
11893 }
11894 }
11895 }
11896
11897 pub struct RackListThen(::httpmock::Then);
11898 impl RackListThen {
11899 pub fn new(inner: ::httpmock::Then) -> Self {
11900 Self(inner)
11901 }
11902
11903 pub fn into_inner(self) -> ::httpmock::Then {
11904 self.0
11905 }
11906
11907 pub fn ok(self, value: &types::RackResultsPage) -> Self {
11908 Self(
11909 self.0
11910 .status(200u16)
11911 .header("content-type", "application/json")
11912 .json_body_obj(value),
11913 )
11914 }
11915
11916 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
11917 assert_eq!(status / 100u16, 4u16);
11918 Self(
11919 self.0
11920 .status(status)
11921 .header("content-type", "application/json")
11922 .json_body_obj(value),
11923 )
11924 }
11925
11926 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
11927 assert_eq!(status / 100u16, 5u16);
11928 Self(
11929 self.0
11930 .status(status)
11931 .header("content-type", "application/json")
11932 .json_body_obj(value),
11933 )
11934 }
11935 }
11936
11937 pub struct RackViewWhen(::httpmock::When);
11938 impl RackViewWhen {
11939 pub fn new(inner: ::httpmock::When) -> Self {
11940 Self(
11941 inner
11942 .method(::httpmock::Method::GET)
11943 .path_matches(regex::Regex::new("^/v1/system/hardware/racks/[^/]*$").unwrap()),
11944 )
11945 }
11946
11947 pub fn into_inner(self) -> ::httpmock::When {
11948 self.0
11949 }
11950
11951 pub fn rack_id(self, value: &::uuid::Uuid) -> Self {
11952 let re = regex::Regex::new(&format!(
11953 "^/v1/system/hardware/racks/{}$",
11954 value.to_string()
11955 ))
11956 .unwrap();
11957 Self(self.0.path_matches(re))
11958 }
11959 }
11960
11961 pub struct RackViewThen(::httpmock::Then);
11962 impl RackViewThen {
11963 pub fn new(inner: ::httpmock::Then) -> Self {
11964 Self(inner)
11965 }
11966
11967 pub fn into_inner(self) -> ::httpmock::Then {
11968 self.0
11969 }
11970
11971 pub fn ok(self, value: &types::Rack) -> Self {
11972 Self(
11973 self.0
11974 .status(200u16)
11975 .header("content-type", "application/json")
11976 .json_body_obj(value),
11977 )
11978 }
11979
11980 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
11981 assert_eq!(status / 100u16, 4u16);
11982 Self(
11983 self.0
11984 .status(status)
11985 .header("content-type", "application/json")
11986 .json_body_obj(value),
11987 )
11988 }
11989
11990 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
11991 assert_eq!(status / 100u16, 5u16);
11992 Self(
11993 self.0
11994 .status(status)
11995 .header("content-type", "application/json")
11996 .json_body_obj(value),
11997 )
11998 }
11999 }
12000
12001 pub struct RackMembershipStatusWhen(::httpmock::When);
12002 impl RackMembershipStatusWhen {
12003 pub fn new(inner: ::httpmock::When) -> Self {
12004 Self(inner.method(::httpmock::Method::GET).path_matches(
12005 regex::Regex::new("^/v1/system/hardware/racks/[^/]*/membership$").unwrap(),
12006 ))
12007 }
12008
12009 pub fn into_inner(self) -> ::httpmock::When {
12010 self.0
12011 }
12012
12013 pub fn rack_id(self, value: &::uuid::Uuid) -> Self {
12014 let re = regex::Regex::new(&format!(
12015 "^/v1/system/hardware/racks/{}/membership$",
12016 value.to_string()
12017 ))
12018 .unwrap();
12019 Self(self.0.path_matches(re))
12020 }
12021
12022 pub fn version<'a, T>(self, value: T) -> Self
12023 where
12024 T: Into<Option<&'a types::RackMembershipVersion>>,
12025 {
12026 if let Some(value) = value.into() {
12027 Self(self.0.query_param("version", value.to_string()))
12028 } else {
12029 Self(self.0.query_param_missing("version"))
12030 }
12031 }
12032 }
12033
12034 pub struct RackMembershipStatusThen(::httpmock::Then);
12035 impl RackMembershipStatusThen {
12036 pub fn new(inner: ::httpmock::Then) -> Self {
12037 Self(inner)
12038 }
12039
12040 pub fn into_inner(self) -> ::httpmock::Then {
12041 self.0
12042 }
12043
12044 pub fn ok(self, value: &types::RackMembershipStatus) -> Self {
12045 Self(
12046 self.0
12047 .status(200u16)
12048 .header("content-type", "application/json")
12049 .json_body_obj(value),
12050 )
12051 }
12052
12053 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
12054 assert_eq!(status / 100u16, 4u16);
12055 Self(
12056 self.0
12057 .status(status)
12058 .header("content-type", "application/json")
12059 .json_body_obj(value),
12060 )
12061 }
12062
12063 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
12064 assert_eq!(status / 100u16, 5u16);
12065 Self(
12066 self.0
12067 .status(status)
12068 .header("content-type", "application/json")
12069 .json_body_obj(value),
12070 )
12071 }
12072 }
12073
12074 pub struct RackMembershipAbortWhen(::httpmock::When);
12075 impl RackMembershipAbortWhen {
12076 pub fn new(inner: ::httpmock::When) -> Self {
12077 Self(inner.method(::httpmock::Method::POST).path_matches(
12078 regex::Regex::new("^/v1/system/hardware/racks/[^/]*/membership/abort$").unwrap(),
12079 ))
12080 }
12081
12082 pub fn into_inner(self) -> ::httpmock::When {
12083 self.0
12084 }
12085
12086 pub fn rack_id(self, value: &::uuid::Uuid) -> Self {
12087 let re = regex::Regex::new(&format!(
12088 "^/v1/system/hardware/racks/{}/membership/abort$",
12089 value.to_string()
12090 ))
12091 .unwrap();
12092 Self(self.0.path_matches(re))
12093 }
12094 }
12095
12096 pub struct RackMembershipAbortThen(::httpmock::Then);
12097 impl RackMembershipAbortThen {
12098 pub fn new(inner: ::httpmock::Then) -> Self {
12099 Self(inner)
12100 }
12101
12102 pub fn into_inner(self) -> ::httpmock::Then {
12103 self.0
12104 }
12105
12106 pub fn ok(self, value: &types::RackMembershipStatus) -> Self {
12107 Self(
12108 self.0
12109 .status(200u16)
12110 .header("content-type", "application/json")
12111 .json_body_obj(value),
12112 )
12113 }
12114
12115 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
12116 assert_eq!(status / 100u16, 4u16);
12117 Self(
12118 self.0
12119 .status(status)
12120 .header("content-type", "application/json")
12121 .json_body_obj(value),
12122 )
12123 }
12124
12125 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
12126 assert_eq!(status / 100u16, 5u16);
12127 Self(
12128 self.0
12129 .status(status)
12130 .header("content-type", "application/json")
12131 .json_body_obj(value),
12132 )
12133 }
12134 }
12135
12136 pub struct RackMembershipAddSledsWhen(::httpmock::When);
12137 impl RackMembershipAddSledsWhen {
12138 pub fn new(inner: ::httpmock::When) -> Self {
12139 Self(inner.method(::httpmock::Method::POST).path_matches(
12140 regex::Regex::new("^/v1/system/hardware/racks/[^/]*/membership/add$").unwrap(),
12141 ))
12142 }
12143
12144 pub fn into_inner(self) -> ::httpmock::When {
12145 self.0
12146 }
12147
12148 pub fn rack_id(self, value: &::uuid::Uuid) -> Self {
12149 let re = regex::Regex::new(&format!(
12150 "^/v1/system/hardware/racks/{}/membership/add$",
12151 value.to_string()
12152 ))
12153 .unwrap();
12154 Self(self.0.path_matches(re))
12155 }
12156
12157 pub fn body(self, value: &types::RackMembershipAddSledsRequest) -> Self {
12158 Self(self.0.json_body_obj(value))
12159 }
12160 }
12161
12162 pub struct RackMembershipAddSledsThen(::httpmock::Then);
12163 impl RackMembershipAddSledsThen {
12164 pub fn new(inner: ::httpmock::Then) -> Self {
12165 Self(inner)
12166 }
12167
12168 pub fn into_inner(self) -> ::httpmock::Then {
12169 self.0
12170 }
12171
12172 pub fn ok(self, value: &types::RackMembershipStatus) -> Self {
12173 Self(
12174 self.0
12175 .status(200u16)
12176 .header("content-type", "application/json")
12177 .json_body_obj(value),
12178 )
12179 }
12180
12181 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
12182 assert_eq!(status / 100u16, 4u16);
12183 Self(
12184 self.0
12185 .status(status)
12186 .header("content-type", "application/json")
12187 .json_body_obj(value),
12188 )
12189 }
12190
12191 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
12192 assert_eq!(status / 100u16, 5u16);
12193 Self(
12194 self.0
12195 .status(status)
12196 .header("content-type", "application/json")
12197 .json_body_obj(value),
12198 )
12199 }
12200 }
12201
12202 pub struct SledListWhen(::httpmock::When);
12203 impl SledListWhen {
12204 pub fn new(inner: ::httpmock::When) -> Self {
12205 Self(
12206 inner
12207 .method(::httpmock::Method::GET)
12208 .path_matches(regex::Regex::new("^/v1/system/hardware/sleds$").unwrap()),
12209 )
12210 }
12211
12212 pub fn into_inner(self) -> ::httpmock::When {
12213 self.0
12214 }
12215
12216 pub fn limit<T>(self, value: T) -> Self
12217 where
12218 T: Into<Option<::std::num::NonZeroU32>>,
12219 {
12220 if let Some(value) = value.into() {
12221 Self(self.0.query_param("limit", value.to_string()))
12222 } else {
12223 Self(self.0.query_param_missing("limit"))
12224 }
12225 }
12226
12227 pub fn page_token<'a, T>(self, value: T) -> Self
12228 where
12229 T: Into<Option<&'a str>>,
12230 {
12231 if let Some(value) = value.into() {
12232 Self(self.0.query_param("page_token", value.to_string()))
12233 } else {
12234 Self(self.0.query_param_missing("page_token"))
12235 }
12236 }
12237
12238 pub fn sort_by<T>(self, value: T) -> Self
12239 where
12240 T: Into<Option<types::IdSortMode>>,
12241 {
12242 if let Some(value) = value.into() {
12243 Self(self.0.query_param("sort_by", value.to_string()))
12244 } else {
12245 Self(self.0.query_param_missing("sort_by"))
12246 }
12247 }
12248 }
12249
12250 pub struct SledListThen(::httpmock::Then);
12251 impl SledListThen {
12252 pub fn new(inner: ::httpmock::Then) -> Self {
12253 Self(inner)
12254 }
12255
12256 pub fn into_inner(self) -> ::httpmock::Then {
12257 self.0
12258 }
12259
12260 pub fn ok(self, value: &types::SledResultsPage) -> Self {
12261 Self(
12262 self.0
12263 .status(200u16)
12264 .header("content-type", "application/json")
12265 .json_body_obj(value),
12266 )
12267 }
12268
12269 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
12270 assert_eq!(status / 100u16, 4u16);
12271 Self(
12272 self.0
12273 .status(status)
12274 .header("content-type", "application/json")
12275 .json_body_obj(value),
12276 )
12277 }
12278
12279 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
12280 assert_eq!(status / 100u16, 5u16);
12281 Self(
12282 self.0
12283 .status(status)
12284 .header("content-type", "application/json")
12285 .json_body_obj(value),
12286 )
12287 }
12288 }
12289
12290 pub struct SledAddWhen(::httpmock::When);
12291 impl SledAddWhen {
12292 pub fn new(inner: ::httpmock::When) -> Self {
12293 Self(
12294 inner
12295 .method(::httpmock::Method::POST)
12296 .path_matches(regex::Regex::new("^/v1/system/hardware/sleds$").unwrap()),
12297 )
12298 }
12299
12300 pub fn into_inner(self) -> ::httpmock::When {
12301 self.0
12302 }
12303
12304 pub fn body(self, value: &types::UninitializedSledId) -> Self {
12305 Self(self.0.json_body_obj(value))
12306 }
12307 }
12308
12309 pub struct SledAddThen(::httpmock::Then);
12310 impl SledAddThen {
12311 pub fn new(inner: ::httpmock::Then) -> Self {
12312 Self(inner)
12313 }
12314
12315 pub fn into_inner(self) -> ::httpmock::Then {
12316 self.0
12317 }
12318
12319 pub fn created(self, value: &types::SledId) -> Self {
12320 Self(
12321 self.0
12322 .status(201u16)
12323 .header("content-type", "application/json")
12324 .json_body_obj(value),
12325 )
12326 }
12327
12328 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
12329 assert_eq!(status / 100u16, 4u16);
12330 Self(
12331 self.0
12332 .status(status)
12333 .header("content-type", "application/json")
12334 .json_body_obj(value),
12335 )
12336 }
12337
12338 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
12339 assert_eq!(status / 100u16, 5u16);
12340 Self(
12341 self.0
12342 .status(status)
12343 .header("content-type", "application/json")
12344 .json_body_obj(value),
12345 )
12346 }
12347 }
12348
12349 pub struct SledViewWhen(::httpmock::When);
12350 impl SledViewWhen {
12351 pub fn new(inner: ::httpmock::When) -> Self {
12352 Self(
12353 inner
12354 .method(::httpmock::Method::GET)
12355 .path_matches(regex::Regex::new("^/v1/system/hardware/sleds/[^/]*$").unwrap()),
12356 )
12357 }
12358
12359 pub fn into_inner(self) -> ::httpmock::When {
12360 self.0
12361 }
12362
12363 pub fn sled_id(self, value: &::uuid::Uuid) -> Self {
12364 let re = regex::Regex::new(&format!(
12365 "^/v1/system/hardware/sleds/{}$",
12366 value.to_string()
12367 ))
12368 .unwrap();
12369 Self(self.0.path_matches(re))
12370 }
12371 }
12372
12373 pub struct SledViewThen(::httpmock::Then);
12374 impl SledViewThen {
12375 pub fn new(inner: ::httpmock::Then) -> Self {
12376 Self(inner)
12377 }
12378
12379 pub fn into_inner(self) -> ::httpmock::Then {
12380 self.0
12381 }
12382
12383 pub fn ok(self, value: &types::Sled) -> Self {
12384 Self(
12385 self.0
12386 .status(200u16)
12387 .header("content-type", "application/json")
12388 .json_body_obj(value),
12389 )
12390 }
12391
12392 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
12393 assert_eq!(status / 100u16, 4u16);
12394 Self(
12395 self.0
12396 .status(status)
12397 .header("content-type", "application/json")
12398 .json_body_obj(value),
12399 )
12400 }
12401
12402 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
12403 assert_eq!(status / 100u16, 5u16);
12404 Self(
12405 self.0
12406 .status(status)
12407 .header("content-type", "application/json")
12408 .json_body_obj(value),
12409 )
12410 }
12411 }
12412
12413 pub struct SledPhysicalDiskListWhen(::httpmock::When);
12414 impl SledPhysicalDiskListWhen {
12415 pub fn new(inner: ::httpmock::When) -> Self {
12416 Self(inner.method(::httpmock::Method::GET).path_matches(
12417 regex::Regex::new("^/v1/system/hardware/sleds/[^/]*/disks$").unwrap(),
12418 ))
12419 }
12420
12421 pub fn into_inner(self) -> ::httpmock::When {
12422 self.0
12423 }
12424
12425 pub fn sled_id(self, value: &::uuid::Uuid) -> Self {
12426 let re = regex::Regex::new(&format!(
12427 "^/v1/system/hardware/sleds/{}/disks$",
12428 value.to_string()
12429 ))
12430 .unwrap();
12431 Self(self.0.path_matches(re))
12432 }
12433
12434 pub fn limit<T>(self, value: T) -> Self
12435 where
12436 T: Into<Option<::std::num::NonZeroU32>>,
12437 {
12438 if let Some(value) = value.into() {
12439 Self(self.0.query_param("limit", value.to_string()))
12440 } else {
12441 Self(self.0.query_param_missing("limit"))
12442 }
12443 }
12444
12445 pub fn page_token<'a, T>(self, value: T) -> Self
12446 where
12447 T: Into<Option<&'a str>>,
12448 {
12449 if let Some(value) = value.into() {
12450 Self(self.0.query_param("page_token", value.to_string()))
12451 } else {
12452 Self(self.0.query_param_missing("page_token"))
12453 }
12454 }
12455
12456 pub fn sort_by<T>(self, value: T) -> Self
12457 where
12458 T: Into<Option<types::IdSortMode>>,
12459 {
12460 if let Some(value) = value.into() {
12461 Self(self.0.query_param("sort_by", value.to_string()))
12462 } else {
12463 Self(self.0.query_param_missing("sort_by"))
12464 }
12465 }
12466 }
12467
12468 pub struct SledPhysicalDiskListThen(::httpmock::Then);
12469 impl SledPhysicalDiskListThen {
12470 pub fn new(inner: ::httpmock::Then) -> Self {
12471 Self(inner)
12472 }
12473
12474 pub fn into_inner(self) -> ::httpmock::Then {
12475 self.0
12476 }
12477
12478 pub fn ok(self, value: &types::PhysicalDiskResultsPage) -> Self {
12479 Self(
12480 self.0
12481 .status(200u16)
12482 .header("content-type", "application/json")
12483 .json_body_obj(value),
12484 )
12485 }
12486
12487 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
12488 assert_eq!(status / 100u16, 4u16);
12489 Self(
12490 self.0
12491 .status(status)
12492 .header("content-type", "application/json")
12493 .json_body_obj(value),
12494 )
12495 }
12496
12497 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
12498 assert_eq!(status / 100u16, 5u16);
12499 Self(
12500 self.0
12501 .status(status)
12502 .header("content-type", "application/json")
12503 .json_body_obj(value),
12504 )
12505 }
12506 }
12507
12508 pub struct SledInstanceListWhen(::httpmock::When);
12509 impl SledInstanceListWhen {
12510 pub fn new(inner: ::httpmock::When) -> Self {
12511 Self(inner.method(::httpmock::Method::GET).path_matches(
12512 regex::Regex::new("^/v1/system/hardware/sleds/[^/]*/instances$").unwrap(),
12513 ))
12514 }
12515
12516 pub fn into_inner(self) -> ::httpmock::When {
12517 self.0
12518 }
12519
12520 pub fn sled_id(self, value: &::uuid::Uuid) -> Self {
12521 let re = regex::Regex::new(&format!(
12522 "^/v1/system/hardware/sleds/{}/instances$",
12523 value.to_string()
12524 ))
12525 .unwrap();
12526 Self(self.0.path_matches(re))
12527 }
12528
12529 pub fn limit<T>(self, value: T) -> Self
12530 where
12531 T: Into<Option<::std::num::NonZeroU32>>,
12532 {
12533 if let Some(value) = value.into() {
12534 Self(self.0.query_param("limit", value.to_string()))
12535 } else {
12536 Self(self.0.query_param_missing("limit"))
12537 }
12538 }
12539
12540 pub fn page_token<'a, T>(self, value: T) -> Self
12541 where
12542 T: Into<Option<&'a str>>,
12543 {
12544 if let Some(value) = value.into() {
12545 Self(self.0.query_param("page_token", value.to_string()))
12546 } else {
12547 Self(self.0.query_param_missing("page_token"))
12548 }
12549 }
12550
12551 pub fn sort_by<T>(self, value: T) -> Self
12552 where
12553 T: Into<Option<types::IdSortMode>>,
12554 {
12555 if let Some(value) = value.into() {
12556 Self(self.0.query_param("sort_by", value.to_string()))
12557 } else {
12558 Self(self.0.query_param_missing("sort_by"))
12559 }
12560 }
12561 }
12562
12563 pub struct SledInstanceListThen(::httpmock::Then);
12564 impl SledInstanceListThen {
12565 pub fn new(inner: ::httpmock::Then) -> Self {
12566 Self(inner)
12567 }
12568
12569 pub fn into_inner(self) -> ::httpmock::Then {
12570 self.0
12571 }
12572
12573 pub fn ok(self, value: &types::SledInstanceResultsPage) -> Self {
12574 Self(
12575 self.0
12576 .status(200u16)
12577 .header("content-type", "application/json")
12578 .json_body_obj(value),
12579 )
12580 }
12581
12582 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
12583 assert_eq!(status / 100u16, 4u16);
12584 Self(
12585 self.0
12586 .status(status)
12587 .header("content-type", "application/json")
12588 .json_body_obj(value),
12589 )
12590 }
12591
12592 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
12593 assert_eq!(status / 100u16, 5u16);
12594 Self(
12595 self.0
12596 .status(status)
12597 .header("content-type", "application/json")
12598 .json_body_obj(value),
12599 )
12600 }
12601 }
12602
12603 pub struct SledSetProvisionPolicyWhen(::httpmock::When);
12604 impl SledSetProvisionPolicyWhen {
12605 pub fn new(inner: ::httpmock::When) -> Self {
12606 Self(inner.method(::httpmock::Method::PUT).path_matches(
12607 regex::Regex::new("^/v1/system/hardware/sleds/[^/]*/provision-policy$").unwrap(),
12608 ))
12609 }
12610
12611 pub fn into_inner(self) -> ::httpmock::When {
12612 self.0
12613 }
12614
12615 pub fn sled_id(self, value: &::uuid::Uuid) -> Self {
12616 let re = regex::Regex::new(&format!(
12617 "^/v1/system/hardware/sleds/{}/provision-policy$",
12618 value.to_string()
12619 ))
12620 .unwrap();
12621 Self(self.0.path_matches(re))
12622 }
12623
12624 pub fn body(self, value: &types::SledProvisionPolicyParams) -> Self {
12625 Self(self.0.json_body_obj(value))
12626 }
12627 }
12628
12629 pub struct SledSetProvisionPolicyThen(::httpmock::Then);
12630 impl SledSetProvisionPolicyThen {
12631 pub fn new(inner: ::httpmock::Then) -> Self {
12632 Self(inner)
12633 }
12634
12635 pub fn into_inner(self) -> ::httpmock::Then {
12636 self.0
12637 }
12638
12639 pub fn ok(self, value: &types::SledProvisionPolicyResponse) -> Self {
12640 Self(
12641 self.0
12642 .status(200u16)
12643 .header("content-type", "application/json")
12644 .json_body_obj(value),
12645 )
12646 }
12647
12648 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
12649 assert_eq!(status / 100u16, 4u16);
12650 Self(
12651 self.0
12652 .status(status)
12653 .header("content-type", "application/json")
12654 .json_body_obj(value),
12655 )
12656 }
12657
12658 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
12659 assert_eq!(status / 100u16, 5u16);
12660 Self(
12661 self.0
12662 .status(status)
12663 .header("content-type", "application/json")
12664 .json_body_obj(value),
12665 )
12666 }
12667 }
12668
12669 pub struct SledListUninitializedWhen(::httpmock::When);
12670 impl SledListUninitializedWhen {
12671 pub fn new(inner: ::httpmock::When) -> Self {
12672 Self(inner.method(::httpmock::Method::GET).path_matches(
12673 regex::Regex::new("^/v1/system/hardware/sleds-uninitialized$").unwrap(),
12674 ))
12675 }
12676
12677 pub fn into_inner(self) -> ::httpmock::When {
12678 self.0
12679 }
12680
12681 pub fn limit<T>(self, value: T) -> Self
12682 where
12683 T: Into<Option<::std::num::NonZeroU32>>,
12684 {
12685 if let Some(value) = value.into() {
12686 Self(self.0.query_param("limit", value.to_string()))
12687 } else {
12688 Self(self.0.query_param_missing("limit"))
12689 }
12690 }
12691
12692 pub fn page_token<'a, T>(self, value: T) -> Self
12693 where
12694 T: Into<Option<&'a str>>,
12695 {
12696 if let Some(value) = value.into() {
12697 Self(self.0.query_param("page_token", value.to_string()))
12698 } else {
12699 Self(self.0.query_param_missing("page_token"))
12700 }
12701 }
12702 }
12703
12704 pub struct SledListUninitializedThen(::httpmock::Then);
12705 impl SledListUninitializedThen {
12706 pub fn new(inner: ::httpmock::Then) -> Self {
12707 Self(inner)
12708 }
12709
12710 pub fn into_inner(self) -> ::httpmock::Then {
12711 self.0
12712 }
12713
12714 pub fn ok(self, value: &types::UninitializedSledResultsPage) -> Self {
12715 Self(
12716 self.0
12717 .status(200u16)
12718 .header("content-type", "application/json")
12719 .json_body_obj(value),
12720 )
12721 }
12722
12723 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
12724 assert_eq!(status / 100u16, 4u16);
12725 Self(
12726 self.0
12727 .status(status)
12728 .header("content-type", "application/json")
12729 .json_body_obj(value),
12730 )
12731 }
12732
12733 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
12734 assert_eq!(status / 100u16, 5u16);
12735 Self(
12736 self.0
12737 .status(status)
12738 .header("content-type", "application/json")
12739 .json_body_obj(value),
12740 )
12741 }
12742 }
12743
12744 pub struct NetworkingSwitchPortListWhen(::httpmock::When);
12745 impl NetworkingSwitchPortListWhen {
12746 pub fn new(inner: ::httpmock::When) -> Self {
12747 Self(
12748 inner
12749 .method(::httpmock::Method::GET)
12750 .path_matches(regex::Regex::new("^/v1/system/hardware/switch-port$").unwrap()),
12751 )
12752 }
12753
12754 pub fn into_inner(self) -> ::httpmock::When {
12755 self.0
12756 }
12757
12758 pub fn limit<T>(self, value: T) -> Self
12759 where
12760 T: Into<Option<::std::num::NonZeroU32>>,
12761 {
12762 if let Some(value) = value.into() {
12763 Self(self.0.query_param("limit", value.to_string()))
12764 } else {
12765 Self(self.0.query_param_missing("limit"))
12766 }
12767 }
12768
12769 pub fn page_token<'a, T>(self, value: T) -> Self
12770 where
12771 T: Into<Option<&'a str>>,
12772 {
12773 if let Some(value) = value.into() {
12774 Self(self.0.query_param("page_token", value.to_string()))
12775 } else {
12776 Self(self.0.query_param_missing("page_token"))
12777 }
12778 }
12779
12780 pub fn sort_by<T>(self, value: T) -> Self
12781 where
12782 T: Into<Option<types::IdSortMode>>,
12783 {
12784 if let Some(value) = value.into() {
12785 Self(self.0.query_param("sort_by", value.to_string()))
12786 } else {
12787 Self(self.0.query_param_missing("sort_by"))
12788 }
12789 }
12790
12791 pub fn switch_port_id<'a, T>(self, value: T) -> Self
12792 where
12793 T: Into<Option<&'a ::uuid::Uuid>>,
12794 {
12795 if let Some(value) = value.into() {
12796 Self(self.0.query_param("switch_port_id", value.to_string()))
12797 } else {
12798 Self(self.0.query_param_missing("switch_port_id"))
12799 }
12800 }
12801 }
12802
12803 pub struct NetworkingSwitchPortListThen(::httpmock::Then);
12804 impl NetworkingSwitchPortListThen {
12805 pub fn new(inner: ::httpmock::Then) -> Self {
12806 Self(inner)
12807 }
12808
12809 pub fn into_inner(self) -> ::httpmock::Then {
12810 self.0
12811 }
12812
12813 pub fn ok(self, value: &types::SwitchPortResultsPage) -> Self {
12814 Self(
12815 self.0
12816 .status(200u16)
12817 .header("content-type", "application/json")
12818 .json_body_obj(value),
12819 )
12820 }
12821
12822 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
12823 assert_eq!(status / 100u16, 4u16);
12824 Self(
12825 self.0
12826 .status(status)
12827 .header("content-type", "application/json")
12828 .json_body_obj(value),
12829 )
12830 }
12831
12832 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
12833 assert_eq!(status / 100u16, 5u16);
12834 Self(
12835 self.0
12836 .status(status)
12837 .header("content-type", "application/json")
12838 .json_body_obj(value),
12839 )
12840 }
12841 }
12842
12843 pub struct NetworkingSwitchPortLldpConfigViewWhen(::httpmock::When);
12844 impl NetworkingSwitchPortLldpConfigViewWhen {
12845 pub fn new(inner: ::httpmock::When) -> Self {
12846 Self(inner.method(::httpmock::Method::GET).path_matches(
12847 regex::Regex::new("^/v1/system/hardware/switch-port/[^/]*/lldp/config$").unwrap(),
12848 ))
12849 }
12850
12851 pub fn into_inner(self) -> ::httpmock::When {
12852 self.0
12853 }
12854
12855 pub fn port(self, value: &types::Name) -> Self {
12856 let re = regex::Regex::new(&format!(
12857 "^/v1/system/hardware/switch-port/{}/lldp/config$",
12858 value.to_string()
12859 ))
12860 .unwrap();
12861 Self(self.0.path_matches(re))
12862 }
12863
12864 pub fn rack_id(self, value: &::uuid::Uuid) -> Self {
12865 Self(self.0.query_param("rack_id", value.to_string()))
12866 }
12867
12868 pub fn switch_location(self, value: &types::Name) -> Self {
12869 Self(self.0.query_param("switch_location", value.to_string()))
12870 }
12871 }
12872
12873 pub struct NetworkingSwitchPortLldpConfigViewThen(::httpmock::Then);
12874 impl NetworkingSwitchPortLldpConfigViewThen {
12875 pub fn new(inner: ::httpmock::Then) -> Self {
12876 Self(inner)
12877 }
12878
12879 pub fn into_inner(self) -> ::httpmock::Then {
12880 self.0
12881 }
12882
12883 pub fn ok(self, value: &types::LldpLinkConfig) -> Self {
12884 Self(
12885 self.0
12886 .status(200u16)
12887 .header("content-type", "application/json")
12888 .json_body_obj(value),
12889 )
12890 }
12891
12892 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
12893 assert_eq!(status / 100u16, 4u16);
12894 Self(
12895 self.0
12896 .status(status)
12897 .header("content-type", "application/json")
12898 .json_body_obj(value),
12899 )
12900 }
12901
12902 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
12903 assert_eq!(status / 100u16, 5u16);
12904 Self(
12905 self.0
12906 .status(status)
12907 .header("content-type", "application/json")
12908 .json_body_obj(value),
12909 )
12910 }
12911 }
12912
12913 pub struct NetworkingSwitchPortLldpConfigUpdateWhen(::httpmock::When);
12914 impl NetworkingSwitchPortLldpConfigUpdateWhen {
12915 pub fn new(inner: ::httpmock::When) -> Self {
12916 Self(inner.method(::httpmock::Method::POST).path_matches(
12917 regex::Regex::new("^/v1/system/hardware/switch-port/[^/]*/lldp/config$").unwrap(),
12918 ))
12919 }
12920
12921 pub fn into_inner(self) -> ::httpmock::When {
12922 self.0
12923 }
12924
12925 pub fn port(self, value: &types::Name) -> Self {
12926 let re = regex::Regex::new(&format!(
12927 "^/v1/system/hardware/switch-port/{}/lldp/config$",
12928 value.to_string()
12929 ))
12930 .unwrap();
12931 Self(self.0.path_matches(re))
12932 }
12933
12934 pub fn rack_id(self, value: &::uuid::Uuid) -> Self {
12935 Self(self.0.query_param("rack_id", value.to_string()))
12936 }
12937
12938 pub fn switch_location(self, value: &types::Name) -> Self {
12939 Self(self.0.query_param("switch_location", value.to_string()))
12940 }
12941
12942 pub fn body(self, value: &types::LldpLinkConfig) -> Self {
12943 Self(self.0.json_body_obj(value))
12944 }
12945 }
12946
12947 pub struct NetworkingSwitchPortLldpConfigUpdateThen(::httpmock::Then);
12948 impl NetworkingSwitchPortLldpConfigUpdateThen {
12949 pub fn new(inner: ::httpmock::Then) -> Self {
12950 Self(inner)
12951 }
12952
12953 pub fn into_inner(self) -> ::httpmock::Then {
12954 self.0
12955 }
12956
12957 pub fn no_content(self) -> Self {
12958 Self(self.0.status(204u16))
12959 }
12960
12961 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
12962 assert_eq!(status / 100u16, 4u16);
12963 Self(
12964 self.0
12965 .status(status)
12966 .header("content-type", "application/json")
12967 .json_body_obj(value),
12968 )
12969 }
12970
12971 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
12972 assert_eq!(status / 100u16, 5u16);
12973 Self(
12974 self.0
12975 .status(status)
12976 .header("content-type", "application/json")
12977 .json_body_obj(value),
12978 )
12979 }
12980 }
12981
12982 pub struct NetworkingSwitchPortApplySettingsWhen(::httpmock::When);
12983 impl NetworkingSwitchPortApplySettingsWhen {
12984 pub fn new(inner: ::httpmock::When) -> Self {
12985 Self(inner.method(::httpmock::Method::POST).path_matches(
12986 regex::Regex::new("^/v1/system/hardware/switch-port/[^/]*/settings$").unwrap(),
12987 ))
12988 }
12989
12990 pub fn into_inner(self) -> ::httpmock::When {
12991 self.0
12992 }
12993
12994 pub fn port(self, value: &types::Name) -> Self {
12995 let re = regex::Regex::new(&format!(
12996 "^/v1/system/hardware/switch-port/{}/settings$",
12997 value.to_string()
12998 ))
12999 .unwrap();
13000 Self(self.0.path_matches(re))
13001 }
13002
13003 pub fn rack_id(self, value: &::uuid::Uuid) -> Self {
13004 Self(self.0.query_param("rack_id", value.to_string()))
13005 }
13006
13007 pub fn switch_location(self, value: &types::Name) -> Self {
13008 Self(self.0.query_param("switch_location", value.to_string()))
13009 }
13010
13011 pub fn body(self, value: &types::SwitchPortApplySettings) -> Self {
13012 Self(self.0.json_body_obj(value))
13013 }
13014 }
13015
13016 pub struct NetworkingSwitchPortApplySettingsThen(::httpmock::Then);
13017 impl NetworkingSwitchPortApplySettingsThen {
13018 pub fn new(inner: ::httpmock::Then) -> Self {
13019 Self(inner)
13020 }
13021
13022 pub fn into_inner(self) -> ::httpmock::Then {
13023 self.0
13024 }
13025
13026 pub fn no_content(self) -> Self {
13027 Self(self.0.status(204u16))
13028 }
13029
13030 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
13031 assert_eq!(status / 100u16, 4u16);
13032 Self(
13033 self.0
13034 .status(status)
13035 .header("content-type", "application/json")
13036 .json_body_obj(value),
13037 )
13038 }
13039
13040 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
13041 assert_eq!(status / 100u16, 5u16);
13042 Self(
13043 self.0
13044 .status(status)
13045 .header("content-type", "application/json")
13046 .json_body_obj(value),
13047 )
13048 }
13049 }
13050
13051 pub struct NetworkingSwitchPortClearSettingsWhen(::httpmock::When);
13052 impl NetworkingSwitchPortClearSettingsWhen {
13053 pub fn new(inner: ::httpmock::When) -> Self {
13054 Self(inner.method(::httpmock::Method::DELETE).path_matches(
13055 regex::Regex::new("^/v1/system/hardware/switch-port/[^/]*/settings$").unwrap(),
13056 ))
13057 }
13058
13059 pub fn into_inner(self) -> ::httpmock::When {
13060 self.0
13061 }
13062
13063 pub fn port(self, value: &types::Name) -> Self {
13064 let re = regex::Regex::new(&format!(
13065 "^/v1/system/hardware/switch-port/{}/settings$",
13066 value.to_string()
13067 ))
13068 .unwrap();
13069 Self(self.0.path_matches(re))
13070 }
13071
13072 pub fn rack_id(self, value: &::uuid::Uuid) -> Self {
13073 Self(self.0.query_param("rack_id", value.to_string()))
13074 }
13075
13076 pub fn switch_location(self, value: &types::Name) -> Self {
13077 Self(self.0.query_param("switch_location", value.to_string()))
13078 }
13079 }
13080
13081 pub struct NetworkingSwitchPortClearSettingsThen(::httpmock::Then);
13082 impl NetworkingSwitchPortClearSettingsThen {
13083 pub fn new(inner: ::httpmock::Then) -> Self {
13084 Self(inner)
13085 }
13086
13087 pub fn into_inner(self) -> ::httpmock::Then {
13088 self.0
13089 }
13090
13091 pub fn no_content(self) -> Self {
13092 Self(self.0.status(204u16))
13093 }
13094
13095 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
13096 assert_eq!(status / 100u16, 4u16);
13097 Self(
13098 self.0
13099 .status(status)
13100 .header("content-type", "application/json")
13101 .json_body_obj(value),
13102 )
13103 }
13104
13105 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
13106 assert_eq!(status / 100u16, 5u16);
13107 Self(
13108 self.0
13109 .status(status)
13110 .header("content-type", "application/json")
13111 .json_body_obj(value),
13112 )
13113 }
13114 }
13115
13116 pub struct NetworkingSwitchPortStatusWhen(::httpmock::When);
13117 impl NetworkingSwitchPortStatusWhen {
13118 pub fn new(inner: ::httpmock::When) -> Self {
13119 Self(inner.method(::httpmock::Method::GET).path_matches(
13120 regex::Regex::new("^/v1/system/hardware/switch-port/[^/]*/status$").unwrap(),
13121 ))
13122 }
13123
13124 pub fn into_inner(self) -> ::httpmock::When {
13125 self.0
13126 }
13127
13128 pub fn port(self, value: &types::Name) -> Self {
13129 let re = regex::Regex::new(&format!(
13130 "^/v1/system/hardware/switch-port/{}/status$",
13131 value.to_string()
13132 ))
13133 .unwrap();
13134 Self(self.0.path_matches(re))
13135 }
13136
13137 pub fn rack_id(self, value: &::uuid::Uuid) -> Self {
13138 Self(self.0.query_param("rack_id", value.to_string()))
13139 }
13140
13141 pub fn switch_location(self, value: &types::Name) -> Self {
13142 Self(self.0.query_param("switch_location", value.to_string()))
13143 }
13144 }
13145
13146 pub struct NetworkingSwitchPortStatusThen(::httpmock::Then);
13147 impl NetworkingSwitchPortStatusThen {
13148 pub fn new(inner: ::httpmock::Then) -> Self {
13149 Self(inner)
13150 }
13151
13152 pub fn into_inner(self) -> ::httpmock::Then {
13153 self.0
13154 }
13155
13156 pub fn ok(self, value: &types::SwitchLinkState) -> Self {
13157 Self(
13158 self.0
13159 .status(200u16)
13160 .header("content-type", "application/json")
13161 .json_body_obj(value),
13162 )
13163 }
13164
13165 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
13166 assert_eq!(status / 100u16, 4u16);
13167 Self(
13168 self.0
13169 .status(status)
13170 .header("content-type", "application/json")
13171 .json_body_obj(value),
13172 )
13173 }
13174
13175 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
13176 assert_eq!(status / 100u16, 5u16);
13177 Self(
13178 self.0
13179 .status(status)
13180 .header("content-type", "application/json")
13181 .json_body_obj(value),
13182 )
13183 }
13184 }
13185
13186 pub struct SwitchListWhen(::httpmock::When);
13187 impl SwitchListWhen {
13188 pub fn new(inner: ::httpmock::When) -> Self {
13189 Self(
13190 inner
13191 .method(::httpmock::Method::GET)
13192 .path_matches(regex::Regex::new("^/v1/system/hardware/switches$").unwrap()),
13193 )
13194 }
13195
13196 pub fn into_inner(self) -> ::httpmock::When {
13197 self.0
13198 }
13199
13200 pub fn limit<T>(self, value: T) -> Self
13201 where
13202 T: Into<Option<::std::num::NonZeroU32>>,
13203 {
13204 if let Some(value) = value.into() {
13205 Self(self.0.query_param("limit", value.to_string()))
13206 } else {
13207 Self(self.0.query_param_missing("limit"))
13208 }
13209 }
13210
13211 pub fn page_token<'a, T>(self, value: T) -> Self
13212 where
13213 T: Into<Option<&'a str>>,
13214 {
13215 if let Some(value) = value.into() {
13216 Self(self.0.query_param("page_token", value.to_string()))
13217 } else {
13218 Self(self.0.query_param_missing("page_token"))
13219 }
13220 }
13221
13222 pub fn sort_by<T>(self, value: T) -> Self
13223 where
13224 T: Into<Option<types::IdSortMode>>,
13225 {
13226 if let Some(value) = value.into() {
13227 Self(self.0.query_param("sort_by", value.to_string()))
13228 } else {
13229 Self(self.0.query_param_missing("sort_by"))
13230 }
13231 }
13232 }
13233
13234 pub struct SwitchListThen(::httpmock::Then);
13235 impl SwitchListThen {
13236 pub fn new(inner: ::httpmock::Then) -> Self {
13237 Self(inner)
13238 }
13239
13240 pub fn into_inner(self) -> ::httpmock::Then {
13241 self.0
13242 }
13243
13244 pub fn ok(self, value: &types::SwitchResultsPage) -> Self {
13245 Self(
13246 self.0
13247 .status(200u16)
13248 .header("content-type", "application/json")
13249 .json_body_obj(value),
13250 )
13251 }
13252
13253 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
13254 assert_eq!(status / 100u16, 4u16);
13255 Self(
13256 self.0
13257 .status(status)
13258 .header("content-type", "application/json")
13259 .json_body_obj(value),
13260 )
13261 }
13262
13263 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
13264 assert_eq!(status / 100u16, 5u16);
13265 Self(
13266 self.0
13267 .status(status)
13268 .header("content-type", "application/json")
13269 .json_body_obj(value),
13270 )
13271 }
13272 }
13273
13274 pub struct SwitchViewWhen(::httpmock::When);
13275 impl SwitchViewWhen {
13276 pub fn new(inner: ::httpmock::When) -> Self {
13277 Self(
13278 inner.method(::httpmock::Method::GET).path_matches(
13279 regex::Regex::new("^/v1/system/hardware/switches/[^/]*$").unwrap(),
13280 ),
13281 )
13282 }
13283
13284 pub fn into_inner(self) -> ::httpmock::When {
13285 self.0
13286 }
13287
13288 pub fn switch_id(self, value: &::uuid::Uuid) -> Self {
13289 let re = regex::Regex::new(&format!(
13290 "^/v1/system/hardware/switches/{}$",
13291 value.to_string()
13292 ))
13293 .unwrap();
13294 Self(self.0.path_matches(re))
13295 }
13296 }
13297
13298 pub struct SwitchViewThen(::httpmock::Then);
13299 impl SwitchViewThen {
13300 pub fn new(inner: ::httpmock::Then) -> Self {
13301 Self(inner)
13302 }
13303
13304 pub fn into_inner(self) -> ::httpmock::Then {
13305 self.0
13306 }
13307
13308 pub fn ok(self, value: &types::Switch) -> Self {
13309 Self(
13310 self.0
13311 .status(200u16)
13312 .header("content-type", "application/json")
13313 .json_body_obj(value),
13314 )
13315 }
13316
13317 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
13318 assert_eq!(status / 100u16, 4u16);
13319 Self(
13320 self.0
13321 .status(status)
13322 .header("content-type", "application/json")
13323 .json_body_obj(value),
13324 )
13325 }
13326
13327 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
13328 assert_eq!(status / 100u16, 5u16);
13329 Self(
13330 self.0
13331 .status(status)
13332 .header("content-type", "application/json")
13333 .json_body_obj(value),
13334 )
13335 }
13336 }
13337
13338 pub struct SiloIdentityProviderListWhen(::httpmock::When);
13339 impl SiloIdentityProviderListWhen {
13340 pub fn new(inner: ::httpmock::When) -> Self {
13341 Self(
13342 inner
13343 .method(::httpmock::Method::GET)
13344 .path_matches(regex::Regex::new("^/v1/system/identity-providers$").unwrap()),
13345 )
13346 }
13347
13348 pub fn into_inner(self) -> ::httpmock::When {
13349 self.0
13350 }
13351
13352 pub fn limit<T>(self, value: T) -> Self
13353 where
13354 T: Into<Option<::std::num::NonZeroU32>>,
13355 {
13356 if let Some(value) = value.into() {
13357 Self(self.0.query_param("limit", value.to_string()))
13358 } else {
13359 Self(self.0.query_param_missing("limit"))
13360 }
13361 }
13362
13363 pub fn page_token<'a, T>(self, value: T) -> Self
13364 where
13365 T: Into<Option<&'a str>>,
13366 {
13367 if let Some(value) = value.into() {
13368 Self(self.0.query_param("page_token", value.to_string()))
13369 } else {
13370 Self(self.0.query_param_missing("page_token"))
13371 }
13372 }
13373
13374 pub fn silo<'a, T>(self, value: T) -> Self
13375 where
13376 T: Into<Option<&'a types::NameOrId>>,
13377 {
13378 if let Some(value) = value.into() {
13379 Self(self.0.query_param("silo", value.to_string()))
13380 } else {
13381 Self(self.0.query_param_missing("silo"))
13382 }
13383 }
13384
13385 pub fn sort_by<T>(self, value: T) -> Self
13386 where
13387 T: Into<Option<types::NameOrIdSortMode>>,
13388 {
13389 if let Some(value) = value.into() {
13390 Self(self.0.query_param("sort_by", value.to_string()))
13391 } else {
13392 Self(self.0.query_param_missing("sort_by"))
13393 }
13394 }
13395 }
13396
13397 pub struct SiloIdentityProviderListThen(::httpmock::Then);
13398 impl SiloIdentityProviderListThen {
13399 pub fn new(inner: ::httpmock::Then) -> Self {
13400 Self(inner)
13401 }
13402
13403 pub fn into_inner(self) -> ::httpmock::Then {
13404 self.0
13405 }
13406
13407 pub fn ok(self, value: &types::IdentityProviderResultsPage) -> Self {
13408 Self(
13409 self.0
13410 .status(200u16)
13411 .header("content-type", "application/json")
13412 .json_body_obj(value),
13413 )
13414 }
13415
13416 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
13417 assert_eq!(status / 100u16, 4u16);
13418 Self(
13419 self.0
13420 .status(status)
13421 .header("content-type", "application/json")
13422 .json_body_obj(value),
13423 )
13424 }
13425
13426 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
13427 assert_eq!(status / 100u16, 5u16);
13428 Self(
13429 self.0
13430 .status(status)
13431 .header("content-type", "application/json")
13432 .json_body_obj(value),
13433 )
13434 }
13435 }
13436
13437 pub struct LocalIdpUserCreateWhen(::httpmock::When);
13438 impl LocalIdpUserCreateWhen {
13439 pub fn new(inner: ::httpmock::When) -> Self {
13440 Self(inner.method(::httpmock::Method::POST).path_matches(
13441 regex::Regex::new("^/v1/system/identity-providers/local/users$").unwrap(),
13442 ))
13443 }
13444
13445 pub fn into_inner(self) -> ::httpmock::When {
13446 self.0
13447 }
13448
13449 pub fn silo(self, value: &types::NameOrId) -> Self {
13450 Self(self.0.query_param("silo", value.to_string()))
13451 }
13452
13453 pub fn body(self, value: &types::UserCreate) -> Self {
13454 Self(self.0.json_body_obj(value))
13455 }
13456 }
13457
13458 pub struct LocalIdpUserCreateThen(::httpmock::Then);
13459 impl LocalIdpUserCreateThen {
13460 pub fn new(inner: ::httpmock::Then) -> Self {
13461 Self(inner)
13462 }
13463
13464 pub fn into_inner(self) -> ::httpmock::Then {
13465 self.0
13466 }
13467
13468 pub fn created(self, value: &types::User) -> Self {
13469 Self(
13470 self.0
13471 .status(201u16)
13472 .header("content-type", "application/json")
13473 .json_body_obj(value),
13474 )
13475 }
13476
13477 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
13478 assert_eq!(status / 100u16, 4u16);
13479 Self(
13480 self.0
13481 .status(status)
13482 .header("content-type", "application/json")
13483 .json_body_obj(value),
13484 )
13485 }
13486
13487 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
13488 assert_eq!(status / 100u16, 5u16);
13489 Self(
13490 self.0
13491 .status(status)
13492 .header("content-type", "application/json")
13493 .json_body_obj(value),
13494 )
13495 }
13496 }
13497
13498 pub struct LocalIdpUserDeleteWhen(::httpmock::When);
13499 impl LocalIdpUserDeleteWhen {
13500 pub fn new(inner: ::httpmock::When) -> Self {
13501 Self(inner.method(::httpmock::Method::DELETE).path_matches(
13502 regex::Regex::new("^/v1/system/identity-providers/local/users/[^/]*$").unwrap(),
13503 ))
13504 }
13505
13506 pub fn into_inner(self) -> ::httpmock::When {
13507 self.0
13508 }
13509
13510 pub fn user_id(self, value: &::uuid::Uuid) -> Self {
13511 let re = regex::Regex::new(&format!(
13512 "^/v1/system/identity-providers/local/users/{}$",
13513 value.to_string()
13514 ))
13515 .unwrap();
13516 Self(self.0.path_matches(re))
13517 }
13518
13519 pub fn silo(self, value: &types::NameOrId) -> Self {
13520 Self(self.0.query_param("silo", value.to_string()))
13521 }
13522 }
13523
13524 pub struct LocalIdpUserDeleteThen(::httpmock::Then);
13525 impl LocalIdpUserDeleteThen {
13526 pub fn new(inner: ::httpmock::Then) -> Self {
13527 Self(inner)
13528 }
13529
13530 pub fn into_inner(self) -> ::httpmock::Then {
13531 self.0
13532 }
13533
13534 pub fn no_content(self) -> Self {
13535 Self(self.0.status(204u16))
13536 }
13537
13538 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
13539 assert_eq!(status / 100u16, 4u16);
13540 Self(
13541 self.0
13542 .status(status)
13543 .header("content-type", "application/json")
13544 .json_body_obj(value),
13545 )
13546 }
13547
13548 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
13549 assert_eq!(status / 100u16, 5u16);
13550 Self(
13551 self.0
13552 .status(status)
13553 .header("content-type", "application/json")
13554 .json_body_obj(value),
13555 )
13556 }
13557 }
13558
13559 pub struct LocalIdpUserSetPasswordWhen(::httpmock::When);
13560 impl LocalIdpUserSetPasswordWhen {
13561 pub fn new(inner: ::httpmock::When) -> Self {
13562 Self(
13563 inner.method(::httpmock::Method::POST).path_matches(
13564 regex::Regex::new(
13565 "^/v1/system/identity-providers/local/users/[^/]*/set-password$",
13566 )
13567 .unwrap(),
13568 ),
13569 )
13570 }
13571
13572 pub fn into_inner(self) -> ::httpmock::When {
13573 self.0
13574 }
13575
13576 pub fn user_id(self, value: &::uuid::Uuid) -> Self {
13577 let re = regex::Regex::new(&format!(
13578 "^/v1/system/identity-providers/local/users/{}/set-password$",
13579 value.to_string()
13580 ))
13581 .unwrap();
13582 Self(self.0.path_matches(re))
13583 }
13584
13585 pub fn silo(self, value: &types::NameOrId) -> Self {
13586 Self(self.0.query_param("silo", value.to_string()))
13587 }
13588
13589 pub fn body(self, value: &types::UserPassword) -> Self {
13590 Self(self.0.json_body_obj(value))
13591 }
13592 }
13593
13594 pub struct LocalIdpUserSetPasswordThen(::httpmock::Then);
13595 impl LocalIdpUserSetPasswordThen {
13596 pub fn new(inner: ::httpmock::Then) -> Self {
13597 Self(inner)
13598 }
13599
13600 pub fn into_inner(self) -> ::httpmock::Then {
13601 self.0
13602 }
13603
13604 pub fn no_content(self) -> Self {
13605 Self(self.0.status(204u16))
13606 }
13607
13608 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
13609 assert_eq!(status / 100u16, 4u16);
13610 Self(
13611 self.0
13612 .status(status)
13613 .header("content-type", "application/json")
13614 .json_body_obj(value),
13615 )
13616 }
13617
13618 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
13619 assert_eq!(status / 100u16, 5u16);
13620 Self(
13621 self.0
13622 .status(status)
13623 .header("content-type", "application/json")
13624 .json_body_obj(value),
13625 )
13626 }
13627 }
13628
13629 pub struct SamlIdentityProviderCreateWhen(::httpmock::When);
13630 impl SamlIdentityProviderCreateWhen {
13631 pub fn new(inner: ::httpmock::When) -> Self {
13632 Self(
13633 inner.method(::httpmock::Method::POST).path_matches(
13634 regex::Regex::new("^/v1/system/identity-providers/saml$").unwrap(),
13635 ),
13636 )
13637 }
13638
13639 pub fn into_inner(self) -> ::httpmock::When {
13640 self.0
13641 }
13642
13643 pub fn silo(self, value: &types::NameOrId) -> Self {
13644 Self(self.0.query_param("silo", value.to_string()))
13645 }
13646
13647 pub fn body(self, value: &types::SamlIdentityProviderCreate) -> Self {
13648 Self(self.0.json_body_obj(value))
13649 }
13650 }
13651
13652 pub struct SamlIdentityProviderCreateThen(::httpmock::Then);
13653 impl SamlIdentityProviderCreateThen {
13654 pub fn new(inner: ::httpmock::Then) -> Self {
13655 Self(inner)
13656 }
13657
13658 pub fn into_inner(self) -> ::httpmock::Then {
13659 self.0
13660 }
13661
13662 pub fn created(self, value: &types::SamlIdentityProvider) -> Self {
13663 Self(
13664 self.0
13665 .status(201u16)
13666 .header("content-type", "application/json")
13667 .json_body_obj(value),
13668 )
13669 }
13670
13671 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
13672 assert_eq!(status / 100u16, 4u16);
13673 Self(
13674 self.0
13675 .status(status)
13676 .header("content-type", "application/json")
13677 .json_body_obj(value),
13678 )
13679 }
13680
13681 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
13682 assert_eq!(status / 100u16, 5u16);
13683 Self(
13684 self.0
13685 .status(status)
13686 .header("content-type", "application/json")
13687 .json_body_obj(value),
13688 )
13689 }
13690 }
13691
13692 pub struct SamlIdentityProviderViewWhen(::httpmock::When);
13693 impl SamlIdentityProviderViewWhen {
13694 pub fn new(inner: ::httpmock::When) -> Self {
13695 Self(inner.method(::httpmock::Method::GET).path_matches(
13696 regex::Regex::new("^/v1/system/identity-providers/saml/[^/]*$").unwrap(),
13697 ))
13698 }
13699
13700 pub fn into_inner(self) -> ::httpmock::When {
13701 self.0
13702 }
13703
13704 pub fn provider(self, value: &types::NameOrId) -> Self {
13705 let re = regex::Regex::new(&format!(
13706 "^/v1/system/identity-providers/saml/{}$",
13707 value.to_string()
13708 ))
13709 .unwrap();
13710 Self(self.0.path_matches(re))
13711 }
13712
13713 pub fn silo<'a, T>(self, value: T) -> Self
13714 where
13715 T: Into<Option<&'a types::NameOrId>>,
13716 {
13717 if let Some(value) = value.into() {
13718 Self(self.0.query_param("silo", value.to_string()))
13719 } else {
13720 Self(self.0.query_param_missing("silo"))
13721 }
13722 }
13723 }
13724
13725 pub struct SamlIdentityProviderViewThen(::httpmock::Then);
13726 impl SamlIdentityProviderViewThen {
13727 pub fn new(inner: ::httpmock::Then) -> Self {
13728 Self(inner)
13729 }
13730
13731 pub fn into_inner(self) -> ::httpmock::Then {
13732 self.0
13733 }
13734
13735 pub fn ok(self, value: &types::SamlIdentityProvider) -> Self {
13736 Self(
13737 self.0
13738 .status(200u16)
13739 .header("content-type", "application/json")
13740 .json_body_obj(value),
13741 )
13742 }
13743
13744 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
13745 assert_eq!(status / 100u16, 4u16);
13746 Self(
13747 self.0
13748 .status(status)
13749 .header("content-type", "application/json")
13750 .json_body_obj(value),
13751 )
13752 }
13753
13754 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
13755 assert_eq!(status / 100u16, 5u16);
13756 Self(
13757 self.0
13758 .status(status)
13759 .header("content-type", "application/json")
13760 .json_body_obj(value),
13761 )
13762 }
13763 }
13764
13765 pub struct SystemIpPoolListWhen(::httpmock::When);
13766 impl SystemIpPoolListWhen {
13767 pub fn new(inner: ::httpmock::When) -> Self {
13768 Self(
13769 inner
13770 .method(::httpmock::Method::GET)
13771 .path_matches(regex::Regex::new("^/v1/system/ip-pools$").unwrap()),
13772 )
13773 }
13774
13775 pub fn into_inner(self) -> ::httpmock::When {
13776 self.0
13777 }
13778
13779 pub fn limit<T>(self, value: T) -> Self
13780 where
13781 T: Into<Option<::std::num::NonZeroU32>>,
13782 {
13783 if let Some(value) = value.into() {
13784 Self(self.0.query_param("limit", value.to_string()))
13785 } else {
13786 Self(self.0.query_param_missing("limit"))
13787 }
13788 }
13789
13790 pub fn page_token<'a, T>(self, value: T) -> Self
13791 where
13792 T: Into<Option<&'a str>>,
13793 {
13794 if let Some(value) = value.into() {
13795 Self(self.0.query_param("page_token", value.to_string()))
13796 } else {
13797 Self(self.0.query_param_missing("page_token"))
13798 }
13799 }
13800
13801 pub fn sort_by<T>(self, value: T) -> Self
13802 where
13803 T: Into<Option<types::NameOrIdSortMode>>,
13804 {
13805 if let Some(value) = value.into() {
13806 Self(self.0.query_param("sort_by", value.to_string()))
13807 } else {
13808 Self(self.0.query_param_missing("sort_by"))
13809 }
13810 }
13811 }
13812
13813 pub struct SystemIpPoolListThen(::httpmock::Then);
13814 impl SystemIpPoolListThen {
13815 pub fn new(inner: ::httpmock::Then) -> Self {
13816 Self(inner)
13817 }
13818
13819 pub fn into_inner(self) -> ::httpmock::Then {
13820 self.0
13821 }
13822
13823 pub fn ok(self, value: &types::IpPoolResultsPage) -> Self {
13824 Self(
13825 self.0
13826 .status(200u16)
13827 .header("content-type", "application/json")
13828 .json_body_obj(value),
13829 )
13830 }
13831
13832 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
13833 assert_eq!(status / 100u16, 4u16);
13834 Self(
13835 self.0
13836 .status(status)
13837 .header("content-type", "application/json")
13838 .json_body_obj(value),
13839 )
13840 }
13841
13842 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
13843 assert_eq!(status / 100u16, 5u16);
13844 Self(
13845 self.0
13846 .status(status)
13847 .header("content-type", "application/json")
13848 .json_body_obj(value),
13849 )
13850 }
13851 }
13852
13853 pub struct SystemIpPoolCreateWhen(::httpmock::When);
13854 impl SystemIpPoolCreateWhen {
13855 pub fn new(inner: ::httpmock::When) -> Self {
13856 Self(
13857 inner
13858 .method(::httpmock::Method::POST)
13859 .path_matches(regex::Regex::new("^/v1/system/ip-pools$").unwrap()),
13860 )
13861 }
13862
13863 pub fn into_inner(self) -> ::httpmock::When {
13864 self.0
13865 }
13866
13867 pub fn body(self, value: &types::IpPoolCreate) -> Self {
13868 Self(self.0.json_body_obj(value))
13869 }
13870 }
13871
13872 pub struct SystemIpPoolCreateThen(::httpmock::Then);
13873 impl SystemIpPoolCreateThen {
13874 pub fn new(inner: ::httpmock::Then) -> Self {
13875 Self(inner)
13876 }
13877
13878 pub fn into_inner(self) -> ::httpmock::Then {
13879 self.0
13880 }
13881
13882 pub fn created(self, value: &types::IpPool) -> Self {
13883 Self(
13884 self.0
13885 .status(201u16)
13886 .header("content-type", "application/json")
13887 .json_body_obj(value),
13888 )
13889 }
13890
13891 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
13892 assert_eq!(status / 100u16, 4u16);
13893 Self(
13894 self.0
13895 .status(status)
13896 .header("content-type", "application/json")
13897 .json_body_obj(value),
13898 )
13899 }
13900
13901 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
13902 assert_eq!(status / 100u16, 5u16);
13903 Self(
13904 self.0
13905 .status(status)
13906 .header("content-type", "application/json")
13907 .json_body_obj(value),
13908 )
13909 }
13910 }
13911
13912 pub struct SystemIpPoolViewWhen(::httpmock::When);
13913 impl SystemIpPoolViewWhen {
13914 pub fn new(inner: ::httpmock::When) -> Self {
13915 Self(
13916 inner
13917 .method(::httpmock::Method::GET)
13918 .path_matches(regex::Regex::new("^/v1/system/ip-pools/[^/]*$").unwrap()),
13919 )
13920 }
13921
13922 pub fn into_inner(self) -> ::httpmock::When {
13923 self.0
13924 }
13925
13926 pub fn pool(self, value: &types::NameOrId) -> Self {
13927 let re =
13928 regex::Regex::new(&format!("^/v1/system/ip-pools/{}$", value.to_string())).unwrap();
13929 Self(self.0.path_matches(re))
13930 }
13931 }
13932
13933 pub struct SystemIpPoolViewThen(::httpmock::Then);
13934 impl SystemIpPoolViewThen {
13935 pub fn new(inner: ::httpmock::Then) -> Self {
13936 Self(inner)
13937 }
13938
13939 pub fn into_inner(self) -> ::httpmock::Then {
13940 self.0
13941 }
13942
13943 pub fn ok(self, value: &types::IpPool) -> Self {
13944 Self(
13945 self.0
13946 .status(200u16)
13947 .header("content-type", "application/json")
13948 .json_body_obj(value),
13949 )
13950 }
13951
13952 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
13953 assert_eq!(status / 100u16, 4u16);
13954 Self(
13955 self.0
13956 .status(status)
13957 .header("content-type", "application/json")
13958 .json_body_obj(value),
13959 )
13960 }
13961
13962 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
13963 assert_eq!(status / 100u16, 5u16);
13964 Self(
13965 self.0
13966 .status(status)
13967 .header("content-type", "application/json")
13968 .json_body_obj(value),
13969 )
13970 }
13971 }
13972
13973 pub struct SystemIpPoolUpdateWhen(::httpmock::When);
13974 impl SystemIpPoolUpdateWhen {
13975 pub fn new(inner: ::httpmock::When) -> Self {
13976 Self(
13977 inner
13978 .method(::httpmock::Method::PUT)
13979 .path_matches(regex::Regex::new("^/v1/system/ip-pools/[^/]*$").unwrap()),
13980 )
13981 }
13982
13983 pub fn into_inner(self) -> ::httpmock::When {
13984 self.0
13985 }
13986
13987 pub fn pool(self, value: &types::NameOrId) -> Self {
13988 let re =
13989 regex::Regex::new(&format!("^/v1/system/ip-pools/{}$", value.to_string())).unwrap();
13990 Self(self.0.path_matches(re))
13991 }
13992
13993 pub fn body(self, value: &types::IpPoolUpdate) -> Self {
13994 Self(self.0.json_body_obj(value))
13995 }
13996 }
13997
13998 pub struct SystemIpPoolUpdateThen(::httpmock::Then);
13999 impl SystemIpPoolUpdateThen {
14000 pub fn new(inner: ::httpmock::Then) -> Self {
14001 Self(inner)
14002 }
14003
14004 pub fn into_inner(self) -> ::httpmock::Then {
14005 self.0
14006 }
14007
14008 pub fn ok(self, value: &types::IpPool) -> Self {
14009 Self(
14010 self.0
14011 .status(200u16)
14012 .header("content-type", "application/json")
14013 .json_body_obj(value),
14014 )
14015 }
14016
14017 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
14018 assert_eq!(status / 100u16, 4u16);
14019 Self(
14020 self.0
14021 .status(status)
14022 .header("content-type", "application/json")
14023 .json_body_obj(value),
14024 )
14025 }
14026
14027 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
14028 assert_eq!(status / 100u16, 5u16);
14029 Self(
14030 self.0
14031 .status(status)
14032 .header("content-type", "application/json")
14033 .json_body_obj(value),
14034 )
14035 }
14036 }
14037
14038 pub struct SystemIpPoolDeleteWhen(::httpmock::When);
14039 impl SystemIpPoolDeleteWhen {
14040 pub fn new(inner: ::httpmock::When) -> Self {
14041 Self(
14042 inner
14043 .method(::httpmock::Method::DELETE)
14044 .path_matches(regex::Regex::new("^/v1/system/ip-pools/[^/]*$").unwrap()),
14045 )
14046 }
14047
14048 pub fn into_inner(self) -> ::httpmock::When {
14049 self.0
14050 }
14051
14052 pub fn pool(self, value: &types::NameOrId) -> Self {
14053 let re =
14054 regex::Regex::new(&format!("^/v1/system/ip-pools/{}$", value.to_string())).unwrap();
14055 Self(self.0.path_matches(re))
14056 }
14057 }
14058
14059 pub struct SystemIpPoolDeleteThen(::httpmock::Then);
14060 impl SystemIpPoolDeleteThen {
14061 pub fn new(inner: ::httpmock::Then) -> Self {
14062 Self(inner)
14063 }
14064
14065 pub fn into_inner(self) -> ::httpmock::Then {
14066 self.0
14067 }
14068
14069 pub fn no_content(self) -> Self {
14070 Self(self.0.status(204u16))
14071 }
14072
14073 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
14074 assert_eq!(status / 100u16, 4u16);
14075 Self(
14076 self.0
14077 .status(status)
14078 .header("content-type", "application/json")
14079 .json_body_obj(value),
14080 )
14081 }
14082
14083 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
14084 assert_eq!(status / 100u16, 5u16);
14085 Self(
14086 self.0
14087 .status(status)
14088 .header("content-type", "application/json")
14089 .json_body_obj(value),
14090 )
14091 }
14092 }
14093
14094 pub struct SystemIpPoolRangeListWhen(::httpmock::When);
14095 impl SystemIpPoolRangeListWhen {
14096 pub fn new(inner: ::httpmock::When) -> Self {
14097 Self(
14098 inner
14099 .method(::httpmock::Method::GET)
14100 .path_matches(regex::Regex::new("^/v1/system/ip-pools/[^/]*/ranges$").unwrap()),
14101 )
14102 }
14103
14104 pub fn into_inner(self) -> ::httpmock::When {
14105 self.0
14106 }
14107
14108 pub fn pool(self, value: &types::NameOrId) -> Self {
14109 let re = regex::Regex::new(&format!(
14110 "^/v1/system/ip-pools/{}/ranges$",
14111 value.to_string()
14112 ))
14113 .unwrap();
14114 Self(self.0.path_matches(re))
14115 }
14116
14117 pub fn limit<T>(self, value: T) -> Self
14118 where
14119 T: Into<Option<::std::num::NonZeroU32>>,
14120 {
14121 if let Some(value) = value.into() {
14122 Self(self.0.query_param("limit", value.to_string()))
14123 } else {
14124 Self(self.0.query_param_missing("limit"))
14125 }
14126 }
14127
14128 pub fn page_token<'a, T>(self, value: T) -> Self
14129 where
14130 T: Into<Option<&'a str>>,
14131 {
14132 if let Some(value) = value.into() {
14133 Self(self.0.query_param("page_token", value.to_string()))
14134 } else {
14135 Self(self.0.query_param_missing("page_token"))
14136 }
14137 }
14138 }
14139
14140 pub struct SystemIpPoolRangeListThen(::httpmock::Then);
14141 impl SystemIpPoolRangeListThen {
14142 pub fn new(inner: ::httpmock::Then) -> Self {
14143 Self(inner)
14144 }
14145
14146 pub fn into_inner(self) -> ::httpmock::Then {
14147 self.0
14148 }
14149
14150 pub fn ok(self, value: &types::IpPoolRangeResultsPage) -> Self {
14151 Self(
14152 self.0
14153 .status(200u16)
14154 .header("content-type", "application/json")
14155 .json_body_obj(value),
14156 )
14157 }
14158
14159 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
14160 assert_eq!(status / 100u16, 4u16);
14161 Self(
14162 self.0
14163 .status(status)
14164 .header("content-type", "application/json")
14165 .json_body_obj(value),
14166 )
14167 }
14168
14169 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
14170 assert_eq!(status / 100u16, 5u16);
14171 Self(
14172 self.0
14173 .status(status)
14174 .header("content-type", "application/json")
14175 .json_body_obj(value),
14176 )
14177 }
14178 }
14179
14180 pub struct SystemIpPoolRangeAddWhen(::httpmock::When);
14181 impl SystemIpPoolRangeAddWhen {
14182 pub fn new(inner: ::httpmock::When) -> Self {
14183 Self(
14184 inner.method(::httpmock::Method::POST).path_matches(
14185 regex::Regex::new("^/v1/system/ip-pools/[^/]*/ranges/add$").unwrap(),
14186 ),
14187 )
14188 }
14189
14190 pub fn into_inner(self) -> ::httpmock::When {
14191 self.0
14192 }
14193
14194 pub fn pool(self, value: &types::NameOrId) -> Self {
14195 let re = regex::Regex::new(&format!(
14196 "^/v1/system/ip-pools/{}/ranges/add$",
14197 value.to_string()
14198 ))
14199 .unwrap();
14200 Self(self.0.path_matches(re))
14201 }
14202
14203 pub fn body(self, value: &types::IpRange) -> Self {
14204 Self(self.0.json_body_obj(value))
14205 }
14206 }
14207
14208 pub struct SystemIpPoolRangeAddThen(::httpmock::Then);
14209 impl SystemIpPoolRangeAddThen {
14210 pub fn new(inner: ::httpmock::Then) -> Self {
14211 Self(inner)
14212 }
14213
14214 pub fn into_inner(self) -> ::httpmock::Then {
14215 self.0
14216 }
14217
14218 pub fn created(self, value: &types::IpPoolRange) -> Self {
14219 Self(
14220 self.0
14221 .status(201u16)
14222 .header("content-type", "application/json")
14223 .json_body_obj(value),
14224 )
14225 }
14226
14227 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
14228 assert_eq!(status / 100u16, 4u16);
14229 Self(
14230 self.0
14231 .status(status)
14232 .header("content-type", "application/json")
14233 .json_body_obj(value),
14234 )
14235 }
14236
14237 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
14238 assert_eq!(status / 100u16, 5u16);
14239 Self(
14240 self.0
14241 .status(status)
14242 .header("content-type", "application/json")
14243 .json_body_obj(value),
14244 )
14245 }
14246 }
14247
14248 pub struct SystemIpPoolRangeRemoveWhen(::httpmock::When);
14249 impl SystemIpPoolRangeRemoveWhen {
14250 pub fn new(inner: ::httpmock::When) -> Self {
14251 Self(inner.method(::httpmock::Method::POST).path_matches(
14252 regex::Regex::new("^/v1/system/ip-pools/[^/]*/ranges/remove$").unwrap(),
14253 ))
14254 }
14255
14256 pub fn into_inner(self) -> ::httpmock::When {
14257 self.0
14258 }
14259
14260 pub fn pool(self, value: &types::NameOrId) -> Self {
14261 let re = regex::Regex::new(&format!(
14262 "^/v1/system/ip-pools/{}/ranges/remove$",
14263 value.to_string()
14264 ))
14265 .unwrap();
14266 Self(self.0.path_matches(re))
14267 }
14268
14269 pub fn body(self, value: &types::IpRange) -> Self {
14270 Self(self.0.json_body_obj(value))
14271 }
14272 }
14273
14274 pub struct SystemIpPoolRangeRemoveThen(::httpmock::Then);
14275 impl SystemIpPoolRangeRemoveThen {
14276 pub fn new(inner: ::httpmock::Then) -> Self {
14277 Self(inner)
14278 }
14279
14280 pub fn into_inner(self) -> ::httpmock::Then {
14281 self.0
14282 }
14283
14284 pub fn no_content(self) -> Self {
14285 Self(self.0.status(204u16))
14286 }
14287
14288 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
14289 assert_eq!(status / 100u16, 4u16);
14290 Self(
14291 self.0
14292 .status(status)
14293 .header("content-type", "application/json")
14294 .json_body_obj(value),
14295 )
14296 }
14297
14298 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
14299 assert_eq!(status / 100u16, 5u16);
14300 Self(
14301 self.0
14302 .status(status)
14303 .header("content-type", "application/json")
14304 .json_body_obj(value),
14305 )
14306 }
14307 }
14308
14309 pub struct SystemIpPoolSiloListWhen(::httpmock::When);
14310 impl SystemIpPoolSiloListWhen {
14311 pub fn new(inner: ::httpmock::When) -> Self {
14312 Self(
14313 inner
14314 .method(::httpmock::Method::GET)
14315 .path_matches(regex::Regex::new("^/v1/system/ip-pools/[^/]*/silos$").unwrap()),
14316 )
14317 }
14318
14319 pub fn into_inner(self) -> ::httpmock::When {
14320 self.0
14321 }
14322
14323 pub fn pool(self, value: &types::NameOrId) -> Self {
14324 let re = regex::Regex::new(&format!(
14325 "^/v1/system/ip-pools/{}/silos$",
14326 value.to_string()
14327 ))
14328 .unwrap();
14329 Self(self.0.path_matches(re))
14330 }
14331
14332 pub fn limit<T>(self, value: T) -> Self
14333 where
14334 T: Into<Option<::std::num::NonZeroU32>>,
14335 {
14336 if let Some(value) = value.into() {
14337 Self(self.0.query_param("limit", value.to_string()))
14338 } else {
14339 Self(self.0.query_param_missing("limit"))
14340 }
14341 }
14342
14343 pub fn page_token<'a, T>(self, value: T) -> Self
14344 where
14345 T: Into<Option<&'a str>>,
14346 {
14347 if let Some(value) = value.into() {
14348 Self(self.0.query_param("page_token", value.to_string()))
14349 } else {
14350 Self(self.0.query_param_missing("page_token"))
14351 }
14352 }
14353
14354 pub fn sort_by<T>(self, value: T) -> Self
14355 where
14356 T: Into<Option<types::IdSortMode>>,
14357 {
14358 if let Some(value) = value.into() {
14359 Self(self.0.query_param("sort_by", value.to_string()))
14360 } else {
14361 Self(self.0.query_param_missing("sort_by"))
14362 }
14363 }
14364 }
14365
14366 pub struct SystemIpPoolSiloListThen(::httpmock::Then);
14367 impl SystemIpPoolSiloListThen {
14368 pub fn new(inner: ::httpmock::Then) -> Self {
14369 Self(inner)
14370 }
14371
14372 pub fn into_inner(self) -> ::httpmock::Then {
14373 self.0
14374 }
14375
14376 pub fn ok(self, value: &types::IpPoolSiloLinkResultsPage) -> Self {
14377 Self(
14378 self.0
14379 .status(200u16)
14380 .header("content-type", "application/json")
14381 .json_body_obj(value),
14382 )
14383 }
14384
14385 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
14386 assert_eq!(status / 100u16, 4u16);
14387 Self(
14388 self.0
14389 .status(status)
14390 .header("content-type", "application/json")
14391 .json_body_obj(value),
14392 )
14393 }
14394
14395 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
14396 assert_eq!(status / 100u16, 5u16);
14397 Self(
14398 self.0
14399 .status(status)
14400 .header("content-type", "application/json")
14401 .json_body_obj(value),
14402 )
14403 }
14404 }
14405
14406 pub struct SystemIpPoolSiloLinkWhen(::httpmock::When);
14407 impl SystemIpPoolSiloLinkWhen {
14408 pub fn new(inner: ::httpmock::When) -> Self {
14409 Self(
14410 inner
14411 .method(::httpmock::Method::POST)
14412 .path_matches(regex::Regex::new("^/v1/system/ip-pools/[^/]*/silos$").unwrap()),
14413 )
14414 }
14415
14416 pub fn into_inner(self) -> ::httpmock::When {
14417 self.0
14418 }
14419
14420 pub fn pool(self, value: &types::NameOrId) -> Self {
14421 let re = regex::Regex::new(&format!(
14422 "^/v1/system/ip-pools/{}/silos$",
14423 value.to_string()
14424 ))
14425 .unwrap();
14426 Self(self.0.path_matches(re))
14427 }
14428
14429 pub fn body(self, value: &types::IpPoolLinkSilo) -> Self {
14430 Self(self.0.json_body_obj(value))
14431 }
14432 }
14433
14434 pub struct SystemIpPoolSiloLinkThen(::httpmock::Then);
14435 impl SystemIpPoolSiloLinkThen {
14436 pub fn new(inner: ::httpmock::Then) -> Self {
14437 Self(inner)
14438 }
14439
14440 pub fn into_inner(self) -> ::httpmock::Then {
14441 self.0
14442 }
14443
14444 pub fn created(self, value: &types::IpPoolSiloLink) -> Self {
14445 Self(
14446 self.0
14447 .status(201u16)
14448 .header("content-type", "application/json")
14449 .json_body_obj(value),
14450 )
14451 }
14452
14453 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
14454 assert_eq!(status / 100u16, 4u16);
14455 Self(
14456 self.0
14457 .status(status)
14458 .header("content-type", "application/json")
14459 .json_body_obj(value),
14460 )
14461 }
14462
14463 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
14464 assert_eq!(status / 100u16, 5u16);
14465 Self(
14466 self.0
14467 .status(status)
14468 .header("content-type", "application/json")
14469 .json_body_obj(value),
14470 )
14471 }
14472 }
14473
14474 pub struct SystemIpPoolSiloUpdateWhen(::httpmock::When);
14475 impl SystemIpPoolSiloUpdateWhen {
14476 pub fn new(inner: ::httpmock::When) -> Self {
14477 Self(inner.method(::httpmock::Method::PUT).path_matches(
14478 regex::Regex::new("^/v1/system/ip-pools/[^/]*/silos/[^/]*$").unwrap(),
14479 ))
14480 }
14481
14482 pub fn into_inner(self) -> ::httpmock::When {
14483 self.0
14484 }
14485
14486 pub fn pool(self, value: &types::NameOrId) -> Self {
14487 let re = regex::Regex::new(&format!(
14488 "^/v1/system/ip-pools/{}/silos/.*$",
14489 value.to_string()
14490 ))
14491 .unwrap();
14492 Self(self.0.path_matches(re))
14493 }
14494
14495 pub fn silo(self, value: &types::NameOrId) -> Self {
14496 let re = regex::Regex::new(&format!(
14497 "^/v1/system/ip-pools/.*/silos/{}$",
14498 value.to_string()
14499 ))
14500 .unwrap();
14501 Self(self.0.path_matches(re))
14502 }
14503
14504 pub fn body(self, value: &types::IpPoolSiloUpdate) -> Self {
14505 Self(self.0.json_body_obj(value))
14506 }
14507 }
14508
14509 pub struct SystemIpPoolSiloUpdateThen(::httpmock::Then);
14510 impl SystemIpPoolSiloUpdateThen {
14511 pub fn new(inner: ::httpmock::Then) -> Self {
14512 Self(inner)
14513 }
14514
14515 pub fn into_inner(self) -> ::httpmock::Then {
14516 self.0
14517 }
14518
14519 pub fn ok(self, value: &types::IpPoolSiloLink) -> Self {
14520 Self(
14521 self.0
14522 .status(200u16)
14523 .header("content-type", "application/json")
14524 .json_body_obj(value),
14525 )
14526 }
14527
14528 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
14529 assert_eq!(status / 100u16, 4u16);
14530 Self(
14531 self.0
14532 .status(status)
14533 .header("content-type", "application/json")
14534 .json_body_obj(value),
14535 )
14536 }
14537
14538 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
14539 assert_eq!(status / 100u16, 5u16);
14540 Self(
14541 self.0
14542 .status(status)
14543 .header("content-type", "application/json")
14544 .json_body_obj(value),
14545 )
14546 }
14547 }
14548
14549 pub struct SystemIpPoolSiloUnlinkWhen(::httpmock::When);
14550 impl SystemIpPoolSiloUnlinkWhen {
14551 pub fn new(inner: ::httpmock::When) -> Self {
14552 Self(inner.method(::httpmock::Method::DELETE).path_matches(
14553 regex::Regex::new("^/v1/system/ip-pools/[^/]*/silos/[^/]*$").unwrap(),
14554 ))
14555 }
14556
14557 pub fn into_inner(self) -> ::httpmock::When {
14558 self.0
14559 }
14560
14561 pub fn pool(self, value: &types::NameOrId) -> Self {
14562 let re = regex::Regex::new(&format!(
14563 "^/v1/system/ip-pools/{}/silos/.*$",
14564 value.to_string()
14565 ))
14566 .unwrap();
14567 Self(self.0.path_matches(re))
14568 }
14569
14570 pub fn silo(self, value: &types::NameOrId) -> Self {
14571 let re = regex::Regex::new(&format!(
14572 "^/v1/system/ip-pools/.*/silos/{}$",
14573 value.to_string()
14574 ))
14575 .unwrap();
14576 Self(self.0.path_matches(re))
14577 }
14578 }
14579
14580 pub struct SystemIpPoolSiloUnlinkThen(::httpmock::Then);
14581 impl SystemIpPoolSiloUnlinkThen {
14582 pub fn new(inner: ::httpmock::Then) -> Self {
14583 Self(inner)
14584 }
14585
14586 pub fn into_inner(self) -> ::httpmock::Then {
14587 self.0
14588 }
14589
14590 pub fn no_content(self) -> Self {
14591 Self(self.0.status(204u16))
14592 }
14593
14594 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
14595 assert_eq!(status / 100u16, 4u16);
14596 Self(
14597 self.0
14598 .status(status)
14599 .header("content-type", "application/json")
14600 .json_body_obj(value),
14601 )
14602 }
14603
14604 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
14605 assert_eq!(status / 100u16, 5u16);
14606 Self(
14607 self.0
14608 .status(status)
14609 .header("content-type", "application/json")
14610 .json_body_obj(value),
14611 )
14612 }
14613 }
14614
14615 pub struct SystemIpPoolUtilizationViewWhen(::httpmock::When);
14616 impl SystemIpPoolUtilizationViewWhen {
14617 pub fn new(inner: ::httpmock::When) -> Self {
14618 Self(inner.method(::httpmock::Method::GET).path_matches(
14619 regex::Regex::new("^/v1/system/ip-pools/[^/]*/utilization$").unwrap(),
14620 ))
14621 }
14622
14623 pub fn into_inner(self) -> ::httpmock::When {
14624 self.0
14625 }
14626
14627 pub fn pool(self, value: &types::NameOrId) -> Self {
14628 let re = regex::Regex::new(&format!(
14629 "^/v1/system/ip-pools/{}/utilization$",
14630 value.to_string()
14631 ))
14632 .unwrap();
14633 Self(self.0.path_matches(re))
14634 }
14635 }
14636
14637 pub struct SystemIpPoolUtilizationViewThen(::httpmock::Then);
14638 impl SystemIpPoolUtilizationViewThen {
14639 pub fn new(inner: ::httpmock::Then) -> Self {
14640 Self(inner)
14641 }
14642
14643 pub fn into_inner(self) -> ::httpmock::Then {
14644 self.0
14645 }
14646
14647 pub fn ok(self, value: &types::IpPoolUtilization) -> Self {
14648 Self(
14649 self.0
14650 .status(200u16)
14651 .header("content-type", "application/json")
14652 .json_body_obj(value),
14653 )
14654 }
14655
14656 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
14657 assert_eq!(status / 100u16, 4u16);
14658 Self(
14659 self.0
14660 .status(status)
14661 .header("content-type", "application/json")
14662 .json_body_obj(value),
14663 )
14664 }
14665
14666 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
14667 assert_eq!(status / 100u16, 5u16);
14668 Self(
14669 self.0
14670 .status(status)
14671 .header("content-type", "application/json")
14672 .json_body_obj(value),
14673 )
14674 }
14675 }
14676
14677 pub struct SystemIpPoolServiceViewWhen(::httpmock::When);
14678 impl SystemIpPoolServiceViewWhen {
14679 pub fn new(inner: ::httpmock::When) -> Self {
14680 Self(
14681 inner
14682 .method(::httpmock::Method::GET)
14683 .path_matches(regex::Regex::new("^/v1/system/ip-pools-service$").unwrap()),
14684 )
14685 }
14686
14687 pub fn into_inner(self) -> ::httpmock::When {
14688 self.0
14689 }
14690 }
14691
14692 pub struct SystemIpPoolServiceViewThen(::httpmock::Then);
14693 impl SystemIpPoolServiceViewThen {
14694 pub fn new(inner: ::httpmock::Then) -> Self {
14695 Self(inner)
14696 }
14697
14698 pub fn into_inner(self) -> ::httpmock::Then {
14699 self.0
14700 }
14701
14702 pub fn ok(self, value: &types::IpPool) -> Self {
14703 Self(
14704 self.0
14705 .status(200u16)
14706 .header("content-type", "application/json")
14707 .json_body_obj(value),
14708 )
14709 }
14710
14711 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
14712 assert_eq!(status / 100u16, 4u16);
14713 Self(
14714 self.0
14715 .status(status)
14716 .header("content-type", "application/json")
14717 .json_body_obj(value),
14718 )
14719 }
14720
14721 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
14722 assert_eq!(status / 100u16, 5u16);
14723 Self(
14724 self.0
14725 .status(status)
14726 .header("content-type", "application/json")
14727 .json_body_obj(value),
14728 )
14729 }
14730 }
14731
14732 pub struct SystemIpPoolServiceRangeListWhen(::httpmock::When);
14733 impl SystemIpPoolServiceRangeListWhen {
14734 pub fn new(inner: ::httpmock::When) -> Self {
14735 Self(
14736 inner.method(::httpmock::Method::GET).path_matches(
14737 regex::Regex::new("^/v1/system/ip-pools-service/ranges$").unwrap(),
14738 ),
14739 )
14740 }
14741
14742 pub fn into_inner(self) -> ::httpmock::When {
14743 self.0
14744 }
14745
14746 pub fn limit<T>(self, value: T) -> Self
14747 where
14748 T: Into<Option<::std::num::NonZeroU32>>,
14749 {
14750 if let Some(value) = value.into() {
14751 Self(self.0.query_param("limit", value.to_string()))
14752 } else {
14753 Self(self.0.query_param_missing("limit"))
14754 }
14755 }
14756
14757 pub fn page_token<'a, T>(self, value: T) -> Self
14758 where
14759 T: Into<Option<&'a str>>,
14760 {
14761 if let Some(value) = value.into() {
14762 Self(self.0.query_param("page_token", value.to_string()))
14763 } else {
14764 Self(self.0.query_param_missing("page_token"))
14765 }
14766 }
14767 }
14768
14769 pub struct SystemIpPoolServiceRangeListThen(::httpmock::Then);
14770 impl SystemIpPoolServiceRangeListThen {
14771 pub fn new(inner: ::httpmock::Then) -> Self {
14772 Self(inner)
14773 }
14774
14775 pub fn into_inner(self) -> ::httpmock::Then {
14776 self.0
14777 }
14778
14779 pub fn ok(self, value: &types::IpPoolRangeResultsPage) -> Self {
14780 Self(
14781 self.0
14782 .status(200u16)
14783 .header("content-type", "application/json")
14784 .json_body_obj(value),
14785 )
14786 }
14787
14788 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
14789 assert_eq!(status / 100u16, 4u16);
14790 Self(
14791 self.0
14792 .status(status)
14793 .header("content-type", "application/json")
14794 .json_body_obj(value),
14795 )
14796 }
14797
14798 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
14799 assert_eq!(status / 100u16, 5u16);
14800 Self(
14801 self.0
14802 .status(status)
14803 .header("content-type", "application/json")
14804 .json_body_obj(value),
14805 )
14806 }
14807 }
14808
14809 pub struct SystemIpPoolServiceRangeAddWhen(::httpmock::When);
14810 impl SystemIpPoolServiceRangeAddWhen {
14811 pub fn new(inner: ::httpmock::When) -> Self {
14812 Self(inner.method(::httpmock::Method::POST).path_matches(
14813 regex::Regex::new("^/v1/system/ip-pools-service/ranges/add$").unwrap(),
14814 ))
14815 }
14816
14817 pub fn into_inner(self) -> ::httpmock::When {
14818 self.0
14819 }
14820
14821 pub fn body(self, value: &types::IpRange) -> Self {
14822 Self(self.0.json_body_obj(value))
14823 }
14824 }
14825
14826 pub struct SystemIpPoolServiceRangeAddThen(::httpmock::Then);
14827 impl SystemIpPoolServiceRangeAddThen {
14828 pub fn new(inner: ::httpmock::Then) -> Self {
14829 Self(inner)
14830 }
14831
14832 pub fn into_inner(self) -> ::httpmock::Then {
14833 self.0
14834 }
14835
14836 pub fn created(self, value: &types::IpPoolRange) -> Self {
14837 Self(
14838 self.0
14839 .status(201u16)
14840 .header("content-type", "application/json")
14841 .json_body_obj(value),
14842 )
14843 }
14844
14845 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
14846 assert_eq!(status / 100u16, 4u16);
14847 Self(
14848 self.0
14849 .status(status)
14850 .header("content-type", "application/json")
14851 .json_body_obj(value),
14852 )
14853 }
14854
14855 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
14856 assert_eq!(status / 100u16, 5u16);
14857 Self(
14858 self.0
14859 .status(status)
14860 .header("content-type", "application/json")
14861 .json_body_obj(value),
14862 )
14863 }
14864 }
14865
14866 pub struct SystemIpPoolServiceRangeRemoveWhen(::httpmock::When);
14867 impl SystemIpPoolServiceRangeRemoveWhen {
14868 pub fn new(inner: ::httpmock::When) -> Self {
14869 Self(inner.method(::httpmock::Method::POST).path_matches(
14870 regex::Regex::new("^/v1/system/ip-pools-service/ranges/remove$").unwrap(),
14871 ))
14872 }
14873
14874 pub fn into_inner(self) -> ::httpmock::When {
14875 self.0
14876 }
14877
14878 pub fn body(self, value: &types::IpRange) -> Self {
14879 Self(self.0.json_body_obj(value))
14880 }
14881 }
14882
14883 pub struct SystemIpPoolServiceRangeRemoveThen(::httpmock::Then);
14884 impl SystemIpPoolServiceRangeRemoveThen {
14885 pub fn new(inner: ::httpmock::Then) -> Self {
14886 Self(inner)
14887 }
14888
14889 pub fn into_inner(self) -> ::httpmock::Then {
14890 self.0
14891 }
14892
14893 pub fn no_content(self) -> Self {
14894 Self(self.0.status(204u16))
14895 }
14896
14897 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
14898 assert_eq!(status / 100u16, 4u16);
14899 Self(
14900 self.0
14901 .status(status)
14902 .header("content-type", "application/json")
14903 .json_body_obj(value),
14904 )
14905 }
14906
14907 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
14908 assert_eq!(status / 100u16, 5u16);
14909 Self(
14910 self.0
14911 .status(status)
14912 .header("content-type", "application/json")
14913 .json_body_obj(value),
14914 )
14915 }
14916 }
14917
14918 pub struct SystemMetricWhen(::httpmock::When);
14919 impl SystemMetricWhen {
14920 pub fn new(inner: ::httpmock::When) -> Self {
14921 Self(
14922 inner
14923 .method(::httpmock::Method::GET)
14924 .path_matches(regex::Regex::new("^/v1/system/metrics/[^/]*$").unwrap()),
14925 )
14926 }
14927
14928 pub fn into_inner(self) -> ::httpmock::When {
14929 self.0
14930 }
14931
14932 pub fn metric_name(self, value: types::SystemMetricName) -> Self {
14933 let re =
14934 regex::Regex::new(&format!("^/v1/system/metrics/{}$", value.to_string())).unwrap();
14935 Self(self.0.path_matches(re))
14936 }
14937
14938 pub fn end_time<'a, T>(self, value: T) -> Self
14939 where
14940 T: Into<Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>>,
14941 {
14942 if let Some(value) = value.into() {
14943 Self(self.0.query_param("end_time", value.to_string()))
14944 } else {
14945 Self(self.0.query_param_missing("end_time"))
14946 }
14947 }
14948
14949 pub fn limit<T>(self, value: T) -> Self
14950 where
14951 T: Into<Option<::std::num::NonZeroU32>>,
14952 {
14953 if let Some(value) = value.into() {
14954 Self(self.0.query_param("limit", value.to_string()))
14955 } else {
14956 Self(self.0.query_param_missing("limit"))
14957 }
14958 }
14959
14960 pub fn order<T>(self, value: T) -> Self
14961 where
14962 T: Into<Option<types::PaginationOrder>>,
14963 {
14964 if let Some(value) = value.into() {
14965 Self(self.0.query_param("order", value.to_string()))
14966 } else {
14967 Self(self.0.query_param_missing("order"))
14968 }
14969 }
14970
14971 pub fn page_token<'a, T>(self, value: T) -> Self
14972 where
14973 T: Into<Option<&'a str>>,
14974 {
14975 if let Some(value) = value.into() {
14976 Self(self.0.query_param("page_token", value.to_string()))
14977 } else {
14978 Self(self.0.query_param_missing("page_token"))
14979 }
14980 }
14981
14982 pub fn silo<'a, T>(self, value: T) -> Self
14983 where
14984 T: Into<Option<&'a types::NameOrId>>,
14985 {
14986 if let Some(value) = value.into() {
14987 Self(self.0.query_param("silo", value.to_string()))
14988 } else {
14989 Self(self.0.query_param_missing("silo"))
14990 }
14991 }
14992
14993 pub fn start_time<'a, T>(self, value: T) -> Self
14994 where
14995 T: Into<Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>>,
14996 {
14997 if let Some(value) = value.into() {
14998 Self(self.0.query_param("start_time", value.to_string()))
14999 } else {
15000 Self(self.0.query_param_missing("start_time"))
15001 }
15002 }
15003 }
15004
15005 pub struct SystemMetricThen(::httpmock::Then);
15006 impl SystemMetricThen {
15007 pub fn new(inner: ::httpmock::Then) -> Self {
15008 Self(inner)
15009 }
15010
15011 pub fn into_inner(self) -> ::httpmock::Then {
15012 self.0
15013 }
15014
15015 pub fn ok(self, value: &types::MeasurementResultsPage) -> Self {
15016 Self(
15017 self.0
15018 .status(200u16)
15019 .header("content-type", "application/json")
15020 .json_body_obj(value),
15021 )
15022 }
15023
15024 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
15025 assert_eq!(status / 100u16, 4u16);
15026 Self(
15027 self.0
15028 .status(status)
15029 .header("content-type", "application/json")
15030 .json_body_obj(value),
15031 )
15032 }
15033
15034 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
15035 assert_eq!(status / 100u16, 5u16);
15036 Self(
15037 self.0
15038 .status(status)
15039 .header("content-type", "application/json")
15040 .json_body_obj(value),
15041 )
15042 }
15043 }
15044
15045 pub struct NetworkingAddressLotListWhen(::httpmock::When);
15046 impl NetworkingAddressLotListWhen {
15047 pub fn new(inner: ::httpmock::When) -> Self {
15048 Self(
15049 inner.method(::httpmock::Method::GET).path_matches(
15050 regex::Regex::new("^/v1/system/networking/address-lot$").unwrap(),
15051 ),
15052 )
15053 }
15054
15055 pub fn into_inner(self) -> ::httpmock::When {
15056 self.0
15057 }
15058
15059 pub fn limit<T>(self, value: T) -> Self
15060 where
15061 T: Into<Option<::std::num::NonZeroU32>>,
15062 {
15063 if let Some(value) = value.into() {
15064 Self(self.0.query_param("limit", value.to_string()))
15065 } else {
15066 Self(self.0.query_param_missing("limit"))
15067 }
15068 }
15069
15070 pub fn page_token<'a, T>(self, value: T) -> Self
15071 where
15072 T: Into<Option<&'a str>>,
15073 {
15074 if let Some(value) = value.into() {
15075 Self(self.0.query_param("page_token", value.to_string()))
15076 } else {
15077 Self(self.0.query_param_missing("page_token"))
15078 }
15079 }
15080
15081 pub fn sort_by<T>(self, value: T) -> Self
15082 where
15083 T: Into<Option<types::NameOrIdSortMode>>,
15084 {
15085 if let Some(value) = value.into() {
15086 Self(self.0.query_param("sort_by", value.to_string()))
15087 } else {
15088 Self(self.0.query_param_missing("sort_by"))
15089 }
15090 }
15091 }
15092
15093 pub struct NetworkingAddressLotListThen(::httpmock::Then);
15094 impl NetworkingAddressLotListThen {
15095 pub fn new(inner: ::httpmock::Then) -> Self {
15096 Self(inner)
15097 }
15098
15099 pub fn into_inner(self) -> ::httpmock::Then {
15100 self.0
15101 }
15102
15103 pub fn ok(self, value: &types::AddressLotResultsPage) -> Self {
15104 Self(
15105 self.0
15106 .status(200u16)
15107 .header("content-type", "application/json")
15108 .json_body_obj(value),
15109 )
15110 }
15111
15112 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
15113 assert_eq!(status / 100u16, 4u16);
15114 Self(
15115 self.0
15116 .status(status)
15117 .header("content-type", "application/json")
15118 .json_body_obj(value),
15119 )
15120 }
15121
15122 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
15123 assert_eq!(status / 100u16, 5u16);
15124 Self(
15125 self.0
15126 .status(status)
15127 .header("content-type", "application/json")
15128 .json_body_obj(value),
15129 )
15130 }
15131 }
15132
15133 pub struct NetworkingAddressLotCreateWhen(::httpmock::When);
15134 impl NetworkingAddressLotCreateWhen {
15135 pub fn new(inner: ::httpmock::When) -> Self {
15136 Self(
15137 inner.method(::httpmock::Method::POST).path_matches(
15138 regex::Regex::new("^/v1/system/networking/address-lot$").unwrap(),
15139 ),
15140 )
15141 }
15142
15143 pub fn into_inner(self) -> ::httpmock::When {
15144 self.0
15145 }
15146
15147 pub fn body(self, value: &types::AddressLotCreate) -> Self {
15148 Self(self.0.json_body_obj(value))
15149 }
15150 }
15151
15152 pub struct NetworkingAddressLotCreateThen(::httpmock::Then);
15153 impl NetworkingAddressLotCreateThen {
15154 pub fn new(inner: ::httpmock::Then) -> Self {
15155 Self(inner)
15156 }
15157
15158 pub fn into_inner(self) -> ::httpmock::Then {
15159 self.0
15160 }
15161
15162 pub fn created(self, value: &types::AddressLotCreateResponse) -> Self {
15163 Self(
15164 self.0
15165 .status(201u16)
15166 .header("content-type", "application/json")
15167 .json_body_obj(value),
15168 )
15169 }
15170
15171 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
15172 assert_eq!(status / 100u16, 4u16);
15173 Self(
15174 self.0
15175 .status(status)
15176 .header("content-type", "application/json")
15177 .json_body_obj(value),
15178 )
15179 }
15180
15181 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
15182 assert_eq!(status / 100u16, 5u16);
15183 Self(
15184 self.0
15185 .status(status)
15186 .header("content-type", "application/json")
15187 .json_body_obj(value),
15188 )
15189 }
15190 }
15191
15192 pub struct NetworkingAddressLotViewWhen(::httpmock::When);
15193 impl NetworkingAddressLotViewWhen {
15194 pub fn new(inner: ::httpmock::When) -> Self {
15195 Self(inner.method(::httpmock::Method::GET).path_matches(
15196 regex::Regex::new("^/v1/system/networking/address-lot/[^/]*$").unwrap(),
15197 ))
15198 }
15199
15200 pub fn into_inner(self) -> ::httpmock::When {
15201 self.0
15202 }
15203
15204 pub fn address_lot(self, value: &types::NameOrId) -> Self {
15205 let re = regex::Regex::new(&format!(
15206 "^/v1/system/networking/address-lot/{}$",
15207 value.to_string()
15208 ))
15209 .unwrap();
15210 Self(self.0.path_matches(re))
15211 }
15212 }
15213
15214 pub struct NetworkingAddressLotViewThen(::httpmock::Then);
15215 impl NetworkingAddressLotViewThen {
15216 pub fn new(inner: ::httpmock::Then) -> Self {
15217 Self(inner)
15218 }
15219
15220 pub fn into_inner(self) -> ::httpmock::Then {
15221 self.0
15222 }
15223
15224 pub fn ok(self, value: &types::AddressLotViewResponse) -> Self {
15225 Self(
15226 self.0
15227 .status(200u16)
15228 .header("content-type", "application/json")
15229 .json_body_obj(value),
15230 )
15231 }
15232
15233 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
15234 assert_eq!(status / 100u16, 4u16);
15235 Self(
15236 self.0
15237 .status(status)
15238 .header("content-type", "application/json")
15239 .json_body_obj(value),
15240 )
15241 }
15242
15243 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
15244 assert_eq!(status / 100u16, 5u16);
15245 Self(
15246 self.0
15247 .status(status)
15248 .header("content-type", "application/json")
15249 .json_body_obj(value),
15250 )
15251 }
15252 }
15253
15254 pub struct NetworkingAddressLotDeleteWhen(::httpmock::When);
15255 impl NetworkingAddressLotDeleteWhen {
15256 pub fn new(inner: ::httpmock::When) -> Self {
15257 Self(inner.method(::httpmock::Method::DELETE).path_matches(
15258 regex::Regex::new("^/v1/system/networking/address-lot/[^/]*$").unwrap(),
15259 ))
15260 }
15261
15262 pub fn into_inner(self) -> ::httpmock::When {
15263 self.0
15264 }
15265
15266 pub fn address_lot(self, value: &types::NameOrId) -> Self {
15267 let re = regex::Regex::new(&format!(
15268 "^/v1/system/networking/address-lot/{}$",
15269 value.to_string()
15270 ))
15271 .unwrap();
15272 Self(self.0.path_matches(re))
15273 }
15274 }
15275
15276 pub struct NetworkingAddressLotDeleteThen(::httpmock::Then);
15277 impl NetworkingAddressLotDeleteThen {
15278 pub fn new(inner: ::httpmock::Then) -> Self {
15279 Self(inner)
15280 }
15281
15282 pub fn into_inner(self) -> ::httpmock::Then {
15283 self.0
15284 }
15285
15286 pub fn no_content(self) -> Self {
15287 Self(self.0.status(204u16))
15288 }
15289
15290 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
15291 assert_eq!(status / 100u16, 4u16);
15292 Self(
15293 self.0
15294 .status(status)
15295 .header("content-type", "application/json")
15296 .json_body_obj(value),
15297 )
15298 }
15299
15300 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
15301 assert_eq!(status / 100u16, 5u16);
15302 Self(
15303 self.0
15304 .status(status)
15305 .header("content-type", "application/json")
15306 .json_body_obj(value),
15307 )
15308 }
15309 }
15310
15311 pub struct NetworkingAddressLotBlockListWhen(::httpmock::When);
15312 impl NetworkingAddressLotBlockListWhen {
15313 pub fn new(inner: ::httpmock::When) -> Self {
15314 Self(inner.method(::httpmock::Method::GET).path_matches(
15315 regex::Regex::new("^/v1/system/networking/address-lot/[^/]*/blocks$").unwrap(),
15316 ))
15317 }
15318
15319 pub fn into_inner(self) -> ::httpmock::When {
15320 self.0
15321 }
15322
15323 pub fn address_lot(self, value: &types::NameOrId) -> Self {
15324 let re = regex::Regex::new(&format!(
15325 "^/v1/system/networking/address-lot/{}/blocks$",
15326 value.to_string()
15327 ))
15328 .unwrap();
15329 Self(self.0.path_matches(re))
15330 }
15331
15332 pub fn limit<T>(self, value: T) -> Self
15333 where
15334 T: Into<Option<::std::num::NonZeroU32>>,
15335 {
15336 if let Some(value) = value.into() {
15337 Self(self.0.query_param("limit", value.to_string()))
15338 } else {
15339 Self(self.0.query_param_missing("limit"))
15340 }
15341 }
15342
15343 pub fn page_token<'a, T>(self, value: T) -> Self
15344 where
15345 T: Into<Option<&'a str>>,
15346 {
15347 if let Some(value) = value.into() {
15348 Self(self.0.query_param("page_token", value.to_string()))
15349 } else {
15350 Self(self.0.query_param_missing("page_token"))
15351 }
15352 }
15353
15354 pub fn sort_by<T>(self, value: T) -> Self
15355 where
15356 T: Into<Option<types::IdSortMode>>,
15357 {
15358 if let Some(value) = value.into() {
15359 Self(self.0.query_param("sort_by", value.to_string()))
15360 } else {
15361 Self(self.0.query_param_missing("sort_by"))
15362 }
15363 }
15364 }
15365
15366 pub struct NetworkingAddressLotBlockListThen(::httpmock::Then);
15367 impl NetworkingAddressLotBlockListThen {
15368 pub fn new(inner: ::httpmock::Then) -> Self {
15369 Self(inner)
15370 }
15371
15372 pub fn into_inner(self) -> ::httpmock::Then {
15373 self.0
15374 }
15375
15376 pub fn ok(self, value: &types::AddressLotBlockResultsPage) -> Self {
15377 Self(
15378 self.0
15379 .status(200u16)
15380 .header("content-type", "application/json")
15381 .json_body_obj(value),
15382 )
15383 }
15384
15385 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
15386 assert_eq!(status / 100u16, 4u16);
15387 Self(
15388 self.0
15389 .status(status)
15390 .header("content-type", "application/json")
15391 .json_body_obj(value),
15392 )
15393 }
15394
15395 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
15396 assert_eq!(status / 100u16, 5u16);
15397 Self(
15398 self.0
15399 .status(status)
15400 .header("content-type", "application/json")
15401 .json_body_obj(value),
15402 )
15403 }
15404 }
15405
15406 pub struct NetworkingAllowListViewWhen(::httpmock::When);
15407 impl NetworkingAllowListViewWhen {
15408 pub fn new(inner: ::httpmock::When) -> Self {
15409 Self(
15410 inner
15411 .method(::httpmock::Method::GET)
15412 .path_matches(regex::Regex::new("^/v1/system/networking/allow-list$").unwrap()),
15413 )
15414 }
15415
15416 pub fn into_inner(self) -> ::httpmock::When {
15417 self.0
15418 }
15419 }
15420
15421 pub struct NetworkingAllowListViewThen(::httpmock::Then);
15422 impl NetworkingAllowListViewThen {
15423 pub fn new(inner: ::httpmock::Then) -> Self {
15424 Self(inner)
15425 }
15426
15427 pub fn into_inner(self) -> ::httpmock::Then {
15428 self.0
15429 }
15430
15431 pub fn ok(self, value: &types::AllowList) -> Self {
15432 Self(
15433 self.0
15434 .status(200u16)
15435 .header("content-type", "application/json")
15436 .json_body_obj(value),
15437 )
15438 }
15439
15440 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
15441 assert_eq!(status / 100u16, 4u16);
15442 Self(
15443 self.0
15444 .status(status)
15445 .header("content-type", "application/json")
15446 .json_body_obj(value),
15447 )
15448 }
15449
15450 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
15451 assert_eq!(status / 100u16, 5u16);
15452 Self(
15453 self.0
15454 .status(status)
15455 .header("content-type", "application/json")
15456 .json_body_obj(value),
15457 )
15458 }
15459 }
15460
15461 pub struct NetworkingAllowListUpdateWhen(::httpmock::When);
15462 impl NetworkingAllowListUpdateWhen {
15463 pub fn new(inner: ::httpmock::When) -> Self {
15464 Self(
15465 inner
15466 .method(::httpmock::Method::PUT)
15467 .path_matches(regex::Regex::new("^/v1/system/networking/allow-list$").unwrap()),
15468 )
15469 }
15470
15471 pub fn into_inner(self) -> ::httpmock::When {
15472 self.0
15473 }
15474
15475 pub fn body(self, value: &types::AllowListUpdate) -> Self {
15476 Self(self.0.json_body_obj(value))
15477 }
15478 }
15479
15480 pub struct NetworkingAllowListUpdateThen(::httpmock::Then);
15481 impl NetworkingAllowListUpdateThen {
15482 pub fn new(inner: ::httpmock::Then) -> Self {
15483 Self(inner)
15484 }
15485
15486 pub fn into_inner(self) -> ::httpmock::Then {
15487 self.0
15488 }
15489
15490 pub fn ok(self, value: &types::AllowList) -> Self {
15491 Self(
15492 self.0
15493 .status(200u16)
15494 .header("content-type", "application/json")
15495 .json_body_obj(value),
15496 )
15497 }
15498
15499 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
15500 assert_eq!(status / 100u16, 4u16);
15501 Self(
15502 self.0
15503 .status(status)
15504 .header("content-type", "application/json")
15505 .json_body_obj(value),
15506 )
15507 }
15508
15509 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
15510 assert_eq!(status / 100u16, 5u16);
15511 Self(
15512 self.0
15513 .status(status)
15514 .header("content-type", "application/json")
15515 .json_body_obj(value),
15516 )
15517 }
15518 }
15519
15520 pub struct NetworkingBfdDisableWhen(::httpmock::When);
15521 impl NetworkingBfdDisableWhen {
15522 pub fn new(inner: ::httpmock::When) -> Self {
15523 Self(
15524 inner.method(::httpmock::Method::POST).path_matches(
15525 regex::Regex::new("^/v1/system/networking/bfd-disable$").unwrap(),
15526 ),
15527 )
15528 }
15529
15530 pub fn into_inner(self) -> ::httpmock::When {
15531 self.0
15532 }
15533
15534 pub fn body(self, value: &types::BfdSessionDisable) -> Self {
15535 Self(self.0.json_body_obj(value))
15536 }
15537 }
15538
15539 pub struct NetworkingBfdDisableThen(::httpmock::Then);
15540 impl NetworkingBfdDisableThen {
15541 pub fn new(inner: ::httpmock::Then) -> Self {
15542 Self(inner)
15543 }
15544
15545 pub fn into_inner(self) -> ::httpmock::Then {
15546 self.0
15547 }
15548
15549 pub fn no_content(self) -> Self {
15550 Self(self.0.status(204u16))
15551 }
15552
15553 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
15554 assert_eq!(status / 100u16, 4u16);
15555 Self(
15556 self.0
15557 .status(status)
15558 .header("content-type", "application/json")
15559 .json_body_obj(value),
15560 )
15561 }
15562
15563 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
15564 assert_eq!(status / 100u16, 5u16);
15565 Self(
15566 self.0
15567 .status(status)
15568 .header("content-type", "application/json")
15569 .json_body_obj(value),
15570 )
15571 }
15572 }
15573
15574 pub struct NetworkingBfdEnableWhen(::httpmock::When);
15575 impl NetworkingBfdEnableWhen {
15576 pub fn new(inner: ::httpmock::When) -> Self {
15577 Self(
15578 inner
15579 .method(::httpmock::Method::POST)
15580 .path_matches(regex::Regex::new("^/v1/system/networking/bfd-enable$").unwrap()),
15581 )
15582 }
15583
15584 pub fn into_inner(self) -> ::httpmock::When {
15585 self.0
15586 }
15587
15588 pub fn body(self, value: &types::BfdSessionEnable) -> Self {
15589 Self(self.0.json_body_obj(value))
15590 }
15591 }
15592
15593 pub struct NetworkingBfdEnableThen(::httpmock::Then);
15594 impl NetworkingBfdEnableThen {
15595 pub fn new(inner: ::httpmock::Then) -> Self {
15596 Self(inner)
15597 }
15598
15599 pub fn into_inner(self) -> ::httpmock::Then {
15600 self.0
15601 }
15602
15603 pub fn no_content(self) -> Self {
15604 Self(self.0.status(204u16))
15605 }
15606
15607 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
15608 assert_eq!(status / 100u16, 4u16);
15609 Self(
15610 self.0
15611 .status(status)
15612 .header("content-type", "application/json")
15613 .json_body_obj(value),
15614 )
15615 }
15616
15617 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
15618 assert_eq!(status / 100u16, 5u16);
15619 Self(
15620 self.0
15621 .status(status)
15622 .header("content-type", "application/json")
15623 .json_body_obj(value),
15624 )
15625 }
15626 }
15627
15628 pub struct NetworkingBfdStatusWhen(::httpmock::When);
15629 impl NetworkingBfdStatusWhen {
15630 pub fn new(inner: ::httpmock::When) -> Self {
15631 Self(
15632 inner
15633 .method(::httpmock::Method::GET)
15634 .path_matches(regex::Regex::new("^/v1/system/networking/bfd-status$").unwrap()),
15635 )
15636 }
15637
15638 pub fn into_inner(self) -> ::httpmock::When {
15639 self.0
15640 }
15641 }
15642
15643 pub struct NetworkingBfdStatusThen(::httpmock::Then);
15644 impl NetworkingBfdStatusThen {
15645 pub fn new(inner: ::httpmock::Then) -> Self {
15646 Self(inner)
15647 }
15648
15649 pub fn into_inner(self) -> ::httpmock::Then {
15650 self.0
15651 }
15652
15653 pub fn ok(self, value: &::std::vec::Vec<types::BfdStatus>) -> Self {
15654 Self(
15655 self.0
15656 .status(200u16)
15657 .header("content-type", "application/json")
15658 .json_body_obj(value),
15659 )
15660 }
15661
15662 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
15663 assert_eq!(status / 100u16, 4u16);
15664 Self(
15665 self.0
15666 .status(status)
15667 .header("content-type", "application/json")
15668 .json_body_obj(value),
15669 )
15670 }
15671
15672 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
15673 assert_eq!(status / 100u16, 5u16);
15674 Self(
15675 self.0
15676 .status(status)
15677 .header("content-type", "application/json")
15678 .json_body_obj(value),
15679 )
15680 }
15681 }
15682
15683 pub struct NetworkingBgpConfigListWhen(::httpmock::When);
15684 impl NetworkingBgpConfigListWhen {
15685 pub fn new(inner: ::httpmock::When) -> Self {
15686 Self(
15687 inner
15688 .method(::httpmock::Method::GET)
15689 .path_matches(regex::Regex::new("^/v1/system/networking/bgp$").unwrap()),
15690 )
15691 }
15692
15693 pub fn into_inner(self) -> ::httpmock::When {
15694 self.0
15695 }
15696
15697 pub fn limit<T>(self, value: T) -> Self
15698 where
15699 T: Into<Option<::std::num::NonZeroU32>>,
15700 {
15701 if let Some(value) = value.into() {
15702 Self(self.0.query_param("limit", value.to_string()))
15703 } else {
15704 Self(self.0.query_param_missing("limit"))
15705 }
15706 }
15707
15708 pub fn page_token<'a, T>(self, value: T) -> Self
15709 where
15710 T: Into<Option<&'a str>>,
15711 {
15712 if let Some(value) = value.into() {
15713 Self(self.0.query_param("page_token", value.to_string()))
15714 } else {
15715 Self(self.0.query_param_missing("page_token"))
15716 }
15717 }
15718
15719 pub fn sort_by<T>(self, value: T) -> Self
15720 where
15721 T: Into<Option<types::NameOrIdSortMode>>,
15722 {
15723 if let Some(value) = value.into() {
15724 Self(self.0.query_param("sort_by", value.to_string()))
15725 } else {
15726 Self(self.0.query_param_missing("sort_by"))
15727 }
15728 }
15729 }
15730
15731 pub struct NetworkingBgpConfigListThen(::httpmock::Then);
15732 impl NetworkingBgpConfigListThen {
15733 pub fn new(inner: ::httpmock::Then) -> Self {
15734 Self(inner)
15735 }
15736
15737 pub fn into_inner(self) -> ::httpmock::Then {
15738 self.0
15739 }
15740
15741 pub fn ok(self, value: &types::BgpConfigResultsPage) -> Self {
15742 Self(
15743 self.0
15744 .status(200u16)
15745 .header("content-type", "application/json")
15746 .json_body_obj(value),
15747 )
15748 }
15749
15750 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
15751 assert_eq!(status / 100u16, 4u16);
15752 Self(
15753 self.0
15754 .status(status)
15755 .header("content-type", "application/json")
15756 .json_body_obj(value),
15757 )
15758 }
15759
15760 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
15761 assert_eq!(status / 100u16, 5u16);
15762 Self(
15763 self.0
15764 .status(status)
15765 .header("content-type", "application/json")
15766 .json_body_obj(value),
15767 )
15768 }
15769 }
15770
15771 pub struct NetworkingBgpConfigCreateWhen(::httpmock::When);
15772 impl NetworkingBgpConfigCreateWhen {
15773 pub fn new(inner: ::httpmock::When) -> Self {
15774 Self(
15775 inner
15776 .method(::httpmock::Method::POST)
15777 .path_matches(regex::Regex::new("^/v1/system/networking/bgp$").unwrap()),
15778 )
15779 }
15780
15781 pub fn into_inner(self) -> ::httpmock::When {
15782 self.0
15783 }
15784
15785 pub fn body(self, value: &types::BgpConfigCreate) -> Self {
15786 Self(self.0.json_body_obj(value))
15787 }
15788 }
15789
15790 pub struct NetworkingBgpConfigCreateThen(::httpmock::Then);
15791 impl NetworkingBgpConfigCreateThen {
15792 pub fn new(inner: ::httpmock::Then) -> Self {
15793 Self(inner)
15794 }
15795
15796 pub fn into_inner(self) -> ::httpmock::Then {
15797 self.0
15798 }
15799
15800 pub fn created(self, value: &types::BgpConfig) -> Self {
15801 Self(
15802 self.0
15803 .status(201u16)
15804 .header("content-type", "application/json")
15805 .json_body_obj(value),
15806 )
15807 }
15808
15809 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
15810 assert_eq!(status / 100u16, 4u16);
15811 Self(
15812 self.0
15813 .status(status)
15814 .header("content-type", "application/json")
15815 .json_body_obj(value),
15816 )
15817 }
15818
15819 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
15820 assert_eq!(status / 100u16, 5u16);
15821 Self(
15822 self.0
15823 .status(status)
15824 .header("content-type", "application/json")
15825 .json_body_obj(value),
15826 )
15827 }
15828 }
15829
15830 pub struct NetworkingBgpConfigDeleteWhen(::httpmock::When);
15831 impl NetworkingBgpConfigDeleteWhen {
15832 pub fn new(inner: ::httpmock::When) -> Self {
15833 Self(
15834 inner
15835 .method(::httpmock::Method::DELETE)
15836 .path_matches(regex::Regex::new("^/v1/system/networking/bgp$").unwrap()),
15837 )
15838 }
15839
15840 pub fn into_inner(self) -> ::httpmock::When {
15841 self.0
15842 }
15843
15844 pub fn name_or_id(self, value: &types::NameOrId) -> Self {
15845 Self(self.0.query_param("name_or_id", value.to_string()))
15846 }
15847 }
15848
15849 pub struct NetworkingBgpConfigDeleteThen(::httpmock::Then);
15850 impl NetworkingBgpConfigDeleteThen {
15851 pub fn new(inner: ::httpmock::Then) -> Self {
15852 Self(inner)
15853 }
15854
15855 pub fn into_inner(self) -> ::httpmock::Then {
15856 self.0
15857 }
15858
15859 pub fn no_content(self) -> Self {
15860 Self(self.0.status(204u16))
15861 }
15862
15863 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
15864 assert_eq!(status / 100u16, 4u16);
15865 Self(
15866 self.0
15867 .status(status)
15868 .header("content-type", "application/json")
15869 .json_body_obj(value),
15870 )
15871 }
15872
15873 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
15874 assert_eq!(status / 100u16, 5u16);
15875 Self(
15876 self.0
15877 .status(status)
15878 .header("content-type", "application/json")
15879 .json_body_obj(value),
15880 )
15881 }
15882 }
15883
15884 pub struct NetworkingBgpAnnounceSetListWhen(::httpmock::When);
15885 impl NetworkingBgpAnnounceSetListWhen {
15886 pub fn new(inner: ::httpmock::When) -> Self {
15887 Self(inner.method(::httpmock::Method::GET).path_matches(
15888 regex::Regex::new("^/v1/system/networking/bgp-announce-set$").unwrap(),
15889 ))
15890 }
15891
15892 pub fn into_inner(self) -> ::httpmock::When {
15893 self.0
15894 }
15895
15896 pub fn limit<T>(self, value: T) -> Self
15897 where
15898 T: Into<Option<::std::num::NonZeroU32>>,
15899 {
15900 if let Some(value) = value.into() {
15901 Self(self.0.query_param("limit", value.to_string()))
15902 } else {
15903 Self(self.0.query_param_missing("limit"))
15904 }
15905 }
15906
15907 pub fn page_token<'a, T>(self, value: T) -> Self
15908 where
15909 T: Into<Option<&'a str>>,
15910 {
15911 if let Some(value) = value.into() {
15912 Self(self.0.query_param("page_token", value.to_string()))
15913 } else {
15914 Self(self.0.query_param_missing("page_token"))
15915 }
15916 }
15917
15918 pub fn sort_by<T>(self, value: T) -> Self
15919 where
15920 T: Into<Option<types::NameOrIdSortMode>>,
15921 {
15922 if let Some(value) = value.into() {
15923 Self(self.0.query_param("sort_by", value.to_string()))
15924 } else {
15925 Self(self.0.query_param_missing("sort_by"))
15926 }
15927 }
15928 }
15929
15930 pub struct NetworkingBgpAnnounceSetListThen(::httpmock::Then);
15931 impl NetworkingBgpAnnounceSetListThen {
15932 pub fn new(inner: ::httpmock::Then) -> Self {
15933 Self(inner)
15934 }
15935
15936 pub fn into_inner(self) -> ::httpmock::Then {
15937 self.0
15938 }
15939
15940 pub fn ok(self, value: &::std::vec::Vec<types::BgpAnnounceSet>) -> Self {
15941 Self(
15942 self.0
15943 .status(200u16)
15944 .header("content-type", "application/json")
15945 .json_body_obj(value),
15946 )
15947 }
15948
15949 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
15950 assert_eq!(status / 100u16, 4u16);
15951 Self(
15952 self.0
15953 .status(status)
15954 .header("content-type", "application/json")
15955 .json_body_obj(value),
15956 )
15957 }
15958
15959 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
15960 assert_eq!(status / 100u16, 5u16);
15961 Self(
15962 self.0
15963 .status(status)
15964 .header("content-type", "application/json")
15965 .json_body_obj(value),
15966 )
15967 }
15968 }
15969
15970 pub struct NetworkingBgpAnnounceSetUpdateWhen(::httpmock::When);
15971 impl NetworkingBgpAnnounceSetUpdateWhen {
15972 pub fn new(inner: ::httpmock::When) -> Self {
15973 Self(inner.method(::httpmock::Method::PUT).path_matches(
15974 regex::Regex::new("^/v1/system/networking/bgp-announce-set$").unwrap(),
15975 ))
15976 }
15977
15978 pub fn into_inner(self) -> ::httpmock::When {
15979 self.0
15980 }
15981
15982 pub fn body(self, value: &types::BgpAnnounceSetCreate) -> Self {
15983 Self(self.0.json_body_obj(value))
15984 }
15985 }
15986
15987 pub struct NetworkingBgpAnnounceSetUpdateThen(::httpmock::Then);
15988 impl NetworkingBgpAnnounceSetUpdateThen {
15989 pub fn new(inner: ::httpmock::Then) -> Self {
15990 Self(inner)
15991 }
15992
15993 pub fn into_inner(self) -> ::httpmock::Then {
15994 self.0
15995 }
15996
15997 pub fn ok(self, value: &types::BgpAnnounceSet) -> Self {
15998 Self(
15999 self.0
16000 .status(200u16)
16001 .header("content-type", "application/json")
16002 .json_body_obj(value),
16003 )
16004 }
16005
16006 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
16007 assert_eq!(status / 100u16, 4u16);
16008 Self(
16009 self.0
16010 .status(status)
16011 .header("content-type", "application/json")
16012 .json_body_obj(value),
16013 )
16014 }
16015
16016 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
16017 assert_eq!(status / 100u16, 5u16);
16018 Self(
16019 self.0
16020 .status(status)
16021 .header("content-type", "application/json")
16022 .json_body_obj(value),
16023 )
16024 }
16025 }
16026
16027 pub struct NetworkingBgpAnnounceSetDeleteWhen(::httpmock::When);
16028 impl NetworkingBgpAnnounceSetDeleteWhen {
16029 pub fn new(inner: ::httpmock::When) -> Self {
16030 Self(inner.method(::httpmock::Method::DELETE).path_matches(
16031 regex::Regex::new("^/v1/system/networking/bgp-announce-set/[^/]*$").unwrap(),
16032 ))
16033 }
16034
16035 pub fn into_inner(self) -> ::httpmock::When {
16036 self.0
16037 }
16038
16039 pub fn announce_set(self, value: &types::NameOrId) -> Self {
16040 let re = regex::Regex::new(&format!(
16041 "^/v1/system/networking/bgp-announce-set/{}$",
16042 value.to_string()
16043 ))
16044 .unwrap();
16045 Self(self.0.path_matches(re))
16046 }
16047 }
16048
16049 pub struct NetworkingBgpAnnounceSetDeleteThen(::httpmock::Then);
16050 impl NetworkingBgpAnnounceSetDeleteThen {
16051 pub fn new(inner: ::httpmock::Then) -> Self {
16052 Self(inner)
16053 }
16054
16055 pub fn into_inner(self) -> ::httpmock::Then {
16056 self.0
16057 }
16058
16059 pub fn no_content(self) -> Self {
16060 Self(self.0.status(204u16))
16061 }
16062
16063 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
16064 assert_eq!(status / 100u16, 4u16);
16065 Self(
16066 self.0
16067 .status(status)
16068 .header("content-type", "application/json")
16069 .json_body_obj(value),
16070 )
16071 }
16072
16073 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
16074 assert_eq!(status / 100u16, 5u16);
16075 Self(
16076 self.0
16077 .status(status)
16078 .header("content-type", "application/json")
16079 .json_body_obj(value),
16080 )
16081 }
16082 }
16083
16084 pub struct NetworkingBgpAnnouncementListWhen(::httpmock::When);
16085 impl NetworkingBgpAnnouncementListWhen {
16086 pub fn new(inner: ::httpmock::When) -> Self {
16087 Self(
16088 inner.method(::httpmock::Method::GET).path_matches(
16089 regex::Regex::new(
16090 "^/v1/system/networking/bgp-announce-set/[^/]*/announcement$",
16091 )
16092 .unwrap(),
16093 ),
16094 )
16095 }
16096
16097 pub fn into_inner(self) -> ::httpmock::When {
16098 self.0
16099 }
16100
16101 pub fn announce_set(self, value: &types::NameOrId) -> Self {
16102 let re = regex::Regex::new(&format!(
16103 "^/v1/system/networking/bgp-announce-set/{}/announcement$",
16104 value.to_string()
16105 ))
16106 .unwrap();
16107 Self(self.0.path_matches(re))
16108 }
16109 }
16110
16111 pub struct NetworkingBgpAnnouncementListThen(::httpmock::Then);
16112 impl NetworkingBgpAnnouncementListThen {
16113 pub fn new(inner: ::httpmock::Then) -> Self {
16114 Self(inner)
16115 }
16116
16117 pub fn into_inner(self) -> ::httpmock::Then {
16118 self.0
16119 }
16120
16121 pub fn ok(self, value: &::std::vec::Vec<types::BgpAnnouncement>) -> Self {
16122 Self(
16123 self.0
16124 .status(200u16)
16125 .header("content-type", "application/json")
16126 .json_body_obj(value),
16127 )
16128 }
16129
16130 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
16131 assert_eq!(status / 100u16, 4u16);
16132 Self(
16133 self.0
16134 .status(status)
16135 .header("content-type", "application/json")
16136 .json_body_obj(value),
16137 )
16138 }
16139
16140 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
16141 assert_eq!(status / 100u16, 5u16);
16142 Self(
16143 self.0
16144 .status(status)
16145 .header("content-type", "application/json")
16146 .json_body_obj(value),
16147 )
16148 }
16149 }
16150
16151 pub struct NetworkingBgpExportedWhen(::httpmock::When);
16152 impl NetworkingBgpExportedWhen {
16153 pub fn new(inner: ::httpmock::When) -> Self {
16154 Self(
16155 inner.method(::httpmock::Method::GET).path_matches(
16156 regex::Regex::new("^/v1/system/networking/bgp-exported$").unwrap(),
16157 ),
16158 )
16159 }
16160
16161 pub fn into_inner(self) -> ::httpmock::When {
16162 self.0
16163 }
16164 }
16165
16166 pub struct NetworkingBgpExportedThen(::httpmock::Then);
16167 impl NetworkingBgpExportedThen {
16168 pub fn new(inner: ::httpmock::Then) -> Self {
16169 Self(inner)
16170 }
16171
16172 pub fn into_inner(self) -> ::httpmock::Then {
16173 self.0
16174 }
16175
16176 pub fn ok(self, value: &::std::vec::Vec<types::BgpExported>) -> Self {
16177 Self(
16178 self.0
16179 .status(200u16)
16180 .header("content-type", "application/json")
16181 .json_body_obj(value),
16182 )
16183 }
16184
16185 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
16186 assert_eq!(status / 100u16, 4u16);
16187 Self(
16188 self.0
16189 .status(status)
16190 .header("content-type", "application/json")
16191 .json_body_obj(value),
16192 )
16193 }
16194
16195 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
16196 assert_eq!(status / 100u16, 5u16);
16197 Self(
16198 self.0
16199 .status(status)
16200 .header("content-type", "application/json")
16201 .json_body_obj(value),
16202 )
16203 }
16204 }
16205
16206 pub struct NetworkingBgpImportedWhen(::httpmock::When);
16207 impl NetworkingBgpImportedWhen {
16208 pub fn new(inner: ::httpmock::When) -> Self {
16209 Self(
16210 inner.method(::httpmock::Method::GET).path_matches(
16211 regex::Regex::new("^/v1/system/networking/bgp-imported$").unwrap(),
16212 ),
16213 )
16214 }
16215
16216 pub fn into_inner(self) -> ::httpmock::When {
16217 self.0
16218 }
16219
16220 pub fn asn(self, value: u32) -> Self {
16221 Self(self.0.query_param("asn", value.to_string()))
16222 }
16223 }
16224
16225 pub struct NetworkingBgpImportedThen(::httpmock::Then);
16226 impl NetworkingBgpImportedThen {
16227 pub fn new(inner: ::httpmock::Then) -> Self {
16228 Self(inner)
16229 }
16230
16231 pub fn into_inner(self) -> ::httpmock::Then {
16232 self.0
16233 }
16234
16235 pub fn ok(self, value: &::std::vec::Vec<types::BgpImported>) -> Self {
16236 Self(
16237 self.0
16238 .status(200u16)
16239 .header("content-type", "application/json")
16240 .json_body_obj(value),
16241 )
16242 }
16243
16244 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
16245 assert_eq!(status / 100u16, 4u16);
16246 Self(
16247 self.0
16248 .status(status)
16249 .header("content-type", "application/json")
16250 .json_body_obj(value),
16251 )
16252 }
16253
16254 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
16255 assert_eq!(status / 100u16, 5u16);
16256 Self(
16257 self.0
16258 .status(status)
16259 .header("content-type", "application/json")
16260 .json_body_obj(value),
16261 )
16262 }
16263 }
16264
16265 pub struct NetworkingBgpMessageHistoryWhen(::httpmock::When);
16266 impl NetworkingBgpMessageHistoryWhen {
16267 pub fn new(inner: ::httpmock::When) -> Self {
16268 Self(inner.method(::httpmock::Method::GET).path_matches(
16269 regex::Regex::new("^/v1/system/networking/bgp-message-history$").unwrap(),
16270 ))
16271 }
16272
16273 pub fn into_inner(self) -> ::httpmock::When {
16274 self.0
16275 }
16276
16277 pub fn asn(self, value: u32) -> Self {
16278 Self(self.0.query_param("asn", value.to_string()))
16279 }
16280 }
16281
16282 pub struct NetworkingBgpMessageHistoryThen(::httpmock::Then);
16283 impl NetworkingBgpMessageHistoryThen {
16284 pub fn new(inner: ::httpmock::Then) -> Self {
16285 Self(inner)
16286 }
16287
16288 pub fn into_inner(self) -> ::httpmock::Then {
16289 self.0
16290 }
16291
16292 pub fn ok(self, value: &types::AggregateBgpMessageHistory) -> Self {
16293 Self(
16294 self.0
16295 .status(200u16)
16296 .header("content-type", "application/json")
16297 .json_body_obj(value),
16298 )
16299 }
16300
16301 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
16302 assert_eq!(status / 100u16, 4u16);
16303 Self(
16304 self.0
16305 .status(status)
16306 .header("content-type", "application/json")
16307 .json_body_obj(value),
16308 )
16309 }
16310
16311 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
16312 assert_eq!(status / 100u16, 5u16);
16313 Self(
16314 self.0
16315 .status(status)
16316 .header("content-type", "application/json")
16317 .json_body_obj(value),
16318 )
16319 }
16320 }
16321
16322 pub struct NetworkingBgpStatusWhen(::httpmock::When);
16323 impl NetworkingBgpStatusWhen {
16324 pub fn new(inner: ::httpmock::When) -> Self {
16325 Self(
16326 inner
16327 .method(::httpmock::Method::GET)
16328 .path_matches(regex::Regex::new("^/v1/system/networking/bgp-status$").unwrap()),
16329 )
16330 }
16331
16332 pub fn into_inner(self) -> ::httpmock::When {
16333 self.0
16334 }
16335 }
16336
16337 pub struct NetworkingBgpStatusThen(::httpmock::Then);
16338 impl NetworkingBgpStatusThen {
16339 pub fn new(inner: ::httpmock::Then) -> Self {
16340 Self(inner)
16341 }
16342
16343 pub fn into_inner(self) -> ::httpmock::Then {
16344 self.0
16345 }
16346
16347 pub fn ok(self, value: &::std::vec::Vec<types::BgpPeerStatus>) -> Self {
16348 Self(
16349 self.0
16350 .status(200u16)
16351 .header("content-type", "application/json")
16352 .json_body_obj(value),
16353 )
16354 }
16355
16356 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
16357 assert_eq!(status / 100u16, 4u16);
16358 Self(
16359 self.0
16360 .status(status)
16361 .header("content-type", "application/json")
16362 .json_body_obj(value),
16363 )
16364 }
16365
16366 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
16367 assert_eq!(status / 100u16, 5u16);
16368 Self(
16369 self.0
16370 .status(status)
16371 .header("content-type", "application/json")
16372 .json_body_obj(value),
16373 )
16374 }
16375 }
16376
16377 pub struct NetworkingInboundIcmpViewWhen(::httpmock::When);
16378 impl NetworkingInboundIcmpViewWhen {
16379 pub fn new(inner: ::httpmock::When) -> Self {
16380 Self(
16381 inner.method(::httpmock::Method::GET).path_matches(
16382 regex::Regex::new("^/v1/system/networking/inbound-icmp$").unwrap(),
16383 ),
16384 )
16385 }
16386
16387 pub fn into_inner(self) -> ::httpmock::When {
16388 self.0
16389 }
16390 }
16391
16392 pub struct NetworkingInboundIcmpViewThen(::httpmock::Then);
16393 impl NetworkingInboundIcmpViewThen {
16394 pub fn new(inner: ::httpmock::Then) -> Self {
16395 Self(inner)
16396 }
16397
16398 pub fn into_inner(self) -> ::httpmock::Then {
16399 self.0
16400 }
16401
16402 pub fn ok(self, value: &types::ServiceIcmpConfig) -> Self {
16403 Self(
16404 self.0
16405 .status(200u16)
16406 .header("content-type", "application/json")
16407 .json_body_obj(value),
16408 )
16409 }
16410
16411 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
16412 assert_eq!(status / 100u16, 4u16);
16413 Self(
16414 self.0
16415 .status(status)
16416 .header("content-type", "application/json")
16417 .json_body_obj(value),
16418 )
16419 }
16420
16421 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
16422 assert_eq!(status / 100u16, 5u16);
16423 Self(
16424 self.0
16425 .status(status)
16426 .header("content-type", "application/json")
16427 .json_body_obj(value),
16428 )
16429 }
16430 }
16431
16432 pub struct NetworkingInboundIcmpUpdateWhen(::httpmock::When);
16433 impl NetworkingInboundIcmpUpdateWhen {
16434 pub fn new(inner: ::httpmock::When) -> Self {
16435 Self(
16436 inner.method(::httpmock::Method::PUT).path_matches(
16437 regex::Regex::new("^/v1/system/networking/inbound-icmp$").unwrap(),
16438 ),
16439 )
16440 }
16441
16442 pub fn into_inner(self) -> ::httpmock::When {
16443 self.0
16444 }
16445
16446 pub fn body(self, value: &types::ServiceIcmpConfig) -> Self {
16447 Self(self.0.json_body_obj(value))
16448 }
16449 }
16450
16451 pub struct NetworkingInboundIcmpUpdateThen(::httpmock::Then);
16452 impl NetworkingInboundIcmpUpdateThen {
16453 pub fn new(inner: ::httpmock::Then) -> Self {
16454 Self(inner)
16455 }
16456
16457 pub fn into_inner(self) -> ::httpmock::Then {
16458 self.0
16459 }
16460
16461 pub fn no_content(self) -> Self {
16462 Self(self.0.status(204u16))
16463 }
16464
16465 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
16466 assert_eq!(status / 100u16, 4u16);
16467 Self(
16468 self.0
16469 .status(status)
16470 .header("content-type", "application/json")
16471 .json_body_obj(value),
16472 )
16473 }
16474
16475 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
16476 assert_eq!(status / 100u16, 5u16);
16477 Self(
16478 self.0
16479 .status(status)
16480 .header("content-type", "application/json")
16481 .json_body_obj(value),
16482 )
16483 }
16484 }
16485
16486 pub struct NetworkingLoopbackAddressListWhen(::httpmock::When);
16487 impl NetworkingLoopbackAddressListWhen {
16488 pub fn new(inner: ::httpmock::When) -> Self {
16489 Self(inner.method(::httpmock::Method::GET).path_matches(
16490 regex::Regex::new("^/v1/system/networking/loopback-address$").unwrap(),
16491 ))
16492 }
16493
16494 pub fn into_inner(self) -> ::httpmock::When {
16495 self.0
16496 }
16497
16498 pub fn limit<T>(self, value: T) -> Self
16499 where
16500 T: Into<Option<::std::num::NonZeroU32>>,
16501 {
16502 if let Some(value) = value.into() {
16503 Self(self.0.query_param("limit", value.to_string()))
16504 } else {
16505 Self(self.0.query_param_missing("limit"))
16506 }
16507 }
16508
16509 pub fn page_token<'a, T>(self, value: T) -> Self
16510 where
16511 T: Into<Option<&'a str>>,
16512 {
16513 if let Some(value) = value.into() {
16514 Self(self.0.query_param("page_token", value.to_string()))
16515 } else {
16516 Self(self.0.query_param_missing("page_token"))
16517 }
16518 }
16519
16520 pub fn sort_by<T>(self, value: T) -> Self
16521 where
16522 T: Into<Option<types::IdSortMode>>,
16523 {
16524 if let Some(value) = value.into() {
16525 Self(self.0.query_param("sort_by", value.to_string()))
16526 } else {
16527 Self(self.0.query_param_missing("sort_by"))
16528 }
16529 }
16530 }
16531
16532 pub struct NetworkingLoopbackAddressListThen(::httpmock::Then);
16533 impl NetworkingLoopbackAddressListThen {
16534 pub fn new(inner: ::httpmock::Then) -> Self {
16535 Self(inner)
16536 }
16537
16538 pub fn into_inner(self) -> ::httpmock::Then {
16539 self.0
16540 }
16541
16542 pub fn ok(self, value: &types::LoopbackAddressResultsPage) -> Self {
16543 Self(
16544 self.0
16545 .status(200u16)
16546 .header("content-type", "application/json")
16547 .json_body_obj(value),
16548 )
16549 }
16550
16551 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
16552 assert_eq!(status / 100u16, 4u16);
16553 Self(
16554 self.0
16555 .status(status)
16556 .header("content-type", "application/json")
16557 .json_body_obj(value),
16558 )
16559 }
16560
16561 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
16562 assert_eq!(status / 100u16, 5u16);
16563 Self(
16564 self.0
16565 .status(status)
16566 .header("content-type", "application/json")
16567 .json_body_obj(value),
16568 )
16569 }
16570 }
16571
16572 pub struct NetworkingLoopbackAddressCreateWhen(::httpmock::When);
16573 impl NetworkingLoopbackAddressCreateWhen {
16574 pub fn new(inner: ::httpmock::When) -> Self {
16575 Self(inner.method(::httpmock::Method::POST).path_matches(
16576 regex::Regex::new("^/v1/system/networking/loopback-address$").unwrap(),
16577 ))
16578 }
16579
16580 pub fn into_inner(self) -> ::httpmock::When {
16581 self.0
16582 }
16583
16584 pub fn body(self, value: &types::LoopbackAddressCreate) -> Self {
16585 Self(self.0.json_body_obj(value))
16586 }
16587 }
16588
16589 pub struct NetworkingLoopbackAddressCreateThen(::httpmock::Then);
16590 impl NetworkingLoopbackAddressCreateThen {
16591 pub fn new(inner: ::httpmock::Then) -> Self {
16592 Self(inner)
16593 }
16594
16595 pub fn into_inner(self) -> ::httpmock::Then {
16596 self.0
16597 }
16598
16599 pub fn created(self, value: &types::LoopbackAddress) -> Self {
16600 Self(
16601 self.0
16602 .status(201u16)
16603 .header("content-type", "application/json")
16604 .json_body_obj(value),
16605 )
16606 }
16607
16608 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
16609 assert_eq!(status / 100u16, 4u16);
16610 Self(
16611 self.0
16612 .status(status)
16613 .header("content-type", "application/json")
16614 .json_body_obj(value),
16615 )
16616 }
16617
16618 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
16619 assert_eq!(status / 100u16, 5u16);
16620 Self(
16621 self.0
16622 .status(status)
16623 .header("content-type", "application/json")
16624 .json_body_obj(value),
16625 )
16626 }
16627 }
16628
16629 pub struct NetworkingLoopbackAddressDeleteWhen(::httpmock::When);
16630 impl NetworkingLoopbackAddressDeleteWhen {
16631 pub fn new(inner: ::httpmock::When) -> Self {
16632 Self(
16633 inner.method(::httpmock::Method::DELETE).path_matches(
16634 regex::Regex::new(
16635 "^/v1/system/networking/loopback-address/[^/]*/[^/]*/[^/]*/[^/]*$",
16636 )
16637 .unwrap(),
16638 ),
16639 )
16640 }
16641
16642 pub fn into_inner(self) -> ::httpmock::When {
16643 self.0
16644 }
16645
16646 pub fn rack_id(self, value: &::uuid::Uuid) -> Self {
16647 let re = regex::Regex::new(&format!(
16648 "^/v1/system/networking/loopback-address/{}/.*/.*/.*$",
16649 value.to_string()
16650 ))
16651 .unwrap();
16652 Self(self.0.path_matches(re))
16653 }
16654
16655 pub fn switch_location(self, value: &types::Name) -> Self {
16656 let re = regex::Regex::new(&format!(
16657 "^/v1/system/networking/loopback-address/.*/{}/.*/.*$",
16658 value.to_string()
16659 ))
16660 .unwrap();
16661 Self(self.0.path_matches(re))
16662 }
16663
16664 pub fn address(self, value: &::std::net::IpAddr) -> Self {
16665 let re = regex::Regex::new(&format!(
16666 "^/v1/system/networking/loopback-address/.*/.*/{}/.*$",
16667 value.to_string()
16668 ))
16669 .unwrap();
16670 Self(self.0.path_matches(re))
16671 }
16672
16673 pub fn subnet_mask(self, value: u8) -> Self {
16674 let re = regex::Regex::new(&format!(
16675 "^/v1/system/networking/loopback-address/.*/.*/.*/{}$",
16676 value.to_string()
16677 ))
16678 .unwrap();
16679 Self(self.0.path_matches(re))
16680 }
16681 }
16682
16683 pub struct NetworkingLoopbackAddressDeleteThen(::httpmock::Then);
16684 impl NetworkingLoopbackAddressDeleteThen {
16685 pub fn new(inner: ::httpmock::Then) -> Self {
16686 Self(inner)
16687 }
16688
16689 pub fn into_inner(self) -> ::httpmock::Then {
16690 self.0
16691 }
16692
16693 pub fn no_content(self) -> Self {
16694 Self(self.0.status(204u16))
16695 }
16696
16697 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
16698 assert_eq!(status / 100u16, 4u16);
16699 Self(
16700 self.0
16701 .status(status)
16702 .header("content-type", "application/json")
16703 .json_body_obj(value),
16704 )
16705 }
16706
16707 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
16708 assert_eq!(status / 100u16, 5u16);
16709 Self(
16710 self.0
16711 .status(status)
16712 .header("content-type", "application/json")
16713 .json_body_obj(value),
16714 )
16715 }
16716 }
16717
16718 pub struct NetworkingSwitchPortSettingsListWhen(::httpmock::When);
16719 impl NetworkingSwitchPortSettingsListWhen {
16720 pub fn new(inner: ::httpmock::When) -> Self {
16721 Self(inner.method(::httpmock::Method::GET).path_matches(
16722 regex::Regex::new("^/v1/system/networking/switch-port-settings$").unwrap(),
16723 ))
16724 }
16725
16726 pub fn into_inner(self) -> ::httpmock::When {
16727 self.0
16728 }
16729
16730 pub fn limit<T>(self, value: T) -> Self
16731 where
16732 T: Into<Option<::std::num::NonZeroU32>>,
16733 {
16734 if let Some(value) = value.into() {
16735 Self(self.0.query_param("limit", value.to_string()))
16736 } else {
16737 Self(self.0.query_param_missing("limit"))
16738 }
16739 }
16740
16741 pub fn page_token<'a, T>(self, value: T) -> Self
16742 where
16743 T: Into<Option<&'a str>>,
16744 {
16745 if let Some(value) = value.into() {
16746 Self(self.0.query_param("page_token", value.to_string()))
16747 } else {
16748 Self(self.0.query_param_missing("page_token"))
16749 }
16750 }
16751
16752 pub fn port_settings<'a, T>(self, value: T) -> Self
16753 where
16754 T: Into<Option<&'a types::NameOrId>>,
16755 {
16756 if let Some(value) = value.into() {
16757 Self(self.0.query_param("port_settings", value.to_string()))
16758 } else {
16759 Self(self.0.query_param_missing("port_settings"))
16760 }
16761 }
16762
16763 pub fn sort_by<T>(self, value: T) -> Self
16764 where
16765 T: Into<Option<types::NameOrIdSortMode>>,
16766 {
16767 if let Some(value) = value.into() {
16768 Self(self.0.query_param("sort_by", value.to_string()))
16769 } else {
16770 Self(self.0.query_param_missing("sort_by"))
16771 }
16772 }
16773 }
16774
16775 pub struct NetworkingSwitchPortSettingsListThen(::httpmock::Then);
16776 impl NetworkingSwitchPortSettingsListThen {
16777 pub fn new(inner: ::httpmock::Then) -> Self {
16778 Self(inner)
16779 }
16780
16781 pub fn into_inner(self) -> ::httpmock::Then {
16782 self.0
16783 }
16784
16785 pub fn ok(self, value: &types::SwitchPortSettingsIdentityResultsPage) -> Self {
16786 Self(
16787 self.0
16788 .status(200u16)
16789 .header("content-type", "application/json")
16790 .json_body_obj(value),
16791 )
16792 }
16793
16794 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
16795 assert_eq!(status / 100u16, 4u16);
16796 Self(
16797 self.0
16798 .status(status)
16799 .header("content-type", "application/json")
16800 .json_body_obj(value),
16801 )
16802 }
16803
16804 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
16805 assert_eq!(status / 100u16, 5u16);
16806 Self(
16807 self.0
16808 .status(status)
16809 .header("content-type", "application/json")
16810 .json_body_obj(value),
16811 )
16812 }
16813 }
16814
16815 pub struct NetworkingSwitchPortSettingsCreateWhen(::httpmock::When);
16816 impl NetworkingSwitchPortSettingsCreateWhen {
16817 pub fn new(inner: ::httpmock::When) -> Self {
16818 Self(inner.method(::httpmock::Method::POST).path_matches(
16819 regex::Regex::new("^/v1/system/networking/switch-port-settings$").unwrap(),
16820 ))
16821 }
16822
16823 pub fn into_inner(self) -> ::httpmock::When {
16824 self.0
16825 }
16826
16827 pub fn body(self, value: &types::SwitchPortSettingsCreate) -> Self {
16828 Self(self.0.json_body_obj(value))
16829 }
16830 }
16831
16832 pub struct NetworkingSwitchPortSettingsCreateThen(::httpmock::Then);
16833 impl NetworkingSwitchPortSettingsCreateThen {
16834 pub fn new(inner: ::httpmock::Then) -> Self {
16835 Self(inner)
16836 }
16837
16838 pub fn into_inner(self) -> ::httpmock::Then {
16839 self.0
16840 }
16841
16842 pub fn created(self, value: &types::SwitchPortSettings) -> Self {
16843 Self(
16844 self.0
16845 .status(201u16)
16846 .header("content-type", "application/json")
16847 .json_body_obj(value),
16848 )
16849 }
16850
16851 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
16852 assert_eq!(status / 100u16, 4u16);
16853 Self(
16854 self.0
16855 .status(status)
16856 .header("content-type", "application/json")
16857 .json_body_obj(value),
16858 )
16859 }
16860
16861 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
16862 assert_eq!(status / 100u16, 5u16);
16863 Self(
16864 self.0
16865 .status(status)
16866 .header("content-type", "application/json")
16867 .json_body_obj(value),
16868 )
16869 }
16870 }
16871
16872 pub struct NetworkingSwitchPortSettingsDeleteWhen(::httpmock::When);
16873 impl NetworkingSwitchPortSettingsDeleteWhen {
16874 pub fn new(inner: ::httpmock::When) -> Self {
16875 Self(inner.method(::httpmock::Method::DELETE).path_matches(
16876 regex::Regex::new("^/v1/system/networking/switch-port-settings$").unwrap(),
16877 ))
16878 }
16879
16880 pub fn into_inner(self) -> ::httpmock::When {
16881 self.0
16882 }
16883
16884 pub fn port_settings<'a, T>(self, value: T) -> Self
16885 where
16886 T: Into<Option<&'a types::NameOrId>>,
16887 {
16888 if let Some(value) = value.into() {
16889 Self(self.0.query_param("port_settings", value.to_string()))
16890 } else {
16891 Self(self.0.query_param_missing("port_settings"))
16892 }
16893 }
16894 }
16895
16896 pub struct NetworkingSwitchPortSettingsDeleteThen(::httpmock::Then);
16897 impl NetworkingSwitchPortSettingsDeleteThen {
16898 pub fn new(inner: ::httpmock::Then) -> Self {
16899 Self(inner)
16900 }
16901
16902 pub fn into_inner(self) -> ::httpmock::Then {
16903 self.0
16904 }
16905
16906 pub fn no_content(self) -> Self {
16907 Self(self.0.status(204u16))
16908 }
16909
16910 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
16911 assert_eq!(status / 100u16, 4u16);
16912 Self(
16913 self.0
16914 .status(status)
16915 .header("content-type", "application/json")
16916 .json_body_obj(value),
16917 )
16918 }
16919
16920 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
16921 assert_eq!(status / 100u16, 5u16);
16922 Self(
16923 self.0
16924 .status(status)
16925 .header("content-type", "application/json")
16926 .json_body_obj(value),
16927 )
16928 }
16929 }
16930
16931 pub struct NetworkingSwitchPortSettingsViewWhen(::httpmock::When);
16932 impl NetworkingSwitchPortSettingsViewWhen {
16933 pub fn new(inner: ::httpmock::When) -> Self {
16934 Self(inner.method(::httpmock::Method::GET).path_matches(
16935 regex::Regex::new("^/v1/system/networking/switch-port-settings/[^/]*$").unwrap(),
16936 ))
16937 }
16938
16939 pub fn into_inner(self) -> ::httpmock::When {
16940 self.0
16941 }
16942
16943 pub fn port(self, value: &types::NameOrId) -> Self {
16944 let re = regex::Regex::new(&format!(
16945 "^/v1/system/networking/switch-port-settings/{}$",
16946 value.to_string()
16947 ))
16948 .unwrap();
16949 Self(self.0.path_matches(re))
16950 }
16951 }
16952
16953 pub struct NetworkingSwitchPortSettingsViewThen(::httpmock::Then);
16954 impl NetworkingSwitchPortSettingsViewThen {
16955 pub fn new(inner: ::httpmock::Then) -> Self {
16956 Self(inner)
16957 }
16958
16959 pub fn into_inner(self) -> ::httpmock::Then {
16960 self.0
16961 }
16962
16963 pub fn ok(self, value: &types::SwitchPortSettings) -> Self {
16964 Self(
16965 self.0
16966 .status(200u16)
16967 .header("content-type", "application/json")
16968 .json_body_obj(value),
16969 )
16970 }
16971
16972 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
16973 assert_eq!(status / 100u16, 4u16);
16974 Self(
16975 self.0
16976 .status(status)
16977 .header("content-type", "application/json")
16978 .json_body_obj(value),
16979 )
16980 }
16981
16982 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
16983 assert_eq!(status / 100u16, 5u16);
16984 Self(
16985 self.0
16986 .status(status)
16987 .header("content-type", "application/json")
16988 .json_body_obj(value),
16989 )
16990 }
16991 }
16992
16993 pub struct SystemPolicyViewWhen(::httpmock::When);
16994 impl SystemPolicyViewWhen {
16995 pub fn new(inner: ::httpmock::When) -> Self {
16996 Self(
16997 inner
16998 .method(::httpmock::Method::GET)
16999 .path_matches(regex::Regex::new("^/v1/system/policy$").unwrap()),
17000 )
17001 }
17002
17003 pub fn into_inner(self) -> ::httpmock::When {
17004 self.0
17005 }
17006 }
17007
17008 pub struct SystemPolicyViewThen(::httpmock::Then);
17009 impl SystemPolicyViewThen {
17010 pub fn new(inner: ::httpmock::Then) -> Self {
17011 Self(inner)
17012 }
17013
17014 pub fn into_inner(self) -> ::httpmock::Then {
17015 self.0
17016 }
17017
17018 pub fn ok(self, value: &types::FleetRolePolicy) -> Self {
17019 Self(
17020 self.0
17021 .status(200u16)
17022 .header("content-type", "application/json")
17023 .json_body_obj(value),
17024 )
17025 }
17026
17027 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
17028 assert_eq!(status / 100u16, 4u16);
17029 Self(
17030 self.0
17031 .status(status)
17032 .header("content-type", "application/json")
17033 .json_body_obj(value),
17034 )
17035 }
17036
17037 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
17038 assert_eq!(status / 100u16, 5u16);
17039 Self(
17040 self.0
17041 .status(status)
17042 .header("content-type", "application/json")
17043 .json_body_obj(value),
17044 )
17045 }
17046 }
17047
17048 pub struct SystemPolicyUpdateWhen(::httpmock::When);
17049 impl SystemPolicyUpdateWhen {
17050 pub fn new(inner: ::httpmock::When) -> Self {
17051 Self(
17052 inner
17053 .method(::httpmock::Method::PUT)
17054 .path_matches(regex::Regex::new("^/v1/system/policy$").unwrap()),
17055 )
17056 }
17057
17058 pub fn into_inner(self) -> ::httpmock::When {
17059 self.0
17060 }
17061
17062 pub fn body(self, value: &types::FleetRolePolicy) -> Self {
17063 Self(self.0.json_body_obj(value))
17064 }
17065 }
17066
17067 pub struct SystemPolicyUpdateThen(::httpmock::Then);
17068 impl SystemPolicyUpdateThen {
17069 pub fn new(inner: ::httpmock::Then) -> Self {
17070 Self(inner)
17071 }
17072
17073 pub fn into_inner(self) -> ::httpmock::Then {
17074 self.0
17075 }
17076
17077 pub fn ok(self, value: &types::FleetRolePolicy) -> Self {
17078 Self(
17079 self.0
17080 .status(200u16)
17081 .header("content-type", "application/json")
17082 .json_body_obj(value),
17083 )
17084 }
17085
17086 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
17087 assert_eq!(status / 100u16, 4u16);
17088 Self(
17089 self.0
17090 .status(status)
17091 .header("content-type", "application/json")
17092 .json_body_obj(value),
17093 )
17094 }
17095
17096 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
17097 assert_eq!(status / 100u16, 5u16);
17098 Self(
17099 self.0
17100 .status(status)
17101 .header("content-type", "application/json")
17102 .json_body_obj(value),
17103 )
17104 }
17105 }
17106
17107 pub struct ScimTokenListWhen(::httpmock::When);
17108 impl ScimTokenListWhen {
17109 pub fn new(inner: ::httpmock::When) -> Self {
17110 Self(
17111 inner
17112 .method(::httpmock::Method::GET)
17113 .path_matches(regex::Regex::new("^/v1/system/scim/tokens$").unwrap()),
17114 )
17115 }
17116
17117 pub fn into_inner(self) -> ::httpmock::When {
17118 self.0
17119 }
17120
17121 pub fn silo(self, value: &types::NameOrId) -> Self {
17122 Self(self.0.query_param("silo", value.to_string()))
17123 }
17124 }
17125
17126 pub struct ScimTokenListThen(::httpmock::Then);
17127 impl ScimTokenListThen {
17128 pub fn new(inner: ::httpmock::Then) -> Self {
17129 Self(inner)
17130 }
17131
17132 pub fn into_inner(self) -> ::httpmock::Then {
17133 self.0
17134 }
17135
17136 pub fn ok(self, value: &::std::vec::Vec<types::ScimClientBearerToken>) -> Self {
17137 Self(
17138 self.0
17139 .status(200u16)
17140 .header("content-type", "application/json")
17141 .json_body_obj(value),
17142 )
17143 }
17144
17145 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
17146 assert_eq!(status / 100u16, 4u16);
17147 Self(
17148 self.0
17149 .status(status)
17150 .header("content-type", "application/json")
17151 .json_body_obj(value),
17152 )
17153 }
17154
17155 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
17156 assert_eq!(status / 100u16, 5u16);
17157 Self(
17158 self.0
17159 .status(status)
17160 .header("content-type", "application/json")
17161 .json_body_obj(value),
17162 )
17163 }
17164 }
17165
17166 pub struct ScimTokenCreateWhen(::httpmock::When);
17167 impl ScimTokenCreateWhen {
17168 pub fn new(inner: ::httpmock::When) -> Self {
17169 Self(
17170 inner
17171 .method(::httpmock::Method::POST)
17172 .path_matches(regex::Regex::new("^/v1/system/scim/tokens$").unwrap()),
17173 )
17174 }
17175
17176 pub fn into_inner(self) -> ::httpmock::When {
17177 self.0
17178 }
17179
17180 pub fn silo(self, value: &types::NameOrId) -> Self {
17181 Self(self.0.query_param("silo", value.to_string()))
17182 }
17183 }
17184
17185 pub struct ScimTokenCreateThen(::httpmock::Then);
17186 impl ScimTokenCreateThen {
17187 pub fn new(inner: ::httpmock::Then) -> Self {
17188 Self(inner)
17189 }
17190
17191 pub fn into_inner(self) -> ::httpmock::Then {
17192 self.0
17193 }
17194
17195 pub fn created(self, value: &types::ScimClientBearerTokenValue) -> Self {
17196 Self(
17197 self.0
17198 .status(201u16)
17199 .header("content-type", "application/json")
17200 .json_body_obj(value),
17201 )
17202 }
17203
17204 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
17205 assert_eq!(status / 100u16, 4u16);
17206 Self(
17207 self.0
17208 .status(status)
17209 .header("content-type", "application/json")
17210 .json_body_obj(value),
17211 )
17212 }
17213
17214 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
17215 assert_eq!(status / 100u16, 5u16);
17216 Self(
17217 self.0
17218 .status(status)
17219 .header("content-type", "application/json")
17220 .json_body_obj(value),
17221 )
17222 }
17223 }
17224
17225 pub struct ScimTokenViewWhen(::httpmock::When);
17226 impl ScimTokenViewWhen {
17227 pub fn new(inner: ::httpmock::When) -> Self {
17228 Self(
17229 inner
17230 .method(::httpmock::Method::GET)
17231 .path_matches(regex::Regex::new("^/v1/system/scim/tokens/[^/]*$").unwrap()),
17232 )
17233 }
17234
17235 pub fn into_inner(self) -> ::httpmock::When {
17236 self.0
17237 }
17238
17239 pub fn token_id(self, value: &::uuid::Uuid) -> Self {
17240 let re = regex::Regex::new(&format!("^/v1/system/scim/tokens/{}$", value.to_string()))
17241 .unwrap();
17242 Self(self.0.path_matches(re))
17243 }
17244
17245 pub fn silo(self, value: &types::NameOrId) -> Self {
17246 Self(self.0.query_param("silo", value.to_string()))
17247 }
17248 }
17249
17250 pub struct ScimTokenViewThen(::httpmock::Then);
17251 impl ScimTokenViewThen {
17252 pub fn new(inner: ::httpmock::Then) -> Self {
17253 Self(inner)
17254 }
17255
17256 pub fn into_inner(self) -> ::httpmock::Then {
17257 self.0
17258 }
17259
17260 pub fn ok(self, value: &types::ScimClientBearerToken) -> Self {
17261 Self(
17262 self.0
17263 .status(200u16)
17264 .header("content-type", "application/json")
17265 .json_body_obj(value),
17266 )
17267 }
17268
17269 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
17270 assert_eq!(status / 100u16, 4u16);
17271 Self(
17272 self.0
17273 .status(status)
17274 .header("content-type", "application/json")
17275 .json_body_obj(value),
17276 )
17277 }
17278
17279 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
17280 assert_eq!(status / 100u16, 5u16);
17281 Self(
17282 self.0
17283 .status(status)
17284 .header("content-type", "application/json")
17285 .json_body_obj(value),
17286 )
17287 }
17288 }
17289
17290 pub struct ScimTokenDeleteWhen(::httpmock::When);
17291 impl ScimTokenDeleteWhen {
17292 pub fn new(inner: ::httpmock::When) -> Self {
17293 Self(
17294 inner
17295 .method(::httpmock::Method::DELETE)
17296 .path_matches(regex::Regex::new("^/v1/system/scim/tokens/[^/]*$").unwrap()),
17297 )
17298 }
17299
17300 pub fn into_inner(self) -> ::httpmock::When {
17301 self.0
17302 }
17303
17304 pub fn token_id(self, value: &::uuid::Uuid) -> Self {
17305 let re = regex::Regex::new(&format!("^/v1/system/scim/tokens/{}$", value.to_string()))
17306 .unwrap();
17307 Self(self.0.path_matches(re))
17308 }
17309
17310 pub fn silo(self, value: &types::NameOrId) -> Self {
17311 Self(self.0.query_param("silo", value.to_string()))
17312 }
17313 }
17314
17315 pub struct ScimTokenDeleteThen(::httpmock::Then);
17316 impl ScimTokenDeleteThen {
17317 pub fn new(inner: ::httpmock::Then) -> Self {
17318 Self(inner)
17319 }
17320
17321 pub fn into_inner(self) -> ::httpmock::Then {
17322 self.0
17323 }
17324
17325 pub fn no_content(self) -> Self {
17326 Self(self.0.status(204u16))
17327 }
17328
17329 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
17330 assert_eq!(status / 100u16, 4u16);
17331 Self(
17332 self.0
17333 .status(status)
17334 .header("content-type", "application/json")
17335 .json_body_obj(value),
17336 )
17337 }
17338
17339 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
17340 assert_eq!(status / 100u16, 5u16);
17341 Self(
17342 self.0
17343 .status(status)
17344 .header("content-type", "application/json")
17345 .json_body_obj(value),
17346 )
17347 }
17348 }
17349
17350 pub struct SystemQuotasListWhen(::httpmock::When);
17351 impl SystemQuotasListWhen {
17352 pub fn new(inner: ::httpmock::When) -> Self {
17353 Self(
17354 inner
17355 .method(::httpmock::Method::GET)
17356 .path_matches(regex::Regex::new("^/v1/system/silo-quotas$").unwrap()),
17357 )
17358 }
17359
17360 pub fn into_inner(self) -> ::httpmock::When {
17361 self.0
17362 }
17363
17364 pub fn limit<T>(self, value: T) -> Self
17365 where
17366 T: Into<Option<::std::num::NonZeroU32>>,
17367 {
17368 if let Some(value) = value.into() {
17369 Self(self.0.query_param("limit", value.to_string()))
17370 } else {
17371 Self(self.0.query_param_missing("limit"))
17372 }
17373 }
17374
17375 pub fn page_token<'a, T>(self, value: T) -> Self
17376 where
17377 T: Into<Option<&'a str>>,
17378 {
17379 if let Some(value) = value.into() {
17380 Self(self.0.query_param("page_token", value.to_string()))
17381 } else {
17382 Self(self.0.query_param_missing("page_token"))
17383 }
17384 }
17385
17386 pub fn sort_by<T>(self, value: T) -> Self
17387 where
17388 T: Into<Option<types::IdSortMode>>,
17389 {
17390 if let Some(value) = value.into() {
17391 Self(self.0.query_param("sort_by", value.to_string()))
17392 } else {
17393 Self(self.0.query_param_missing("sort_by"))
17394 }
17395 }
17396 }
17397
17398 pub struct SystemQuotasListThen(::httpmock::Then);
17399 impl SystemQuotasListThen {
17400 pub fn new(inner: ::httpmock::Then) -> Self {
17401 Self(inner)
17402 }
17403
17404 pub fn into_inner(self) -> ::httpmock::Then {
17405 self.0
17406 }
17407
17408 pub fn ok(self, value: &types::SiloQuotasResultsPage) -> Self {
17409 Self(
17410 self.0
17411 .status(200u16)
17412 .header("content-type", "application/json")
17413 .json_body_obj(value),
17414 )
17415 }
17416
17417 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
17418 assert_eq!(status / 100u16, 4u16);
17419 Self(
17420 self.0
17421 .status(status)
17422 .header("content-type", "application/json")
17423 .json_body_obj(value),
17424 )
17425 }
17426
17427 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
17428 assert_eq!(status / 100u16, 5u16);
17429 Self(
17430 self.0
17431 .status(status)
17432 .header("content-type", "application/json")
17433 .json_body_obj(value),
17434 )
17435 }
17436 }
17437
17438 pub struct SiloListWhen(::httpmock::When);
17439 impl SiloListWhen {
17440 pub fn new(inner: ::httpmock::When) -> Self {
17441 Self(
17442 inner
17443 .method(::httpmock::Method::GET)
17444 .path_matches(regex::Regex::new("^/v1/system/silos$").unwrap()),
17445 )
17446 }
17447
17448 pub fn into_inner(self) -> ::httpmock::When {
17449 self.0
17450 }
17451
17452 pub fn limit<T>(self, value: T) -> Self
17453 where
17454 T: Into<Option<::std::num::NonZeroU32>>,
17455 {
17456 if let Some(value) = value.into() {
17457 Self(self.0.query_param("limit", value.to_string()))
17458 } else {
17459 Self(self.0.query_param_missing("limit"))
17460 }
17461 }
17462
17463 pub fn page_token<'a, T>(self, value: T) -> Self
17464 where
17465 T: Into<Option<&'a str>>,
17466 {
17467 if let Some(value) = value.into() {
17468 Self(self.0.query_param("page_token", value.to_string()))
17469 } else {
17470 Self(self.0.query_param_missing("page_token"))
17471 }
17472 }
17473
17474 pub fn sort_by<T>(self, value: T) -> Self
17475 where
17476 T: Into<Option<types::NameOrIdSortMode>>,
17477 {
17478 if let Some(value) = value.into() {
17479 Self(self.0.query_param("sort_by", value.to_string()))
17480 } else {
17481 Self(self.0.query_param_missing("sort_by"))
17482 }
17483 }
17484 }
17485
17486 pub struct SiloListThen(::httpmock::Then);
17487 impl SiloListThen {
17488 pub fn new(inner: ::httpmock::Then) -> Self {
17489 Self(inner)
17490 }
17491
17492 pub fn into_inner(self) -> ::httpmock::Then {
17493 self.0
17494 }
17495
17496 pub fn ok(self, value: &types::SiloResultsPage) -> Self {
17497 Self(
17498 self.0
17499 .status(200u16)
17500 .header("content-type", "application/json")
17501 .json_body_obj(value),
17502 )
17503 }
17504
17505 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
17506 assert_eq!(status / 100u16, 4u16);
17507 Self(
17508 self.0
17509 .status(status)
17510 .header("content-type", "application/json")
17511 .json_body_obj(value),
17512 )
17513 }
17514
17515 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
17516 assert_eq!(status / 100u16, 5u16);
17517 Self(
17518 self.0
17519 .status(status)
17520 .header("content-type", "application/json")
17521 .json_body_obj(value),
17522 )
17523 }
17524 }
17525
17526 pub struct SiloCreateWhen(::httpmock::When);
17527 impl SiloCreateWhen {
17528 pub fn new(inner: ::httpmock::When) -> Self {
17529 Self(
17530 inner
17531 .method(::httpmock::Method::POST)
17532 .path_matches(regex::Regex::new("^/v1/system/silos$").unwrap()),
17533 )
17534 }
17535
17536 pub fn into_inner(self) -> ::httpmock::When {
17537 self.0
17538 }
17539
17540 pub fn body(self, value: &types::SiloCreate) -> Self {
17541 Self(self.0.json_body_obj(value))
17542 }
17543 }
17544
17545 pub struct SiloCreateThen(::httpmock::Then);
17546 impl SiloCreateThen {
17547 pub fn new(inner: ::httpmock::Then) -> Self {
17548 Self(inner)
17549 }
17550
17551 pub fn into_inner(self) -> ::httpmock::Then {
17552 self.0
17553 }
17554
17555 pub fn created(self, value: &types::Silo) -> Self {
17556 Self(
17557 self.0
17558 .status(201u16)
17559 .header("content-type", "application/json")
17560 .json_body_obj(value),
17561 )
17562 }
17563
17564 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
17565 assert_eq!(status / 100u16, 4u16);
17566 Self(
17567 self.0
17568 .status(status)
17569 .header("content-type", "application/json")
17570 .json_body_obj(value),
17571 )
17572 }
17573
17574 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
17575 assert_eq!(status / 100u16, 5u16);
17576 Self(
17577 self.0
17578 .status(status)
17579 .header("content-type", "application/json")
17580 .json_body_obj(value),
17581 )
17582 }
17583 }
17584
17585 pub struct SiloViewWhen(::httpmock::When);
17586 impl SiloViewWhen {
17587 pub fn new(inner: ::httpmock::When) -> Self {
17588 Self(
17589 inner
17590 .method(::httpmock::Method::GET)
17591 .path_matches(regex::Regex::new("^/v1/system/silos/[^/]*$").unwrap()),
17592 )
17593 }
17594
17595 pub fn into_inner(self) -> ::httpmock::When {
17596 self.0
17597 }
17598
17599 pub fn silo(self, value: &types::NameOrId) -> Self {
17600 let re =
17601 regex::Regex::new(&format!("^/v1/system/silos/{}$", value.to_string())).unwrap();
17602 Self(self.0.path_matches(re))
17603 }
17604 }
17605
17606 pub struct SiloViewThen(::httpmock::Then);
17607 impl SiloViewThen {
17608 pub fn new(inner: ::httpmock::Then) -> Self {
17609 Self(inner)
17610 }
17611
17612 pub fn into_inner(self) -> ::httpmock::Then {
17613 self.0
17614 }
17615
17616 pub fn ok(self, value: &types::Silo) -> Self {
17617 Self(
17618 self.0
17619 .status(200u16)
17620 .header("content-type", "application/json")
17621 .json_body_obj(value),
17622 )
17623 }
17624
17625 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
17626 assert_eq!(status / 100u16, 4u16);
17627 Self(
17628 self.0
17629 .status(status)
17630 .header("content-type", "application/json")
17631 .json_body_obj(value),
17632 )
17633 }
17634
17635 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
17636 assert_eq!(status / 100u16, 5u16);
17637 Self(
17638 self.0
17639 .status(status)
17640 .header("content-type", "application/json")
17641 .json_body_obj(value),
17642 )
17643 }
17644 }
17645
17646 pub struct SiloDeleteWhen(::httpmock::When);
17647 impl SiloDeleteWhen {
17648 pub fn new(inner: ::httpmock::When) -> Self {
17649 Self(
17650 inner
17651 .method(::httpmock::Method::DELETE)
17652 .path_matches(regex::Regex::new("^/v1/system/silos/[^/]*$").unwrap()),
17653 )
17654 }
17655
17656 pub fn into_inner(self) -> ::httpmock::When {
17657 self.0
17658 }
17659
17660 pub fn silo(self, value: &types::NameOrId) -> Self {
17661 let re =
17662 regex::Regex::new(&format!("^/v1/system/silos/{}$", value.to_string())).unwrap();
17663 Self(self.0.path_matches(re))
17664 }
17665 }
17666
17667 pub struct SiloDeleteThen(::httpmock::Then);
17668 impl SiloDeleteThen {
17669 pub fn new(inner: ::httpmock::Then) -> Self {
17670 Self(inner)
17671 }
17672
17673 pub fn into_inner(self) -> ::httpmock::Then {
17674 self.0
17675 }
17676
17677 pub fn no_content(self) -> Self {
17678 Self(self.0.status(204u16))
17679 }
17680
17681 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
17682 assert_eq!(status / 100u16, 4u16);
17683 Self(
17684 self.0
17685 .status(status)
17686 .header("content-type", "application/json")
17687 .json_body_obj(value),
17688 )
17689 }
17690
17691 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
17692 assert_eq!(status / 100u16, 5u16);
17693 Self(
17694 self.0
17695 .status(status)
17696 .header("content-type", "application/json")
17697 .json_body_obj(value),
17698 )
17699 }
17700 }
17701
17702 pub struct SiloIpPoolListWhen(::httpmock::When);
17703 impl SiloIpPoolListWhen {
17704 pub fn new(inner: ::httpmock::When) -> Self {
17705 Self(
17706 inner
17707 .method(::httpmock::Method::GET)
17708 .path_matches(regex::Regex::new("^/v1/system/silos/[^/]*/ip-pools$").unwrap()),
17709 )
17710 }
17711
17712 pub fn into_inner(self) -> ::httpmock::When {
17713 self.0
17714 }
17715
17716 pub fn silo(self, value: &types::NameOrId) -> Self {
17717 let re = regex::Regex::new(&format!(
17718 "^/v1/system/silos/{}/ip-pools$",
17719 value.to_string()
17720 ))
17721 .unwrap();
17722 Self(self.0.path_matches(re))
17723 }
17724
17725 pub fn limit<T>(self, value: T) -> Self
17726 where
17727 T: Into<Option<::std::num::NonZeroU32>>,
17728 {
17729 if let Some(value) = value.into() {
17730 Self(self.0.query_param("limit", value.to_string()))
17731 } else {
17732 Self(self.0.query_param_missing("limit"))
17733 }
17734 }
17735
17736 pub fn page_token<'a, T>(self, value: T) -> Self
17737 where
17738 T: Into<Option<&'a str>>,
17739 {
17740 if let Some(value) = value.into() {
17741 Self(self.0.query_param("page_token", value.to_string()))
17742 } else {
17743 Self(self.0.query_param_missing("page_token"))
17744 }
17745 }
17746
17747 pub fn sort_by<T>(self, value: T) -> Self
17748 where
17749 T: Into<Option<types::NameOrIdSortMode>>,
17750 {
17751 if let Some(value) = value.into() {
17752 Self(self.0.query_param("sort_by", value.to_string()))
17753 } else {
17754 Self(self.0.query_param_missing("sort_by"))
17755 }
17756 }
17757 }
17758
17759 pub struct SiloIpPoolListThen(::httpmock::Then);
17760 impl SiloIpPoolListThen {
17761 pub fn new(inner: ::httpmock::Then) -> Self {
17762 Self(inner)
17763 }
17764
17765 pub fn into_inner(self) -> ::httpmock::Then {
17766 self.0
17767 }
17768
17769 pub fn ok(self, value: &types::SiloIpPoolResultsPage) -> Self {
17770 Self(
17771 self.0
17772 .status(200u16)
17773 .header("content-type", "application/json")
17774 .json_body_obj(value),
17775 )
17776 }
17777
17778 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
17779 assert_eq!(status / 100u16, 4u16);
17780 Self(
17781 self.0
17782 .status(status)
17783 .header("content-type", "application/json")
17784 .json_body_obj(value),
17785 )
17786 }
17787
17788 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
17789 assert_eq!(status / 100u16, 5u16);
17790 Self(
17791 self.0
17792 .status(status)
17793 .header("content-type", "application/json")
17794 .json_body_obj(value),
17795 )
17796 }
17797 }
17798
17799 pub struct SiloPolicyViewWhen(::httpmock::When);
17800 impl SiloPolicyViewWhen {
17801 pub fn new(inner: ::httpmock::When) -> Self {
17802 Self(
17803 inner
17804 .method(::httpmock::Method::GET)
17805 .path_matches(regex::Regex::new("^/v1/system/silos/[^/]*/policy$").unwrap()),
17806 )
17807 }
17808
17809 pub fn into_inner(self) -> ::httpmock::When {
17810 self.0
17811 }
17812
17813 pub fn silo(self, value: &types::NameOrId) -> Self {
17814 let re = regex::Regex::new(&format!("^/v1/system/silos/{}/policy$", value.to_string()))
17815 .unwrap();
17816 Self(self.0.path_matches(re))
17817 }
17818 }
17819
17820 pub struct SiloPolicyViewThen(::httpmock::Then);
17821 impl SiloPolicyViewThen {
17822 pub fn new(inner: ::httpmock::Then) -> Self {
17823 Self(inner)
17824 }
17825
17826 pub fn into_inner(self) -> ::httpmock::Then {
17827 self.0
17828 }
17829
17830 pub fn ok(self, value: &types::SiloRolePolicy) -> Self {
17831 Self(
17832 self.0
17833 .status(200u16)
17834 .header("content-type", "application/json")
17835 .json_body_obj(value),
17836 )
17837 }
17838
17839 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
17840 assert_eq!(status / 100u16, 4u16);
17841 Self(
17842 self.0
17843 .status(status)
17844 .header("content-type", "application/json")
17845 .json_body_obj(value),
17846 )
17847 }
17848
17849 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
17850 assert_eq!(status / 100u16, 5u16);
17851 Self(
17852 self.0
17853 .status(status)
17854 .header("content-type", "application/json")
17855 .json_body_obj(value),
17856 )
17857 }
17858 }
17859
17860 pub struct SiloPolicyUpdateWhen(::httpmock::When);
17861 impl SiloPolicyUpdateWhen {
17862 pub fn new(inner: ::httpmock::When) -> Self {
17863 Self(
17864 inner
17865 .method(::httpmock::Method::PUT)
17866 .path_matches(regex::Regex::new("^/v1/system/silos/[^/]*/policy$").unwrap()),
17867 )
17868 }
17869
17870 pub fn into_inner(self) -> ::httpmock::When {
17871 self.0
17872 }
17873
17874 pub fn silo(self, value: &types::NameOrId) -> Self {
17875 let re = regex::Regex::new(&format!("^/v1/system/silos/{}/policy$", value.to_string()))
17876 .unwrap();
17877 Self(self.0.path_matches(re))
17878 }
17879
17880 pub fn body(self, value: &types::SiloRolePolicy) -> Self {
17881 Self(self.0.json_body_obj(value))
17882 }
17883 }
17884
17885 pub struct SiloPolicyUpdateThen(::httpmock::Then);
17886 impl SiloPolicyUpdateThen {
17887 pub fn new(inner: ::httpmock::Then) -> Self {
17888 Self(inner)
17889 }
17890
17891 pub fn into_inner(self) -> ::httpmock::Then {
17892 self.0
17893 }
17894
17895 pub fn ok(self, value: &types::SiloRolePolicy) -> Self {
17896 Self(
17897 self.0
17898 .status(200u16)
17899 .header("content-type", "application/json")
17900 .json_body_obj(value),
17901 )
17902 }
17903
17904 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
17905 assert_eq!(status / 100u16, 4u16);
17906 Self(
17907 self.0
17908 .status(status)
17909 .header("content-type", "application/json")
17910 .json_body_obj(value),
17911 )
17912 }
17913
17914 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
17915 assert_eq!(status / 100u16, 5u16);
17916 Self(
17917 self.0
17918 .status(status)
17919 .header("content-type", "application/json")
17920 .json_body_obj(value),
17921 )
17922 }
17923 }
17924
17925 pub struct SiloQuotasViewWhen(::httpmock::When);
17926 impl SiloQuotasViewWhen {
17927 pub fn new(inner: ::httpmock::When) -> Self {
17928 Self(
17929 inner
17930 .method(::httpmock::Method::GET)
17931 .path_matches(regex::Regex::new("^/v1/system/silos/[^/]*/quotas$").unwrap()),
17932 )
17933 }
17934
17935 pub fn into_inner(self) -> ::httpmock::When {
17936 self.0
17937 }
17938
17939 pub fn silo(self, value: &types::NameOrId) -> Self {
17940 let re = regex::Regex::new(&format!("^/v1/system/silos/{}/quotas$", value.to_string()))
17941 .unwrap();
17942 Self(self.0.path_matches(re))
17943 }
17944 }
17945
17946 pub struct SiloQuotasViewThen(::httpmock::Then);
17947 impl SiloQuotasViewThen {
17948 pub fn new(inner: ::httpmock::Then) -> Self {
17949 Self(inner)
17950 }
17951
17952 pub fn into_inner(self) -> ::httpmock::Then {
17953 self.0
17954 }
17955
17956 pub fn ok(self, value: &types::SiloQuotas) -> Self {
17957 Self(
17958 self.0
17959 .status(200u16)
17960 .header("content-type", "application/json")
17961 .json_body_obj(value),
17962 )
17963 }
17964
17965 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
17966 assert_eq!(status / 100u16, 4u16);
17967 Self(
17968 self.0
17969 .status(status)
17970 .header("content-type", "application/json")
17971 .json_body_obj(value),
17972 )
17973 }
17974
17975 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
17976 assert_eq!(status / 100u16, 5u16);
17977 Self(
17978 self.0
17979 .status(status)
17980 .header("content-type", "application/json")
17981 .json_body_obj(value),
17982 )
17983 }
17984 }
17985
17986 pub struct SiloQuotasUpdateWhen(::httpmock::When);
17987 impl SiloQuotasUpdateWhen {
17988 pub fn new(inner: ::httpmock::When) -> Self {
17989 Self(
17990 inner
17991 .method(::httpmock::Method::PUT)
17992 .path_matches(regex::Regex::new("^/v1/system/silos/[^/]*/quotas$").unwrap()),
17993 )
17994 }
17995
17996 pub fn into_inner(self) -> ::httpmock::When {
17997 self.0
17998 }
17999
18000 pub fn silo(self, value: &types::NameOrId) -> Self {
18001 let re = regex::Regex::new(&format!("^/v1/system/silos/{}/quotas$", value.to_string()))
18002 .unwrap();
18003 Self(self.0.path_matches(re))
18004 }
18005
18006 pub fn body(self, value: &types::SiloQuotasUpdate) -> Self {
18007 Self(self.0.json_body_obj(value))
18008 }
18009 }
18010
18011 pub struct SiloQuotasUpdateThen(::httpmock::Then);
18012 impl SiloQuotasUpdateThen {
18013 pub fn new(inner: ::httpmock::Then) -> Self {
18014 Self(inner)
18015 }
18016
18017 pub fn into_inner(self) -> ::httpmock::Then {
18018 self.0
18019 }
18020
18021 pub fn ok(self, value: &types::SiloQuotas) -> Self {
18022 Self(
18023 self.0
18024 .status(200u16)
18025 .header("content-type", "application/json")
18026 .json_body_obj(value),
18027 )
18028 }
18029
18030 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
18031 assert_eq!(status / 100u16, 4u16);
18032 Self(
18033 self.0
18034 .status(status)
18035 .header("content-type", "application/json")
18036 .json_body_obj(value),
18037 )
18038 }
18039
18040 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
18041 assert_eq!(status / 100u16, 5u16);
18042 Self(
18043 self.0
18044 .status(status)
18045 .header("content-type", "application/json")
18046 .json_body_obj(value),
18047 )
18048 }
18049 }
18050
18051 pub struct SiloSubnetPoolListWhen(::httpmock::When);
18052 impl SiloSubnetPoolListWhen {
18053 pub fn new(inner: ::httpmock::When) -> Self {
18054 Self(
18055 inner.method(::httpmock::Method::GET).path_matches(
18056 regex::Regex::new("^/v1/system/silos/[^/]*/subnet-pools$").unwrap(),
18057 ),
18058 )
18059 }
18060
18061 pub fn into_inner(self) -> ::httpmock::When {
18062 self.0
18063 }
18064
18065 pub fn silo(self, value: &types::NameOrId) -> Self {
18066 let re = regex::Regex::new(&format!(
18067 "^/v1/system/silos/{}/subnet-pools$",
18068 value.to_string()
18069 ))
18070 .unwrap();
18071 Self(self.0.path_matches(re))
18072 }
18073
18074 pub fn limit<T>(self, value: T) -> Self
18075 where
18076 T: Into<Option<::std::num::NonZeroU32>>,
18077 {
18078 if let Some(value) = value.into() {
18079 Self(self.0.query_param("limit", value.to_string()))
18080 } else {
18081 Self(self.0.query_param_missing("limit"))
18082 }
18083 }
18084
18085 pub fn page_token<'a, T>(self, value: T) -> Self
18086 where
18087 T: Into<Option<&'a str>>,
18088 {
18089 if let Some(value) = value.into() {
18090 Self(self.0.query_param("page_token", value.to_string()))
18091 } else {
18092 Self(self.0.query_param_missing("page_token"))
18093 }
18094 }
18095
18096 pub fn sort_by<T>(self, value: T) -> Self
18097 where
18098 T: Into<Option<types::NameOrIdSortMode>>,
18099 {
18100 if let Some(value) = value.into() {
18101 Self(self.0.query_param("sort_by", value.to_string()))
18102 } else {
18103 Self(self.0.query_param_missing("sort_by"))
18104 }
18105 }
18106 }
18107
18108 pub struct SiloSubnetPoolListThen(::httpmock::Then);
18109 impl SiloSubnetPoolListThen {
18110 pub fn new(inner: ::httpmock::Then) -> Self {
18111 Self(inner)
18112 }
18113
18114 pub fn into_inner(self) -> ::httpmock::Then {
18115 self.0
18116 }
18117
18118 pub fn ok(self, value: &types::SiloSubnetPoolResultsPage) -> Self {
18119 Self(
18120 self.0
18121 .status(200u16)
18122 .header("content-type", "application/json")
18123 .json_body_obj(value),
18124 )
18125 }
18126
18127 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
18128 assert_eq!(status / 100u16, 4u16);
18129 Self(
18130 self.0
18131 .status(status)
18132 .header("content-type", "application/json")
18133 .json_body_obj(value),
18134 )
18135 }
18136
18137 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
18138 assert_eq!(status / 100u16, 5u16);
18139 Self(
18140 self.0
18141 .status(status)
18142 .header("content-type", "application/json")
18143 .json_body_obj(value),
18144 )
18145 }
18146 }
18147
18148 pub struct SystemSubnetPoolListWhen(::httpmock::When);
18149 impl SystemSubnetPoolListWhen {
18150 pub fn new(inner: ::httpmock::When) -> Self {
18151 Self(
18152 inner
18153 .method(::httpmock::Method::GET)
18154 .path_matches(regex::Regex::new("^/v1/system/subnet-pools$").unwrap()),
18155 )
18156 }
18157
18158 pub fn into_inner(self) -> ::httpmock::When {
18159 self.0
18160 }
18161
18162 pub fn limit<T>(self, value: T) -> Self
18163 where
18164 T: Into<Option<::std::num::NonZeroU32>>,
18165 {
18166 if let Some(value) = value.into() {
18167 Self(self.0.query_param("limit", value.to_string()))
18168 } else {
18169 Self(self.0.query_param_missing("limit"))
18170 }
18171 }
18172
18173 pub fn page_token<'a, T>(self, value: T) -> Self
18174 where
18175 T: Into<Option<&'a str>>,
18176 {
18177 if let Some(value) = value.into() {
18178 Self(self.0.query_param("page_token", value.to_string()))
18179 } else {
18180 Self(self.0.query_param_missing("page_token"))
18181 }
18182 }
18183
18184 pub fn sort_by<T>(self, value: T) -> Self
18185 where
18186 T: Into<Option<types::NameOrIdSortMode>>,
18187 {
18188 if let Some(value) = value.into() {
18189 Self(self.0.query_param("sort_by", value.to_string()))
18190 } else {
18191 Self(self.0.query_param_missing("sort_by"))
18192 }
18193 }
18194 }
18195
18196 pub struct SystemSubnetPoolListThen(::httpmock::Then);
18197 impl SystemSubnetPoolListThen {
18198 pub fn new(inner: ::httpmock::Then) -> Self {
18199 Self(inner)
18200 }
18201
18202 pub fn into_inner(self) -> ::httpmock::Then {
18203 self.0
18204 }
18205
18206 pub fn ok(self, value: &types::SubnetPoolResultsPage) -> Self {
18207 Self(
18208 self.0
18209 .status(200u16)
18210 .header("content-type", "application/json")
18211 .json_body_obj(value),
18212 )
18213 }
18214
18215 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
18216 assert_eq!(status / 100u16, 4u16);
18217 Self(
18218 self.0
18219 .status(status)
18220 .header("content-type", "application/json")
18221 .json_body_obj(value),
18222 )
18223 }
18224
18225 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
18226 assert_eq!(status / 100u16, 5u16);
18227 Self(
18228 self.0
18229 .status(status)
18230 .header("content-type", "application/json")
18231 .json_body_obj(value),
18232 )
18233 }
18234 }
18235
18236 pub struct SystemSubnetPoolCreateWhen(::httpmock::When);
18237 impl SystemSubnetPoolCreateWhen {
18238 pub fn new(inner: ::httpmock::When) -> Self {
18239 Self(
18240 inner
18241 .method(::httpmock::Method::POST)
18242 .path_matches(regex::Regex::new("^/v1/system/subnet-pools$").unwrap()),
18243 )
18244 }
18245
18246 pub fn into_inner(self) -> ::httpmock::When {
18247 self.0
18248 }
18249
18250 pub fn body(self, value: &types::SubnetPoolCreate) -> Self {
18251 Self(self.0.json_body_obj(value))
18252 }
18253 }
18254
18255 pub struct SystemSubnetPoolCreateThen(::httpmock::Then);
18256 impl SystemSubnetPoolCreateThen {
18257 pub fn new(inner: ::httpmock::Then) -> Self {
18258 Self(inner)
18259 }
18260
18261 pub fn into_inner(self) -> ::httpmock::Then {
18262 self.0
18263 }
18264
18265 pub fn created(self, value: &types::SubnetPool) -> Self {
18266 Self(
18267 self.0
18268 .status(201u16)
18269 .header("content-type", "application/json")
18270 .json_body_obj(value),
18271 )
18272 }
18273
18274 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
18275 assert_eq!(status / 100u16, 4u16);
18276 Self(
18277 self.0
18278 .status(status)
18279 .header("content-type", "application/json")
18280 .json_body_obj(value),
18281 )
18282 }
18283
18284 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
18285 assert_eq!(status / 100u16, 5u16);
18286 Self(
18287 self.0
18288 .status(status)
18289 .header("content-type", "application/json")
18290 .json_body_obj(value),
18291 )
18292 }
18293 }
18294
18295 pub struct SystemSubnetPoolViewWhen(::httpmock::When);
18296 impl SystemSubnetPoolViewWhen {
18297 pub fn new(inner: ::httpmock::When) -> Self {
18298 Self(
18299 inner
18300 .method(::httpmock::Method::GET)
18301 .path_matches(regex::Regex::new("^/v1/system/subnet-pools/[^/]*$").unwrap()),
18302 )
18303 }
18304
18305 pub fn into_inner(self) -> ::httpmock::When {
18306 self.0
18307 }
18308
18309 pub fn pool(self, value: &types::NameOrId) -> Self {
18310 let re = regex::Regex::new(&format!("^/v1/system/subnet-pools/{}$", value.to_string()))
18311 .unwrap();
18312 Self(self.0.path_matches(re))
18313 }
18314 }
18315
18316 pub struct SystemSubnetPoolViewThen(::httpmock::Then);
18317 impl SystemSubnetPoolViewThen {
18318 pub fn new(inner: ::httpmock::Then) -> Self {
18319 Self(inner)
18320 }
18321
18322 pub fn into_inner(self) -> ::httpmock::Then {
18323 self.0
18324 }
18325
18326 pub fn ok(self, value: &types::SubnetPool) -> Self {
18327 Self(
18328 self.0
18329 .status(200u16)
18330 .header("content-type", "application/json")
18331 .json_body_obj(value),
18332 )
18333 }
18334
18335 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
18336 assert_eq!(status / 100u16, 4u16);
18337 Self(
18338 self.0
18339 .status(status)
18340 .header("content-type", "application/json")
18341 .json_body_obj(value),
18342 )
18343 }
18344
18345 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
18346 assert_eq!(status / 100u16, 5u16);
18347 Self(
18348 self.0
18349 .status(status)
18350 .header("content-type", "application/json")
18351 .json_body_obj(value),
18352 )
18353 }
18354 }
18355
18356 pub struct SystemSubnetPoolUpdateWhen(::httpmock::When);
18357 impl SystemSubnetPoolUpdateWhen {
18358 pub fn new(inner: ::httpmock::When) -> Self {
18359 Self(
18360 inner
18361 .method(::httpmock::Method::PUT)
18362 .path_matches(regex::Regex::new("^/v1/system/subnet-pools/[^/]*$").unwrap()),
18363 )
18364 }
18365
18366 pub fn into_inner(self) -> ::httpmock::When {
18367 self.0
18368 }
18369
18370 pub fn pool(self, value: &types::NameOrId) -> Self {
18371 let re = regex::Regex::new(&format!("^/v1/system/subnet-pools/{}$", value.to_string()))
18372 .unwrap();
18373 Self(self.0.path_matches(re))
18374 }
18375
18376 pub fn body(self, value: &types::SubnetPoolUpdate) -> Self {
18377 Self(self.0.json_body_obj(value))
18378 }
18379 }
18380
18381 pub struct SystemSubnetPoolUpdateThen(::httpmock::Then);
18382 impl SystemSubnetPoolUpdateThen {
18383 pub fn new(inner: ::httpmock::Then) -> Self {
18384 Self(inner)
18385 }
18386
18387 pub fn into_inner(self) -> ::httpmock::Then {
18388 self.0
18389 }
18390
18391 pub fn ok(self, value: &types::SubnetPool) -> Self {
18392 Self(
18393 self.0
18394 .status(200u16)
18395 .header("content-type", "application/json")
18396 .json_body_obj(value),
18397 )
18398 }
18399
18400 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
18401 assert_eq!(status / 100u16, 4u16);
18402 Self(
18403 self.0
18404 .status(status)
18405 .header("content-type", "application/json")
18406 .json_body_obj(value),
18407 )
18408 }
18409
18410 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
18411 assert_eq!(status / 100u16, 5u16);
18412 Self(
18413 self.0
18414 .status(status)
18415 .header("content-type", "application/json")
18416 .json_body_obj(value),
18417 )
18418 }
18419 }
18420
18421 pub struct SystemSubnetPoolDeleteWhen(::httpmock::When);
18422 impl SystemSubnetPoolDeleteWhen {
18423 pub fn new(inner: ::httpmock::When) -> Self {
18424 Self(
18425 inner
18426 .method(::httpmock::Method::DELETE)
18427 .path_matches(regex::Regex::new("^/v1/system/subnet-pools/[^/]*$").unwrap()),
18428 )
18429 }
18430
18431 pub fn into_inner(self) -> ::httpmock::When {
18432 self.0
18433 }
18434
18435 pub fn pool(self, value: &types::NameOrId) -> Self {
18436 let re = regex::Regex::new(&format!("^/v1/system/subnet-pools/{}$", value.to_string()))
18437 .unwrap();
18438 Self(self.0.path_matches(re))
18439 }
18440 }
18441
18442 pub struct SystemSubnetPoolDeleteThen(::httpmock::Then);
18443 impl SystemSubnetPoolDeleteThen {
18444 pub fn new(inner: ::httpmock::Then) -> Self {
18445 Self(inner)
18446 }
18447
18448 pub fn into_inner(self) -> ::httpmock::Then {
18449 self.0
18450 }
18451
18452 pub fn no_content(self) -> Self {
18453 Self(self.0.status(204u16))
18454 }
18455
18456 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
18457 assert_eq!(status / 100u16, 4u16);
18458 Self(
18459 self.0
18460 .status(status)
18461 .header("content-type", "application/json")
18462 .json_body_obj(value),
18463 )
18464 }
18465
18466 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
18467 assert_eq!(status / 100u16, 5u16);
18468 Self(
18469 self.0
18470 .status(status)
18471 .header("content-type", "application/json")
18472 .json_body_obj(value),
18473 )
18474 }
18475 }
18476
18477 pub struct SystemSubnetPoolMemberListWhen(::httpmock::When);
18478 impl SystemSubnetPoolMemberListWhen {
18479 pub fn new(inner: ::httpmock::When) -> Self {
18480 Self(inner.method(::httpmock::Method::GET).path_matches(
18481 regex::Regex::new("^/v1/system/subnet-pools/[^/]*/members$").unwrap(),
18482 ))
18483 }
18484
18485 pub fn into_inner(self) -> ::httpmock::When {
18486 self.0
18487 }
18488
18489 pub fn pool(self, value: &types::NameOrId) -> Self {
18490 let re = regex::Regex::new(&format!(
18491 "^/v1/system/subnet-pools/{}/members$",
18492 value.to_string()
18493 ))
18494 .unwrap();
18495 Self(self.0.path_matches(re))
18496 }
18497
18498 pub fn limit<T>(self, value: T) -> Self
18499 where
18500 T: Into<Option<::std::num::NonZeroU32>>,
18501 {
18502 if let Some(value) = value.into() {
18503 Self(self.0.query_param("limit", value.to_string()))
18504 } else {
18505 Self(self.0.query_param_missing("limit"))
18506 }
18507 }
18508
18509 pub fn page_token<'a, T>(self, value: T) -> Self
18510 where
18511 T: Into<Option<&'a str>>,
18512 {
18513 if let Some(value) = value.into() {
18514 Self(self.0.query_param("page_token", value.to_string()))
18515 } else {
18516 Self(self.0.query_param_missing("page_token"))
18517 }
18518 }
18519 }
18520
18521 pub struct SystemSubnetPoolMemberListThen(::httpmock::Then);
18522 impl SystemSubnetPoolMemberListThen {
18523 pub fn new(inner: ::httpmock::Then) -> Self {
18524 Self(inner)
18525 }
18526
18527 pub fn into_inner(self) -> ::httpmock::Then {
18528 self.0
18529 }
18530
18531 pub fn ok(self, value: &types::SubnetPoolMemberResultsPage) -> Self {
18532 Self(
18533 self.0
18534 .status(200u16)
18535 .header("content-type", "application/json")
18536 .json_body_obj(value),
18537 )
18538 }
18539
18540 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
18541 assert_eq!(status / 100u16, 4u16);
18542 Self(
18543 self.0
18544 .status(status)
18545 .header("content-type", "application/json")
18546 .json_body_obj(value),
18547 )
18548 }
18549
18550 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
18551 assert_eq!(status / 100u16, 5u16);
18552 Self(
18553 self.0
18554 .status(status)
18555 .header("content-type", "application/json")
18556 .json_body_obj(value),
18557 )
18558 }
18559 }
18560
18561 pub struct SystemSubnetPoolMemberAddWhen(::httpmock::When);
18562 impl SystemSubnetPoolMemberAddWhen {
18563 pub fn new(inner: ::httpmock::When) -> Self {
18564 Self(inner.method(::httpmock::Method::POST).path_matches(
18565 regex::Regex::new("^/v1/system/subnet-pools/[^/]*/members/add$").unwrap(),
18566 ))
18567 }
18568
18569 pub fn into_inner(self) -> ::httpmock::When {
18570 self.0
18571 }
18572
18573 pub fn pool(self, value: &types::NameOrId) -> Self {
18574 let re = regex::Regex::new(&format!(
18575 "^/v1/system/subnet-pools/{}/members/add$",
18576 value.to_string()
18577 ))
18578 .unwrap();
18579 Self(self.0.path_matches(re))
18580 }
18581
18582 pub fn body(self, value: &types::SubnetPoolMemberAdd) -> Self {
18583 Self(self.0.json_body_obj(value))
18584 }
18585 }
18586
18587 pub struct SystemSubnetPoolMemberAddThen(::httpmock::Then);
18588 impl SystemSubnetPoolMemberAddThen {
18589 pub fn new(inner: ::httpmock::Then) -> Self {
18590 Self(inner)
18591 }
18592
18593 pub fn into_inner(self) -> ::httpmock::Then {
18594 self.0
18595 }
18596
18597 pub fn created(self, value: &types::SubnetPoolMember) -> Self {
18598 Self(
18599 self.0
18600 .status(201u16)
18601 .header("content-type", "application/json")
18602 .json_body_obj(value),
18603 )
18604 }
18605
18606 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
18607 assert_eq!(status / 100u16, 4u16);
18608 Self(
18609 self.0
18610 .status(status)
18611 .header("content-type", "application/json")
18612 .json_body_obj(value),
18613 )
18614 }
18615
18616 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
18617 assert_eq!(status / 100u16, 5u16);
18618 Self(
18619 self.0
18620 .status(status)
18621 .header("content-type", "application/json")
18622 .json_body_obj(value),
18623 )
18624 }
18625 }
18626
18627 pub struct SystemSubnetPoolMemberRemoveWhen(::httpmock::When);
18628 impl SystemSubnetPoolMemberRemoveWhen {
18629 pub fn new(inner: ::httpmock::When) -> Self {
18630 Self(inner.method(::httpmock::Method::POST).path_matches(
18631 regex::Regex::new("^/v1/system/subnet-pools/[^/]*/members/remove$").unwrap(),
18632 ))
18633 }
18634
18635 pub fn into_inner(self) -> ::httpmock::When {
18636 self.0
18637 }
18638
18639 pub fn pool(self, value: &types::NameOrId) -> Self {
18640 let re = regex::Regex::new(&format!(
18641 "^/v1/system/subnet-pools/{}/members/remove$",
18642 value.to_string()
18643 ))
18644 .unwrap();
18645 Self(self.0.path_matches(re))
18646 }
18647
18648 pub fn body(self, value: &types::SubnetPoolMemberRemove) -> Self {
18649 Self(self.0.json_body_obj(value))
18650 }
18651 }
18652
18653 pub struct SystemSubnetPoolMemberRemoveThen(::httpmock::Then);
18654 impl SystemSubnetPoolMemberRemoveThen {
18655 pub fn new(inner: ::httpmock::Then) -> Self {
18656 Self(inner)
18657 }
18658
18659 pub fn into_inner(self) -> ::httpmock::Then {
18660 self.0
18661 }
18662
18663 pub fn no_content(self) -> Self {
18664 Self(self.0.status(204u16))
18665 }
18666
18667 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
18668 assert_eq!(status / 100u16, 4u16);
18669 Self(
18670 self.0
18671 .status(status)
18672 .header("content-type", "application/json")
18673 .json_body_obj(value),
18674 )
18675 }
18676
18677 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
18678 assert_eq!(status / 100u16, 5u16);
18679 Self(
18680 self.0
18681 .status(status)
18682 .header("content-type", "application/json")
18683 .json_body_obj(value),
18684 )
18685 }
18686 }
18687
18688 pub struct SystemSubnetPoolSiloListWhen(::httpmock::When);
18689 impl SystemSubnetPoolSiloListWhen {
18690 pub fn new(inner: ::httpmock::When) -> Self {
18691 Self(
18692 inner.method(::httpmock::Method::GET).path_matches(
18693 regex::Regex::new("^/v1/system/subnet-pools/[^/]*/silos$").unwrap(),
18694 ),
18695 )
18696 }
18697
18698 pub fn into_inner(self) -> ::httpmock::When {
18699 self.0
18700 }
18701
18702 pub fn pool(self, value: &types::NameOrId) -> Self {
18703 let re = regex::Regex::new(&format!(
18704 "^/v1/system/subnet-pools/{}/silos$",
18705 value.to_string()
18706 ))
18707 .unwrap();
18708 Self(self.0.path_matches(re))
18709 }
18710
18711 pub fn limit<T>(self, value: T) -> Self
18712 where
18713 T: Into<Option<::std::num::NonZeroU32>>,
18714 {
18715 if let Some(value) = value.into() {
18716 Self(self.0.query_param("limit", value.to_string()))
18717 } else {
18718 Self(self.0.query_param_missing("limit"))
18719 }
18720 }
18721
18722 pub fn page_token<'a, T>(self, value: T) -> Self
18723 where
18724 T: Into<Option<&'a str>>,
18725 {
18726 if let Some(value) = value.into() {
18727 Self(self.0.query_param("page_token", value.to_string()))
18728 } else {
18729 Self(self.0.query_param_missing("page_token"))
18730 }
18731 }
18732
18733 pub fn sort_by<T>(self, value: T) -> Self
18734 where
18735 T: Into<Option<types::IdSortMode>>,
18736 {
18737 if let Some(value) = value.into() {
18738 Self(self.0.query_param("sort_by", value.to_string()))
18739 } else {
18740 Self(self.0.query_param_missing("sort_by"))
18741 }
18742 }
18743 }
18744
18745 pub struct SystemSubnetPoolSiloListThen(::httpmock::Then);
18746 impl SystemSubnetPoolSiloListThen {
18747 pub fn new(inner: ::httpmock::Then) -> Self {
18748 Self(inner)
18749 }
18750
18751 pub fn into_inner(self) -> ::httpmock::Then {
18752 self.0
18753 }
18754
18755 pub fn ok(self, value: &types::SubnetPoolSiloLinkResultsPage) -> Self {
18756 Self(
18757 self.0
18758 .status(200u16)
18759 .header("content-type", "application/json")
18760 .json_body_obj(value),
18761 )
18762 }
18763
18764 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
18765 assert_eq!(status / 100u16, 4u16);
18766 Self(
18767 self.0
18768 .status(status)
18769 .header("content-type", "application/json")
18770 .json_body_obj(value),
18771 )
18772 }
18773
18774 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
18775 assert_eq!(status / 100u16, 5u16);
18776 Self(
18777 self.0
18778 .status(status)
18779 .header("content-type", "application/json")
18780 .json_body_obj(value),
18781 )
18782 }
18783 }
18784
18785 pub struct SystemSubnetPoolSiloLinkWhen(::httpmock::When);
18786 impl SystemSubnetPoolSiloLinkWhen {
18787 pub fn new(inner: ::httpmock::When) -> Self {
18788 Self(
18789 inner.method(::httpmock::Method::POST).path_matches(
18790 regex::Regex::new("^/v1/system/subnet-pools/[^/]*/silos$").unwrap(),
18791 ),
18792 )
18793 }
18794
18795 pub fn into_inner(self) -> ::httpmock::When {
18796 self.0
18797 }
18798
18799 pub fn pool(self, value: &types::NameOrId) -> Self {
18800 let re = regex::Regex::new(&format!(
18801 "^/v1/system/subnet-pools/{}/silos$",
18802 value.to_string()
18803 ))
18804 .unwrap();
18805 Self(self.0.path_matches(re))
18806 }
18807
18808 pub fn body(self, value: &types::SubnetPoolLinkSilo) -> Self {
18809 Self(self.0.json_body_obj(value))
18810 }
18811 }
18812
18813 pub struct SystemSubnetPoolSiloLinkThen(::httpmock::Then);
18814 impl SystemSubnetPoolSiloLinkThen {
18815 pub fn new(inner: ::httpmock::Then) -> Self {
18816 Self(inner)
18817 }
18818
18819 pub fn into_inner(self) -> ::httpmock::Then {
18820 self.0
18821 }
18822
18823 pub fn created(self, value: &types::SubnetPoolSiloLink) -> Self {
18824 Self(
18825 self.0
18826 .status(201u16)
18827 .header("content-type", "application/json")
18828 .json_body_obj(value),
18829 )
18830 }
18831
18832 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
18833 assert_eq!(status / 100u16, 4u16);
18834 Self(
18835 self.0
18836 .status(status)
18837 .header("content-type", "application/json")
18838 .json_body_obj(value),
18839 )
18840 }
18841
18842 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
18843 assert_eq!(status / 100u16, 5u16);
18844 Self(
18845 self.0
18846 .status(status)
18847 .header("content-type", "application/json")
18848 .json_body_obj(value),
18849 )
18850 }
18851 }
18852
18853 pub struct SystemSubnetPoolSiloUpdateWhen(::httpmock::When);
18854 impl SystemSubnetPoolSiloUpdateWhen {
18855 pub fn new(inner: ::httpmock::When) -> Self {
18856 Self(inner.method(::httpmock::Method::PUT).path_matches(
18857 regex::Regex::new("^/v1/system/subnet-pools/[^/]*/silos/[^/]*$").unwrap(),
18858 ))
18859 }
18860
18861 pub fn into_inner(self) -> ::httpmock::When {
18862 self.0
18863 }
18864
18865 pub fn pool(self, value: &types::NameOrId) -> Self {
18866 let re = regex::Regex::new(&format!(
18867 "^/v1/system/subnet-pools/{}/silos/.*$",
18868 value.to_string()
18869 ))
18870 .unwrap();
18871 Self(self.0.path_matches(re))
18872 }
18873
18874 pub fn silo(self, value: &types::NameOrId) -> Self {
18875 let re = regex::Regex::new(&format!(
18876 "^/v1/system/subnet-pools/.*/silos/{}$",
18877 value.to_string()
18878 ))
18879 .unwrap();
18880 Self(self.0.path_matches(re))
18881 }
18882
18883 pub fn body(self, value: &types::SubnetPoolSiloUpdate) -> Self {
18884 Self(self.0.json_body_obj(value))
18885 }
18886 }
18887
18888 pub struct SystemSubnetPoolSiloUpdateThen(::httpmock::Then);
18889 impl SystemSubnetPoolSiloUpdateThen {
18890 pub fn new(inner: ::httpmock::Then) -> Self {
18891 Self(inner)
18892 }
18893
18894 pub fn into_inner(self) -> ::httpmock::Then {
18895 self.0
18896 }
18897
18898 pub fn ok(self, value: &types::SubnetPoolSiloLink) -> Self {
18899 Self(
18900 self.0
18901 .status(200u16)
18902 .header("content-type", "application/json")
18903 .json_body_obj(value),
18904 )
18905 }
18906
18907 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
18908 assert_eq!(status / 100u16, 4u16);
18909 Self(
18910 self.0
18911 .status(status)
18912 .header("content-type", "application/json")
18913 .json_body_obj(value),
18914 )
18915 }
18916
18917 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
18918 assert_eq!(status / 100u16, 5u16);
18919 Self(
18920 self.0
18921 .status(status)
18922 .header("content-type", "application/json")
18923 .json_body_obj(value),
18924 )
18925 }
18926 }
18927
18928 pub struct SystemSubnetPoolSiloUnlinkWhen(::httpmock::When);
18929 impl SystemSubnetPoolSiloUnlinkWhen {
18930 pub fn new(inner: ::httpmock::When) -> Self {
18931 Self(inner.method(::httpmock::Method::DELETE).path_matches(
18932 regex::Regex::new("^/v1/system/subnet-pools/[^/]*/silos/[^/]*$").unwrap(),
18933 ))
18934 }
18935
18936 pub fn into_inner(self) -> ::httpmock::When {
18937 self.0
18938 }
18939
18940 pub fn pool(self, value: &types::NameOrId) -> Self {
18941 let re = regex::Regex::new(&format!(
18942 "^/v1/system/subnet-pools/{}/silos/.*$",
18943 value.to_string()
18944 ))
18945 .unwrap();
18946 Self(self.0.path_matches(re))
18947 }
18948
18949 pub fn silo(self, value: &types::NameOrId) -> Self {
18950 let re = regex::Regex::new(&format!(
18951 "^/v1/system/subnet-pools/.*/silos/{}$",
18952 value.to_string()
18953 ))
18954 .unwrap();
18955 Self(self.0.path_matches(re))
18956 }
18957 }
18958
18959 pub struct SystemSubnetPoolSiloUnlinkThen(::httpmock::Then);
18960 impl SystemSubnetPoolSiloUnlinkThen {
18961 pub fn new(inner: ::httpmock::Then) -> Self {
18962 Self(inner)
18963 }
18964
18965 pub fn into_inner(self) -> ::httpmock::Then {
18966 self.0
18967 }
18968
18969 pub fn no_content(self) -> Self {
18970 Self(self.0.status(204u16))
18971 }
18972
18973 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
18974 assert_eq!(status / 100u16, 4u16);
18975 Self(
18976 self.0
18977 .status(status)
18978 .header("content-type", "application/json")
18979 .json_body_obj(value),
18980 )
18981 }
18982
18983 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
18984 assert_eq!(status / 100u16, 5u16);
18985 Self(
18986 self.0
18987 .status(status)
18988 .header("content-type", "application/json")
18989 .json_body_obj(value),
18990 )
18991 }
18992 }
18993
18994 pub struct SystemSubnetPoolUtilizationViewWhen(::httpmock::When);
18995 impl SystemSubnetPoolUtilizationViewWhen {
18996 pub fn new(inner: ::httpmock::When) -> Self {
18997 Self(inner.method(::httpmock::Method::GET).path_matches(
18998 regex::Regex::new("^/v1/system/subnet-pools/[^/]*/utilization$").unwrap(),
18999 ))
19000 }
19001
19002 pub fn into_inner(self) -> ::httpmock::When {
19003 self.0
19004 }
19005
19006 pub fn pool(self, value: &types::NameOrId) -> Self {
19007 let re = regex::Regex::new(&format!(
19008 "^/v1/system/subnet-pools/{}/utilization$",
19009 value.to_string()
19010 ))
19011 .unwrap();
19012 Self(self.0.path_matches(re))
19013 }
19014 }
19015
19016 pub struct SystemSubnetPoolUtilizationViewThen(::httpmock::Then);
19017 impl SystemSubnetPoolUtilizationViewThen {
19018 pub fn new(inner: ::httpmock::Then) -> Self {
19019 Self(inner)
19020 }
19021
19022 pub fn into_inner(self) -> ::httpmock::Then {
19023 self.0
19024 }
19025
19026 pub fn ok(self, value: &types::SubnetPoolUtilization) -> Self {
19027 Self(
19028 self.0
19029 .status(200u16)
19030 .header("content-type", "application/json")
19031 .json_body_obj(value),
19032 )
19033 }
19034
19035 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
19036 assert_eq!(status / 100u16, 4u16);
19037 Self(
19038 self.0
19039 .status(status)
19040 .header("content-type", "application/json")
19041 .json_body_obj(value),
19042 )
19043 }
19044
19045 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
19046 assert_eq!(status / 100u16, 5u16);
19047 Self(
19048 self.0
19049 .status(status)
19050 .header("content-type", "application/json")
19051 .json_body_obj(value),
19052 )
19053 }
19054 }
19055
19056 pub struct SystemTimeseriesQueryWhen(::httpmock::When);
19057 impl SystemTimeseriesQueryWhen {
19058 pub fn new(inner: ::httpmock::When) -> Self {
19059 Self(
19060 inner
19061 .method(::httpmock::Method::POST)
19062 .path_matches(regex::Regex::new("^/v1/system/timeseries/query$").unwrap()),
19063 )
19064 }
19065
19066 pub fn into_inner(self) -> ::httpmock::When {
19067 self.0
19068 }
19069
19070 pub fn body(self, value: &types::TimeseriesQuery) -> Self {
19071 Self(self.0.json_body_obj(value))
19072 }
19073 }
19074
19075 pub struct SystemTimeseriesQueryThen(::httpmock::Then);
19076 impl SystemTimeseriesQueryThen {
19077 pub fn new(inner: ::httpmock::Then) -> Self {
19078 Self(inner)
19079 }
19080
19081 pub fn into_inner(self) -> ::httpmock::Then {
19082 self.0
19083 }
19084
19085 pub fn ok(self, value: &types::OxqlQueryResult) -> Self {
19086 Self(
19087 self.0
19088 .status(200u16)
19089 .header("content-type", "application/json")
19090 .json_body_obj(value),
19091 )
19092 }
19093
19094 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
19095 assert_eq!(status / 100u16, 4u16);
19096 Self(
19097 self.0
19098 .status(status)
19099 .header("content-type", "application/json")
19100 .json_body_obj(value),
19101 )
19102 }
19103
19104 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
19105 assert_eq!(status / 100u16, 5u16);
19106 Self(
19107 self.0
19108 .status(status)
19109 .header("content-type", "application/json")
19110 .json_body_obj(value),
19111 )
19112 }
19113 }
19114
19115 pub struct SystemTimeseriesSchemaListWhen(::httpmock::When);
19116 impl SystemTimeseriesSchemaListWhen {
19117 pub fn new(inner: ::httpmock::When) -> Self {
19118 Self(
19119 inner
19120 .method(::httpmock::Method::GET)
19121 .path_matches(regex::Regex::new("^/v1/system/timeseries/schemas$").unwrap()),
19122 )
19123 }
19124
19125 pub fn into_inner(self) -> ::httpmock::When {
19126 self.0
19127 }
19128
19129 pub fn limit<T>(self, value: T) -> Self
19130 where
19131 T: Into<Option<::std::num::NonZeroU32>>,
19132 {
19133 if let Some(value) = value.into() {
19134 Self(self.0.query_param("limit", value.to_string()))
19135 } else {
19136 Self(self.0.query_param_missing("limit"))
19137 }
19138 }
19139
19140 pub fn page_token<'a, T>(self, value: T) -> Self
19141 where
19142 T: Into<Option<&'a str>>,
19143 {
19144 if let Some(value) = value.into() {
19145 Self(self.0.query_param("page_token", value.to_string()))
19146 } else {
19147 Self(self.0.query_param_missing("page_token"))
19148 }
19149 }
19150 }
19151
19152 pub struct SystemTimeseriesSchemaListThen(::httpmock::Then);
19153 impl SystemTimeseriesSchemaListThen {
19154 pub fn new(inner: ::httpmock::Then) -> Self {
19155 Self(inner)
19156 }
19157
19158 pub fn into_inner(self) -> ::httpmock::Then {
19159 self.0
19160 }
19161
19162 pub fn ok(self, value: &types::TimeseriesSchemaResultsPage) -> Self {
19163 Self(
19164 self.0
19165 .status(200u16)
19166 .header("content-type", "application/json")
19167 .json_body_obj(value),
19168 )
19169 }
19170
19171 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
19172 assert_eq!(status / 100u16, 4u16);
19173 Self(
19174 self.0
19175 .status(status)
19176 .header("content-type", "application/json")
19177 .json_body_obj(value),
19178 )
19179 }
19180
19181 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
19182 assert_eq!(status / 100u16, 5u16);
19183 Self(
19184 self.0
19185 .status(status)
19186 .header("content-type", "application/json")
19187 .json_body_obj(value),
19188 )
19189 }
19190 }
19191
19192 pub struct SystemUpdateRepositoryListWhen(::httpmock::When);
19193 impl SystemUpdateRepositoryListWhen {
19194 pub fn new(inner: ::httpmock::When) -> Self {
19195 Self(
19196 inner
19197 .method(::httpmock::Method::GET)
19198 .path_matches(regex::Regex::new("^/v1/system/update/repositories$").unwrap()),
19199 )
19200 }
19201
19202 pub fn into_inner(self) -> ::httpmock::When {
19203 self.0
19204 }
19205
19206 pub fn limit<T>(self, value: T) -> Self
19207 where
19208 T: Into<Option<::std::num::NonZeroU32>>,
19209 {
19210 if let Some(value) = value.into() {
19211 Self(self.0.query_param("limit", value.to_string()))
19212 } else {
19213 Self(self.0.query_param_missing("limit"))
19214 }
19215 }
19216
19217 pub fn page_token<'a, T>(self, value: T) -> Self
19218 where
19219 T: Into<Option<&'a str>>,
19220 {
19221 if let Some(value) = value.into() {
19222 Self(self.0.query_param("page_token", value.to_string()))
19223 } else {
19224 Self(self.0.query_param_missing("page_token"))
19225 }
19226 }
19227
19228 pub fn sort_by<T>(self, value: T) -> Self
19229 where
19230 T: Into<Option<types::VersionSortMode>>,
19231 {
19232 if let Some(value) = value.into() {
19233 Self(self.0.query_param("sort_by", value.to_string()))
19234 } else {
19235 Self(self.0.query_param_missing("sort_by"))
19236 }
19237 }
19238 }
19239
19240 pub struct SystemUpdateRepositoryListThen(::httpmock::Then);
19241 impl SystemUpdateRepositoryListThen {
19242 pub fn new(inner: ::httpmock::Then) -> Self {
19243 Self(inner)
19244 }
19245
19246 pub fn into_inner(self) -> ::httpmock::Then {
19247 self.0
19248 }
19249
19250 pub fn ok(self, value: &types::TufRepoResultsPage) -> Self {
19251 Self(
19252 self.0
19253 .status(200u16)
19254 .header("content-type", "application/json")
19255 .json_body_obj(value),
19256 )
19257 }
19258
19259 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
19260 assert_eq!(status / 100u16, 4u16);
19261 Self(
19262 self.0
19263 .status(status)
19264 .header("content-type", "application/json")
19265 .json_body_obj(value),
19266 )
19267 }
19268
19269 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
19270 assert_eq!(status / 100u16, 5u16);
19271 Self(
19272 self.0
19273 .status(status)
19274 .header("content-type", "application/json")
19275 .json_body_obj(value),
19276 )
19277 }
19278 }
19279
19280 pub struct SystemUpdateRepositoryUploadWhen(::httpmock::When);
19281 impl SystemUpdateRepositoryUploadWhen {
19282 pub fn new(inner: ::httpmock::When) -> Self {
19283 Self(
19284 inner
19285 .method(::httpmock::Method::PUT)
19286 .path_matches(regex::Regex::new("^/v1/system/update/repositories$").unwrap()),
19287 )
19288 }
19289
19290 pub fn into_inner(self) -> ::httpmock::When {
19291 self.0
19292 }
19293
19294 pub fn file_name(self, value: &str) -> Self {
19295 Self(self.0.query_param("file_name", value.to_string()))
19296 }
19297
19298 pub fn body(self, value: ::serde_json::Value) -> Self {
19299 Self(self.0.json_body(value))
19300 }
19301 }
19302
19303 pub struct SystemUpdateRepositoryUploadThen(::httpmock::Then);
19304 impl SystemUpdateRepositoryUploadThen {
19305 pub fn new(inner: ::httpmock::Then) -> Self {
19306 Self(inner)
19307 }
19308
19309 pub fn into_inner(self) -> ::httpmock::Then {
19310 self.0
19311 }
19312
19313 pub fn ok(self, value: &types::TufRepoUpload) -> Self {
19314 Self(
19315 self.0
19316 .status(200u16)
19317 .header("content-type", "application/json")
19318 .json_body_obj(value),
19319 )
19320 }
19321
19322 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
19323 assert_eq!(status / 100u16, 4u16);
19324 Self(
19325 self.0
19326 .status(status)
19327 .header("content-type", "application/json")
19328 .json_body_obj(value),
19329 )
19330 }
19331
19332 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
19333 assert_eq!(status / 100u16, 5u16);
19334 Self(
19335 self.0
19336 .status(status)
19337 .header("content-type", "application/json")
19338 .json_body_obj(value),
19339 )
19340 }
19341 }
19342
19343 pub struct SystemUpdateRepositoryViewWhen(::httpmock::When);
19344 impl SystemUpdateRepositoryViewWhen {
19345 pub fn new(inner: ::httpmock::When) -> Self {
19346 Self(
19347 inner.method(::httpmock::Method::GET).path_matches(
19348 regex::Regex::new("^/v1/system/update/repositories/[^/]*$").unwrap(),
19349 ),
19350 )
19351 }
19352
19353 pub fn into_inner(self) -> ::httpmock::When {
19354 self.0
19355 }
19356
19357 pub fn system_version(
19358 self,
19359 value: &types::SystemUpdateRepositoryViewSystemVersion,
19360 ) -> Self {
19361 let re = regex::Regex::new(&format!(
19362 "^/v1/system/update/repositories/{}$",
19363 value.to_string()
19364 ))
19365 .unwrap();
19366 Self(self.0.path_matches(re))
19367 }
19368 }
19369
19370 pub struct SystemUpdateRepositoryViewThen(::httpmock::Then);
19371 impl SystemUpdateRepositoryViewThen {
19372 pub fn new(inner: ::httpmock::Then) -> Self {
19373 Self(inner)
19374 }
19375
19376 pub fn into_inner(self) -> ::httpmock::Then {
19377 self.0
19378 }
19379
19380 pub fn ok(self, value: &types::TufRepo) -> Self {
19381 Self(
19382 self.0
19383 .status(200u16)
19384 .header("content-type", "application/json")
19385 .json_body_obj(value),
19386 )
19387 }
19388
19389 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
19390 assert_eq!(status / 100u16, 4u16);
19391 Self(
19392 self.0
19393 .status(status)
19394 .header("content-type", "application/json")
19395 .json_body_obj(value),
19396 )
19397 }
19398
19399 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
19400 assert_eq!(status / 100u16, 5u16);
19401 Self(
19402 self.0
19403 .status(status)
19404 .header("content-type", "application/json")
19405 .json_body_obj(value),
19406 )
19407 }
19408 }
19409
19410 pub struct SystemUpdateStatusWhen(::httpmock::When);
19411 impl SystemUpdateStatusWhen {
19412 pub fn new(inner: ::httpmock::When) -> Self {
19413 Self(
19414 inner
19415 .method(::httpmock::Method::GET)
19416 .path_matches(regex::Regex::new("^/v1/system/update/status$").unwrap()),
19417 )
19418 }
19419
19420 pub fn into_inner(self) -> ::httpmock::When {
19421 self.0
19422 }
19423 }
19424
19425 pub struct SystemUpdateStatusThen(::httpmock::Then);
19426 impl SystemUpdateStatusThen {
19427 pub fn new(inner: ::httpmock::Then) -> Self {
19428 Self(inner)
19429 }
19430
19431 pub fn into_inner(self) -> ::httpmock::Then {
19432 self.0
19433 }
19434
19435 pub fn ok(self, value: &types::UpdateStatus) -> Self {
19436 Self(
19437 self.0
19438 .status(200u16)
19439 .header("content-type", "application/json")
19440 .json_body_obj(value),
19441 )
19442 }
19443
19444 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
19445 assert_eq!(status / 100u16, 4u16);
19446 Self(
19447 self.0
19448 .status(status)
19449 .header("content-type", "application/json")
19450 .json_body_obj(value),
19451 )
19452 }
19453
19454 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
19455 assert_eq!(status / 100u16, 5u16);
19456 Self(
19457 self.0
19458 .status(status)
19459 .header("content-type", "application/json")
19460 .json_body_obj(value),
19461 )
19462 }
19463 }
19464
19465 pub struct TargetReleaseUpdateWhen(::httpmock::When);
19466 impl TargetReleaseUpdateWhen {
19467 pub fn new(inner: ::httpmock::When) -> Self {
19468 Self(
19469 inner
19470 .method(::httpmock::Method::PUT)
19471 .path_matches(regex::Regex::new("^/v1/system/update/target-release$").unwrap()),
19472 )
19473 }
19474
19475 pub fn into_inner(self) -> ::httpmock::When {
19476 self.0
19477 }
19478
19479 pub fn body(self, value: &types::SetTargetReleaseParams) -> Self {
19480 Self(self.0.json_body_obj(value))
19481 }
19482 }
19483
19484 pub struct TargetReleaseUpdateThen(::httpmock::Then);
19485 impl TargetReleaseUpdateThen {
19486 pub fn new(inner: ::httpmock::Then) -> Self {
19487 Self(inner)
19488 }
19489
19490 pub fn into_inner(self) -> ::httpmock::Then {
19491 self.0
19492 }
19493
19494 pub fn no_content(self) -> Self {
19495 Self(self.0.status(204u16))
19496 }
19497
19498 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
19499 assert_eq!(status / 100u16, 4u16);
19500 Self(
19501 self.0
19502 .status(status)
19503 .header("content-type", "application/json")
19504 .json_body_obj(value),
19505 )
19506 }
19507
19508 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
19509 assert_eq!(status / 100u16, 5u16);
19510 Self(
19511 self.0
19512 .status(status)
19513 .header("content-type", "application/json")
19514 .json_body_obj(value),
19515 )
19516 }
19517 }
19518
19519 pub struct SystemUpdateTrustRootListWhen(::httpmock::When);
19520 impl SystemUpdateTrustRootListWhen {
19521 pub fn new(inner: ::httpmock::When) -> Self {
19522 Self(
19523 inner
19524 .method(::httpmock::Method::GET)
19525 .path_matches(regex::Regex::new("^/v1/system/update/trust-roots$").unwrap()),
19526 )
19527 }
19528
19529 pub fn into_inner(self) -> ::httpmock::When {
19530 self.0
19531 }
19532
19533 pub fn limit<T>(self, value: T) -> Self
19534 where
19535 T: Into<Option<::std::num::NonZeroU32>>,
19536 {
19537 if let Some(value) = value.into() {
19538 Self(self.0.query_param("limit", value.to_string()))
19539 } else {
19540 Self(self.0.query_param_missing("limit"))
19541 }
19542 }
19543
19544 pub fn page_token<'a, T>(self, value: T) -> Self
19545 where
19546 T: Into<Option<&'a str>>,
19547 {
19548 if let Some(value) = value.into() {
19549 Self(self.0.query_param("page_token", value.to_string()))
19550 } else {
19551 Self(self.0.query_param_missing("page_token"))
19552 }
19553 }
19554
19555 pub fn sort_by<T>(self, value: T) -> Self
19556 where
19557 T: Into<Option<types::IdSortMode>>,
19558 {
19559 if let Some(value) = value.into() {
19560 Self(self.0.query_param("sort_by", value.to_string()))
19561 } else {
19562 Self(self.0.query_param_missing("sort_by"))
19563 }
19564 }
19565 }
19566
19567 pub struct SystemUpdateTrustRootListThen(::httpmock::Then);
19568 impl SystemUpdateTrustRootListThen {
19569 pub fn new(inner: ::httpmock::Then) -> Self {
19570 Self(inner)
19571 }
19572
19573 pub fn into_inner(self) -> ::httpmock::Then {
19574 self.0
19575 }
19576
19577 pub fn ok(self, value: &types::UpdatesTrustRootResultsPage) -> Self {
19578 Self(
19579 self.0
19580 .status(200u16)
19581 .header("content-type", "application/json")
19582 .json_body_obj(value),
19583 )
19584 }
19585
19586 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
19587 assert_eq!(status / 100u16, 4u16);
19588 Self(
19589 self.0
19590 .status(status)
19591 .header("content-type", "application/json")
19592 .json_body_obj(value),
19593 )
19594 }
19595
19596 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
19597 assert_eq!(status / 100u16, 5u16);
19598 Self(
19599 self.0
19600 .status(status)
19601 .header("content-type", "application/json")
19602 .json_body_obj(value),
19603 )
19604 }
19605 }
19606
19607 pub struct SystemUpdateTrustRootCreateWhen(::httpmock::When);
19608 impl SystemUpdateTrustRootCreateWhen {
19609 pub fn new(inner: ::httpmock::When) -> Self {
19610 Self(
19611 inner
19612 .method(::httpmock::Method::POST)
19613 .path_matches(regex::Regex::new("^/v1/system/update/trust-roots$").unwrap()),
19614 )
19615 }
19616
19617 pub fn into_inner(self) -> ::httpmock::When {
19618 self.0
19619 }
19620
19621 pub fn body(self, value: &::serde_json::Value) -> Self {
19622 Self(self.0.json_body_obj(value))
19623 }
19624 }
19625
19626 pub struct SystemUpdateTrustRootCreateThen(::httpmock::Then);
19627 impl SystemUpdateTrustRootCreateThen {
19628 pub fn new(inner: ::httpmock::Then) -> Self {
19629 Self(inner)
19630 }
19631
19632 pub fn into_inner(self) -> ::httpmock::Then {
19633 self.0
19634 }
19635
19636 pub fn created(self, value: &types::UpdatesTrustRoot) -> Self {
19637 Self(
19638 self.0
19639 .status(201u16)
19640 .header("content-type", "application/json")
19641 .json_body_obj(value),
19642 )
19643 }
19644
19645 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
19646 assert_eq!(status / 100u16, 4u16);
19647 Self(
19648 self.0
19649 .status(status)
19650 .header("content-type", "application/json")
19651 .json_body_obj(value),
19652 )
19653 }
19654
19655 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
19656 assert_eq!(status / 100u16, 5u16);
19657 Self(
19658 self.0
19659 .status(status)
19660 .header("content-type", "application/json")
19661 .json_body_obj(value),
19662 )
19663 }
19664 }
19665
19666 pub struct SystemUpdateTrustRootViewWhen(::httpmock::When);
19667 impl SystemUpdateTrustRootViewWhen {
19668 pub fn new(inner: ::httpmock::When) -> Self {
19669 Self(
19670 inner.method(::httpmock::Method::GET).path_matches(
19671 regex::Regex::new("^/v1/system/update/trust-roots/[^/]*$").unwrap(),
19672 ),
19673 )
19674 }
19675
19676 pub fn into_inner(self) -> ::httpmock::When {
19677 self.0
19678 }
19679
19680 pub fn trust_root_id(self, value: &::uuid::Uuid) -> Self {
19681 let re = regex::Regex::new(&format!(
19682 "^/v1/system/update/trust-roots/{}$",
19683 value.to_string()
19684 ))
19685 .unwrap();
19686 Self(self.0.path_matches(re))
19687 }
19688 }
19689
19690 pub struct SystemUpdateTrustRootViewThen(::httpmock::Then);
19691 impl SystemUpdateTrustRootViewThen {
19692 pub fn new(inner: ::httpmock::Then) -> Self {
19693 Self(inner)
19694 }
19695
19696 pub fn into_inner(self) -> ::httpmock::Then {
19697 self.0
19698 }
19699
19700 pub fn ok(self, value: &types::UpdatesTrustRoot) -> Self {
19701 Self(
19702 self.0
19703 .status(200u16)
19704 .header("content-type", "application/json")
19705 .json_body_obj(value),
19706 )
19707 }
19708
19709 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
19710 assert_eq!(status / 100u16, 4u16);
19711 Self(
19712 self.0
19713 .status(status)
19714 .header("content-type", "application/json")
19715 .json_body_obj(value),
19716 )
19717 }
19718
19719 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
19720 assert_eq!(status / 100u16, 5u16);
19721 Self(
19722 self.0
19723 .status(status)
19724 .header("content-type", "application/json")
19725 .json_body_obj(value),
19726 )
19727 }
19728 }
19729
19730 pub struct SystemUpdateTrustRootDeleteWhen(::httpmock::When);
19731 impl SystemUpdateTrustRootDeleteWhen {
19732 pub fn new(inner: ::httpmock::When) -> Self {
19733 Self(
19734 inner.method(::httpmock::Method::DELETE).path_matches(
19735 regex::Regex::new("^/v1/system/update/trust-roots/[^/]*$").unwrap(),
19736 ),
19737 )
19738 }
19739
19740 pub fn into_inner(self) -> ::httpmock::When {
19741 self.0
19742 }
19743
19744 pub fn trust_root_id(self, value: &::uuid::Uuid) -> Self {
19745 let re = regex::Regex::new(&format!(
19746 "^/v1/system/update/trust-roots/{}$",
19747 value.to_string()
19748 ))
19749 .unwrap();
19750 Self(self.0.path_matches(re))
19751 }
19752 }
19753
19754 pub struct SystemUpdateTrustRootDeleteThen(::httpmock::Then);
19755 impl SystemUpdateTrustRootDeleteThen {
19756 pub fn new(inner: ::httpmock::Then) -> Self {
19757 Self(inner)
19758 }
19759
19760 pub fn into_inner(self) -> ::httpmock::Then {
19761 self.0
19762 }
19763
19764 pub fn no_content(self) -> Self {
19765 Self(self.0.status(204u16))
19766 }
19767
19768 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
19769 assert_eq!(status / 100u16, 4u16);
19770 Self(
19771 self.0
19772 .status(status)
19773 .header("content-type", "application/json")
19774 .json_body_obj(value),
19775 )
19776 }
19777
19778 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
19779 assert_eq!(status / 100u16, 5u16);
19780 Self(
19781 self.0
19782 .status(status)
19783 .header("content-type", "application/json")
19784 .json_body_obj(value),
19785 )
19786 }
19787 }
19788
19789 pub struct SiloUserListWhen(::httpmock::When);
19790 impl SiloUserListWhen {
19791 pub fn new(inner: ::httpmock::When) -> Self {
19792 Self(
19793 inner
19794 .method(::httpmock::Method::GET)
19795 .path_matches(regex::Regex::new("^/v1/system/users$").unwrap()),
19796 )
19797 }
19798
19799 pub fn into_inner(self) -> ::httpmock::When {
19800 self.0
19801 }
19802
19803 pub fn limit<T>(self, value: T) -> Self
19804 where
19805 T: Into<Option<::std::num::NonZeroU32>>,
19806 {
19807 if let Some(value) = value.into() {
19808 Self(self.0.query_param("limit", value.to_string()))
19809 } else {
19810 Self(self.0.query_param_missing("limit"))
19811 }
19812 }
19813
19814 pub fn page_token<'a, T>(self, value: T) -> Self
19815 where
19816 T: Into<Option<&'a str>>,
19817 {
19818 if let Some(value) = value.into() {
19819 Self(self.0.query_param("page_token", value.to_string()))
19820 } else {
19821 Self(self.0.query_param_missing("page_token"))
19822 }
19823 }
19824
19825 pub fn silo<'a, T>(self, value: T) -> Self
19826 where
19827 T: Into<Option<&'a types::NameOrId>>,
19828 {
19829 if let Some(value) = value.into() {
19830 Self(self.0.query_param("silo", value.to_string()))
19831 } else {
19832 Self(self.0.query_param_missing("silo"))
19833 }
19834 }
19835
19836 pub fn sort_by<T>(self, value: T) -> Self
19837 where
19838 T: Into<Option<types::IdSortMode>>,
19839 {
19840 if let Some(value) = value.into() {
19841 Self(self.0.query_param("sort_by", value.to_string()))
19842 } else {
19843 Self(self.0.query_param_missing("sort_by"))
19844 }
19845 }
19846 }
19847
19848 pub struct SiloUserListThen(::httpmock::Then);
19849 impl SiloUserListThen {
19850 pub fn new(inner: ::httpmock::Then) -> Self {
19851 Self(inner)
19852 }
19853
19854 pub fn into_inner(self) -> ::httpmock::Then {
19855 self.0
19856 }
19857
19858 pub fn ok(self, value: &types::UserResultsPage) -> Self {
19859 Self(
19860 self.0
19861 .status(200u16)
19862 .header("content-type", "application/json")
19863 .json_body_obj(value),
19864 )
19865 }
19866
19867 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
19868 assert_eq!(status / 100u16, 4u16);
19869 Self(
19870 self.0
19871 .status(status)
19872 .header("content-type", "application/json")
19873 .json_body_obj(value),
19874 )
19875 }
19876
19877 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
19878 assert_eq!(status / 100u16, 5u16);
19879 Self(
19880 self.0
19881 .status(status)
19882 .header("content-type", "application/json")
19883 .json_body_obj(value),
19884 )
19885 }
19886 }
19887
19888 pub struct SiloUserViewWhen(::httpmock::When);
19889 impl SiloUserViewWhen {
19890 pub fn new(inner: ::httpmock::When) -> Self {
19891 Self(
19892 inner
19893 .method(::httpmock::Method::GET)
19894 .path_matches(regex::Regex::new("^/v1/system/users/[^/]*$").unwrap()),
19895 )
19896 }
19897
19898 pub fn into_inner(self) -> ::httpmock::When {
19899 self.0
19900 }
19901
19902 pub fn user_id(self, value: &::uuid::Uuid) -> Self {
19903 let re =
19904 regex::Regex::new(&format!("^/v1/system/users/{}$", value.to_string())).unwrap();
19905 Self(self.0.path_matches(re))
19906 }
19907
19908 pub fn silo(self, value: &types::NameOrId) -> Self {
19909 Self(self.0.query_param("silo", value.to_string()))
19910 }
19911 }
19912
19913 pub struct SiloUserViewThen(::httpmock::Then);
19914 impl SiloUserViewThen {
19915 pub fn new(inner: ::httpmock::Then) -> Self {
19916 Self(inner)
19917 }
19918
19919 pub fn into_inner(self) -> ::httpmock::Then {
19920 self.0
19921 }
19922
19923 pub fn ok(self, value: &types::User) -> Self {
19924 Self(
19925 self.0
19926 .status(200u16)
19927 .header("content-type", "application/json")
19928 .json_body_obj(value),
19929 )
19930 }
19931
19932 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
19933 assert_eq!(status / 100u16, 4u16);
19934 Self(
19935 self.0
19936 .status(status)
19937 .header("content-type", "application/json")
19938 .json_body_obj(value),
19939 )
19940 }
19941
19942 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
19943 assert_eq!(status / 100u16, 5u16);
19944 Self(
19945 self.0
19946 .status(status)
19947 .header("content-type", "application/json")
19948 .json_body_obj(value),
19949 )
19950 }
19951 }
19952
19953 pub struct UserBuiltinListWhen(::httpmock::When);
19954 impl UserBuiltinListWhen {
19955 pub fn new(inner: ::httpmock::When) -> Self {
19956 Self(
19957 inner
19958 .method(::httpmock::Method::GET)
19959 .path_matches(regex::Regex::new("^/v1/system/users-builtin$").unwrap()),
19960 )
19961 }
19962
19963 pub fn into_inner(self) -> ::httpmock::When {
19964 self.0
19965 }
19966
19967 pub fn limit<T>(self, value: T) -> Self
19968 where
19969 T: Into<Option<::std::num::NonZeroU32>>,
19970 {
19971 if let Some(value) = value.into() {
19972 Self(self.0.query_param("limit", value.to_string()))
19973 } else {
19974 Self(self.0.query_param_missing("limit"))
19975 }
19976 }
19977
19978 pub fn page_token<'a, T>(self, value: T) -> Self
19979 where
19980 T: Into<Option<&'a str>>,
19981 {
19982 if let Some(value) = value.into() {
19983 Self(self.0.query_param("page_token", value.to_string()))
19984 } else {
19985 Self(self.0.query_param_missing("page_token"))
19986 }
19987 }
19988
19989 pub fn sort_by<T>(self, value: T) -> Self
19990 where
19991 T: Into<Option<types::NameSortMode>>,
19992 {
19993 if let Some(value) = value.into() {
19994 Self(self.0.query_param("sort_by", value.to_string()))
19995 } else {
19996 Self(self.0.query_param_missing("sort_by"))
19997 }
19998 }
19999 }
20000
20001 pub struct UserBuiltinListThen(::httpmock::Then);
20002 impl UserBuiltinListThen {
20003 pub fn new(inner: ::httpmock::Then) -> Self {
20004 Self(inner)
20005 }
20006
20007 pub fn into_inner(self) -> ::httpmock::Then {
20008 self.0
20009 }
20010
20011 pub fn ok(self, value: &types::UserBuiltinResultsPage) -> Self {
20012 Self(
20013 self.0
20014 .status(200u16)
20015 .header("content-type", "application/json")
20016 .json_body_obj(value),
20017 )
20018 }
20019
20020 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
20021 assert_eq!(status / 100u16, 4u16);
20022 Self(
20023 self.0
20024 .status(status)
20025 .header("content-type", "application/json")
20026 .json_body_obj(value),
20027 )
20028 }
20029
20030 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
20031 assert_eq!(status / 100u16, 5u16);
20032 Self(
20033 self.0
20034 .status(status)
20035 .header("content-type", "application/json")
20036 .json_body_obj(value),
20037 )
20038 }
20039 }
20040
20041 pub struct UserBuiltinViewWhen(::httpmock::When);
20042 impl UserBuiltinViewWhen {
20043 pub fn new(inner: ::httpmock::When) -> Self {
20044 Self(
20045 inner
20046 .method(::httpmock::Method::GET)
20047 .path_matches(regex::Regex::new("^/v1/system/users-builtin/[^/]*$").unwrap()),
20048 )
20049 }
20050
20051 pub fn into_inner(self) -> ::httpmock::When {
20052 self.0
20053 }
20054
20055 pub fn user(self, value: &types::NameOrId) -> Self {
20056 let re =
20057 regex::Regex::new(&format!("^/v1/system/users-builtin/{}$", value.to_string()))
20058 .unwrap();
20059 Self(self.0.path_matches(re))
20060 }
20061 }
20062
20063 pub struct UserBuiltinViewThen(::httpmock::Then);
20064 impl UserBuiltinViewThen {
20065 pub fn new(inner: ::httpmock::Then) -> Self {
20066 Self(inner)
20067 }
20068
20069 pub fn into_inner(self) -> ::httpmock::Then {
20070 self.0
20071 }
20072
20073 pub fn ok(self, value: &types::UserBuiltin) -> Self {
20074 Self(
20075 self.0
20076 .status(200u16)
20077 .header("content-type", "application/json")
20078 .json_body_obj(value),
20079 )
20080 }
20081
20082 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
20083 assert_eq!(status / 100u16, 4u16);
20084 Self(
20085 self.0
20086 .status(status)
20087 .header("content-type", "application/json")
20088 .json_body_obj(value),
20089 )
20090 }
20091
20092 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
20093 assert_eq!(status / 100u16, 5u16);
20094 Self(
20095 self.0
20096 .status(status)
20097 .header("content-type", "application/json")
20098 .json_body_obj(value),
20099 )
20100 }
20101 }
20102
20103 pub struct SiloUtilizationListWhen(::httpmock::When);
20104 impl SiloUtilizationListWhen {
20105 pub fn new(inner: ::httpmock::When) -> Self {
20106 Self(
20107 inner
20108 .method(::httpmock::Method::GET)
20109 .path_matches(regex::Regex::new("^/v1/system/utilization/silos$").unwrap()),
20110 )
20111 }
20112
20113 pub fn into_inner(self) -> ::httpmock::When {
20114 self.0
20115 }
20116
20117 pub fn limit<T>(self, value: T) -> Self
20118 where
20119 T: Into<Option<::std::num::NonZeroU32>>,
20120 {
20121 if let Some(value) = value.into() {
20122 Self(self.0.query_param("limit", value.to_string()))
20123 } else {
20124 Self(self.0.query_param_missing("limit"))
20125 }
20126 }
20127
20128 pub fn page_token<'a, T>(self, value: T) -> Self
20129 where
20130 T: Into<Option<&'a str>>,
20131 {
20132 if let Some(value) = value.into() {
20133 Self(self.0.query_param("page_token", value.to_string()))
20134 } else {
20135 Self(self.0.query_param_missing("page_token"))
20136 }
20137 }
20138
20139 pub fn sort_by<T>(self, value: T) -> Self
20140 where
20141 T: Into<Option<types::NameOrIdSortMode>>,
20142 {
20143 if let Some(value) = value.into() {
20144 Self(self.0.query_param("sort_by", value.to_string()))
20145 } else {
20146 Self(self.0.query_param_missing("sort_by"))
20147 }
20148 }
20149 }
20150
20151 pub struct SiloUtilizationListThen(::httpmock::Then);
20152 impl SiloUtilizationListThen {
20153 pub fn new(inner: ::httpmock::Then) -> Self {
20154 Self(inner)
20155 }
20156
20157 pub fn into_inner(self) -> ::httpmock::Then {
20158 self.0
20159 }
20160
20161 pub fn ok(self, value: &types::SiloUtilizationResultsPage) -> Self {
20162 Self(
20163 self.0
20164 .status(200u16)
20165 .header("content-type", "application/json")
20166 .json_body_obj(value),
20167 )
20168 }
20169
20170 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
20171 assert_eq!(status / 100u16, 4u16);
20172 Self(
20173 self.0
20174 .status(status)
20175 .header("content-type", "application/json")
20176 .json_body_obj(value),
20177 )
20178 }
20179
20180 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
20181 assert_eq!(status / 100u16, 5u16);
20182 Self(
20183 self.0
20184 .status(status)
20185 .header("content-type", "application/json")
20186 .json_body_obj(value),
20187 )
20188 }
20189 }
20190
20191 pub struct SiloUtilizationViewWhen(::httpmock::When);
20192 impl SiloUtilizationViewWhen {
20193 pub fn new(inner: ::httpmock::When) -> Self {
20194 Self(
20195 inner.method(::httpmock::Method::GET).path_matches(
20196 regex::Regex::new("^/v1/system/utilization/silos/[^/]*$").unwrap(),
20197 ),
20198 )
20199 }
20200
20201 pub fn into_inner(self) -> ::httpmock::When {
20202 self.0
20203 }
20204
20205 pub fn silo(self, value: &types::NameOrId) -> Self {
20206 let re = regex::Regex::new(&format!(
20207 "^/v1/system/utilization/silos/{}$",
20208 value.to_string()
20209 ))
20210 .unwrap();
20211 Self(self.0.path_matches(re))
20212 }
20213 }
20214
20215 pub struct SiloUtilizationViewThen(::httpmock::Then);
20216 impl SiloUtilizationViewThen {
20217 pub fn new(inner: ::httpmock::Then) -> Self {
20218 Self(inner)
20219 }
20220
20221 pub fn into_inner(self) -> ::httpmock::Then {
20222 self.0
20223 }
20224
20225 pub fn ok(self, value: &types::SiloUtilization) -> Self {
20226 Self(
20227 self.0
20228 .status(200u16)
20229 .header("content-type", "application/json")
20230 .json_body_obj(value),
20231 )
20232 }
20233
20234 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
20235 assert_eq!(status / 100u16, 4u16);
20236 Self(
20237 self.0
20238 .status(status)
20239 .header("content-type", "application/json")
20240 .json_body_obj(value),
20241 )
20242 }
20243
20244 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
20245 assert_eq!(status / 100u16, 5u16);
20246 Self(
20247 self.0
20248 .status(status)
20249 .header("content-type", "application/json")
20250 .json_body_obj(value),
20251 )
20252 }
20253 }
20254
20255 pub struct TimeseriesQueryWhen(::httpmock::When);
20256 impl TimeseriesQueryWhen {
20257 pub fn new(inner: ::httpmock::When) -> Self {
20258 Self(
20259 inner
20260 .method(::httpmock::Method::POST)
20261 .path_matches(regex::Regex::new("^/v1/timeseries/query$").unwrap()),
20262 )
20263 }
20264
20265 pub fn into_inner(self) -> ::httpmock::When {
20266 self.0
20267 }
20268
20269 pub fn project(self, value: &types::NameOrId) -> Self {
20270 Self(self.0.query_param("project", value.to_string()))
20271 }
20272
20273 pub fn body(self, value: &types::TimeseriesQuery) -> Self {
20274 Self(self.0.json_body_obj(value))
20275 }
20276 }
20277
20278 pub struct TimeseriesQueryThen(::httpmock::Then);
20279 impl TimeseriesQueryThen {
20280 pub fn new(inner: ::httpmock::Then) -> Self {
20281 Self(inner)
20282 }
20283
20284 pub fn into_inner(self) -> ::httpmock::Then {
20285 self.0
20286 }
20287
20288 pub fn ok(self, value: &types::OxqlQueryResult) -> Self {
20289 Self(
20290 self.0
20291 .status(200u16)
20292 .header("content-type", "application/json")
20293 .json_body_obj(value),
20294 )
20295 }
20296
20297 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
20298 assert_eq!(status / 100u16, 4u16);
20299 Self(
20300 self.0
20301 .status(status)
20302 .header("content-type", "application/json")
20303 .json_body_obj(value),
20304 )
20305 }
20306
20307 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
20308 assert_eq!(status / 100u16, 5u16);
20309 Self(
20310 self.0
20311 .status(status)
20312 .header("content-type", "application/json")
20313 .json_body_obj(value),
20314 )
20315 }
20316 }
20317
20318 pub struct UserListWhen(::httpmock::When);
20319 impl UserListWhen {
20320 pub fn new(inner: ::httpmock::When) -> Self {
20321 Self(
20322 inner
20323 .method(::httpmock::Method::GET)
20324 .path_matches(regex::Regex::new("^/v1/users$").unwrap()),
20325 )
20326 }
20327
20328 pub fn into_inner(self) -> ::httpmock::When {
20329 self.0
20330 }
20331
20332 pub fn group<'a, T>(self, value: T) -> Self
20333 where
20334 T: Into<Option<&'a ::uuid::Uuid>>,
20335 {
20336 if let Some(value) = value.into() {
20337 Self(self.0.query_param("group", value.to_string()))
20338 } else {
20339 Self(self.0.query_param_missing("group"))
20340 }
20341 }
20342
20343 pub fn limit<T>(self, value: T) -> Self
20344 where
20345 T: Into<Option<::std::num::NonZeroU32>>,
20346 {
20347 if let Some(value) = value.into() {
20348 Self(self.0.query_param("limit", value.to_string()))
20349 } else {
20350 Self(self.0.query_param_missing("limit"))
20351 }
20352 }
20353
20354 pub fn page_token<'a, T>(self, value: T) -> Self
20355 where
20356 T: Into<Option<&'a str>>,
20357 {
20358 if let Some(value) = value.into() {
20359 Self(self.0.query_param("page_token", value.to_string()))
20360 } else {
20361 Self(self.0.query_param_missing("page_token"))
20362 }
20363 }
20364
20365 pub fn sort_by<T>(self, value: T) -> Self
20366 where
20367 T: Into<Option<types::IdSortMode>>,
20368 {
20369 if let Some(value) = value.into() {
20370 Self(self.0.query_param("sort_by", value.to_string()))
20371 } else {
20372 Self(self.0.query_param_missing("sort_by"))
20373 }
20374 }
20375 }
20376
20377 pub struct UserListThen(::httpmock::Then);
20378 impl UserListThen {
20379 pub fn new(inner: ::httpmock::Then) -> Self {
20380 Self(inner)
20381 }
20382
20383 pub fn into_inner(self) -> ::httpmock::Then {
20384 self.0
20385 }
20386
20387 pub fn ok(self, value: &types::UserResultsPage) -> Self {
20388 Self(
20389 self.0
20390 .status(200u16)
20391 .header("content-type", "application/json")
20392 .json_body_obj(value),
20393 )
20394 }
20395
20396 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
20397 assert_eq!(status / 100u16, 4u16);
20398 Self(
20399 self.0
20400 .status(status)
20401 .header("content-type", "application/json")
20402 .json_body_obj(value),
20403 )
20404 }
20405
20406 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
20407 assert_eq!(status / 100u16, 5u16);
20408 Self(
20409 self.0
20410 .status(status)
20411 .header("content-type", "application/json")
20412 .json_body_obj(value),
20413 )
20414 }
20415 }
20416
20417 pub struct UserViewWhen(::httpmock::When);
20418 impl UserViewWhen {
20419 pub fn new(inner: ::httpmock::When) -> Self {
20420 Self(
20421 inner
20422 .method(::httpmock::Method::GET)
20423 .path_matches(regex::Regex::new("^/v1/users/[^/]*$").unwrap()),
20424 )
20425 }
20426
20427 pub fn into_inner(self) -> ::httpmock::When {
20428 self.0
20429 }
20430
20431 pub fn user_id(self, value: &::uuid::Uuid) -> Self {
20432 let re = regex::Regex::new(&format!("^/v1/users/{}$", value.to_string())).unwrap();
20433 Self(self.0.path_matches(re))
20434 }
20435 }
20436
20437 pub struct UserViewThen(::httpmock::Then);
20438 impl UserViewThen {
20439 pub fn new(inner: ::httpmock::Then) -> Self {
20440 Self(inner)
20441 }
20442
20443 pub fn into_inner(self) -> ::httpmock::Then {
20444 self.0
20445 }
20446
20447 pub fn ok(self, value: &types::User) -> Self {
20448 Self(
20449 self.0
20450 .status(200u16)
20451 .header("content-type", "application/json")
20452 .json_body_obj(value),
20453 )
20454 }
20455
20456 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
20457 assert_eq!(status / 100u16, 4u16);
20458 Self(
20459 self.0
20460 .status(status)
20461 .header("content-type", "application/json")
20462 .json_body_obj(value),
20463 )
20464 }
20465
20466 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
20467 assert_eq!(status / 100u16, 5u16);
20468 Self(
20469 self.0
20470 .status(status)
20471 .header("content-type", "application/json")
20472 .json_body_obj(value),
20473 )
20474 }
20475 }
20476
20477 pub struct UserTokenListWhen(::httpmock::When);
20478 impl UserTokenListWhen {
20479 pub fn new(inner: ::httpmock::When) -> Self {
20480 Self(
20481 inner
20482 .method(::httpmock::Method::GET)
20483 .path_matches(regex::Regex::new("^/v1/users/[^/]*/access-tokens$").unwrap()),
20484 )
20485 }
20486
20487 pub fn into_inner(self) -> ::httpmock::When {
20488 self.0
20489 }
20490
20491 pub fn user_id(self, value: &::uuid::Uuid) -> Self {
20492 let re = regex::Regex::new(&format!("^/v1/users/{}/access-tokens$", value.to_string()))
20493 .unwrap();
20494 Self(self.0.path_matches(re))
20495 }
20496
20497 pub fn limit<T>(self, value: T) -> Self
20498 where
20499 T: Into<Option<::std::num::NonZeroU32>>,
20500 {
20501 if let Some(value) = value.into() {
20502 Self(self.0.query_param("limit", value.to_string()))
20503 } else {
20504 Self(self.0.query_param_missing("limit"))
20505 }
20506 }
20507
20508 pub fn page_token<'a, T>(self, value: T) -> Self
20509 where
20510 T: Into<Option<&'a str>>,
20511 {
20512 if let Some(value) = value.into() {
20513 Self(self.0.query_param("page_token", value.to_string()))
20514 } else {
20515 Self(self.0.query_param_missing("page_token"))
20516 }
20517 }
20518
20519 pub fn sort_by<T>(self, value: T) -> Self
20520 where
20521 T: Into<Option<types::IdSortMode>>,
20522 {
20523 if let Some(value) = value.into() {
20524 Self(self.0.query_param("sort_by", value.to_string()))
20525 } else {
20526 Self(self.0.query_param_missing("sort_by"))
20527 }
20528 }
20529 }
20530
20531 pub struct UserTokenListThen(::httpmock::Then);
20532 impl UserTokenListThen {
20533 pub fn new(inner: ::httpmock::Then) -> Self {
20534 Self(inner)
20535 }
20536
20537 pub fn into_inner(self) -> ::httpmock::Then {
20538 self.0
20539 }
20540
20541 pub fn ok(self, value: &types::DeviceAccessTokenResultsPage) -> Self {
20542 Self(
20543 self.0
20544 .status(200u16)
20545 .header("content-type", "application/json")
20546 .json_body_obj(value),
20547 )
20548 }
20549
20550 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
20551 assert_eq!(status / 100u16, 4u16);
20552 Self(
20553 self.0
20554 .status(status)
20555 .header("content-type", "application/json")
20556 .json_body_obj(value),
20557 )
20558 }
20559
20560 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
20561 assert_eq!(status / 100u16, 5u16);
20562 Self(
20563 self.0
20564 .status(status)
20565 .header("content-type", "application/json")
20566 .json_body_obj(value),
20567 )
20568 }
20569 }
20570
20571 pub struct UserLogoutWhen(::httpmock::When);
20572 impl UserLogoutWhen {
20573 pub fn new(inner: ::httpmock::When) -> Self {
20574 Self(
20575 inner
20576 .method(::httpmock::Method::POST)
20577 .path_matches(regex::Regex::new("^/v1/users/[^/]*/logout$").unwrap()),
20578 )
20579 }
20580
20581 pub fn into_inner(self) -> ::httpmock::When {
20582 self.0
20583 }
20584
20585 pub fn user_id(self, value: &::uuid::Uuid) -> Self {
20586 let re =
20587 regex::Regex::new(&format!("^/v1/users/{}/logout$", value.to_string())).unwrap();
20588 Self(self.0.path_matches(re))
20589 }
20590 }
20591
20592 pub struct UserLogoutThen(::httpmock::Then);
20593 impl UserLogoutThen {
20594 pub fn new(inner: ::httpmock::Then) -> Self {
20595 Self(inner)
20596 }
20597
20598 pub fn into_inner(self) -> ::httpmock::Then {
20599 self.0
20600 }
20601
20602 pub fn no_content(self) -> Self {
20603 Self(self.0.status(204u16))
20604 }
20605
20606 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
20607 assert_eq!(status / 100u16, 4u16);
20608 Self(
20609 self.0
20610 .status(status)
20611 .header("content-type", "application/json")
20612 .json_body_obj(value),
20613 )
20614 }
20615
20616 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
20617 assert_eq!(status / 100u16, 5u16);
20618 Self(
20619 self.0
20620 .status(status)
20621 .header("content-type", "application/json")
20622 .json_body_obj(value),
20623 )
20624 }
20625 }
20626
20627 pub struct UserSessionListWhen(::httpmock::When);
20628 impl UserSessionListWhen {
20629 pub fn new(inner: ::httpmock::When) -> Self {
20630 Self(
20631 inner
20632 .method(::httpmock::Method::GET)
20633 .path_matches(regex::Regex::new("^/v1/users/[^/]*/sessions$").unwrap()),
20634 )
20635 }
20636
20637 pub fn into_inner(self) -> ::httpmock::When {
20638 self.0
20639 }
20640
20641 pub fn user_id(self, value: &::uuid::Uuid) -> Self {
20642 let re =
20643 regex::Regex::new(&format!("^/v1/users/{}/sessions$", value.to_string())).unwrap();
20644 Self(self.0.path_matches(re))
20645 }
20646
20647 pub fn limit<T>(self, value: T) -> Self
20648 where
20649 T: Into<Option<::std::num::NonZeroU32>>,
20650 {
20651 if let Some(value) = value.into() {
20652 Self(self.0.query_param("limit", value.to_string()))
20653 } else {
20654 Self(self.0.query_param_missing("limit"))
20655 }
20656 }
20657
20658 pub fn page_token<'a, T>(self, value: T) -> Self
20659 where
20660 T: Into<Option<&'a str>>,
20661 {
20662 if let Some(value) = value.into() {
20663 Self(self.0.query_param("page_token", value.to_string()))
20664 } else {
20665 Self(self.0.query_param_missing("page_token"))
20666 }
20667 }
20668
20669 pub fn sort_by<T>(self, value: T) -> Self
20670 where
20671 T: Into<Option<types::IdSortMode>>,
20672 {
20673 if let Some(value) = value.into() {
20674 Self(self.0.query_param("sort_by", value.to_string()))
20675 } else {
20676 Self(self.0.query_param_missing("sort_by"))
20677 }
20678 }
20679 }
20680
20681 pub struct UserSessionListThen(::httpmock::Then);
20682 impl UserSessionListThen {
20683 pub fn new(inner: ::httpmock::Then) -> Self {
20684 Self(inner)
20685 }
20686
20687 pub fn into_inner(self) -> ::httpmock::Then {
20688 self.0
20689 }
20690
20691 pub fn ok(self, value: &types::ConsoleSessionResultsPage) -> Self {
20692 Self(
20693 self.0
20694 .status(200u16)
20695 .header("content-type", "application/json")
20696 .json_body_obj(value),
20697 )
20698 }
20699
20700 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
20701 assert_eq!(status / 100u16, 4u16);
20702 Self(
20703 self.0
20704 .status(status)
20705 .header("content-type", "application/json")
20706 .json_body_obj(value),
20707 )
20708 }
20709
20710 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
20711 assert_eq!(status / 100u16, 5u16);
20712 Self(
20713 self.0
20714 .status(status)
20715 .header("content-type", "application/json")
20716 .json_body_obj(value),
20717 )
20718 }
20719 }
20720
20721 pub struct UtilizationViewWhen(::httpmock::When);
20722 impl UtilizationViewWhen {
20723 pub fn new(inner: ::httpmock::When) -> Self {
20724 Self(
20725 inner
20726 .method(::httpmock::Method::GET)
20727 .path_matches(regex::Regex::new("^/v1/utilization$").unwrap()),
20728 )
20729 }
20730
20731 pub fn into_inner(self) -> ::httpmock::When {
20732 self.0
20733 }
20734 }
20735
20736 pub struct UtilizationViewThen(::httpmock::Then);
20737 impl UtilizationViewThen {
20738 pub fn new(inner: ::httpmock::Then) -> Self {
20739 Self(inner)
20740 }
20741
20742 pub fn into_inner(self) -> ::httpmock::Then {
20743 self.0
20744 }
20745
20746 pub fn ok(self, value: &types::Utilization) -> Self {
20747 Self(
20748 self.0
20749 .status(200u16)
20750 .header("content-type", "application/json")
20751 .json_body_obj(value),
20752 )
20753 }
20754
20755 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
20756 assert_eq!(status / 100u16, 4u16);
20757 Self(
20758 self.0
20759 .status(status)
20760 .header("content-type", "application/json")
20761 .json_body_obj(value),
20762 )
20763 }
20764
20765 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
20766 assert_eq!(status / 100u16, 5u16);
20767 Self(
20768 self.0
20769 .status(status)
20770 .header("content-type", "application/json")
20771 .json_body_obj(value),
20772 )
20773 }
20774 }
20775
20776 pub struct VpcFirewallRulesViewWhen(::httpmock::When);
20777 impl VpcFirewallRulesViewWhen {
20778 pub fn new(inner: ::httpmock::When) -> Self {
20779 Self(
20780 inner
20781 .method(::httpmock::Method::GET)
20782 .path_matches(regex::Regex::new("^/v1/vpc-firewall-rules$").unwrap()),
20783 )
20784 }
20785
20786 pub fn into_inner(self) -> ::httpmock::When {
20787 self.0
20788 }
20789
20790 pub fn project<'a, T>(self, value: T) -> Self
20791 where
20792 T: Into<Option<&'a types::NameOrId>>,
20793 {
20794 if let Some(value) = value.into() {
20795 Self(self.0.query_param("project", value.to_string()))
20796 } else {
20797 Self(self.0.query_param_missing("project"))
20798 }
20799 }
20800
20801 pub fn vpc(self, value: &types::NameOrId) -> Self {
20802 Self(self.0.query_param("vpc", value.to_string()))
20803 }
20804 }
20805
20806 pub struct VpcFirewallRulesViewThen(::httpmock::Then);
20807 impl VpcFirewallRulesViewThen {
20808 pub fn new(inner: ::httpmock::Then) -> Self {
20809 Self(inner)
20810 }
20811
20812 pub fn into_inner(self) -> ::httpmock::Then {
20813 self.0
20814 }
20815
20816 pub fn ok(self, value: &types::VpcFirewallRules) -> Self {
20817 Self(
20818 self.0
20819 .status(200u16)
20820 .header("content-type", "application/json")
20821 .json_body_obj(value),
20822 )
20823 }
20824
20825 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
20826 assert_eq!(status / 100u16, 4u16);
20827 Self(
20828 self.0
20829 .status(status)
20830 .header("content-type", "application/json")
20831 .json_body_obj(value),
20832 )
20833 }
20834
20835 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
20836 assert_eq!(status / 100u16, 5u16);
20837 Self(
20838 self.0
20839 .status(status)
20840 .header("content-type", "application/json")
20841 .json_body_obj(value),
20842 )
20843 }
20844 }
20845
20846 pub struct VpcFirewallRulesUpdateWhen(::httpmock::When);
20847 impl VpcFirewallRulesUpdateWhen {
20848 pub fn new(inner: ::httpmock::When) -> Self {
20849 Self(
20850 inner
20851 .method(::httpmock::Method::PUT)
20852 .path_matches(regex::Regex::new("^/v1/vpc-firewall-rules$").unwrap()),
20853 )
20854 }
20855
20856 pub fn into_inner(self) -> ::httpmock::When {
20857 self.0
20858 }
20859
20860 pub fn project<'a, T>(self, value: T) -> Self
20861 where
20862 T: Into<Option<&'a types::NameOrId>>,
20863 {
20864 if let Some(value) = value.into() {
20865 Self(self.0.query_param("project", value.to_string()))
20866 } else {
20867 Self(self.0.query_param_missing("project"))
20868 }
20869 }
20870
20871 pub fn vpc(self, value: &types::NameOrId) -> Self {
20872 Self(self.0.query_param("vpc", value.to_string()))
20873 }
20874
20875 pub fn body(self, value: &types::VpcFirewallRuleUpdateParams) -> Self {
20876 Self(self.0.json_body_obj(value))
20877 }
20878 }
20879
20880 pub struct VpcFirewallRulesUpdateThen(::httpmock::Then);
20881 impl VpcFirewallRulesUpdateThen {
20882 pub fn new(inner: ::httpmock::Then) -> Self {
20883 Self(inner)
20884 }
20885
20886 pub fn into_inner(self) -> ::httpmock::Then {
20887 self.0
20888 }
20889
20890 pub fn ok(self, value: &types::VpcFirewallRules) -> Self {
20891 Self(
20892 self.0
20893 .status(200u16)
20894 .header("content-type", "application/json")
20895 .json_body_obj(value),
20896 )
20897 }
20898
20899 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
20900 assert_eq!(status / 100u16, 4u16);
20901 Self(
20902 self.0
20903 .status(status)
20904 .header("content-type", "application/json")
20905 .json_body_obj(value),
20906 )
20907 }
20908
20909 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
20910 assert_eq!(status / 100u16, 5u16);
20911 Self(
20912 self.0
20913 .status(status)
20914 .header("content-type", "application/json")
20915 .json_body_obj(value),
20916 )
20917 }
20918 }
20919
20920 pub struct VpcRouterRouteListWhen(::httpmock::When);
20921 impl VpcRouterRouteListWhen {
20922 pub fn new(inner: ::httpmock::When) -> Self {
20923 Self(
20924 inner
20925 .method(::httpmock::Method::GET)
20926 .path_matches(regex::Regex::new("^/v1/vpc-router-routes$").unwrap()),
20927 )
20928 }
20929
20930 pub fn into_inner(self) -> ::httpmock::When {
20931 self.0
20932 }
20933
20934 pub fn limit<T>(self, value: T) -> Self
20935 where
20936 T: Into<Option<::std::num::NonZeroU32>>,
20937 {
20938 if let Some(value) = value.into() {
20939 Self(self.0.query_param("limit", value.to_string()))
20940 } else {
20941 Self(self.0.query_param_missing("limit"))
20942 }
20943 }
20944
20945 pub fn page_token<'a, T>(self, value: T) -> Self
20946 where
20947 T: Into<Option<&'a str>>,
20948 {
20949 if let Some(value) = value.into() {
20950 Self(self.0.query_param("page_token", value.to_string()))
20951 } else {
20952 Self(self.0.query_param_missing("page_token"))
20953 }
20954 }
20955
20956 pub fn project<'a, T>(self, value: T) -> Self
20957 where
20958 T: Into<Option<&'a types::NameOrId>>,
20959 {
20960 if let Some(value) = value.into() {
20961 Self(self.0.query_param("project", value.to_string()))
20962 } else {
20963 Self(self.0.query_param_missing("project"))
20964 }
20965 }
20966
20967 pub fn router<'a, T>(self, value: T) -> Self
20968 where
20969 T: Into<Option<&'a types::NameOrId>>,
20970 {
20971 if let Some(value) = value.into() {
20972 Self(self.0.query_param("router", value.to_string()))
20973 } else {
20974 Self(self.0.query_param_missing("router"))
20975 }
20976 }
20977
20978 pub fn sort_by<T>(self, value: T) -> Self
20979 where
20980 T: Into<Option<types::NameOrIdSortMode>>,
20981 {
20982 if let Some(value) = value.into() {
20983 Self(self.0.query_param("sort_by", value.to_string()))
20984 } else {
20985 Self(self.0.query_param_missing("sort_by"))
20986 }
20987 }
20988
20989 pub fn vpc<'a, T>(self, value: T) -> Self
20990 where
20991 T: Into<Option<&'a types::NameOrId>>,
20992 {
20993 if let Some(value) = value.into() {
20994 Self(self.0.query_param("vpc", value.to_string()))
20995 } else {
20996 Self(self.0.query_param_missing("vpc"))
20997 }
20998 }
20999 }
21000
21001 pub struct VpcRouterRouteListThen(::httpmock::Then);
21002 impl VpcRouterRouteListThen {
21003 pub fn new(inner: ::httpmock::Then) -> Self {
21004 Self(inner)
21005 }
21006
21007 pub fn into_inner(self) -> ::httpmock::Then {
21008 self.0
21009 }
21010
21011 pub fn ok(self, value: &types::RouterRouteResultsPage) -> Self {
21012 Self(
21013 self.0
21014 .status(200u16)
21015 .header("content-type", "application/json")
21016 .json_body_obj(value),
21017 )
21018 }
21019
21020 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
21021 assert_eq!(status / 100u16, 4u16);
21022 Self(
21023 self.0
21024 .status(status)
21025 .header("content-type", "application/json")
21026 .json_body_obj(value),
21027 )
21028 }
21029
21030 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
21031 assert_eq!(status / 100u16, 5u16);
21032 Self(
21033 self.0
21034 .status(status)
21035 .header("content-type", "application/json")
21036 .json_body_obj(value),
21037 )
21038 }
21039 }
21040
21041 pub struct VpcRouterRouteCreateWhen(::httpmock::When);
21042 impl VpcRouterRouteCreateWhen {
21043 pub fn new(inner: ::httpmock::When) -> Self {
21044 Self(
21045 inner
21046 .method(::httpmock::Method::POST)
21047 .path_matches(regex::Regex::new("^/v1/vpc-router-routes$").unwrap()),
21048 )
21049 }
21050
21051 pub fn into_inner(self) -> ::httpmock::When {
21052 self.0
21053 }
21054
21055 pub fn project<'a, T>(self, value: T) -> Self
21056 where
21057 T: Into<Option<&'a types::NameOrId>>,
21058 {
21059 if let Some(value) = value.into() {
21060 Self(self.0.query_param("project", value.to_string()))
21061 } else {
21062 Self(self.0.query_param_missing("project"))
21063 }
21064 }
21065
21066 pub fn router(self, value: &types::NameOrId) -> Self {
21067 Self(self.0.query_param("router", value.to_string()))
21068 }
21069
21070 pub fn vpc<'a, T>(self, value: T) -> Self
21071 where
21072 T: Into<Option<&'a types::NameOrId>>,
21073 {
21074 if let Some(value) = value.into() {
21075 Self(self.0.query_param("vpc", value.to_string()))
21076 } else {
21077 Self(self.0.query_param_missing("vpc"))
21078 }
21079 }
21080
21081 pub fn body(self, value: &types::RouterRouteCreate) -> Self {
21082 Self(self.0.json_body_obj(value))
21083 }
21084 }
21085
21086 pub struct VpcRouterRouteCreateThen(::httpmock::Then);
21087 impl VpcRouterRouteCreateThen {
21088 pub fn new(inner: ::httpmock::Then) -> Self {
21089 Self(inner)
21090 }
21091
21092 pub fn into_inner(self) -> ::httpmock::Then {
21093 self.0
21094 }
21095
21096 pub fn created(self, value: &types::RouterRoute) -> Self {
21097 Self(
21098 self.0
21099 .status(201u16)
21100 .header("content-type", "application/json")
21101 .json_body_obj(value),
21102 )
21103 }
21104
21105 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
21106 assert_eq!(status / 100u16, 4u16);
21107 Self(
21108 self.0
21109 .status(status)
21110 .header("content-type", "application/json")
21111 .json_body_obj(value),
21112 )
21113 }
21114
21115 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
21116 assert_eq!(status / 100u16, 5u16);
21117 Self(
21118 self.0
21119 .status(status)
21120 .header("content-type", "application/json")
21121 .json_body_obj(value),
21122 )
21123 }
21124 }
21125
21126 pub struct VpcRouterRouteViewWhen(::httpmock::When);
21127 impl VpcRouterRouteViewWhen {
21128 pub fn new(inner: ::httpmock::When) -> Self {
21129 Self(
21130 inner
21131 .method(::httpmock::Method::GET)
21132 .path_matches(regex::Regex::new("^/v1/vpc-router-routes/[^/]*$").unwrap()),
21133 )
21134 }
21135
21136 pub fn into_inner(self) -> ::httpmock::When {
21137 self.0
21138 }
21139
21140 pub fn route(self, value: &types::NameOrId) -> Self {
21141 let re = regex::Regex::new(&format!("^/v1/vpc-router-routes/{}$", value.to_string()))
21142 .unwrap();
21143 Self(self.0.path_matches(re))
21144 }
21145
21146 pub fn project<'a, T>(self, value: T) -> Self
21147 where
21148 T: Into<Option<&'a types::NameOrId>>,
21149 {
21150 if let Some(value) = value.into() {
21151 Self(self.0.query_param("project", value.to_string()))
21152 } else {
21153 Self(self.0.query_param_missing("project"))
21154 }
21155 }
21156
21157 pub fn router<'a, T>(self, value: T) -> Self
21158 where
21159 T: Into<Option<&'a types::NameOrId>>,
21160 {
21161 if let Some(value) = value.into() {
21162 Self(self.0.query_param("router", value.to_string()))
21163 } else {
21164 Self(self.0.query_param_missing("router"))
21165 }
21166 }
21167
21168 pub fn vpc<'a, T>(self, value: T) -> Self
21169 where
21170 T: Into<Option<&'a types::NameOrId>>,
21171 {
21172 if let Some(value) = value.into() {
21173 Self(self.0.query_param("vpc", value.to_string()))
21174 } else {
21175 Self(self.0.query_param_missing("vpc"))
21176 }
21177 }
21178 }
21179
21180 pub struct VpcRouterRouteViewThen(::httpmock::Then);
21181 impl VpcRouterRouteViewThen {
21182 pub fn new(inner: ::httpmock::Then) -> Self {
21183 Self(inner)
21184 }
21185
21186 pub fn into_inner(self) -> ::httpmock::Then {
21187 self.0
21188 }
21189
21190 pub fn ok(self, value: &types::RouterRoute) -> Self {
21191 Self(
21192 self.0
21193 .status(200u16)
21194 .header("content-type", "application/json")
21195 .json_body_obj(value),
21196 )
21197 }
21198
21199 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
21200 assert_eq!(status / 100u16, 4u16);
21201 Self(
21202 self.0
21203 .status(status)
21204 .header("content-type", "application/json")
21205 .json_body_obj(value),
21206 )
21207 }
21208
21209 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
21210 assert_eq!(status / 100u16, 5u16);
21211 Self(
21212 self.0
21213 .status(status)
21214 .header("content-type", "application/json")
21215 .json_body_obj(value),
21216 )
21217 }
21218 }
21219
21220 pub struct VpcRouterRouteUpdateWhen(::httpmock::When);
21221 impl VpcRouterRouteUpdateWhen {
21222 pub fn new(inner: ::httpmock::When) -> Self {
21223 Self(
21224 inner
21225 .method(::httpmock::Method::PUT)
21226 .path_matches(regex::Regex::new("^/v1/vpc-router-routes/[^/]*$").unwrap()),
21227 )
21228 }
21229
21230 pub fn into_inner(self) -> ::httpmock::When {
21231 self.0
21232 }
21233
21234 pub fn route(self, value: &types::NameOrId) -> Self {
21235 let re = regex::Regex::new(&format!("^/v1/vpc-router-routes/{}$", value.to_string()))
21236 .unwrap();
21237 Self(self.0.path_matches(re))
21238 }
21239
21240 pub fn project<'a, T>(self, value: T) -> Self
21241 where
21242 T: Into<Option<&'a types::NameOrId>>,
21243 {
21244 if let Some(value) = value.into() {
21245 Self(self.0.query_param("project", value.to_string()))
21246 } else {
21247 Self(self.0.query_param_missing("project"))
21248 }
21249 }
21250
21251 pub fn router<'a, T>(self, value: T) -> Self
21252 where
21253 T: Into<Option<&'a types::NameOrId>>,
21254 {
21255 if let Some(value) = value.into() {
21256 Self(self.0.query_param("router", value.to_string()))
21257 } else {
21258 Self(self.0.query_param_missing("router"))
21259 }
21260 }
21261
21262 pub fn vpc<'a, T>(self, value: T) -> Self
21263 where
21264 T: Into<Option<&'a types::NameOrId>>,
21265 {
21266 if let Some(value) = value.into() {
21267 Self(self.0.query_param("vpc", value.to_string()))
21268 } else {
21269 Self(self.0.query_param_missing("vpc"))
21270 }
21271 }
21272
21273 pub fn body(self, value: &types::RouterRouteUpdate) -> Self {
21274 Self(self.0.json_body_obj(value))
21275 }
21276 }
21277
21278 pub struct VpcRouterRouteUpdateThen(::httpmock::Then);
21279 impl VpcRouterRouteUpdateThen {
21280 pub fn new(inner: ::httpmock::Then) -> Self {
21281 Self(inner)
21282 }
21283
21284 pub fn into_inner(self) -> ::httpmock::Then {
21285 self.0
21286 }
21287
21288 pub fn ok(self, value: &types::RouterRoute) -> Self {
21289 Self(
21290 self.0
21291 .status(200u16)
21292 .header("content-type", "application/json")
21293 .json_body_obj(value),
21294 )
21295 }
21296
21297 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
21298 assert_eq!(status / 100u16, 4u16);
21299 Self(
21300 self.0
21301 .status(status)
21302 .header("content-type", "application/json")
21303 .json_body_obj(value),
21304 )
21305 }
21306
21307 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
21308 assert_eq!(status / 100u16, 5u16);
21309 Self(
21310 self.0
21311 .status(status)
21312 .header("content-type", "application/json")
21313 .json_body_obj(value),
21314 )
21315 }
21316 }
21317
21318 pub struct VpcRouterRouteDeleteWhen(::httpmock::When);
21319 impl VpcRouterRouteDeleteWhen {
21320 pub fn new(inner: ::httpmock::When) -> Self {
21321 Self(
21322 inner
21323 .method(::httpmock::Method::DELETE)
21324 .path_matches(regex::Regex::new("^/v1/vpc-router-routes/[^/]*$").unwrap()),
21325 )
21326 }
21327
21328 pub fn into_inner(self) -> ::httpmock::When {
21329 self.0
21330 }
21331
21332 pub fn route(self, value: &types::NameOrId) -> Self {
21333 let re = regex::Regex::new(&format!("^/v1/vpc-router-routes/{}$", value.to_string()))
21334 .unwrap();
21335 Self(self.0.path_matches(re))
21336 }
21337
21338 pub fn project<'a, T>(self, value: T) -> Self
21339 where
21340 T: Into<Option<&'a types::NameOrId>>,
21341 {
21342 if let Some(value) = value.into() {
21343 Self(self.0.query_param("project", value.to_string()))
21344 } else {
21345 Self(self.0.query_param_missing("project"))
21346 }
21347 }
21348
21349 pub fn router<'a, T>(self, value: T) -> Self
21350 where
21351 T: Into<Option<&'a types::NameOrId>>,
21352 {
21353 if let Some(value) = value.into() {
21354 Self(self.0.query_param("router", value.to_string()))
21355 } else {
21356 Self(self.0.query_param_missing("router"))
21357 }
21358 }
21359
21360 pub fn vpc<'a, T>(self, value: T) -> Self
21361 where
21362 T: Into<Option<&'a types::NameOrId>>,
21363 {
21364 if let Some(value) = value.into() {
21365 Self(self.0.query_param("vpc", value.to_string()))
21366 } else {
21367 Self(self.0.query_param_missing("vpc"))
21368 }
21369 }
21370 }
21371
21372 pub struct VpcRouterRouteDeleteThen(::httpmock::Then);
21373 impl VpcRouterRouteDeleteThen {
21374 pub fn new(inner: ::httpmock::Then) -> Self {
21375 Self(inner)
21376 }
21377
21378 pub fn into_inner(self) -> ::httpmock::Then {
21379 self.0
21380 }
21381
21382 pub fn no_content(self) -> Self {
21383 Self(self.0.status(204u16))
21384 }
21385
21386 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
21387 assert_eq!(status / 100u16, 4u16);
21388 Self(
21389 self.0
21390 .status(status)
21391 .header("content-type", "application/json")
21392 .json_body_obj(value),
21393 )
21394 }
21395
21396 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
21397 assert_eq!(status / 100u16, 5u16);
21398 Self(
21399 self.0
21400 .status(status)
21401 .header("content-type", "application/json")
21402 .json_body_obj(value),
21403 )
21404 }
21405 }
21406
21407 pub struct VpcRouterListWhen(::httpmock::When);
21408 impl VpcRouterListWhen {
21409 pub fn new(inner: ::httpmock::When) -> Self {
21410 Self(
21411 inner
21412 .method(::httpmock::Method::GET)
21413 .path_matches(regex::Regex::new("^/v1/vpc-routers$").unwrap()),
21414 )
21415 }
21416
21417 pub fn into_inner(self) -> ::httpmock::When {
21418 self.0
21419 }
21420
21421 pub fn limit<T>(self, value: T) -> Self
21422 where
21423 T: Into<Option<::std::num::NonZeroU32>>,
21424 {
21425 if let Some(value) = value.into() {
21426 Self(self.0.query_param("limit", value.to_string()))
21427 } else {
21428 Self(self.0.query_param_missing("limit"))
21429 }
21430 }
21431
21432 pub fn page_token<'a, T>(self, value: T) -> Self
21433 where
21434 T: Into<Option<&'a str>>,
21435 {
21436 if let Some(value) = value.into() {
21437 Self(self.0.query_param("page_token", value.to_string()))
21438 } else {
21439 Self(self.0.query_param_missing("page_token"))
21440 }
21441 }
21442
21443 pub fn project<'a, T>(self, value: T) -> Self
21444 where
21445 T: Into<Option<&'a types::NameOrId>>,
21446 {
21447 if let Some(value) = value.into() {
21448 Self(self.0.query_param("project", value.to_string()))
21449 } else {
21450 Self(self.0.query_param_missing("project"))
21451 }
21452 }
21453
21454 pub fn sort_by<T>(self, value: T) -> Self
21455 where
21456 T: Into<Option<types::NameOrIdSortMode>>,
21457 {
21458 if let Some(value) = value.into() {
21459 Self(self.0.query_param("sort_by", value.to_string()))
21460 } else {
21461 Self(self.0.query_param_missing("sort_by"))
21462 }
21463 }
21464
21465 pub fn vpc<'a, T>(self, value: T) -> Self
21466 where
21467 T: Into<Option<&'a types::NameOrId>>,
21468 {
21469 if let Some(value) = value.into() {
21470 Self(self.0.query_param("vpc", value.to_string()))
21471 } else {
21472 Self(self.0.query_param_missing("vpc"))
21473 }
21474 }
21475 }
21476
21477 pub struct VpcRouterListThen(::httpmock::Then);
21478 impl VpcRouterListThen {
21479 pub fn new(inner: ::httpmock::Then) -> Self {
21480 Self(inner)
21481 }
21482
21483 pub fn into_inner(self) -> ::httpmock::Then {
21484 self.0
21485 }
21486
21487 pub fn ok(self, value: &types::VpcRouterResultsPage) -> Self {
21488 Self(
21489 self.0
21490 .status(200u16)
21491 .header("content-type", "application/json")
21492 .json_body_obj(value),
21493 )
21494 }
21495
21496 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
21497 assert_eq!(status / 100u16, 4u16);
21498 Self(
21499 self.0
21500 .status(status)
21501 .header("content-type", "application/json")
21502 .json_body_obj(value),
21503 )
21504 }
21505
21506 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
21507 assert_eq!(status / 100u16, 5u16);
21508 Self(
21509 self.0
21510 .status(status)
21511 .header("content-type", "application/json")
21512 .json_body_obj(value),
21513 )
21514 }
21515 }
21516
21517 pub struct VpcRouterCreateWhen(::httpmock::When);
21518 impl VpcRouterCreateWhen {
21519 pub fn new(inner: ::httpmock::When) -> Self {
21520 Self(
21521 inner
21522 .method(::httpmock::Method::POST)
21523 .path_matches(regex::Regex::new("^/v1/vpc-routers$").unwrap()),
21524 )
21525 }
21526
21527 pub fn into_inner(self) -> ::httpmock::When {
21528 self.0
21529 }
21530
21531 pub fn project<'a, T>(self, value: T) -> Self
21532 where
21533 T: Into<Option<&'a types::NameOrId>>,
21534 {
21535 if let Some(value) = value.into() {
21536 Self(self.0.query_param("project", value.to_string()))
21537 } else {
21538 Self(self.0.query_param_missing("project"))
21539 }
21540 }
21541
21542 pub fn vpc(self, value: &types::NameOrId) -> Self {
21543 Self(self.0.query_param("vpc", value.to_string()))
21544 }
21545
21546 pub fn body(self, value: &types::VpcRouterCreate) -> Self {
21547 Self(self.0.json_body_obj(value))
21548 }
21549 }
21550
21551 pub struct VpcRouterCreateThen(::httpmock::Then);
21552 impl VpcRouterCreateThen {
21553 pub fn new(inner: ::httpmock::Then) -> Self {
21554 Self(inner)
21555 }
21556
21557 pub fn into_inner(self) -> ::httpmock::Then {
21558 self.0
21559 }
21560
21561 pub fn created(self, value: &types::VpcRouter) -> Self {
21562 Self(
21563 self.0
21564 .status(201u16)
21565 .header("content-type", "application/json")
21566 .json_body_obj(value),
21567 )
21568 }
21569
21570 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
21571 assert_eq!(status / 100u16, 4u16);
21572 Self(
21573 self.0
21574 .status(status)
21575 .header("content-type", "application/json")
21576 .json_body_obj(value),
21577 )
21578 }
21579
21580 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
21581 assert_eq!(status / 100u16, 5u16);
21582 Self(
21583 self.0
21584 .status(status)
21585 .header("content-type", "application/json")
21586 .json_body_obj(value),
21587 )
21588 }
21589 }
21590
21591 pub struct VpcRouterViewWhen(::httpmock::When);
21592 impl VpcRouterViewWhen {
21593 pub fn new(inner: ::httpmock::When) -> Self {
21594 Self(
21595 inner
21596 .method(::httpmock::Method::GET)
21597 .path_matches(regex::Regex::new("^/v1/vpc-routers/[^/]*$").unwrap()),
21598 )
21599 }
21600
21601 pub fn into_inner(self) -> ::httpmock::When {
21602 self.0
21603 }
21604
21605 pub fn router(self, value: &types::NameOrId) -> Self {
21606 let re =
21607 regex::Regex::new(&format!("^/v1/vpc-routers/{}$", value.to_string())).unwrap();
21608 Self(self.0.path_matches(re))
21609 }
21610
21611 pub fn project<'a, T>(self, value: T) -> Self
21612 where
21613 T: Into<Option<&'a types::NameOrId>>,
21614 {
21615 if let Some(value) = value.into() {
21616 Self(self.0.query_param("project", value.to_string()))
21617 } else {
21618 Self(self.0.query_param_missing("project"))
21619 }
21620 }
21621
21622 pub fn vpc<'a, T>(self, value: T) -> Self
21623 where
21624 T: Into<Option<&'a types::NameOrId>>,
21625 {
21626 if let Some(value) = value.into() {
21627 Self(self.0.query_param("vpc", value.to_string()))
21628 } else {
21629 Self(self.0.query_param_missing("vpc"))
21630 }
21631 }
21632 }
21633
21634 pub struct VpcRouterViewThen(::httpmock::Then);
21635 impl VpcRouterViewThen {
21636 pub fn new(inner: ::httpmock::Then) -> Self {
21637 Self(inner)
21638 }
21639
21640 pub fn into_inner(self) -> ::httpmock::Then {
21641 self.0
21642 }
21643
21644 pub fn ok(self, value: &types::VpcRouter) -> Self {
21645 Self(
21646 self.0
21647 .status(200u16)
21648 .header("content-type", "application/json")
21649 .json_body_obj(value),
21650 )
21651 }
21652
21653 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
21654 assert_eq!(status / 100u16, 4u16);
21655 Self(
21656 self.0
21657 .status(status)
21658 .header("content-type", "application/json")
21659 .json_body_obj(value),
21660 )
21661 }
21662
21663 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
21664 assert_eq!(status / 100u16, 5u16);
21665 Self(
21666 self.0
21667 .status(status)
21668 .header("content-type", "application/json")
21669 .json_body_obj(value),
21670 )
21671 }
21672 }
21673
21674 pub struct VpcRouterUpdateWhen(::httpmock::When);
21675 impl VpcRouterUpdateWhen {
21676 pub fn new(inner: ::httpmock::When) -> Self {
21677 Self(
21678 inner
21679 .method(::httpmock::Method::PUT)
21680 .path_matches(regex::Regex::new("^/v1/vpc-routers/[^/]*$").unwrap()),
21681 )
21682 }
21683
21684 pub fn into_inner(self) -> ::httpmock::When {
21685 self.0
21686 }
21687
21688 pub fn router(self, value: &types::NameOrId) -> Self {
21689 let re =
21690 regex::Regex::new(&format!("^/v1/vpc-routers/{}$", value.to_string())).unwrap();
21691 Self(self.0.path_matches(re))
21692 }
21693
21694 pub fn project<'a, T>(self, value: T) -> Self
21695 where
21696 T: Into<Option<&'a types::NameOrId>>,
21697 {
21698 if let Some(value) = value.into() {
21699 Self(self.0.query_param("project", value.to_string()))
21700 } else {
21701 Self(self.0.query_param_missing("project"))
21702 }
21703 }
21704
21705 pub fn vpc<'a, T>(self, value: T) -> Self
21706 where
21707 T: Into<Option<&'a types::NameOrId>>,
21708 {
21709 if let Some(value) = value.into() {
21710 Self(self.0.query_param("vpc", value.to_string()))
21711 } else {
21712 Self(self.0.query_param_missing("vpc"))
21713 }
21714 }
21715
21716 pub fn body(self, value: &types::VpcRouterUpdate) -> Self {
21717 Self(self.0.json_body_obj(value))
21718 }
21719 }
21720
21721 pub struct VpcRouterUpdateThen(::httpmock::Then);
21722 impl VpcRouterUpdateThen {
21723 pub fn new(inner: ::httpmock::Then) -> Self {
21724 Self(inner)
21725 }
21726
21727 pub fn into_inner(self) -> ::httpmock::Then {
21728 self.0
21729 }
21730
21731 pub fn ok(self, value: &types::VpcRouter) -> Self {
21732 Self(
21733 self.0
21734 .status(200u16)
21735 .header("content-type", "application/json")
21736 .json_body_obj(value),
21737 )
21738 }
21739
21740 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
21741 assert_eq!(status / 100u16, 4u16);
21742 Self(
21743 self.0
21744 .status(status)
21745 .header("content-type", "application/json")
21746 .json_body_obj(value),
21747 )
21748 }
21749
21750 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
21751 assert_eq!(status / 100u16, 5u16);
21752 Self(
21753 self.0
21754 .status(status)
21755 .header("content-type", "application/json")
21756 .json_body_obj(value),
21757 )
21758 }
21759 }
21760
21761 pub struct VpcRouterDeleteWhen(::httpmock::When);
21762 impl VpcRouterDeleteWhen {
21763 pub fn new(inner: ::httpmock::When) -> Self {
21764 Self(
21765 inner
21766 .method(::httpmock::Method::DELETE)
21767 .path_matches(regex::Regex::new("^/v1/vpc-routers/[^/]*$").unwrap()),
21768 )
21769 }
21770
21771 pub fn into_inner(self) -> ::httpmock::When {
21772 self.0
21773 }
21774
21775 pub fn router(self, value: &types::NameOrId) -> Self {
21776 let re =
21777 regex::Regex::new(&format!("^/v1/vpc-routers/{}$", value.to_string())).unwrap();
21778 Self(self.0.path_matches(re))
21779 }
21780
21781 pub fn project<'a, T>(self, value: T) -> Self
21782 where
21783 T: Into<Option<&'a types::NameOrId>>,
21784 {
21785 if let Some(value) = value.into() {
21786 Self(self.0.query_param("project", value.to_string()))
21787 } else {
21788 Self(self.0.query_param_missing("project"))
21789 }
21790 }
21791
21792 pub fn vpc<'a, T>(self, value: T) -> Self
21793 where
21794 T: Into<Option<&'a types::NameOrId>>,
21795 {
21796 if let Some(value) = value.into() {
21797 Self(self.0.query_param("vpc", value.to_string()))
21798 } else {
21799 Self(self.0.query_param_missing("vpc"))
21800 }
21801 }
21802 }
21803
21804 pub struct VpcRouterDeleteThen(::httpmock::Then);
21805 impl VpcRouterDeleteThen {
21806 pub fn new(inner: ::httpmock::Then) -> Self {
21807 Self(inner)
21808 }
21809
21810 pub fn into_inner(self) -> ::httpmock::Then {
21811 self.0
21812 }
21813
21814 pub fn no_content(self) -> Self {
21815 Self(self.0.status(204u16))
21816 }
21817
21818 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
21819 assert_eq!(status / 100u16, 4u16);
21820 Self(
21821 self.0
21822 .status(status)
21823 .header("content-type", "application/json")
21824 .json_body_obj(value),
21825 )
21826 }
21827
21828 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
21829 assert_eq!(status / 100u16, 5u16);
21830 Self(
21831 self.0
21832 .status(status)
21833 .header("content-type", "application/json")
21834 .json_body_obj(value),
21835 )
21836 }
21837 }
21838
21839 pub struct VpcSubnetListWhen(::httpmock::When);
21840 impl VpcSubnetListWhen {
21841 pub fn new(inner: ::httpmock::When) -> Self {
21842 Self(
21843 inner
21844 .method(::httpmock::Method::GET)
21845 .path_matches(regex::Regex::new("^/v1/vpc-subnets$").unwrap()),
21846 )
21847 }
21848
21849 pub fn into_inner(self) -> ::httpmock::When {
21850 self.0
21851 }
21852
21853 pub fn limit<T>(self, value: T) -> Self
21854 where
21855 T: Into<Option<::std::num::NonZeroU32>>,
21856 {
21857 if let Some(value) = value.into() {
21858 Self(self.0.query_param("limit", value.to_string()))
21859 } else {
21860 Self(self.0.query_param_missing("limit"))
21861 }
21862 }
21863
21864 pub fn page_token<'a, T>(self, value: T) -> Self
21865 where
21866 T: Into<Option<&'a str>>,
21867 {
21868 if let Some(value) = value.into() {
21869 Self(self.0.query_param("page_token", value.to_string()))
21870 } else {
21871 Self(self.0.query_param_missing("page_token"))
21872 }
21873 }
21874
21875 pub fn project<'a, T>(self, value: T) -> Self
21876 where
21877 T: Into<Option<&'a types::NameOrId>>,
21878 {
21879 if let Some(value) = value.into() {
21880 Self(self.0.query_param("project", value.to_string()))
21881 } else {
21882 Self(self.0.query_param_missing("project"))
21883 }
21884 }
21885
21886 pub fn sort_by<T>(self, value: T) -> Self
21887 where
21888 T: Into<Option<types::NameOrIdSortMode>>,
21889 {
21890 if let Some(value) = value.into() {
21891 Self(self.0.query_param("sort_by", value.to_string()))
21892 } else {
21893 Self(self.0.query_param_missing("sort_by"))
21894 }
21895 }
21896
21897 pub fn vpc<'a, T>(self, value: T) -> Self
21898 where
21899 T: Into<Option<&'a types::NameOrId>>,
21900 {
21901 if let Some(value) = value.into() {
21902 Self(self.0.query_param("vpc", value.to_string()))
21903 } else {
21904 Self(self.0.query_param_missing("vpc"))
21905 }
21906 }
21907 }
21908
21909 pub struct VpcSubnetListThen(::httpmock::Then);
21910 impl VpcSubnetListThen {
21911 pub fn new(inner: ::httpmock::Then) -> Self {
21912 Self(inner)
21913 }
21914
21915 pub fn into_inner(self) -> ::httpmock::Then {
21916 self.0
21917 }
21918
21919 pub fn ok(self, value: &types::VpcSubnetResultsPage) -> Self {
21920 Self(
21921 self.0
21922 .status(200u16)
21923 .header("content-type", "application/json")
21924 .json_body_obj(value),
21925 )
21926 }
21927
21928 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
21929 assert_eq!(status / 100u16, 4u16);
21930 Self(
21931 self.0
21932 .status(status)
21933 .header("content-type", "application/json")
21934 .json_body_obj(value),
21935 )
21936 }
21937
21938 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
21939 assert_eq!(status / 100u16, 5u16);
21940 Self(
21941 self.0
21942 .status(status)
21943 .header("content-type", "application/json")
21944 .json_body_obj(value),
21945 )
21946 }
21947 }
21948
21949 pub struct VpcSubnetCreateWhen(::httpmock::When);
21950 impl VpcSubnetCreateWhen {
21951 pub fn new(inner: ::httpmock::When) -> Self {
21952 Self(
21953 inner
21954 .method(::httpmock::Method::POST)
21955 .path_matches(regex::Regex::new("^/v1/vpc-subnets$").unwrap()),
21956 )
21957 }
21958
21959 pub fn into_inner(self) -> ::httpmock::When {
21960 self.0
21961 }
21962
21963 pub fn project<'a, T>(self, value: T) -> Self
21964 where
21965 T: Into<Option<&'a types::NameOrId>>,
21966 {
21967 if let Some(value) = value.into() {
21968 Self(self.0.query_param("project", value.to_string()))
21969 } else {
21970 Self(self.0.query_param_missing("project"))
21971 }
21972 }
21973
21974 pub fn vpc(self, value: &types::NameOrId) -> Self {
21975 Self(self.0.query_param("vpc", value.to_string()))
21976 }
21977
21978 pub fn body(self, value: &types::VpcSubnetCreate) -> Self {
21979 Self(self.0.json_body_obj(value))
21980 }
21981 }
21982
21983 pub struct VpcSubnetCreateThen(::httpmock::Then);
21984 impl VpcSubnetCreateThen {
21985 pub fn new(inner: ::httpmock::Then) -> Self {
21986 Self(inner)
21987 }
21988
21989 pub fn into_inner(self) -> ::httpmock::Then {
21990 self.0
21991 }
21992
21993 pub fn created(self, value: &types::VpcSubnet) -> Self {
21994 Self(
21995 self.0
21996 .status(201u16)
21997 .header("content-type", "application/json")
21998 .json_body_obj(value),
21999 )
22000 }
22001
22002 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
22003 assert_eq!(status / 100u16, 4u16);
22004 Self(
22005 self.0
22006 .status(status)
22007 .header("content-type", "application/json")
22008 .json_body_obj(value),
22009 )
22010 }
22011
22012 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
22013 assert_eq!(status / 100u16, 5u16);
22014 Self(
22015 self.0
22016 .status(status)
22017 .header("content-type", "application/json")
22018 .json_body_obj(value),
22019 )
22020 }
22021 }
22022
22023 pub struct VpcSubnetViewWhen(::httpmock::When);
22024 impl VpcSubnetViewWhen {
22025 pub fn new(inner: ::httpmock::When) -> Self {
22026 Self(
22027 inner
22028 .method(::httpmock::Method::GET)
22029 .path_matches(regex::Regex::new("^/v1/vpc-subnets/[^/]*$").unwrap()),
22030 )
22031 }
22032
22033 pub fn into_inner(self) -> ::httpmock::When {
22034 self.0
22035 }
22036
22037 pub fn subnet(self, value: &types::NameOrId) -> Self {
22038 let re =
22039 regex::Regex::new(&format!("^/v1/vpc-subnets/{}$", value.to_string())).unwrap();
22040 Self(self.0.path_matches(re))
22041 }
22042
22043 pub fn project<'a, T>(self, value: T) -> Self
22044 where
22045 T: Into<Option<&'a types::NameOrId>>,
22046 {
22047 if let Some(value) = value.into() {
22048 Self(self.0.query_param("project", value.to_string()))
22049 } else {
22050 Self(self.0.query_param_missing("project"))
22051 }
22052 }
22053
22054 pub fn vpc<'a, T>(self, value: T) -> Self
22055 where
22056 T: Into<Option<&'a types::NameOrId>>,
22057 {
22058 if let Some(value) = value.into() {
22059 Self(self.0.query_param("vpc", value.to_string()))
22060 } else {
22061 Self(self.0.query_param_missing("vpc"))
22062 }
22063 }
22064 }
22065
22066 pub struct VpcSubnetViewThen(::httpmock::Then);
22067 impl VpcSubnetViewThen {
22068 pub fn new(inner: ::httpmock::Then) -> Self {
22069 Self(inner)
22070 }
22071
22072 pub fn into_inner(self) -> ::httpmock::Then {
22073 self.0
22074 }
22075
22076 pub fn ok(self, value: &types::VpcSubnet) -> Self {
22077 Self(
22078 self.0
22079 .status(200u16)
22080 .header("content-type", "application/json")
22081 .json_body_obj(value),
22082 )
22083 }
22084
22085 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
22086 assert_eq!(status / 100u16, 4u16);
22087 Self(
22088 self.0
22089 .status(status)
22090 .header("content-type", "application/json")
22091 .json_body_obj(value),
22092 )
22093 }
22094
22095 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
22096 assert_eq!(status / 100u16, 5u16);
22097 Self(
22098 self.0
22099 .status(status)
22100 .header("content-type", "application/json")
22101 .json_body_obj(value),
22102 )
22103 }
22104 }
22105
22106 pub struct VpcSubnetUpdateWhen(::httpmock::When);
22107 impl VpcSubnetUpdateWhen {
22108 pub fn new(inner: ::httpmock::When) -> Self {
22109 Self(
22110 inner
22111 .method(::httpmock::Method::PUT)
22112 .path_matches(regex::Regex::new("^/v1/vpc-subnets/[^/]*$").unwrap()),
22113 )
22114 }
22115
22116 pub fn into_inner(self) -> ::httpmock::When {
22117 self.0
22118 }
22119
22120 pub fn subnet(self, value: &types::NameOrId) -> Self {
22121 let re =
22122 regex::Regex::new(&format!("^/v1/vpc-subnets/{}$", value.to_string())).unwrap();
22123 Self(self.0.path_matches(re))
22124 }
22125
22126 pub fn project<'a, T>(self, value: T) -> Self
22127 where
22128 T: Into<Option<&'a types::NameOrId>>,
22129 {
22130 if let Some(value) = value.into() {
22131 Self(self.0.query_param("project", value.to_string()))
22132 } else {
22133 Self(self.0.query_param_missing("project"))
22134 }
22135 }
22136
22137 pub fn vpc<'a, T>(self, value: T) -> Self
22138 where
22139 T: Into<Option<&'a types::NameOrId>>,
22140 {
22141 if let Some(value) = value.into() {
22142 Self(self.0.query_param("vpc", value.to_string()))
22143 } else {
22144 Self(self.0.query_param_missing("vpc"))
22145 }
22146 }
22147
22148 pub fn body(self, value: &types::VpcSubnetUpdate) -> Self {
22149 Self(self.0.json_body_obj(value))
22150 }
22151 }
22152
22153 pub struct VpcSubnetUpdateThen(::httpmock::Then);
22154 impl VpcSubnetUpdateThen {
22155 pub fn new(inner: ::httpmock::Then) -> Self {
22156 Self(inner)
22157 }
22158
22159 pub fn into_inner(self) -> ::httpmock::Then {
22160 self.0
22161 }
22162
22163 pub fn ok(self, value: &types::VpcSubnet) -> Self {
22164 Self(
22165 self.0
22166 .status(200u16)
22167 .header("content-type", "application/json")
22168 .json_body_obj(value),
22169 )
22170 }
22171
22172 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
22173 assert_eq!(status / 100u16, 4u16);
22174 Self(
22175 self.0
22176 .status(status)
22177 .header("content-type", "application/json")
22178 .json_body_obj(value),
22179 )
22180 }
22181
22182 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
22183 assert_eq!(status / 100u16, 5u16);
22184 Self(
22185 self.0
22186 .status(status)
22187 .header("content-type", "application/json")
22188 .json_body_obj(value),
22189 )
22190 }
22191 }
22192
22193 pub struct VpcSubnetDeleteWhen(::httpmock::When);
22194 impl VpcSubnetDeleteWhen {
22195 pub fn new(inner: ::httpmock::When) -> Self {
22196 Self(
22197 inner
22198 .method(::httpmock::Method::DELETE)
22199 .path_matches(regex::Regex::new("^/v1/vpc-subnets/[^/]*$").unwrap()),
22200 )
22201 }
22202
22203 pub fn into_inner(self) -> ::httpmock::When {
22204 self.0
22205 }
22206
22207 pub fn subnet(self, value: &types::NameOrId) -> Self {
22208 let re =
22209 regex::Regex::new(&format!("^/v1/vpc-subnets/{}$", value.to_string())).unwrap();
22210 Self(self.0.path_matches(re))
22211 }
22212
22213 pub fn project<'a, T>(self, value: T) -> Self
22214 where
22215 T: Into<Option<&'a types::NameOrId>>,
22216 {
22217 if let Some(value) = value.into() {
22218 Self(self.0.query_param("project", value.to_string()))
22219 } else {
22220 Self(self.0.query_param_missing("project"))
22221 }
22222 }
22223
22224 pub fn vpc<'a, T>(self, value: T) -> Self
22225 where
22226 T: Into<Option<&'a types::NameOrId>>,
22227 {
22228 if let Some(value) = value.into() {
22229 Self(self.0.query_param("vpc", value.to_string()))
22230 } else {
22231 Self(self.0.query_param_missing("vpc"))
22232 }
22233 }
22234 }
22235
22236 pub struct VpcSubnetDeleteThen(::httpmock::Then);
22237 impl VpcSubnetDeleteThen {
22238 pub fn new(inner: ::httpmock::Then) -> Self {
22239 Self(inner)
22240 }
22241
22242 pub fn into_inner(self) -> ::httpmock::Then {
22243 self.0
22244 }
22245
22246 pub fn no_content(self) -> Self {
22247 Self(self.0.status(204u16))
22248 }
22249
22250 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
22251 assert_eq!(status / 100u16, 4u16);
22252 Self(
22253 self.0
22254 .status(status)
22255 .header("content-type", "application/json")
22256 .json_body_obj(value),
22257 )
22258 }
22259
22260 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
22261 assert_eq!(status / 100u16, 5u16);
22262 Self(
22263 self.0
22264 .status(status)
22265 .header("content-type", "application/json")
22266 .json_body_obj(value),
22267 )
22268 }
22269 }
22270
22271 pub struct VpcSubnetListNetworkInterfacesWhen(::httpmock::When);
22272 impl VpcSubnetListNetworkInterfacesWhen {
22273 pub fn new(inner: ::httpmock::When) -> Self {
22274 Self(inner.method(::httpmock::Method::GET).path_matches(
22275 regex::Regex::new("^/v1/vpc-subnets/[^/]*/network-interfaces$").unwrap(),
22276 ))
22277 }
22278
22279 pub fn into_inner(self) -> ::httpmock::When {
22280 self.0
22281 }
22282
22283 pub fn subnet(self, value: &types::NameOrId) -> Self {
22284 let re = regex::Regex::new(&format!(
22285 "^/v1/vpc-subnets/{}/network-interfaces$",
22286 value.to_string()
22287 ))
22288 .unwrap();
22289 Self(self.0.path_matches(re))
22290 }
22291
22292 pub fn limit<T>(self, value: T) -> Self
22293 where
22294 T: Into<Option<::std::num::NonZeroU32>>,
22295 {
22296 if let Some(value) = value.into() {
22297 Self(self.0.query_param("limit", value.to_string()))
22298 } else {
22299 Self(self.0.query_param_missing("limit"))
22300 }
22301 }
22302
22303 pub fn page_token<'a, T>(self, value: T) -> Self
22304 where
22305 T: Into<Option<&'a str>>,
22306 {
22307 if let Some(value) = value.into() {
22308 Self(self.0.query_param("page_token", value.to_string()))
22309 } else {
22310 Self(self.0.query_param_missing("page_token"))
22311 }
22312 }
22313
22314 pub fn project<'a, T>(self, value: T) -> Self
22315 where
22316 T: Into<Option<&'a types::NameOrId>>,
22317 {
22318 if let Some(value) = value.into() {
22319 Self(self.0.query_param("project", value.to_string()))
22320 } else {
22321 Self(self.0.query_param_missing("project"))
22322 }
22323 }
22324
22325 pub fn sort_by<T>(self, value: T) -> Self
22326 where
22327 T: Into<Option<types::NameOrIdSortMode>>,
22328 {
22329 if let Some(value) = value.into() {
22330 Self(self.0.query_param("sort_by", value.to_string()))
22331 } else {
22332 Self(self.0.query_param_missing("sort_by"))
22333 }
22334 }
22335
22336 pub fn vpc<'a, T>(self, value: T) -> Self
22337 where
22338 T: Into<Option<&'a types::NameOrId>>,
22339 {
22340 if let Some(value) = value.into() {
22341 Self(self.0.query_param("vpc", value.to_string()))
22342 } else {
22343 Self(self.0.query_param_missing("vpc"))
22344 }
22345 }
22346 }
22347
22348 pub struct VpcSubnetListNetworkInterfacesThen(::httpmock::Then);
22349 impl VpcSubnetListNetworkInterfacesThen {
22350 pub fn new(inner: ::httpmock::Then) -> Self {
22351 Self(inner)
22352 }
22353
22354 pub fn into_inner(self) -> ::httpmock::Then {
22355 self.0
22356 }
22357
22358 pub fn ok(self, value: &types::InstanceNetworkInterfaceResultsPage) -> Self {
22359 Self(
22360 self.0
22361 .status(200u16)
22362 .header("content-type", "application/json")
22363 .json_body_obj(value),
22364 )
22365 }
22366
22367 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
22368 assert_eq!(status / 100u16, 4u16);
22369 Self(
22370 self.0
22371 .status(status)
22372 .header("content-type", "application/json")
22373 .json_body_obj(value),
22374 )
22375 }
22376
22377 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
22378 assert_eq!(status / 100u16, 5u16);
22379 Self(
22380 self.0
22381 .status(status)
22382 .header("content-type", "application/json")
22383 .json_body_obj(value),
22384 )
22385 }
22386 }
22387
22388 pub struct VpcListWhen(::httpmock::When);
22389 impl VpcListWhen {
22390 pub fn new(inner: ::httpmock::When) -> Self {
22391 Self(
22392 inner
22393 .method(::httpmock::Method::GET)
22394 .path_matches(regex::Regex::new("^/v1/vpcs$").unwrap()),
22395 )
22396 }
22397
22398 pub fn into_inner(self) -> ::httpmock::When {
22399 self.0
22400 }
22401
22402 pub fn limit<T>(self, value: T) -> Self
22403 where
22404 T: Into<Option<::std::num::NonZeroU32>>,
22405 {
22406 if let Some(value) = value.into() {
22407 Self(self.0.query_param("limit", value.to_string()))
22408 } else {
22409 Self(self.0.query_param_missing("limit"))
22410 }
22411 }
22412
22413 pub fn page_token<'a, T>(self, value: T) -> Self
22414 where
22415 T: Into<Option<&'a str>>,
22416 {
22417 if let Some(value) = value.into() {
22418 Self(self.0.query_param("page_token", value.to_string()))
22419 } else {
22420 Self(self.0.query_param_missing("page_token"))
22421 }
22422 }
22423
22424 pub fn project<'a, T>(self, value: T) -> Self
22425 where
22426 T: Into<Option<&'a types::NameOrId>>,
22427 {
22428 if let Some(value) = value.into() {
22429 Self(self.0.query_param("project", value.to_string()))
22430 } else {
22431 Self(self.0.query_param_missing("project"))
22432 }
22433 }
22434
22435 pub fn sort_by<T>(self, value: T) -> Self
22436 where
22437 T: Into<Option<types::NameOrIdSortMode>>,
22438 {
22439 if let Some(value) = value.into() {
22440 Self(self.0.query_param("sort_by", value.to_string()))
22441 } else {
22442 Self(self.0.query_param_missing("sort_by"))
22443 }
22444 }
22445 }
22446
22447 pub struct VpcListThen(::httpmock::Then);
22448 impl VpcListThen {
22449 pub fn new(inner: ::httpmock::Then) -> Self {
22450 Self(inner)
22451 }
22452
22453 pub fn into_inner(self) -> ::httpmock::Then {
22454 self.0
22455 }
22456
22457 pub fn ok(self, value: &types::VpcResultsPage) -> Self {
22458 Self(
22459 self.0
22460 .status(200u16)
22461 .header("content-type", "application/json")
22462 .json_body_obj(value),
22463 )
22464 }
22465
22466 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
22467 assert_eq!(status / 100u16, 4u16);
22468 Self(
22469 self.0
22470 .status(status)
22471 .header("content-type", "application/json")
22472 .json_body_obj(value),
22473 )
22474 }
22475
22476 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
22477 assert_eq!(status / 100u16, 5u16);
22478 Self(
22479 self.0
22480 .status(status)
22481 .header("content-type", "application/json")
22482 .json_body_obj(value),
22483 )
22484 }
22485 }
22486
22487 pub struct VpcCreateWhen(::httpmock::When);
22488 impl VpcCreateWhen {
22489 pub fn new(inner: ::httpmock::When) -> Self {
22490 Self(
22491 inner
22492 .method(::httpmock::Method::POST)
22493 .path_matches(regex::Regex::new("^/v1/vpcs$").unwrap()),
22494 )
22495 }
22496
22497 pub fn into_inner(self) -> ::httpmock::When {
22498 self.0
22499 }
22500
22501 pub fn project(self, value: &types::NameOrId) -> Self {
22502 Self(self.0.query_param("project", value.to_string()))
22503 }
22504
22505 pub fn body(self, value: &types::VpcCreate) -> Self {
22506 Self(self.0.json_body_obj(value))
22507 }
22508 }
22509
22510 pub struct VpcCreateThen(::httpmock::Then);
22511 impl VpcCreateThen {
22512 pub fn new(inner: ::httpmock::Then) -> Self {
22513 Self(inner)
22514 }
22515
22516 pub fn into_inner(self) -> ::httpmock::Then {
22517 self.0
22518 }
22519
22520 pub fn created(self, value: &types::Vpc) -> Self {
22521 Self(
22522 self.0
22523 .status(201u16)
22524 .header("content-type", "application/json")
22525 .json_body_obj(value),
22526 )
22527 }
22528
22529 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
22530 assert_eq!(status / 100u16, 4u16);
22531 Self(
22532 self.0
22533 .status(status)
22534 .header("content-type", "application/json")
22535 .json_body_obj(value),
22536 )
22537 }
22538
22539 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
22540 assert_eq!(status / 100u16, 5u16);
22541 Self(
22542 self.0
22543 .status(status)
22544 .header("content-type", "application/json")
22545 .json_body_obj(value),
22546 )
22547 }
22548 }
22549
22550 pub struct VpcViewWhen(::httpmock::When);
22551 impl VpcViewWhen {
22552 pub fn new(inner: ::httpmock::When) -> Self {
22553 Self(
22554 inner
22555 .method(::httpmock::Method::GET)
22556 .path_matches(regex::Regex::new("^/v1/vpcs/[^/]*$").unwrap()),
22557 )
22558 }
22559
22560 pub fn into_inner(self) -> ::httpmock::When {
22561 self.0
22562 }
22563
22564 pub fn vpc(self, value: &types::NameOrId) -> Self {
22565 let re = regex::Regex::new(&format!("^/v1/vpcs/{}$", value.to_string())).unwrap();
22566 Self(self.0.path_matches(re))
22567 }
22568
22569 pub fn project<'a, T>(self, value: T) -> Self
22570 where
22571 T: Into<Option<&'a types::NameOrId>>,
22572 {
22573 if let Some(value) = value.into() {
22574 Self(self.0.query_param("project", value.to_string()))
22575 } else {
22576 Self(self.0.query_param_missing("project"))
22577 }
22578 }
22579 }
22580
22581 pub struct VpcViewThen(::httpmock::Then);
22582 impl VpcViewThen {
22583 pub fn new(inner: ::httpmock::Then) -> Self {
22584 Self(inner)
22585 }
22586
22587 pub fn into_inner(self) -> ::httpmock::Then {
22588 self.0
22589 }
22590
22591 pub fn ok(self, value: &types::Vpc) -> Self {
22592 Self(
22593 self.0
22594 .status(200u16)
22595 .header("content-type", "application/json")
22596 .json_body_obj(value),
22597 )
22598 }
22599
22600 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
22601 assert_eq!(status / 100u16, 4u16);
22602 Self(
22603 self.0
22604 .status(status)
22605 .header("content-type", "application/json")
22606 .json_body_obj(value),
22607 )
22608 }
22609
22610 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
22611 assert_eq!(status / 100u16, 5u16);
22612 Self(
22613 self.0
22614 .status(status)
22615 .header("content-type", "application/json")
22616 .json_body_obj(value),
22617 )
22618 }
22619 }
22620
22621 pub struct VpcUpdateWhen(::httpmock::When);
22622 impl VpcUpdateWhen {
22623 pub fn new(inner: ::httpmock::When) -> Self {
22624 Self(
22625 inner
22626 .method(::httpmock::Method::PUT)
22627 .path_matches(regex::Regex::new("^/v1/vpcs/[^/]*$").unwrap()),
22628 )
22629 }
22630
22631 pub fn into_inner(self) -> ::httpmock::When {
22632 self.0
22633 }
22634
22635 pub fn vpc(self, value: &types::NameOrId) -> Self {
22636 let re = regex::Regex::new(&format!("^/v1/vpcs/{}$", value.to_string())).unwrap();
22637 Self(self.0.path_matches(re))
22638 }
22639
22640 pub fn project<'a, T>(self, value: T) -> Self
22641 where
22642 T: Into<Option<&'a types::NameOrId>>,
22643 {
22644 if let Some(value) = value.into() {
22645 Self(self.0.query_param("project", value.to_string()))
22646 } else {
22647 Self(self.0.query_param_missing("project"))
22648 }
22649 }
22650
22651 pub fn body(self, value: &types::VpcUpdate) -> Self {
22652 Self(self.0.json_body_obj(value))
22653 }
22654 }
22655
22656 pub struct VpcUpdateThen(::httpmock::Then);
22657 impl VpcUpdateThen {
22658 pub fn new(inner: ::httpmock::Then) -> Self {
22659 Self(inner)
22660 }
22661
22662 pub fn into_inner(self) -> ::httpmock::Then {
22663 self.0
22664 }
22665
22666 pub fn ok(self, value: &types::Vpc) -> Self {
22667 Self(
22668 self.0
22669 .status(200u16)
22670 .header("content-type", "application/json")
22671 .json_body_obj(value),
22672 )
22673 }
22674
22675 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
22676 assert_eq!(status / 100u16, 4u16);
22677 Self(
22678 self.0
22679 .status(status)
22680 .header("content-type", "application/json")
22681 .json_body_obj(value),
22682 )
22683 }
22684
22685 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
22686 assert_eq!(status / 100u16, 5u16);
22687 Self(
22688 self.0
22689 .status(status)
22690 .header("content-type", "application/json")
22691 .json_body_obj(value),
22692 )
22693 }
22694 }
22695
22696 pub struct VpcDeleteWhen(::httpmock::When);
22697 impl VpcDeleteWhen {
22698 pub fn new(inner: ::httpmock::When) -> Self {
22699 Self(
22700 inner
22701 .method(::httpmock::Method::DELETE)
22702 .path_matches(regex::Regex::new("^/v1/vpcs/[^/]*$").unwrap()),
22703 )
22704 }
22705
22706 pub fn into_inner(self) -> ::httpmock::When {
22707 self.0
22708 }
22709
22710 pub fn vpc(self, value: &types::NameOrId) -> Self {
22711 let re = regex::Regex::new(&format!("^/v1/vpcs/{}$", value.to_string())).unwrap();
22712 Self(self.0.path_matches(re))
22713 }
22714
22715 pub fn project<'a, T>(self, value: T) -> Self
22716 where
22717 T: Into<Option<&'a types::NameOrId>>,
22718 {
22719 if let Some(value) = value.into() {
22720 Self(self.0.query_param("project", value.to_string()))
22721 } else {
22722 Self(self.0.query_param_missing("project"))
22723 }
22724 }
22725 }
22726
22727 pub struct VpcDeleteThen(::httpmock::Then);
22728 impl VpcDeleteThen {
22729 pub fn new(inner: ::httpmock::Then) -> Self {
22730 Self(inner)
22731 }
22732
22733 pub fn into_inner(self) -> ::httpmock::Then {
22734 self.0
22735 }
22736
22737 pub fn no_content(self) -> Self {
22738 Self(self.0.status(204u16))
22739 }
22740
22741 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
22742 assert_eq!(status / 100u16, 4u16);
22743 Self(
22744 self.0
22745 .status(status)
22746 .header("content-type", "application/json")
22747 .json_body_obj(value),
22748 )
22749 }
22750
22751 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
22752 assert_eq!(status / 100u16, 5u16);
22753 Self(
22754 self.0
22755 .status(status)
22756 .header("content-type", "application/json")
22757 .json_body_obj(value),
22758 )
22759 }
22760 }
22761
22762 pub struct WebhookReceiverCreateWhen(::httpmock::When);
22763 impl WebhookReceiverCreateWhen {
22764 pub fn new(inner: ::httpmock::When) -> Self {
22765 Self(
22766 inner
22767 .method(::httpmock::Method::POST)
22768 .path_matches(regex::Regex::new("^/v1/webhook-receivers$").unwrap()),
22769 )
22770 }
22771
22772 pub fn into_inner(self) -> ::httpmock::When {
22773 self.0
22774 }
22775
22776 pub fn body(self, value: &types::WebhookCreate) -> Self {
22777 Self(self.0.json_body_obj(value))
22778 }
22779 }
22780
22781 pub struct WebhookReceiverCreateThen(::httpmock::Then);
22782 impl WebhookReceiverCreateThen {
22783 pub fn new(inner: ::httpmock::Then) -> Self {
22784 Self(inner)
22785 }
22786
22787 pub fn into_inner(self) -> ::httpmock::Then {
22788 self.0
22789 }
22790
22791 pub fn created(self, value: &types::WebhookReceiver) -> Self {
22792 Self(
22793 self.0
22794 .status(201u16)
22795 .header("content-type", "application/json")
22796 .json_body_obj(value),
22797 )
22798 }
22799
22800 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
22801 assert_eq!(status / 100u16, 4u16);
22802 Self(
22803 self.0
22804 .status(status)
22805 .header("content-type", "application/json")
22806 .json_body_obj(value),
22807 )
22808 }
22809
22810 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
22811 assert_eq!(status / 100u16, 5u16);
22812 Self(
22813 self.0
22814 .status(status)
22815 .header("content-type", "application/json")
22816 .json_body_obj(value),
22817 )
22818 }
22819 }
22820
22821 pub struct WebhookReceiverUpdateWhen(::httpmock::When);
22822 impl WebhookReceiverUpdateWhen {
22823 pub fn new(inner: ::httpmock::When) -> Self {
22824 Self(
22825 inner
22826 .method(::httpmock::Method::PUT)
22827 .path_matches(regex::Regex::new("^/v1/webhook-receivers/[^/]*$").unwrap()),
22828 )
22829 }
22830
22831 pub fn into_inner(self) -> ::httpmock::When {
22832 self.0
22833 }
22834
22835 pub fn receiver(self, value: &types::NameOrId) -> Self {
22836 let re = regex::Regex::new(&format!("^/v1/webhook-receivers/{}$", value.to_string()))
22837 .unwrap();
22838 Self(self.0.path_matches(re))
22839 }
22840
22841 pub fn body(self, value: &types::WebhookReceiverUpdate) -> Self {
22842 Self(self.0.json_body_obj(value))
22843 }
22844 }
22845
22846 pub struct WebhookReceiverUpdateThen(::httpmock::Then);
22847 impl WebhookReceiverUpdateThen {
22848 pub fn new(inner: ::httpmock::Then) -> Self {
22849 Self(inner)
22850 }
22851
22852 pub fn into_inner(self) -> ::httpmock::Then {
22853 self.0
22854 }
22855
22856 pub fn no_content(self) -> Self {
22857 Self(self.0.status(204u16))
22858 }
22859
22860 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
22861 assert_eq!(status / 100u16, 4u16);
22862 Self(
22863 self.0
22864 .status(status)
22865 .header("content-type", "application/json")
22866 .json_body_obj(value),
22867 )
22868 }
22869
22870 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
22871 assert_eq!(status / 100u16, 5u16);
22872 Self(
22873 self.0
22874 .status(status)
22875 .header("content-type", "application/json")
22876 .json_body_obj(value),
22877 )
22878 }
22879 }
22880
22881 pub struct WebhookSecretsListWhen(::httpmock::When);
22882 impl WebhookSecretsListWhen {
22883 pub fn new(inner: ::httpmock::When) -> Self {
22884 Self(
22885 inner
22886 .method(::httpmock::Method::GET)
22887 .path_matches(regex::Regex::new("^/v1/webhook-secrets$").unwrap()),
22888 )
22889 }
22890
22891 pub fn into_inner(self) -> ::httpmock::When {
22892 self.0
22893 }
22894
22895 pub fn receiver(self, value: &types::NameOrId) -> Self {
22896 Self(self.0.query_param("receiver", value.to_string()))
22897 }
22898 }
22899
22900 pub struct WebhookSecretsListThen(::httpmock::Then);
22901 impl WebhookSecretsListThen {
22902 pub fn new(inner: ::httpmock::Then) -> Self {
22903 Self(inner)
22904 }
22905
22906 pub fn into_inner(self) -> ::httpmock::Then {
22907 self.0
22908 }
22909
22910 pub fn ok(self, value: &types::WebhookSecrets) -> Self {
22911 Self(
22912 self.0
22913 .status(200u16)
22914 .header("content-type", "application/json")
22915 .json_body_obj(value),
22916 )
22917 }
22918
22919 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
22920 assert_eq!(status / 100u16, 4u16);
22921 Self(
22922 self.0
22923 .status(status)
22924 .header("content-type", "application/json")
22925 .json_body_obj(value),
22926 )
22927 }
22928
22929 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
22930 assert_eq!(status / 100u16, 5u16);
22931 Self(
22932 self.0
22933 .status(status)
22934 .header("content-type", "application/json")
22935 .json_body_obj(value),
22936 )
22937 }
22938 }
22939
22940 pub struct WebhookSecretsAddWhen(::httpmock::When);
22941 impl WebhookSecretsAddWhen {
22942 pub fn new(inner: ::httpmock::When) -> Self {
22943 Self(
22944 inner
22945 .method(::httpmock::Method::POST)
22946 .path_matches(regex::Regex::new("^/v1/webhook-secrets$").unwrap()),
22947 )
22948 }
22949
22950 pub fn into_inner(self) -> ::httpmock::When {
22951 self.0
22952 }
22953
22954 pub fn receiver(self, value: &types::NameOrId) -> Self {
22955 Self(self.0.query_param("receiver", value.to_string()))
22956 }
22957
22958 pub fn body(self, value: &types::WebhookSecretCreate) -> Self {
22959 Self(self.0.json_body_obj(value))
22960 }
22961 }
22962
22963 pub struct WebhookSecretsAddThen(::httpmock::Then);
22964 impl WebhookSecretsAddThen {
22965 pub fn new(inner: ::httpmock::Then) -> Self {
22966 Self(inner)
22967 }
22968
22969 pub fn into_inner(self) -> ::httpmock::Then {
22970 self.0
22971 }
22972
22973 pub fn created(self, value: &types::WebhookSecret) -> Self {
22974 Self(
22975 self.0
22976 .status(201u16)
22977 .header("content-type", "application/json")
22978 .json_body_obj(value),
22979 )
22980 }
22981
22982 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
22983 assert_eq!(status / 100u16, 4u16);
22984 Self(
22985 self.0
22986 .status(status)
22987 .header("content-type", "application/json")
22988 .json_body_obj(value),
22989 )
22990 }
22991
22992 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
22993 assert_eq!(status / 100u16, 5u16);
22994 Self(
22995 self.0
22996 .status(status)
22997 .header("content-type", "application/json")
22998 .json_body_obj(value),
22999 )
23000 }
23001 }
23002
23003 pub struct WebhookSecretsDeleteWhen(::httpmock::When);
23004 impl WebhookSecretsDeleteWhen {
23005 pub fn new(inner: ::httpmock::When) -> Self {
23006 Self(
23007 inner
23008 .method(::httpmock::Method::DELETE)
23009 .path_matches(regex::Regex::new("^/v1/webhook-secrets/[^/]*$").unwrap()),
23010 )
23011 }
23012
23013 pub fn into_inner(self) -> ::httpmock::When {
23014 self.0
23015 }
23016
23017 pub fn secret_id(self, value: &::uuid::Uuid) -> Self {
23018 let re =
23019 regex::Regex::new(&format!("^/v1/webhook-secrets/{}$", value.to_string())).unwrap();
23020 Self(self.0.path_matches(re))
23021 }
23022 }
23023
23024 pub struct WebhookSecretsDeleteThen(::httpmock::Then);
23025 impl WebhookSecretsDeleteThen {
23026 pub fn new(inner: ::httpmock::Then) -> Self {
23027 Self(inner)
23028 }
23029
23030 pub fn into_inner(self) -> ::httpmock::Then {
23031 self.0
23032 }
23033
23034 pub fn no_content(self) -> Self {
23035 Self(self.0.status(204u16))
23036 }
23037
23038 pub fn client_error(self, status: u16, value: &types::Error) -> Self {
23039 assert_eq!(status / 100u16, 4u16);
23040 Self(
23041 self.0
23042 .status(status)
23043 .header("content-type", "application/json")
23044 .json_body_obj(value),
23045 )
23046 }
23047
23048 pub fn server_error(self, status: u16, value: &types::Error) -> Self {
23049 assert_eq!(status / 100u16, 5u16);
23050 Self(
23051 self.0
23052 .status(status)
23053 .header("content-type", "application/json")
23054 .json_body_obj(value),
23055 )
23056 }
23057 }
23058}
23059
23060pub trait MockServerExt {
23064 fn device_auth_request<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23065 where
23066 F: FnOnce(operations::DeviceAuthRequestWhen, operations::DeviceAuthRequestThen);
23067 fn device_auth_confirm<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23068 where
23069 F: FnOnce(operations::DeviceAuthConfirmWhen, operations::DeviceAuthConfirmThen);
23070 fn device_access_token<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23071 where
23072 F: FnOnce(operations::DeviceAccessTokenWhen, operations::DeviceAccessTokenThen);
23073 fn probe_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23074 where
23075 F: FnOnce(operations::ProbeListWhen, operations::ProbeListThen);
23076 fn probe_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23077 where
23078 F: FnOnce(operations::ProbeCreateWhen, operations::ProbeCreateThen);
23079 fn probe_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23080 where
23081 F: FnOnce(operations::ProbeViewWhen, operations::ProbeViewThen);
23082 fn probe_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23083 where
23084 F: FnOnce(operations::ProbeDeleteWhen, operations::ProbeDeleteThen);
23085 fn support_bundle_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23086 where
23087 F: FnOnce(operations::SupportBundleListWhen, operations::SupportBundleListThen);
23088 fn support_bundle_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23089 where
23090 F: FnOnce(operations::SupportBundleCreateWhen, operations::SupportBundleCreateThen);
23091 fn support_bundle_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23092 where
23093 F: FnOnce(operations::SupportBundleViewWhen, operations::SupportBundleViewThen);
23094 fn support_bundle_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23095 where
23096 F: FnOnce(operations::SupportBundleUpdateWhen, operations::SupportBundleUpdateThen);
23097 fn support_bundle_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23098 where
23099 F: FnOnce(operations::SupportBundleDeleteWhen, operations::SupportBundleDeleteThen);
23100 fn support_bundle_download<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23101 where
23102 F: FnOnce(operations::SupportBundleDownloadWhen, operations::SupportBundleDownloadThen);
23103 fn support_bundle_head<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23104 where
23105 F: FnOnce(operations::SupportBundleHeadWhen, operations::SupportBundleHeadThen);
23106 fn support_bundle_download_file<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23107 where
23108 F: FnOnce(
23109 operations::SupportBundleDownloadFileWhen,
23110 operations::SupportBundleDownloadFileThen,
23111 );
23112 fn support_bundle_head_file<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23113 where
23114 F: FnOnce(operations::SupportBundleHeadFileWhen, operations::SupportBundleHeadFileThen);
23115 fn support_bundle_index<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23116 where
23117 F: FnOnce(operations::SupportBundleIndexWhen, operations::SupportBundleIndexThen);
23118 fn login_saml<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23119 where
23120 F: FnOnce(operations::LoginSamlWhen, operations::LoginSamlThen);
23121 fn affinity_group_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23122 where
23123 F: FnOnce(operations::AffinityGroupListWhen, operations::AffinityGroupListThen);
23124 fn affinity_group_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23125 where
23126 F: FnOnce(operations::AffinityGroupCreateWhen, operations::AffinityGroupCreateThen);
23127 fn affinity_group_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23128 where
23129 F: FnOnce(operations::AffinityGroupViewWhen, operations::AffinityGroupViewThen);
23130 fn affinity_group_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23131 where
23132 F: FnOnce(operations::AffinityGroupUpdateWhen, operations::AffinityGroupUpdateThen);
23133 fn affinity_group_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23134 where
23135 F: FnOnce(operations::AffinityGroupDeleteWhen, operations::AffinityGroupDeleteThen);
23136 fn affinity_group_member_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23137 where
23138 F: FnOnce(operations::AffinityGroupMemberListWhen, operations::AffinityGroupMemberListThen);
23139 fn affinity_group_member_instance_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23140 where
23141 F: FnOnce(
23142 operations::AffinityGroupMemberInstanceViewWhen,
23143 operations::AffinityGroupMemberInstanceViewThen,
23144 );
23145 fn affinity_group_member_instance_add<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23146 where
23147 F: FnOnce(
23148 operations::AffinityGroupMemberInstanceAddWhen,
23149 operations::AffinityGroupMemberInstanceAddThen,
23150 );
23151 fn affinity_group_member_instance_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23152 where
23153 F: FnOnce(
23154 operations::AffinityGroupMemberInstanceDeleteWhen,
23155 operations::AffinityGroupMemberInstanceDeleteThen,
23156 );
23157 fn alert_class_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23158 where
23159 F: FnOnce(operations::AlertClassListWhen, operations::AlertClassListThen);
23160 fn alert_receiver_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23161 where
23162 F: FnOnce(operations::AlertReceiverListWhen, operations::AlertReceiverListThen);
23163 fn alert_receiver_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23164 where
23165 F: FnOnce(operations::AlertReceiverViewWhen, operations::AlertReceiverViewThen);
23166 fn alert_receiver_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23167 where
23168 F: FnOnce(operations::AlertReceiverDeleteWhen, operations::AlertReceiverDeleteThen);
23169 fn alert_delivery_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23170 where
23171 F: FnOnce(operations::AlertDeliveryListWhen, operations::AlertDeliveryListThen);
23172 fn alert_receiver_probe<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23173 where
23174 F: FnOnce(operations::AlertReceiverProbeWhen, operations::AlertReceiverProbeThen);
23175 fn alert_receiver_subscription_add<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23176 where
23177 F: FnOnce(
23178 operations::AlertReceiverSubscriptionAddWhen,
23179 operations::AlertReceiverSubscriptionAddThen,
23180 );
23181 fn alert_receiver_subscription_remove<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23182 where
23183 F: FnOnce(
23184 operations::AlertReceiverSubscriptionRemoveWhen,
23185 operations::AlertReceiverSubscriptionRemoveThen,
23186 );
23187 fn alert_delivery_resend<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23188 where
23189 F: FnOnce(operations::AlertDeliveryResendWhen, operations::AlertDeliveryResendThen);
23190 fn anti_affinity_group_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23191 where
23192 F: FnOnce(operations::AntiAffinityGroupListWhen, operations::AntiAffinityGroupListThen);
23193 fn anti_affinity_group_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23194 where
23195 F: FnOnce(operations::AntiAffinityGroupCreateWhen, operations::AntiAffinityGroupCreateThen);
23196 fn anti_affinity_group_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23197 where
23198 F: FnOnce(operations::AntiAffinityGroupViewWhen, operations::AntiAffinityGroupViewThen);
23199 fn anti_affinity_group_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23200 where
23201 F: FnOnce(operations::AntiAffinityGroupUpdateWhen, operations::AntiAffinityGroupUpdateThen);
23202 fn anti_affinity_group_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23203 where
23204 F: FnOnce(operations::AntiAffinityGroupDeleteWhen, operations::AntiAffinityGroupDeleteThen);
23205 fn anti_affinity_group_member_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23206 where
23207 F: FnOnce(
23208 operations::AntiAffinityGroupMemberListWhen,
23209 operations::AntiAffinityGroupMemberListThen,
23210 );
23211 fn anti_affinity_group_member_instance_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23212 where
23213 F: FnOnce(
23214 operations::AntiAffinityGroupMemberInstanceViewWhen,
23215 operations::AntiAffinityGroupMemberInstanceViewThen,
23216 );
23217 fn anti_affinity_group_member_instance_add<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23218 where
23219 F: FnOnce(
23220 operations::AntiAffinityGroupMemberInstanceAddWhen,
23221 operations::AntiAffinityGroupMemberInstanceAddThen,
23222 );
23223 fn anti_affinity_group_member_instance_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23224 where
23225 F: FnOnce(
23226 operations::AntiAffinityGroupMemberInstanceDeleteWhen,
23227 operations::AntiAffinityGroupMemberInstanceDeleteThen,
23228 );
23229 fn auth_settings_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23230 where
23231 F: FnOnce(operations::AuthSettingsViewWhen, operations::AuthSettingsViewThen);
23232 fn auth_settings_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23233 where
23234 F: FnOnce(operations::AuthSettingsUpdateWhen, operations::AuthSettingsUpdateThen);
23235 fn certificate_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23236 where
23237 F: FnOnce(operations::CertificateListWhen, operations::CertificateListThen);
23238 fn certificate_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23239 where
23240 F: FnOnce(operations::CertificateCreateWhen, operations::CertificateCreateThen);
23241 fn certificate_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23242 where
23243 F: FnOnce(operations::CertificateViewWhen, operations::CertificateViewThen);
23244 fn certificate_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23245 where
23246 F: FnOnce(operations::CertificateDeleteWhen, operations::CertificateDeleteThen);
23247 fn disk_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23248 where
23249 F: FnOnce(operations::DiskListWhen, operations::DiskListThen);
23250 fn disk_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23251 where
23252 F: FnOnce(operations::DiskCreateWhen, operations::DiskCreateThen);
23253 fn disk_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23254 where
23255 F: FnOnce(operations::DiskViewWhen, operations::DiskViewThen);
23256 fn disk_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23257 where
23258 F: FnOnce(operations::DiskDeleteWhen, operations::DiskDeleteThen);
23259 fn disk_bulk_write_import<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23260 where
23261 F: FnOnce(operations::DiskBulkWriteImportWhen, operations::DiskBulkWriteImportThen);
23262 fn disk_bulk_write_import_start<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23263 where
23264 F: FnOnce(
23265 operations::DiskBulkWriteImportStartWhen,
23266 operations::DiskBulkWriteImportStartThen,
23267 );
23268 fn disk_bulk_write_import_stop<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23269 where
23270 F: FnOnce(operations::DiskBulkWriteImportStopWhen, operations::DiskBulkWriteImportStopThen);
23271 fn disk_finalize_import<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23272 where
23273 F: FnOnce(operations::DiskFinalizeImportWhen, operations::DiskFinalizeImportThen);
23274 fn external_subnet_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23275 where
23276 F: FnOnce(operations::ExternalSubnetListWhen, operations::ExternalSubnetListThen);
23277 fn external_subnet_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23278 where
23279 F: FnOnce(operations::ExternalSubnetCreateWhen, operations::ExternalSubnetCreateThen);
23280 fn external_subnet_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23281 where
23282 F: FnOnce(operations::ExternalSubnetViewWhen, operations::ExternalSubnetViewThen);
23283 fn external_subnet_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23284 where
23285 F: FnOnce(operations::ExternalSubnetUpdateWhen, operations::ExternalSubnetUpdateThen);
23286 fn external_subnet_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23287 where
23288 F: FnOnce(operations::ExternalSubnetDeleteWhen, operations::ExternalSubnetDeleteThen);
23289 fn external_subnet_attach<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23290 where
23291 F: FnOnce(operations::ExternalSubnetAttachWhen, operations::ExternalSubnetAttachThen);
23292 fn external_subnet_detach<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23293 where
23294 F: FnOnce(operations::ExternalSubnetDetachWhen, operations::ExternalSubnetDetachThen);
23295 fn floating_ip_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23296 where
23297 F: FnOnce(operations::FloatingIpListWhen, operations::FloatingIpListThen);
23298 fn floating_ip_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23299 where
23300 F: FnOnce(operations::FloatingIpCreateWhen, operations::FloatingIpCreateThen);
23301 fn floating_ip_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23302 where
23303 F: FnOnce(operations::FloatingIpViewWhen, operations::FloatingIpViewThen);
23304 fn floating_ip_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23305 where
23306 F: FnOnce(operations::FloatingIpUpdateWhen, operations::FloatingIpUpdateThen);
23307 fn floating_ip_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23308 where
23309 F: FnOnce(operations::FloatingIpDeleteWhen, operations::FloatingIpDeleteThen);
23310 fn floating_ip_attach<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23311 where
23312 F: FnOnce(operations::FloatingIpAttachWhen, operations::FloatingIpAttachThen);
23313 fn floating_ip_detach<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23314 where
23315 F: FnOnce(operations::FloatingIpDetachWhen, operations::FloatingIpDetachThen);
23316 fn group_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23317 where
23318 F: FnOnce(operations::GroupListWhen, operations::GroupListThen);
23319 fn group_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23320 where
23321 F: FnOnce(operations::GroupViewWhen, operations::GroupViewThen);
23322 fn image_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23323 where
23324 F: FnOnce(operations::ImageListWhen, operations::ImageListThen);
23325 fn image_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23326 where
23327 F: FnOnce(operations::ImageCreateWhen, operations::ImageCreateThen);
23328 fn image_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23329 where
23330 F: FnOnce(operations::ImageViewWhen, operations::ImageViewThen);
23331 fn image_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23332 where
23333 F: FnOnce(operations::ImageDeleteWhen, operations::ImageDeleteThen);
23334 fn image_demote<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23335 where
23336 F: FnOnce(operations::ImageDemoteWhen, operations::ImageDemoteThen);
23337 fn image_promote<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23338 where
23339 F: FnOnce(operations::ImagePromoteWhen, operations::ImagePromoteThen);
23340 fn instance_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23341 where
23342 F: FnOnce(operations::InstanceListWhen, operations::InstanceListThen);
23343 fn instance_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23344 where
23345 F: FnOnce(operations::InstanceCreateWhen, operations::InstanceCreateThen);
23346 fn instance_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23347 where
23348 F: FnOnce(operations::InstanceViewWhen, operations::InstanceViewThen);
23349 fn instance_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23350 where
23351 F: FnOnce(operations::InstanceUpdateWhen, operations::InstanceUpdateThen);
23352 fn instance_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23353 where
23354 F: FnOnce(operations::InstanceDeleteWhen, operations::InstanceDeleteThen);
23355 fn instance_affinity_group_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23356 where
23357 F: FnOnce(
23358 operations::InstanceAffinityGroupListWhen,
23359 operations::InstanceAffinityGroupListThen,
23360 );
23361 fn instance_anti_affinity_group_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23362 where
23363 F: FnOnce(
23364 operations::InstanceAntiAffinityGroupListWhen,
23365 operations::InstanceAntiAffinityGroupListThen,
23366 );
23367 fn instance_disk_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23368 where
23369 F: FnOnce(operations::InstanceDiskListWhen, operations::InstanceDiskListThen);
23370 fn instance_disk_attach<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23371 where
23372 F: FnOnce(operations::InstanceDiskAttachWhen, operations::InstanceDiskAttachThen);
23373 fn instance_disk_detach<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23374 where
23375 F: FnOnce(operations::InstanceDiskDetachWhen, operations::InstanceDiskDetachThen);
23376 fn instance_external_ip_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23377 where
23378 F: FnOnce(operations::InstanceExternalIpListWhen, operations::InstanceExternalIpListThen);
23379 fn instance_ephemeral_ip_attach<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23380 where
23381 F: FnOnce(
23382 operations::InstanceEphemeralIpAttachWhen,
23383 operations::InstanceEphemeralIpAttachThen,
23384 );
23385 fn instance_ephemeral_ip_detach<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23386 where
23387 F: FnOnce(
23388 operations::InstanceEphemeralIpDetachWhen,
23389 operations::InstanceEphemeralIpDetachThen,
23390 );
23391 fn instance_external_subnet_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23392 where
23393 F: FnOnce(
23394 operations::InstanceExternalSubnetListWhen,
23395 operations::InstanceExternalSubnetListThen,
23396 );
23397 fn instance_multicast_group_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23398 where
23399 F: FnOnce(
23400 operations::InstanceMulticastGroupListWhen,
23401 operations::InstanceMulticastGroupListThen,
23402 );
23403 fn instance_multicast_group_join<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23404 where
23405 F: FnOnce(
23406 operations::InstanceMulticastGroupJoinWhen,
23407 operations::InstanceMulticastGroupJoinThen,
23408 );
23409 fn instance_multicast_group_leave<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23410 where
23411 F: FnOnce(
23412 operations::InstanceMulticastGroupLeaveWhen,
23413 operations::InstanceMulticastGroupLeaveThen,
23414 );
23415 fn instance_reboot<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23416 where
23417 F: FnOnce(operations::InstanceRebootWhen, operations::InstanceRebootThen);
23418 fn instance_serial_console<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23419 where
23420 F: FnOnce(operations::InstanceSerialConsoleWhen, operations::InstanceSerialConsoleThen);
23421 fn instance_serial_console_stream<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23422 where
23423 F: FnOnce(
23424 operations::InstanceSerialConsoleStreamWhen,
23425 operations::InstanceSerialConsoleStreamThen,
23426 );
23427 fn instance_ssh_public_key_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23428 where
23429 F: FnOnce(
23430 operations::InstanceSshPublicKeyListWhen,
23431 operations::InstanceSshPublicKeyListThen,
23432 );
23433 fn instance_start<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23434 where
23435 F: FnOnce(operations::InstanceStartWhen, operations::InstanceStartThen);
23436 fn instance_stop<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23437 where
23438 F: FnOnce(operations::InstanceStopWhen, operations::InstanceStopThen);
23439 fn internet_gateway_ip_address_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23440 where
23441 F: FnOnce(
23442 operations::InternetGatewayIpAddressListWhen,
23443 operations::InternetGatewayIpAddressListThen,
23444 );
23445 fn internet_gateway_ip_address_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23446 where
23447 F: FnOnce(
23448 operations::InternetGatewayIpAddressCreateWhen,
23449 operations::InternetGatewayIpAddressCreateThen,
23450 );
23451 fn internet_gateway_ip_address_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23452 where
23453 F: FnOnce(
23454 operations::InternetGatewayIpAddressDeleteWhen,
23455 operations::InternetGatewayIpAddressDeleteThen,
23456 );
23457 fn internet_gateway_ip_pool_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23458 where
23459 F: FnOnce(
23460 operations::InternetGatewayIpPoolListWhen,
23461 operations::InternetGatewayIpPoolListThen,
23462 );
23463 fn internet_gateway_ip_pool_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23464 where
23465 F: FnOnce(
23466 operations::InternetGatewayIpPoolCreateWhen,
23467 operations::InternetGatewayIpPoolCreateThen,
23468 );
23469 fn internet_gateway_ip_pool_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23470 where
23471 F: FnOnce(
23472 operations::InternetGatewayIpPoolDeleteWhen,
23473 operations::InternetGatewayIpPoolDeleteThen,
23474 );
23475 fn internet_gateway_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23476 where
23477 F: FnOnce(operations::InternetGatewayListWhen, operations::InternetGatewayListThen);
23478 fn internet_gateway_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23479 where
23480 F: FnOnce(operations::InternetGatewayCreateWhen, operations::InternetGatewayCreateThen);
23481 fn internet_gateway_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23482 where
23483 F: FnOnce(operations::InternetGatewayViewWhen, operations::InternetGatewayViewThen);
23484 fn internet_gateway_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23485 where
23486 F: FnOnce(operations::InternetGatewayDeleteWhen, operations::InternetGatewayDeleteThen);
23487 fn ip_pool_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23488 where
23489 F: FnOnce(operations::IpPoolListWhen, operations::IpPoolListThen);
23490 fn ip_pool_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23491 where
23492 F: FnOnce(operations::IpPoolViewWhen, operations::IpPoolViewThen);
23493 fn login_local<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23494 where
23495 F: FnOnce(operations::LoginLocalWhen, operations::LoginLocalThen);
23496 fn logout<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23497 where
23498 F: FnOnce(operations::LogoutWhen, operations::LogoutThen);
23499 fn current_user_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23500 where
23501 F: FnOnce(operations::CurrentUserViewWhen, operations::CurrentUserViewThen);
23502 fn current_user_access_token_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23503 where
23504 F: FnOnce(
23505 operations::CurrentUserAccessTokenListWhen,
23506 operations::CurrentUserAccessTokenListThen,
23507 );
23508 fn current_user_access_token_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23509 where
23510 F: FnOnce(
23511 operations::CurrentUserAccessTokenDeleteWhen,
23512 operations::CurrentUserAccessTokenDeleteThen,
23513 );
23514 fn current_user_groups<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23515 where
23516 F: FnOnce(operations::CurrentUserGroupsWhen, operations::CurrentUserGroupsThen);
23517 fn current_user_ssh_key_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23518 where
23519 F: FnOnce(operations::CurrentUserSshKeyListWhen, operations::CurrentUserSshKeyListThen);
23520 fn current_user_ssh_key_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23521 where
23522 F: FnOnce(operations::CurrentUserSshKeyCreateWhen, operations::CurrentUserSshKeyCreateThen);
23523 fn current_user_ssh_key_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23524 where
23525 F: FnOnce(operations::CurrentUserSshKeyViewWhen, operations::CurrentUserSshKeyViewThen);
23526 fn current_user_ssh_key_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23527 where
23528 F: FnOnce(operations::CurrentUserSshKeyDeleteWhen, operations::CurrentUserSshKeyDeleteThen);
23529 fn silo_metric<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23530 where
23531 F: FnOnce(operations::SiloMetricWhen, operations::SiloMetricThen);
23532 fn multicast_group_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23533 where
23534 F: FnOnce(operations::MulticastGroupListWhen, operations::MulticastGroupListThen);
23535 fn multicast_group_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23536 where
23537 F: FnOnce(operations::MulticastGroupViewWhen, operations::MulticastGroupViewThen);
23538 fn multicast_group_member_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23539 where
23540 F: FnOnce(
23541 operations::MulticastGroupMemberListWhen,
23542 operations::MulticastGroupMemberListThen,
23543 );
23544 fn instance_network_interface_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23545 where
23546 F: FnOnce(
23547 operations::InstanceNetworkInterfaceListWhen,
23548 operations::InstanceNetworkInterfaceListThen,
23549 );
23550 fn instance_network_interface_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23551 where
23552 F: FnOnce(
23553 operations::InstanceNetworkInterfaceCreateWhen,
23554 operations::InstanceNetworkInterfaceCreateThen,
23555 );
23556 fn instance_network_interface_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23557 where
23558 F: FnOnce(
23559 operations::InstanceNetworkInterfaceViewWhen,
23560 operations::InstanceNetworkInterfaceViewThen,
23561 );
23562 fn instance_network_interface_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23563 where
23564 F: FnOnce(
23565 operations::InstanceNetworkInterfaceUpdateWhen,
23566 operations::InstanceNetworkInterfaceUpdateThen,
23567 );
23568 fn instance_network_interface_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23569 where
23570 F: FnOnce(
23571 operations::InstanceNetworkInterfaceDeleteWhen,
23572 operations::InstanceNetworkInterfaceDeleteThen,
23573 );
23574 fn ping<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23575 where
23576 F: FnOnce(operations::PingWhen, operations::PingThen);
23577 fn policy_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23578 where
23579 F: FnOnce(operations::PolicyViewWhen, operations::PolicyViewThen);
23580 fn policy_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23581 where
23582 F: FnOnce(operations::PolicyUpdateWhen, operations::PolicyUpdateThen);
23583 fn project_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23584 where
23585 F: FnOnce(operations::ProjectListWhen, operations::ProjectListThen);
23586 fn project_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23587 where
23588 F: FnOnce(operations::ProjectCreateWhen, operations::ProjectCreateThen);
23589 fn project_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23590 where
23591 F: FnOnce(operations::ProjectViewWhen, operations::ProjectViewThen);
23592 fn project_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23593 where
23594 F: FnOnce(operations::ProjectUpdateWhen, operations::ProjectUpdateThen);
23595 fn project_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23596 where
23597 F: FnOnce(operations::ProjectDeleteWhen, operations::ProjectDeleteThen);
23598 fn project_policy_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23599 where
23600 F: FnOnce(operations::ProjectPolicyViewWhen, operations::ProjectPolicyViewThen);
23601 fn project_policy_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23602 where
23603 F: FnOnce(operations::ProjectPolicyUpdateWhen, operations::ProjectPolicyUpdateThen);
23604 fn snapshot_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23605 where
23606 F: FnOnce(operations::SnapshotListWhen, operations::SnapshotListThen);
23607 fn snapshot_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23608 where
23609 F: FnOnce(operations::SnapshotCreateWhen, operations::SnapshotCreateThen);
23610 fn snapshot_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23611 where
23612 F: FnOnce(operations::SnapshotViewWhen, operations::SnapshotViewThen);
23613 fn snapshot_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23614 where
23615 F: FnOnce(operations::SnapshotDeleteWhen, operations::SnapshotDeleteThen);
23616 fn subnet_pool_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23617 where
23618 F: FnOnce(operations::SubnetPoolListWhen, operations::SubnetPoolListThen);
23619 fn subnet_pool_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23620 where
23621 F: FnOnce(operations::SubnetPoolViewWhen, operations::SubnetPoolViewThen);
23622 fn audit_log_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23623 where
23624 F: FnOnce(operations::AuditLogListWhen, operations::AuditLogListThen);
23625 fn physical_disk_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23626 where
23627 F: FnOnce(operations::PhysicalDiskListWhen, operations::PhysicalDiskListThen);
23628 fn physical_disk_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23629 where
23630 F: FnOnce(operations::PhysicalDiskViewWhen, operations::PhysicalDiskViewThen);
23631 fn networking_switch_port_lldp_neighbors<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23632 where
23633 F: FnOnce(
23634 operations::NetworkingSwitchPortLldpNeighborsWhen,
23635 operations::NetworkingSwitchPortLldpNeighborsThen,
23636 );
23637 fn rack_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23638 where
23639 F: FnOnce(operations::RackListWhen, operations::RackListThen);
23640 fn rack_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23641 where
23642 F: FnOnce(operations::RackViewWhen, operations::RackViewThen);
23643 fn rack_membership_status<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23644 where
23645 F: FnOnce(operations::RackMembershipStatusWhen, operations::RackMembershipStatusThen);
23646 fn rack_membership_abort<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23647 where
23648 F: FnOnce(operations::RackMembershipAbortWhen, operations::RackMembershipAbortThen);
23649 fn rack_membership_add_sleds<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23650 where
23651 F: FnOnce(operations::RackMembershipAddSledsWhen, operations::RackMembershipAddSledsThen);
23652 fn sled_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23653 where
23654 F: FnOnce(operations::SledListWhen, operations::SledListThen);
23655 fn sled_add<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23656 where
23657 F: FnOnce(operations::SledAddWhen, operations::SledAddThen);
23658 fn sled_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23659 where
23660 F: FnOnce(operations::SledViewWhen, operations::SledViewThen);
23661 fn sled_physical_disk_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23662 where
23663 F: FnOnce(operations::SledPhysicalDiskListWhen, operations::SledPhysicalDiskListThen);
23664 fn sled_instance_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23665 where
23666 F: FnOnce(operations::SledInstanceListWhen, operations::SledInstanceListThen);
23667 fn sled_set_provision_policy<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23668 where
23669 F: FnOnce(operations::SledSetProvisionPolicyWhen, operations::SledSetProvisionPolicyThen);
23670 fn sled_list_uninitialized<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23671 where
23672 F: FnOnce(operations::SledListUninitializedWhen, operations::SledListUninitializedThen);
23673 fn networking_switch_port_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23674 where
23675 F: FnOnce(
23676 operations::NetworkingSwitchPortListWhen,
23677 operations::NetworkingSwitchPortListThen,
23678 );
23679 fn networking_switch_port_lldp_config_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23680 where
23681 F: FnOnce(
23682 operations::NetworkingSwitchPortLldpConfigViewWhen,
23683 operations::NetworkingSwitchPortLldpConfigViewThen,
23684 );
23685 fn networking_switch_port_lldp_config_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23686 where
23687 F: FnOnce(
23688 operations::NetworkingSwitchPortLldpConfigUpdateWhen,
23689 operations::NetworkingSwitchPortLldpConfigUpdateThen,
23690 );
23691 fn networking_switch_port_apply_settings<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23692 where
23693 F: FnOnce(
23694 operations::NetworkingSwitchPortApplySettingsWhen,
23695 operations::NetworkingSwitchPortApplySettingsThen,
23696 );
23697 fn networking_switch_port_clear_settings<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23698 where
23699 F: FnOnce(
23700 operations::NetworkingSwitchPortClearSettingsWhen,
23701 operations::NetworkingSwitchPortClearSettingsThen,
23702 );
23703 fn networking_switch_port_status<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23704 where
23705 F: FnOnce(
23706 operations::NetworkingSwitchPortStatusWhen,
23707 operations::NetworkingSwitchPortStatusThen,
23708 );
23709 fn switch_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23710 where
23711 F: FnOnce(operations::SwitchListWhen, operations::SwitchListThen);
23712 fn switch_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23713 where
23714 F: FnOnce(operations::SwitchViewWhen, operations::SwitchViewThen);
23715 fn silo_identity_provider_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23716 where
23717 F: FnOnce(
23718 operations::SiloIdentityProviderListWhen,
23719 operations::SiloIdentityProviderListThen,
23720 );
23721 fn local_idp_user_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23722 where
23723 F: FnOnce(operations::LocalIdpUserCreateWhen, operations::LocalIdpUserCreateThen);
23724 fn local_idp_user_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23725 where
23726 F: FnOnce(operations::LocalIdpUserDeleteWhen, operations::LocalIdpUserDeleteThen);
23727 fn local_idp_user_set_password<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23728 where
23729 F: FnOnce(operations::LocalIdpUserSetPasswordWhen, operations::LocalIdpUserSetPasswordThen);
23730 fn saml_identity_provider_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23731 where
23732 F: FnOnce(
23733 operations::SamlIdentityProviderCreateWhen,
23734 operations::SamlIdentityProviderCreateThen,
23735 );
23736 fn saml_identity_provider_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23737 where
23738 F: FnOnce(
23739 operations::SamlIdentityProviderViewWhen,
23740 operations::SamlIdentityProviderViewThen,
23741 );
23742 fn system_ip_pool_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23743 where
23744 F: FnOnce(operations::SystemIpPoolListWhen, operations::SystemIpPoolListThen);
23745 fn system_ip_pool_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23746 where
23747 F: FnOnce(operations::SystemIpPoolCreateWhen, operations::SystemIpPoolCreateThen);
23748 fn system_ip_pool_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23749 where
23750 F: FnOnce(operations::SystemIpPoolViewWhen, operations::SystemIpPoolViewThen);
23751 fn system_ip_pool_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23752 where
23753 F: FnOnce(operations::SystemIpPoolUpdateWhen, operations::SystemIpPoolUpdateThen);
23754 fn system_ip_pool_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23755 where
23756 F: FnOnce(operations::SystemIpPoolDeleteWhen, operations::SystemIpPoolDeleteThen);
23757 fn system_ip_pool_range_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23758 where
23759 F: FnOnce(operations::SystemIpPoolRangeListWhen, operations::SystemIpPoolRangeListThen);
23760 fn system_ip_pool_range_add<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23761 where
23762 F: FnOnce(operations::SystemIpPoolRangeAddWhen, operations::SystemIpPoolRangeAddThen);
23763 fn system_ip_pool_range_remove<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23764 where
23765 F: FnOnce(operations::SystemIpPoolRangeRemoveWhen, operations::SystemIpPoolRangeRemoveThen);
23766 fn system_ip_pool_silo_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23767 where
23768 F: FnOnce(operations::SystemIpPoolSiloListWhen, operations::SystemIpPoolSiloListThen);
23769 fn system_ip_pool_silo_link<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23770 where
23771 F: FnOnce(operations::SystemIpPoolSiloLinkWhen, operations::SystemIpPoolSiloLinkThen);
23772 fn system_ip_pool_silo_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23773 where
23774 F: FnOnce(operations::SystemIpPoolSiloUpdateWhen, operations::SystemIpPoolSiloUpdateThen);
23775 fn system_ip_pool_silo_unlink<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23776 where
23777 F: FnOnce(operations::SystemIpPoolSiloUnlinkWhen, operations::SystemIpPoolSiloUnlinkThen);
23778 fn system_ip_pool_utilization_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23779 where
23780 F: FnOnce(
23781 operations::SystemIpPoolUtilizationViewWhen,
23782 operations::SystemIpPoolUtilizationViewThen,
23783 );
23784 fn system_ip_pool_service_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23785 where
23786 F: FnOnce(operations::SystemIpPoolServiceViewWhen, operations::SystemIpPoolServiceViewThen);
23787 fn system_ip_pool_service_range_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23788 where
23789 F: FnOnce(
23790 operations::SystemIpPoolServiceRangeListWhen,
23791 operations::SystemIpPoolServiceRangeListThen,
23792 );
23793 fn system_ip_pool_service_range_add<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23794 where
23795 F: FnOnce(
23796 operations::SystemIpPoolServiceRangeAddWhen,
23797 operations::SystemIpPoolServiceRangeAddThen,
23798 );
23799 fn system_ip_pool_service_range_remove<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23800 where
23801 F: FnOnce(
23802 operations::SystemIpPoolServiceRangeRemoveWhen,
23803 operations::SystemIpPoolServiceRangeRemoveThen,
23804 );
23805 fn system_metric<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23806 where
23807 F: FnOnce(operations::SystemMetricWhen, operations::SystemMetricThen);
23808 fn networking_address_lot_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23809 where
23810 F: FnOnce(
23811 operations::NetworkingAddressLotListWhen,
23812 operations::NetworkingAddressLotListThen,
23813 );
23814 fn networking_address_lot_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23815 where
23816 F: FnOnce(
23817 operations::NetworkingAddressLotCreateWhen,
23818 operations::NetworkingAddressLotCreateThen,
23819 );
23820 fn networking_address_lot_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23821 where
23822 F: FnOnce(
23823 operations::NetworkingAddressLotViewWhen,
23824 operations::NetworkingAddressLotViewThen,
23825 );
23826 fn networking_address_lot_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23827 where
23828 F: FnOnce(
23829 operations::NetworkingAddressLotDeleteWhen,
23830 operations::NetworkingAddressLotDeleteThen,
23831 );
23832 fn networking_address_lot_block_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23833 where
23834 F: FnOnce(
23835 operations::NetworkingAddressLotBlockListWhen,
23836 operations::NetworkingAddressLotBlockListThen,
23837 );
23838 fn networking_allow_list_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23839 where
23840 F: FnOnce(operations::NetworkingAllowListViewWhen, operations::NetworkingAllowListViewThen);
23841 fn networking_allow_list_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23842 where
23843 F: FnOnce(
23844 operations::NetworkingAllowListUpdateWhen,
23845 operations::NetworkingAllowListUpdateThen,
23846 );
23847 fn networking_bfd_disable<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23848 where
23849 F: FnOnce(operations::NetworkingBfdDisableWhen, operations::NetworkingBfdDisableThen);
23850 fn networking_bfd_enable<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23851 where
23852 F: FnOnce(operations::NetworkingBfdEnableWhen, operations::NetworkingBfdEnableThen);
23853 fn networking_bfd_status<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23854 where
23855 F: FnOnce(operations::NetworkingBfdStatusWhen, operations::NetworkingBfdStatusThen);
23856 fn networking_bgp_config_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23857 where
23858 F: FnOnce(operations::NetworkingBgpConfigListWhen, operations::NetworkingBgpConfigListThen);
23859 fn networking_bgp_config_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23860 where
23861 F: FnOnce(
23862 operations::NetworkingBgpConfigCreateWhen,
23863 operations::NetworkingBgpConfigCreateThen,
23864 );
23865 fn networking_bgp_config_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23866 where
23867 F: FnOnce(
23868 operations::NetworkingBgpConfigDeleteWhen,
23869 operations::NetworkingBgpConfigDeleteThen,
23870 );
23871 fn networking_bgp_announce_set_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23872 where
23873 F: FnOnce(
23874 operations::NetworkingBgpAnnounceSetListWhen,
23875 operations::NetworkingBgpAnnounceSetListThen,
23876 );
23877 fn networking_bgp_announce_set_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23878 where
23879 F: FnOnce(
23880 operations::NetworkingBgpAnnounceSetUpdateWhen,
23881 operations::NetworkingBgpAnnounceSetUpdateThen,
23882 );
23883 fn networking_bgp_announce_set_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23884 where
23885 F: FnOnce(
23886 operations::NetworkingBgpAnnounceSetDeleteWhen,
23887 operations::NetworkingBgpAnnounceSetDeleteThen,
23888 );
23889 fn networking_bgp_announcement_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23890 where
23891 F: FnOnce(
23892 operations::NetworkingBgpAnnouncementListWhen,
23893 operations::NetworkingBgpAnnouncementListThen,
23894 );
23895 fn networking_bgp_exported<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23896 where
23897 F: FnOnce(operations::NetworkingBgpExportedWhen, operations::NetworkingBgpExportedThen);
23898 fn networking_bgp_imported<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23899 where
23900 F: FnOnce(operations::NetworkingBgpImportedWhen, operations::NetworkingBgpImportedThen);
23901 fn networking_bgp_message_history<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23902 where
23903 F: FnOnce(
23904 operations::NetworkingBgpMessageHistoryWhen,
23905 operations::NetworkingBgpMessageHistoryThen,
23906 );
23907 fn networking_bgp_status<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23908 where
23909 F: FnOnce(operations::NetworkingBgpStatusWhen, operations::NetworkingBgpStatusThen);
23910 fn networking_inbound_icmp_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23911 where
23912 F: FnOnce(
23913 operations::NetworkingInboundIcmpViewWhen,
23914 operations::NetworkingInboundIcmpViewThen,
23915 );
23916 fn networking_inbound_icmp_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23917 where
23918 F: FnOnce(
23919 operations::NetworkingInboundIcmpUpdateWhen,
23920 operations::NetworkingInboundIcmpUpdateThen,
23921 );
23922 fn networking_loopback_address_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23923 where
23924 F: FnOnce(
23925 operations::NetworkingLoopbackAddressListWhen,
23926 operations::NetworkingLoopbackAddressListThen,
23927 );
23928 fn networking_loopback_address_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23929 where
23930 F: FnOnce(
23931 operations::NetworkingLoopbackAddressCreateWhen,
23932 operations::NetworkingLoopbackAddressCreateThen,
23933 );
23934 fn networking_loopback_address_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23935 where
23936 F: FnOnce(
23937 operations::NetworkingLoopbackAddressDeleteWhen,
23938 operations::NetworkingLoopbackAddressDeleteThen,
23939 );
23940 fn networking_switch_port_settings_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23941 where
23942 F: FnOnce(
23943 operations::NetworkingSwitchPortSettingsListWhen,
23944 operations::NetworkingSwitchPortSettingsListThen,
23945 );
23946 fn networking_switch_port_settings_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23947 where
23948 F: FnOnce(
23949 operations::NetworkingSwitchPortSettingsCreateWhen,
23950 operations::NetworkingSwitchPortSettingsCreateThen,
23951 );
23952 fn networking_switch_port_settings_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23953 where
23954 F: FnOnce(
23955 operations::NetworkingSwitchPortSettingsDeleteWhen,
23956 operations::NetworkingSwitchPortSettingsDeleteThen,
23957 );
23958 fn networking_switch_port_settings_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23959 where
23960 F: FnOnce(
23961 operations::NetworkingSwitchPortSettingsViewWhen,
23962 operations::NetworkingSwitchPortSettingsViewThen,
23963 );
23964 fn system_policy_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23965 where
23966 F: FnOnce(operations::SystemPolicyViewWhen, operations::SystemPolicyViewThen);
23967 fn system_policy_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23968 where
23969 F: FnOnce(operations::SystemPolicyUpdateWhen, operations::SystemPolicyUpdateThen);
23970 fn scim_token_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23971 where
23972 F: FnOnce(operations::ScimTokenListWhen, operations::ScimTokenListThen);
23973 fn scim_token_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23974 where
23975 F: FnOnce(operations::ScimTokenCreateWhen, operations::ScimTokenCreateThen);
23976 fn scim_token_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23977 where
23978 F: FnOnce(operations::ScimTokenViewWhen, operations::ScimTokenViewThen);
23979 fn scim_token_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23980 where
23981 F: FnOnce(operations::ScimTokenDeleteWhen, operations::ScimTokenDeleteThen);
23982 fn system_quotas_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23983 where
23984 F: FnOnce(operations::SystemQuotasListWhen, operations::SystemQuotasListThen);
23985 fn silo_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23986 where
23987 F: FnOnce(operations::SiloListWhen, operations::SiloListThen);
23988 fn silo_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23989 where
23990 F: FnOnce(operations::SiloCreateWhen, operations::SiloCreateThen);
23991 fn silo_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23992 where
23993 F: FnOnce(operations::SiloViewWhen, operations::SiloViewThen);
23994 fn silo_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23995 where
23996 F: FnOnce(operations::SiloDeleteWhen, operations::SiloDeleteThen);
23997 fn silo_ip_pool_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
23998 where
23999 F: FnOnce(operations::SiloIpPoolListWhen, operations::SiloIpPoolListThen);
24000 fn silo_policy_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24001 where
24002 F: FnOnce(operations::SiloPolicyViewWhen, operations::SiloPolicyViewThen);
24003 fn silo_policy_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24004 where
24005 F: FnOnce(operations::SiloPolicyUpdateWhen, operations::SiloPolicyUpdateThen);
24006 fn silo_quotas_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24007 where
24008 F: FnOnce(operations::SiloQuotasViewWhen, operations::SiloQuotasViewThen);
24009 fn silo_quotas_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24010 where
24011 F: FnOnce(operations::SiloQuotasUpdateWhen, operations::SiloQuotasUpdateThen);
24012 fn silo_subnet_pool_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24013 where
24014 F: FnOnce(operations::SiloSubnetPoolListWhen, operations::SiloSubnetPoolListThen);
24015 fn system_subnet_pool_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24016 where
24017 F: FnOnce(operations::SystemSubnetPoolListWhen, operations::SystemSubnetPoolListThen);
24018 fn system_subnet_pool_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24019 where
24020 F: FnOnce(operations::SystemSubnetPoolCreateWhen, operations::SystemSubnetPoolCreateThen);
24021 fn system_subnet_pool_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24022 where
24023 F: FnOnce(operations::SystemSubnetPoolViewWhen, operations::SystemSubnetPoolViewThen);
24024 fn system_subnet_pool_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24025 where
24026 F: FnOnce(operations::SystemSubnetPoolUpdateWhen, operations::SystemSubnetPoolUpdateThen);
24027 fn system_subnet_pool_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24028 where
24029 F: FnOnce(operations::SystemSubnetPoolDeleteWhen, operations::SystemSubnetPoolDeleteThen);
24030 fn system_subnet_pool_member_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24031 where
24032 F: FnOnce(
24033 operations::SystemSubnetPoolMemberListWhen,
24034 operations::SystemSubnetPoolMemberListThen,
24035 );
24036 fn system_subnet_pool_member_add<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24037 where
24038 F: FnOnce(
24039 operations::SystemSubnetPoolMemberAddWhen,
24040 operations::SystemSubnetPoolMemberAddThen,
24041 );
24042 fn system_subnet_pool_member_remove<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24043 where
24044 F: FnOnce(
24045 operations::SystemSubnetPoolMemberRemoveWhen,
24046 operations::SystemSubnetPoolMemberRemoveThen,
24047 );
24048 fn system_subnet_pool_silo_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24049 where
24050 F: FnOnce(
24051 operations::SystemSubnetPoolSiloListWhen,
24052 operations::SystemSubnetPoolSiloListThen,
24053 );
24054 fn system_subnet_pool_silo_link<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24055 where
24056 F: FnOnce(
24057 operations::SystemSubnetPoolSiloLinkWhen,
24058 operations::SystemSubnetPoolSiloLinkThen,
24059 );
24060 fn system_subnet_pool_silo_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24061 where
24062 F: FnOnce(
24063 operations::SystemSubnetPoolSiloUpdateWhen,
24064 operations::SystemSubnetPoolSiloUpdateThen,
24065 );
24066 fn system_subnet_pool_silo_unlink<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24067 where
24068 F: FnOnce(
24069 operations::SystemSubnetPoolSiloUnlinkWhen,
24070 operations::SystemSubnetPoolSiloUnlinkThen,
24071 );
24072 fn system_subnet_pool_utilization_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24073 where
24074 F: FnOnce(
24075 operations::SystemSubnetPoolUtilizationViewWhen,
24076 operations::SystemSubnetPoolUtilizationViewThen,
24077 );
24078 fn system_timeseries_query<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24079 where
24080 F: FnOnce(operations::SystemTimeseriesQueryWhen, operations::SystemTimeseriesQueryThen);
24081 fn system_timeseries_schema_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24082 where
24083 F: FnOnce(
24084 operations::SystemTimeseriesSchemaListWhen,
24085 operations::SystemTimeseriesSchemaListThen,
24086 );
24087 fn system_update_repository_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24088 where
24089 F: FnOnce(
24090 operations::SystemUpdateRepositoryListWhen,
24091 operations::SystemUpdateRepositoryListThen,
24092 );
24093 fn system_update_repository_upload<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24094 where
24095 F: FnOnce(
24096 operations::SystemUpdateRepositoryUploadWhen,
24097 operations::SystemUpdateRepositoryUploadThen,
24098 );
24099 fn system_update_repository_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24100 where
24101 F: FnOnce(
24102 operations::SystemUpdateRepositoryViewWhen,
24103 operations::SystemUpdateRepositoryViewThen,
24104 );
24105 fn system_update_status<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24106 where
24107 F: FnOnce(operations::SystemUpdateStatusWhen, operations::SystemUpdateStatusThen);
24108 fn target_release_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24109 where
24110 F: FnOnce(operations::TargetReleaseUpdateWhen, operations::TargetReleaseUpdateThen);
24111 fn system_update_trust_root_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24112 where
24113 F: FnOnce(
24114 operations::SystemUpdateTrustRootListWhen,
24115 operations::SystemUpdateTrustRootListThen,
24116 );
24117 fn system_update_trust_root_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24118 where
24119 F: FnOnce(
24120 operations::SystemUpdateTrustRootCreateWhen,
24121 operations::SystemUpdateTrustRootCreateThen,
24122 );
24123 fn system_update_trust_root_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24124 where
24125 F: FnOnce(
24126 operations::SystemUpdateTrustRootViewWhen,
24127 operations::SystemUpdateTrustRootViewThen,
24128 );
24129 fn system_update_trust_root_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24130 where
24131 F: FnOnce(
24132 operations::SystemUpdateTrustRootDeleteWhen,
24133 operations::SystemUpdateTrustRootDeleteThen,
24134 );
24135 fn silo_user_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24136 where
24137 F: FnOnce(operations::SiloUserListWhen, operations::SiloUserListThen);
24138 fn silo_user_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24139 where
24140 F: FnOnce(operations::SiloUserViewWhen, operations::SiloUserViewThen);
24141 fn user_builtin_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24142 where
24143 F: FnOnce(operations::UserBuiltinListWhen, operations::UserBuiltinListThen);
24144 fn user_builtin_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24145 where
24146 F: FnOnce(operations::UserBuiltinViewWhen, operations::UserBuiltinViewThen);
24147 fn silo_utilization_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24148 where
24149 F: FnOnce(operations::SiloUtilizationListWhen, operations::SiloUtilizationListThen);
24150 fn silo_utilization_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24151 where
24152 F: FnOnce(operations::SiloUtilizationViewWhen, operations::SiloUtilizationViewThen);
24153 fn timeseries_query<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24154 where
24155 F: FnOnce(operations::TimeseriesQueryWhen, operations::TimeseriesQueryThen);
24156 fn user_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24157 where
24158 F: FnOnce(operations::UserListWhen, operations::UserListThen);
24159 fn user_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24160 where
24161 F: FnOnce(operations::UserViewWhen, operations::UserViewThen);
24162 fn user_token_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24163 where
24164 F: FnOnce(operations::UserTokenListWhen, operations::UserTokenListThen);
24165 fn user_logout<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24166 where
24167 F: FnOnce(operations::UserLogoutWhen, operations::UserLogoutThen);
24168 fn user_session_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24169 where
24170 F: FnOnce(operations::UserSessionListWhen, operations::UserSessionListThen);
24171 fn utilization_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24172 where
24173 F: FnOnce(operations::UtilizationViewWhen, operations::UtilizationViewThen);
24174 fn vpc_firewall_rules_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24175 where
24176 F: FnOnce(operations::VpcFirewallRulesViewWhen, operations::VpcFirewallRulesViewThen);
24177 fn vpc_firewall_rules_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24178 where
24179 F: FnOnce(operations::VpcFirewallRulesUpdateWhen, operations::VpcFirewallRulesUpdateThen);
24180 fn vpc_router_route_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24181 where
24182 F: FnOnce(operations::VpcRouterRouteListWhen, operations::VpcRouterRouteListThen);
24183 fn vpc_router_route_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24184 where
24185 F: FnOnce(operations::VpcRouterRouteCreateWhen, operations::VpcRouterRouteCreateThen);
24186 fn vpc_router_route_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24187 where
24188 F: FnOnce(operations::VpcRouterRouteViewWhen, operations::VpcRouterRouteViewThen);
24189 fn vpc_router_route_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24190 where
24191 F: FnOnce(operations::VpcRouterRouteUpdateWhen, operations::VpcRouterRouteUpdateThen);
24192 fn vpc_router_route_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24193 where
24194 F: FnOnce(operations::VpcRouterRouteDeleteWhen, operations::VpcRouterRouteDeleteThen);
24195 fn vpc_router_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24196 where
24197 F: FnOnce(operations::VpcRouterListWhen, operations::VpcRouterListThen);
24198 fn vpc_router_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24199 where
24200 F: FnOnce(operations::VpcRouterCreateWhen, operations::VpcRouterCreateThen);
24201 fn vpc_router_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24202 where
24203 F: FnOnce(operations::VpcRouterViewWhen, operations::VpcRouterViewThen);
24204 fn vpc_router_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24205 where
24206 F: FnOnce(operations::VpcRouterUpdateWhen, operations::VpcRouterUpdateThen);
24207 fn vpc_router_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24208 where
24209 F: FnOnce(operations::VpcRouterDeleteWhen, operations::VpcRouterDeleteThen);
24210 fn vpc_subnet_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24211 where
24212 F: FnOnce(operations::VpcSubnetListWhen, operations::VpcSubnetListThen);
24213 fn vpc_subnet_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24214 where
24215 F: FnOnce(operations::VpcSubnetCreateWhen, operations::VpcSubnetCreateThen);
24216 fn vpc_subnet_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24217 where
24218 F: FnOnce(operations::VpcSubnetViewWhen, operations::VpcSubnetViewThen);
24219 fn vpc_subnet_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24220 where
24221 F: FnOnce(operations::VpcSubnetUpdateWhen, operations::VpcSubnetUpdateThen);
24222 fn vpc_subnet_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24223 where
24224 F: FnOnce(operations::VpcSubnetDeleteWhen, operations::VpcSubnetDeleteThen);
24225 fn vpc_subnet_list_network_interfaces<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24226 where
24227 F: FnOnce(
24228 operations::VpcSubnetListNetworkInterfacesWhen,
24229 operations::VpcSubnetListNetworkInterfacesThen,
24230 );
24231 fn vpc_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24232 where
24233 F: FnOnce(operations::VpcListWhen, operations::VpcListThen);
24234 fn vpc_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24235 where
24236 F: FnOnce(operations::VpcCreateWhen, operations::VpcCreateThen);
24237 fn vpc_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24238 where
24239 F: FnOnce(operations::VpcViewWhen, operations::VpcViewThen);
24240 fn vpc_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24241 where
24242 F: FnOnce(operations::VpcUpdateWhen, operations::VpcUpdateThen);
24243 fn vpc_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24244 where
24245 F: FnOnce(operations::VpcDeleteWhen, operations::VpcDeleteThen);
24246 fn webhook_receiver_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24247 where
24248 F: FnOnce(operations::WebhookReceiverCreateWhen, operations::WebhookReceiverCreateThen);
24249 fn webhook_receiver_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24250 where
24251 F: FnOnce(operations::WebhookReceiverUpdateWhen, operations::WebhookReceiverUpdateThen);
24252 fn webhook_secrets_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24253 where
24254 F: FnOnce(operations::WebhookSecretsListWhen, operations::WebhookSecretsListThen);
24255 fn webhook_secrets_add<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24256 where
24257 F: FnOnce(operations::WebhookSecretsAddWhen, operations::WebhookSecretsAddThen);
24258 fn webhook_secrets_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24259 where
24260 F: FnOnce(operations::WebhookSecretsDeleteWhen, operations::WebhookSecretsDeleteThen);
24261}
24262
24263impl MockServerExt for ::httpmock::MockServer {
24264 fn device_auth_request<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24265 where
24266 F: FnOnce(operations::DeviceAuthRequestWhen, operations::DeviceAuthRequestThen),
24267 {
24268 self.mock(|when, then| {
24269 config_fn(
24270 operations::DeviceAuthRequestWhen::new(when),
24271 operations::DeviceAuthRequestThen::new(then),
24272 )
24273 })
24274 }
24275
24276 fn device_auth_confirm<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24277 where
24278 F: FnOnce(operations::DeviceAuthConfirmWhen, operations::DeviceAuthConfirmThen),
24279 {
24280 self.mock(|when, then| {
24281 config_fn(
24282 operations::DeviceAuthConfirmWhen::new(when),
24283 operations::DeviceAuthConfirmThen::new(then),
24284 )
24285 })
24286 }
24287
24288 fn device_access_token<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24289 where
24290 F: FnOnce(operations::DeviceAccessTokenWhen, operations::DeviceAccessTokenThen),
24291 {
24292 self.mock(|when, then| {
24293 config_fn(
24294 operations::DeviceAccessTokenWhen::new(when),
24295 operations::DeviceAccessTokenThen::new(then),
24296 )
24297 })
24298 }
24299
24300 fn probe_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24301 where
24302 F: FnOnce(operations::ProbeListWhen, operations::ProbeListThen),
24303 {
24304 self.mock(|when, then| {
24305 config_fn(
24306 operations::ProbeListWhen::new(when),
24307 operations::ProbeListThen::new(then),
24308 )
24309 })
24310 }
24311
24312 fn probe_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24313 where
24314 F: FnOnce(operations::ProbeCreateWhen, operations::ProbeCreateThen),
24315 {
24316 self.mock(|when, then| {
24317 config_fn(
24318 operations::ProbeCreateWhen::new(when),
24319 operations::ProbeCreateThen::new(then),
24320 )
24321 })
24322 }
24323
24324 fn probe_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24325 where
24326 F: FnOnce(operations::ProbeViewWhen, operations::ProbeViewThen),
24327 {
24328 self.mock(|when, then| {
24329 config_fn(
24330 operations::ProbeViewWhen::new(when),
24331 operations::ProbeViewThen::new(then),
24332 )
24333 })
24334 }
24335
24336 fn probe_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24337 where
24338 F: FnOnce(operations::ProbeDeleteWhen, operations::ProbeDeleteThen),
24339 {
24340 self.mock(|when, then| {
24341 config_fn(
24342 operations::ProbeDeleteWhen::new(when),
24343 operations::ProbeDeleteThen::new(then),
24344 )
24345 })
24346 }
24347
24348 fn support_bundle_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24349 where
24350 F: FnOnce(operations::SupportBundleListWhen, operations::SupportBundleListThen),
24351 {
24352 self.mock(|when, then| {
24353 config_fn(
24354 operations::SupportBundleListWhen::new(when),
24355 operations::SupportBundleListThen::new(then),
24356 )
24357 })
24358 }
24359
24360 fn support_bundle_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24361 where
24362 F: FnOnce(operations::SupportBundleCreateWhen, operations::SupportBundleCreateThen),
24363 {
24364 self.mock(|when, then| {
24365 config_fn(
24366 operations::SupportBundleCreateWhen::new(when),
24367 operations::SupportBundleCreateThen::new(then),
24368 )
24369 })
24370 }
24371
24372 fn support_bundle_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24373 where
24374 F: FnOnce(operations::SupportBundleViewWhen, operations::SupportBundleViewThen),
24375 {
24376 self.mock(|when, then| {
24377 config_fn(
24378 operations::SupportBundleViewWhen::new(when),
24379 operations::SupportBundleViewThen::new(then),
24380 )
24381 })
24382 }
24383
24384 fn support_bundle_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24385 where
24386 F: FnOnce(operations::SupportBundleUpdateWhen, operations::SupportBundleUpdateThen),
24387 {
24388 self.mock(|when, then| {
24389 config_fn(
24390 operations::SupportBundleUpdateWhen::new(when),
24391 operations::SupportBundleUpdateThen::new(then),
24392 )
24393 })
24394 }
24395
24396 fn support_bundle_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24397 where
24398 F: FnOnce(operations::SupportBundleDeleteWhen, operations::SupportBundleDeleteThen),
24399 {
24400 self.mock(|when, then| {
24401 config_fn(
24402 operations::SupportBundleDeleteWhen::new(when),
24403 operations::SupportBundleDeleteThen::new(then),
24404 )
24405 })
24406 }
24407
24408 fn support_bundle_download<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24409 where
24410 F: FnOnce(operations::SupportBundleDownloadWhen, operations::SupportBundleDownloadThen),
24411 {
24412 self.mock(|when, then| {
24413 config_fn(
24414 operations::SupportBundleDownloadWhen::new(when),
24415 operations::SupportBundleDownloadThen::new(then),
24416 )
24417 })
24418 }
24419
24420 fn support_bundle_head<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24421 where
24422 F: FnOnce(operations::SupportBundleHeadWhen, operations::SupportBundleHeadThen),
24423 {
24424 self.mock(|when, then| {
24425 config_fn(
24426 operations::SupportBundleHeadWhen::new(when),
24427 operations::SupportBundleHeadThen::new(then),
24428 )
24429 })
24430 }
24431
24432 fn support_bundle_download_file<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24433 where
24434 F: FnOnce(
24435 operations::SupportBundleDownloadFileWhen,
24436 operations::SupportBundleDownloadFileThen,
24437 ),
24438 {
24439 self.mock(|when, then| {
24440 config_fn(
24441 operations::SupportBundleDownloadFileWhen::new(when),
24442 operations::SupportBundleDownloadFileThen::new(then),
24443 )
24444 })
24445 }
24446
24447 fn support_bundle_head_file<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24448 where
24449 F: FnOnce(operations::SupportBundleHeadFileWhen, operations::SupportBundleHeadFileThen),
24450 {
24451 self.mock(|when, then| {
24452 config_fn(
24453 operations::SupportBundleHeadFileWhen::new(when),
24454 operations::SupportBundleHeadFileThen::new(then),
24455 )
24456 })
24457 }
24458
24459 fn support_bundle_index<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24460 where
24461 F: FnOnce(operations::SupportBundleIndexWhen, operations::SupportBundleIndexThen),
24462 {
24463 self.mock(|when, then| {
24464 config_fn(
24465 operations::SupportBundleIndexWhen::new(when),
24466 operations::SupportBundleIndexThen::new(then),
24467 )
24468 })
24469 }
24470
24471 fn login_saml<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24472 where
24473 F: FnOnce(operations::LoginSamlWhen, operations::LoginSamlThen),
24474 {
24475 self.mock(|when, then| {
24476 config_fn(
24477 operations::LoginSamlWhen::new(when),
24478 operations::LoginSamlThen::new(then),
24479 )
24480 })
24481 }
24482
24483 fn affinity_group_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24484 where
24485 F: FnOnce(operations::AffinityGroupListWhen, operations::AffinityGroupListThen),
24486 {
24487 self.mock(|when, then| {
24488 config_fn(
24489 operations::AffinityGroupListWhen::new(when),
24490 operations::AffinityGroupListThen::new(then),
24491 )
24492 })
24493 }
24494
24495 fn affinity_group_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24496 where
24497 F: FnOnce(operations::AffinityGroupCreateWhen, operations::AffinityGroupCreateThen),
24498 {
24499 self.mock(|when, then| {
24500 config_fn(
24501 operations::AffinityGroupCreateWhen::new(when),
24502 operations::AffinityGroupCreateThen::new(then),
24503 )
24504 })
24505 }
24506
24507 fn affinity_group_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24508 where
24509 F: FnOnce(operations::AffinityGroupViewWhen, operations::AffinityGroupViewThen),
24510 {
24511 self.mock(|when, then| {
24512 config_fn(
24513 operations::AffinityGroupViewWhen::new(when),
24514 operations::AffinityGroupViewThen::new(then),
24515 )
24516 })
24517 }
24518
24519 fn affinity_group_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24520 where
24521 F: FnOnce(operations::AffinityGroupUpdateWhen, operations::AffinityGroupUpdateThen),
24522 {
24523 self.mock(|when, then| {
24524 config_fn(
24525 operations::AffinityGroupUpdateWhen::new(when),
24526 operations::AffinityGroupUpdateThen::new(then),
24527 )
24528 })
24529 }
24530
24531 fn affinity_group_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24532 where
24533 F: FnOnce(operations::AffinityGroupDeleteWhen, operations::AffinityGroupDeleteThen),
24534 {
24535 self.mock(|when, then| {
24536 config_fn(
24537 operations::AffinityGroupDeleteWhen::new(when),
24538 operations::AffinityGroupDeleteThen::new(then),
24539 )
24540 })
24541 }
24542
24543 fn affinity_group_member_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24544 where
24545 F: FnOnce(operations::AffinityGroupMemberListWhen, operations::AffinityGroupMemberListThen),
24546 {
24547 self.mock(|when, then| {
24548 config_fn(
24549 operations::AffinityGroupMemberListWhen::new(when),
24550 operations::AffinityGroupMemberListThen::new(then),
24551 )
24552 })
24553 }
24554
24555 fn affinity_group_member_instance_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24556 where
24557 F: FnOnce(
24558 operations::AffinityGroupMemberInstanceViewWhen,
24559 operations::AffinityGroupMemberInstanceViewThen,
24560 ),
24561 {
24562 self.mock(|when, then| {
24563 config_fn(
24564 operations::AffinityGroupMemberInstanceViewWhen::new(when),
24565 operations::AffinityGroupMemberInstanceViewThen::new(then),
24566 )
24567 })
24568 }
24569
24570 fn affinity_group_member_instance_add<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24571 where
24572 F: FnOnce(
24573 operations::AffinityGroupMemberInstanceAddWhen,
24574 operations::AffinityGroupMemberInstanceAddThen,
24575 ),
24576 {
24577 self.mock(|when, then| {
24578 config_fn(
24579 operations::AffinityGroupMemberInstanceAddWhen::new(when),
24580 operations::AffinityGroupMemberInstanceAddThen::new(then),
24581 )
24582 })
24583 }
24584
24585 fn affinity_group_member_instance_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24586 where
24587 F: FnOnce(
24588 operations::AffinityGroupMemberInstanceDeleteWhen,
24589 operations::AffinityGroupMemberInstanceDeleteThen,
24590 ),
24591 {
24592 self.mock(|when, then| {
24593 config_fn(
24594 operations::AffinityGroupMemberInstanceDeleteWhen::new(when),
24595 operations::AffinityGroupMemberInstanceDeleteThen::new(then),
24596 )
24597 })
24598 }
24599
24600 fn alert_class_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24601 where
24602 F: FnOnce(operations::AlertClassListWhen, operations::AlertClassListThen),
24603 {
24604 self.mock(|when, then| {
24605 config_fn(
24606 operations::AlertClassListWhen::new(when),
24607 operations::AlertClassListThen::new(then),
24608 )
24609 })
24610 }
24611
24612 fn alert_receiver_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24613 where
24614 F: FnOnce(operations::AlertReceiverListWhen, operations::AlertReceiverListThen),
24615 {
24616 self.mock(|when, then| {
24617 config_fn(
24618 operations::AlertReceiverListWhen::new(when),
24619 operations::AlertReceiverListThen::new(then),
24620 )
24621 })
24622 }
24623
24624 fn alert_receiver_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24625 where
24626 F: FnOnce(operations::AlertReceiverViewWhen, operations::AlertReceiverViewThen),
24627 {
24628 self.mock(|when, then| {
24629 config_fn(
24630 operations::AlertReceiverViewWhen::new(when),
24631 operations::AlertReceiverViewThen::new(then),
24632 )
24633 })
24634 }
24635
24636 fn alert_receiver_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24637 where
24638 F: FnOnce(operations::AlertReceiverDeleteWhen, operations::AlertReceiverDeleteThen),
24639 {
24640 self.mock(|when, then| {
24641 config_fn(
24642 operations::AlertReceiverDeleteWhen::new(when),
24643 operations::AlertReceiverDeleteThen::new(then),
24644 )
24645 })
24646 }
24647
24648 fn alert_delivery_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24649 where
24650 F: FnOnce(operations::AlertDeliveryListWhen, operations::AlertDeliveryListThen),
24651 {
24652 self.mock(|when, then| {
24653 config_fn(
24654 operations::AlertDeliveryListWhen::new(when),
24655 operations::AlertDeliveryListThen::new(then),
24656 )
24657 })
24658 }
24659
24660 fn alert_receiver_probe<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24661 where
24662 F: FnOnce(operations::AlertReceiverProbeWhen, operations::AlertReceiverProbeThen),
24663 {
24664 self.mock(|when, then| {
24665 config_fn(
24666 operations::AlertReceiverProbeWhen::new(when),
24667 operations::AlertReceiverProbeThen::new(then),
24668 )
24669 })
24670 }
24671
24672 fn alert_receiver_subscription_add<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24673 where
24674 F: FnOnce(
24675 operations::AlertReceiverSubscriptionAddWhen,
24676 operations::AlertReceiverSubscriptionAddThen,
24677 ),
24678 {
24679 self.mock(|when, then| {
24680 config_fn(
24681 operations::AlertReceiverSubscriptionAddWhen::new(when),
24682 operations::AlertReceiverSubscriptionAddThen::new(then),
24683 )
24684 })
24685 }
24686
24687 fn alert_receiver_subscription_remove<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24688 where
24689 F: FnOnce(
24690 operations::AlertReceiverSubscriptionRemoveWhen,
24691 operations::AlertReceiverSubscriptionRemoveThen,
24692 ),
24693 {
24694 self.mock(|when, then| {
24695 config_fn(
24696 operations::AlertReceiverSubscriptionRemoveWhen::new(when),
24697 operations::AlertReceiverSubscriptionRemoveThen::new(then),
24698 )
24699 })
24700 }
24701
24702 fn alert_delivery_resend<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24703 where
24704 F: FnOnce(operations::AlertDeliveryResendWhen, operations::AlertDeliveryResendThen),
24705 {
24706 self.mock(|when, then| {
24707 config_fn(
24708 operations::AlertDeliveryResendWhen::new(when),
24709 operations::AlertDeliveryResendThen::new(then),
24710 )
24711 })
24712 }
24713
24714 fn anti_affinity_group_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24715 where
24716 F: FnOnce(operations::AntiAffinityGroupListWhen, operations::AntiAffinityGroupListThen),
24717 {
24718 self.mock(|when, then| {
24719 config_fn(
24720 operations::AntiAffinityGroupListWhen::new(when),
24721 operations::AntiAffinityGroupListThen::new(then),
24722 )
24723 })
24724 }
24725
24726 fn anti_affinity_group_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24727 where
24728 F: FnOnce(operations::AntiAffinityGroupCreateWhen, operations::AntiAffinityGroupCreateThen),
24729 {
24730 self.mock(|when, then| {
24731 config_fn(
24732 operations::AntiAffinityGroupCreateWhen::new(when),
24733 operations::AntiAffinityGroupCreateThen::new(then),
24734 )
24735 })
24736 }
24737
24738 fn anti_affinity_group_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24739 where
24740 F: FnOnce(operations::AntiAffinityGroupViewWhen, operations::AntiAffinityGroupViewThen),
24741 {
24742 self.mock(|when, then| {
24743 config_fn(
24744 operations::AntiAffinityGroupViewWhen::new(when),
24745 operations::AntiAffinityGroupViewThen::new(then),
24746 )
24747 })
24748 }
24749
24750 fn anti_affinity_group_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24751 where
24752 F: FnOnce(operations::AntiAffinityGroupUpdateWhen, operations::AntiAffinityGroupUpdateThen),
24753 {
24754 self.mock(|when, then| {
24755 config_fn(
24756 operations::AntiAffinityGroupUpdateWhen::new(when),
24757 operations::AntiAffinityGroupUpdateThen::new(then),
24758 )
24759 })
24760 }
24761
24762 fn anti_affinity_group_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24763 where
24764 F: FnOnce(operations::AntiAffinityGroupDeleteWhen, operations::AntiAffinityGroupDeleteThen),
24765 {
24766 self.mock(|when, then| {
24767 config_fn(
24768 operations::AntiAffinityGroupDeleteWhen::new(when),
24769 operations::AntiAffinityGroupDeleteThen::new(then),
24770 )
24771 })
24772 }
24773
24774 fn anti_affinity_group_member_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24775 where
24776 F: FnOnce(
24777 operations::AntiAffinityGroupMemberListWhen,
24778 operations::AntiAffinityGroupMemberListThen,
24779 ),
24780 {
24781 self.mock(|when, then| {
24782 config_fn(
24783 operations::AntiAffinityGroupMemberListWhen::new(when),
24784 operations::AntiAffinityGroupMemberListThen::new(then),
24785 )
24786 })
24787 }
24788
24789 fn anti_affinity_group_member_instance_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24790 where
24791 F: FnOnce(
24792 operations::AntiAffinityGroupMemberInstanceViewWhen,
24793 operations::AntiAffinityGroupMemberInstanceViewThen,
24794 ),
24795 {
24796 self.mock(|when, then| {
24797 config_fn(
24798 operations::AntiAffinityGroupMemberInstanceViewWhen::new(when),
24799 operations::AntiAffinityGroupMemberInstanceViewThen::new(then),
24800 )
24801 })
24802 }
24803
24804 fn anti_affinity_group_member_instance_add<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24805 where
24806 F: FnOnce(
24807 operations::AntiAffinityGroupMemberInstanceAddWhen,
24808 operations::AntiAffinityGroupMemberInstanceAddThen,
24809 ),
24810 {
24811 self.mock(|when, then| {
24812 config_fn(
24813 operations::AntiAffinityGroupMemberInstanceAddWhen::new(when),
24814 operations::AntiAffinityGroupMemberInstanceAddThen::new(then),
24815 )
24816 })
24817 }
24818
24819 fn anti_affinity_group_member_instance_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24820 where
24821 F: FnOnce(
24822 operations::AntiAffinityGroupMemberInstanceDeleteWhen,
24823 operations::AntiAffinityGroupMemberInstanceDeleteThen,
24824 ),
24825 {
24826 self.mock(|when, then| {
24827 config_fn(
24828 operations::AntiAffinityGroupMemberInstanceDeleteWhen::new(when),
24829 operations::AntiAffinityGroupMemberInstanceDeleteThen::new(then),
24830 )
24831 })
24832 }
24833
24834 fn auth_settings_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24835 where
24836 F: FnOnce(operations::AuthSettingsViewWhen, operations::AuthSettingsViewThen),
24837 {
24838 self.mock(|when, then| {
24839 config_fn(
24840 operations::AuthSettingsViewWhen::new(when),
24841 operations::AuthSettingsViewThen::new(then),
24842 )
24843 })
24844 }
24845
24846 fn auth_settings_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24847 where
24848 F: FnOnce(operations::AuthSettingsUpdateWhen, operations::AuthSettingsUpdateThen),
24849 {
24850 self.mock(|when, then| {
24851 config_fn(
24852 operations::AuthSettingsUpdateWhen::new(when),
24853 operations::AuthSettingsUpdateThen::new(then),
24854 )
24855 })
24856 }
24857
24858 fn certificate_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24859 where
24860 F: FnOnce(operations::CertificateListWhen, operations::CertificateListThen),
24861 {
24862 self.mock(|when, then| {
24863 config_fn(
24864 operations::CertificateListWhen::new(when),
24865 operations::CertificateListThen::new(then),
24866 )
24867 })
24868 }
24869
24870 fn certificate_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24871 where
24872 F: FnOnce(operations::CertificateCreateWhen, operations::CertificateCreateThen),
24873 {
24874 self.mock(|when, then| {
24875 config_fn(
24876 operations::CertificateCreateWhen::new(when),
24877 operations::CertificateCreateThen::new(then),
24878 )
24879 })
24880 }
24881
24882 fn certificate_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24883 where
24884 F: FnOnce(operations::CertificateViewWhen, operations::CertificateViewThen),
24885 {
24886 self.mock(|when, then| {
24887 config_fn(
24888 operations::CertificateViewWhen::new(when),
24889 operations::CertificateViewThen::new(then),
24890 )
24891 })
24892 }
24893
24894 fn certificate_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24895 where
24896 F: FnOnce(operations::CertificateDeleteWhen, operations::CertificateDeleteThen),
24897 {
24898 self.mock(|when, then| {
24899 config_fn(
24900 operations::CertificateDeleteWhen::new(when),
24901 operations::CertificateDeleteThen::new(then),
24902 )
24903 })
24904 }
24905
24906 fn disk_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24907 where
24908 F: FnOnce(operations::DiskListWhen, operations::DiskListThen),
24909 {
24910 self.mock(|when, then| {
24911 config_fn(
24912 operations::DiskListWhen::new(when),
24913 operations::DiskListThen::new(then),
24914 )
24915 })
24916 }
24917
24918 fn disk_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24919 where
24920 F: FnOnce(operations::DiskCreateWhen, operations::DiskCreateThen),
24921 {
24922 self.mock(|when, then| {
24923 config_fn(
24924 operations::DiskCreateWhen::new(when),
24925 operations::DiskCreateThen::new(then),
24926 )
24927 })
24928 }
24929
24930 fn disk_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24931 where
24932 F: FnOnce(operations::DiskViewWhen, operations::DiskViewThen),
24933 {
24934 self.mock(|when, then| {
24935 config_fn(
24936 operations::DiskViewWhen::new(when),
24937 operations::DiskViewThen::new(then),
24938 )
24939 })
24940 }
24941
24942 fn disk_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24943 where
24944 F: FnOnce(operations::DiskDeleteWhen, operations::DiskDeleteThen),
24945 {
24946 self.mock(|when, then| {
24947 config_fn(
24948 operations::DiskDeleteWhen::new(when),
24949 operations::DiskDeleteThen::new(then),
24950 )
24951 })
24952 }
24953
24954 fn disk_bulk_write_import<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24955 where
24956 F: FnOnce(operations::DiskBulkWriteImportWhen, operations::DiskBulkWriteImportThen),
24957 {
24958 self.mock(|when, then| {
24959 config_fn(
24960 operations::DiskBulkWriteImportWhen::new(when),
24961 operations::DiskBulkWriteImportThen::new(then),
24962 )
24963 })
24964 }
24965
24966 fn disk_bulk_write_import_start<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24967 where
24968 F: FnOnce(
24969 operations::DiskBulkWriteImportStartWhen,
24970 operations::DiskBulkWriteImportStartThen,
24971 ),
24972 {
24973 self.mock(|when, then| {
24974 config_fn(
24975 operations::DiskBulkWriteImportStartWhen::new(when),
24976 operations::DiskBulkWriteImportStartThen::new(then),
24977 )
24978 })
24979 }
24980
24981 fn disk_bulk_write_import_stop<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24982 where
24983 F: FnOnce(operations::DiskBulkWriteImportStopWhen, operations::DiskBulkWriteImportStopThen),
24984 {
24985 self.mock(|when, then| {
24986 config_fn(
24987 operations::DiskBulkWriteImportStopWhen::new(when),
24988 operations::DiskBulkWriteImportStopThen::new(then),
24989 )
24990 })
24991 }
24992
24993 fn disk_finalize_import<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
24994 where
24995 F: FnOnce(operations::DiskFinalizeImportWhen, operations::DiskFinalizeImportThen),
24996 {
24997 self.mock(|when, then| {
24998 config_fn(
24999 operations::DiskFinalizeImportWhen::new(when),
25000 operations::DiskFinalizeImportThen::new(then),
25001 )
25002 })
25003 }
25004
25005 fn external_subnet_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25006 where
25007 F: FnOnce(operations::ExternalSubnetListWhen, operations::ExternalSubnetListThen),
25008 {
25009 self.mock(|when, then| {
25010 config_fn(
25011 operations::ExternalSubnetListWhen::new(when),
25012 operations::ExternalSubnetListThen::new(then),
25013 )
25014 })
25015 }
25016
25017 fn external_subnet_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25018 where
25019 F: FnOnce(operations::ExternalSubnetCreateWhen, operations::ExternalSubnetCreateThen),
25020 {
25021 self.mock(|when, then| {
25022 config_fn(
25023 operations::ExternalSubnetCreateWhen::new(when),
25024 operations::ExternalSubnetCreateThen::new(then),
25025 )
25026 })
25027 }
25028
25029 fn external_subnet_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25030 where
25031 F: FnOnce(operations::ExternalSubnetViewWhen, operations::ExternalSubnetViewThen),
25032 {
25033 self.mock(|when, then| {
25034 config_fn(
25035 operations::ExternalSubnetViewWhen::new(when),
25036 operations::ExternalSubnetViewThen::new(then),
25037 )
25038 })
25039 }
25040
25041 fn external_subnet_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25042 where
25043 F: FnOnce(operations::ExternalSubnetUpdateWhen, operations::ExternalSubnetUpdateThen),
25044 {
25045 self.mock(|when, then| {
25046 config_fn(
25047 operations::ExternalSubnetUpdateWhen::new(when),
25048 operations::ExternalSubnetUpdateThen::new(then),
25049 )
25050 })
25051 }
25052
25053 fn external_subnet_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25054 where
25055 F: FnOnce(operations::ExternalSubnetDeleteWhen, operations::ExternalSubnetDeleteThen),
25056 {
25057 self.mock(|when, then| {
25058 config_fn(
25059 operations::ExternalSubnetDeleteWhen::new(when),
25060 operations::ExternalSubnetDeleteThen::new(then),
25061 )
25062 })
25063 }
25064
25065 fn external_subnet_attach<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25066 where
25067 F: FnOnce(operations::ExternalSubnetAttachWhen, operations::ExternalSubnetAttachThen),
25068 {
25069 self.mock(|when, then| {
25070 config_fn(
25071 operations::ExternalSubnetAttachWhen::new(when),
25072 operations::ExternalSubnetAttachThen::new(then),
25073 )
25074 })
25075 }
25076
25077 fn external_subnet_detach<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25078 where
25079 F: FnOnce(operations::ExternalSubnetDetachWhen, operations::ExternalSubnetDetachThen),
25080 {
25081 self.mock(|when, then| {
25082 config_fn(
25083 operations::ExternalSubnetDetachWhen::new(when),
25084 operations::ExternalSubnetDetachThen::new(then),
25085 )
25086 })
25087 }
25088
25089 fn floating_ip_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25090 where
25091 F: FnOnce(operations::FloatingIpListWhen, operations::FloatingIpListThen),
25092 {
25093 self.mock(|when, then| {
25094 config_fn(
25095 operations::FloatingIpListWhen::new(when),
25096 operations::FloatingIpListThen::new(then),
25097 )
25098 })
25099 }
25100
25101 fn floating_ip_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25102 where
25103 F: FnOnce(operations::FloatingIpCreateWhen, operations::FloatingIpCreateThen),
25104 {
25105 self.mock(|when, then| {
25106 config_fn(
25107 operations::FloatingIpCreateWhen::new(when),
25108 operations::FloatingIpCreateThen::new(then),
25109 )
25110 })
25111 }
25112
25113 fn floating_ip_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25114 where
25115 F: FnOnce(operations::FloatingIpViewWhen, operations::FloatingIpViewThen),
25116 {
25117 self.mock(|when, then| {
25118 config_fn(
25119 operations::FloatingIpViewWhen::new(when),
25120 operations::FloatingIpViewThen::new(then),
25121 )
25122 })
25123 }
25124
25125 fn floating_ip_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25126 where
25127 F: FnOnce(operations::FloatingIpUpdateWhen, operations::FloatingIpUpdateThen),
25128 {
25129 self.mock(|when, then| {
25130 config_fn(
25131 operations::FloatingIpUpdateWhen::new(when),
25132 operations::FloatingIpUpdateThen::new(then),
25133 )
25134 })
25135 }
25136
25137 fn floating_ip_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25138 where
25139 F: FnOnce(operations::FloatingIpDeleteWhen, operations::FloatingIpDeleteThen),
25140 {
25141 self.mock(|when, then| {
25142 config_fn(
25143 operations::FloatingIpDeleteWhen::new(when),
25144 operations::FloatingIpDeleteThen::new(then),
25145 )
25146 })
25147 }
25148
25149 fn floating_ip_attach<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25150 where
25151 F: FnOnce(operations::FloatingIpAttachWhen, operations::FloatingIpAttachThen),
25152 {
25153 self.mock(|when, then| {
25154 config_fn(
25155 operations::FloatingIpAttachWhen::new(when),
25156 operations::FloatingIpAttachThen::new(then),
25157 )
25158 })
25159 }
25160
25161 fn floating_ip_detach<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25162 where
25163 F: FnOnce(operations::FloatingIpDetachWhen, operations::FloatingIpDetachThen),
25164 {
25165 self.mock(|when, then| {
25166 config_fn(
25167 operations::FloatingIpDetachWhen::new(when),
25168 operations::FloatingIpDetachThen::new(then),
25169 )
25170 })
25171 }
25172
25173 fn group_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25174 where
25175 F: FnOnce(operations::GroupListWhen, operations::GroupListThen),
25176 {
25177 self.mock(|when, then| {
25178 config_fn(
25179 operations::GroupListWhen::new(when),
25180 operations::GroupListThen::new(then),
25181 )
25182 })
25183 }
25184
25185 fn group_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25186 where
25187 F: FnOnce(operations::GroupViewWhen, operations::GroupViewThen),
25188 {
25189 self.mock(|when, then| {
25190 config_fn(
25191 operations::GroupViewWhen::new(when),
25192 operations::GroupViewThen::new(then),
25193 )
25194 })
25195 }
25196
25197 fn image_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25198 where
25199 F: FnOnce(operations::ImageListWhen, operations::ImageListThen),
25200 {
25201 self.mock(|when, then| {
25202 config_fn(
25203 operations::ImageListWhen::new(when),
25204 operations::ImageListThen::new(then),
25205 )
25206 })
25207 }
25208
25209 fn image_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25210 where
25211 F: FnOnce(operations::ImageCreateWhen, operations::ImageCreateThen),
25212 {
25213 self.mock(|when, then| {
25214 config_fn(
25215 operations::ImageCreateWhen::new(when),
25216 operations::ImageCreateThen::new(then),
25217 )
25218 })
25219 }
25220
25221 fn image_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25222 where
25223 F: FnOnce(operations::ImageViewWhen, operations::ImageViewThen),
25224 {
25225 self.mock(|when, then| {
25226 config_fn(
25227 operations::ImageViewWhen::new(when),
25228 operations::ImageViewThen::new(then),
25229 )
25230 })
25231 }
25232
25233 fn image_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25234 where
25235 F: FnOnce(operations::ImageDeleteWhen, operations::ImageDeleteThen),
25236 {
25237 self.mock(|when, then| {
25238 config_fn(
25239 operations::ImageDeleteWhen::new(when),
25240 operations::ImageDeleteThen::new(then),
25241 )
25242 })
25243 }
25244
25245 fn image_demote<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25246 where
25247 F: FnOnce(operations::ImageDemoteWhen, operations::ImageDemoteThen),
25248 {
25249 self.mock(|when, then| {
25250 config_fn(
25251 operations::ImageDemoteWhen::new(when),
25252 operations::ImageDemoteThen::new(then),
25253 )
25254 })
25255 }
25256
25257 fn image_promote<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25258 where
25259 F: FnOnce(operations::ImagePromoteWhen, operations::ImagePromoteThen),
25260 {
25261 self.mock(|when, then| {
25262 config_fn(
25263 operations::ImagePromoteWhen::new(when),
25264 operations::ImagePromoteThen::new(then),
25265 )
25266 })
25267 }
25268
25269 fn instance_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25270 where
25271 F: FnOnce(operations::InstanceListWhen, operations::InstanceListThen),
25272 {
25273 self.mock(|when, then| {
25274 config_fn(
25275 operations::InstanceListWhen::new(when),
25276 operations::InstanceListThen::new(then),
25277 )
25278 })
25279 }
25280
25281 fn instance_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25282 where
25283 F: FnOnce(operations::InstanceCreateWhen, operations::InstanceCreateThen),
25284 {
25285 self.mock(|when, then| {
25286 config_fn(
25287 operations::InstanceCreateWhen::new(when),
25288 operations::InstanceCreateThen::new(then),
25289 )
25290 })
25291 }
25292
25293 fn instance_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25294 where
25295 F: FnOnce(operations::InstanceViewWhen, operations::InstanceViewThen),
25296 {
25297 self.mock(|when, then| {
25298 config_fn(
25299 operations::InstanceViewWhen::new(when),
25300 operations::InstanceViewThen::new(then),
25301 )
25302 })
25303 }
25304
25305 fn instance_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25306 where
25307 F: FnOnce(operations::InstanceUpdateWhen, operations::InstanceUpdateThen),
25308 {
25309 self.mock(|when, then| {
25310 config_fn(
25311 operations::InstanceUpdateWhen::new(when),
25312 operations::InstanceUpdateThen::new(then),
25313 )
25314 })
25315 }
25316
25317 fn instance_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25318 where
25319 F: FnOnce(operations::InstanceDeleteWhen, operations::InstanceDeleteThen),
25320 {
25321 self.mock(|when, then| {
25322 config_fn(
25323 operations::InstanceDeleteWhen::new(when),
25324 operations::InstanceDeleteThen::new(then),
25325 )
25326 })
25327 }
25328
25329 fn instance_affinity_group_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25330 where
25331 F: FnOnce(
25332 operations::InstanceAffinityGroupListWhen,
25333 operations::InstanceAffinityGroupListThen,
25334 ),
25335 {
25336 self.mock(|when, then| {
25337 config_fn(
25338 operations::InstanceAffinityGroupListWhen::new(when),
25339 operations::InstanceAffinityGroupListThen::new(then),
25340 )
25341 })
25342 }
25343
25344 fn instance_anti_affinity_group_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25345 where
25346 F: FnOnce(
25347 operations::InstanceAntiAffinityGroupListWhen,
25348 operations::InstanceAntiAffinityGroupListThen,
25349 ),
25350 {
25351 self.mock(|when, then| {
25352 config_fn(
25353 operations::InstanceAntiAffinityGroupListWhen::new(when),
25354 operations::InstanceAntiAffinityGroupListThen::new(then),
25355 )
25356 })
25357 }
25358
25359 fn instance_disk_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25360 where
25361 F: FnOnce(operations::InstanceDiskListWhen, operations::InstanceDiskListThen),
25362 {
25363 self.mock(|when, then| {
25364 config_fn(
25365 operations::InstanceDiskListWhen::new(when),
25366 operations::InstanceDiskListThen::new(then),
25367 )
25368 })
25369 }
25370
25371 fn instance_disk_attach<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25372 where
25373 F: FnOnce(operations::InstanceDiskAttachWhen, operations::InstanceDiskAttachThen),
25374 {
25375 self.mock(|when, then| {
25376 config_fn(
25377 operations::InstanceDiskAttachWhen::new(when),
25378 operations::InstanceDiskAttachThen::new(then),
25379 )
25380 })
25381 }
25382
25383 fn instance_disk_detach<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25384 where
25385 F: FnOnce(operations::InstanceDiskDetachWhen, operations::InstanceDiskDetachThen),
25386 {
25387 self.mock(|when, then| {
25388 config_fn(
25389 operations::InstanceDiskDetachWhen::new(when),
25390 operations::InstanceDiskDetachThen::new(then),
25391 )
25392 })
25393 }
25394
25395 fn instance_external_ip_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25396 where
25397 F: FnOnce(operations::InstanceExternalIpListWhen, operations::InstanceExternalIpListThen),
25398 {
25399 self.mock(|when, then| {
25400 config_fn(
25401 operations::InstanceExternalIpListWhen::new(when),
25402 operations::InstanceExternalIpListThen::new(then),
25403 )
25404 })
25405 }
25406
25407 fn instance_ephemeral_ip_attach<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25408 where
25409 F: FnOnce(
25410 operations::InstanceEphemeralIpAttachWhen,
25411 operations::InstanceEphemeralIpAttachThen,
25412 ),
25413 {
25414 self.mock(|when, then| {
25415 config_fn(
25416 operations::InstanceEphemeralIpAttachWhen::new(when),
25417 operations::InstanceEphemeralIpAttachThen::new(then),
25418 )
25419 })
25420 }
25421
25422 fn instance_ephemeral_ip_detach<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25423 where
25424 F: FnOnce(
25425 operations::InstanceEphemeralIpDetachWhen,
25426 operations::InstanceEphemeralIpDetachThen,
25427 ),
25428 {
25429 self.mock(|when, then| {
25430 config_fn(
25431 operations::InstanceEphemeralIpDetachWhen::new(when),
25432 operations::InstanceEphemeralIpDetachThen::new(then),
25433 )
25434 })
25435 }
25436
25437 fn instance_external_subnet_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25438 where
25439 F: FnOnce(
25440 operations::InstanceExternalSubnetListWhen,
25441 operations::InstanceExternalSubnetListThen,
25442 ),
25443 {
25444 self.mock(|when, then| {
25445 config_fn(
25446 operations::InstanceExternalSubnetListWhen::new(when),
25447 operations::InstanceExternalSubnetListThen::new(then),
25448 )
25449 })
25450 }
25451
25452 fn instance_multicast_group_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25453 where
25454 F: FnOnce(
25455 operations::InstanceMulticastGroupListWhen,
25456 operations::InstanceMulticastGroupListThen,
25457 ),
25458 {
25459 self.mock(|when, then| {
25460 config_fn(
25461 operations::InstanceMulticastGroupListWhen::new(when),
25462 operations::InstanceMulticastGroupListThen::new(then),
25463 )
25464 })
25465 }
25466
25467 fn instance_multicast_group_join<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25468 where
25469 F: FnOnce(
25470 operations::InstanceMulticastGroupJoinWhen,
25471 operations::InstanceMulticastGroupJoinThen,
25472 ),
25473 {
25474 self.mock(|when, then| {
25475 config_fn(
25476 operations::InstanceMulticastGroupJoinWhen::new(when),
25477 operations::InstanceMulticastGroupJoinThen::new(then),
25478 )
25479 })
25480 }
25481
25482 fn instance_multicast_group_leave<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25483 where
25484 F: FnOnce(
25485 operations::InstanceMulticastGroupLeaveWhen,
25486 operations::InstanceMulticastGroupLeaveThen,
25487 ),
25488 {
25489 self.mock(|when, then| {
25490 config_fn(
25491 operations::InstanceMulticastGroupLeaveWhen::new(when),
25492 operations::InstanceMulticastGroupLeaveThen::new(then),
25493 )
25494 })
25495 }
25496
25497 fn instance_reboot<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25498 where
25499 F: FnOnce(operations::InstanceRebootWhen, operations::InstanceRebootThen),
25500 {
25501 self.mock(|when, then| {
25502 config_fn(
25503 operations::InstanceRebootWhen::new(when),
25504 operations::InstanceRebootThen::new(then),
25505 )
25506 })
25507 }
25508
25509 fn instance_serial_console<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25510 where
25511 F: FnOnce(operations::InstanceSerialConsoleWhen, operations::InstanceSerialConsoleThen),
25512 {
25513 self.mock(|when, then| {
25514 config_fn(
25515 operations::InstanceSerialConsoleWhen::new(when),
25516 operations::InstanceSerialConsoleThen::new(then),
25517 )
25518 })
25519 }
25520
25521 fn instance_serial_console_stream<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25522 where
25523 F: FnOnce(
25524 operations::InstanceSerialConsoleStreamWhen,
25525 operations::InstanceSerialConsoleStreamThen,
25526 ),
25527 {
25528 self.mock(|when, then| {
25529 config_fn(
25530 operations::InstanceSerialConsoleStreamWhen::new(when),
25531 operations::InstanceSerialConsoleStreamThen::new(then),
25532 )
25533 })
25534 }
25535
25536 fn instance_ssh_public_key_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25537 where
25538 F: FnOnce(
25539 operations::InstanceSshPublicKeyListWhen,
25540 operations::InstanceSshPublicKeyListThen,
25541 ),
25542 {
25543 self.mock(|when, then| {
25544 config_fn(
25545 operations::InstanceSshPublicKeyListWhen::new(when),
25546 operations::InstanceSshPublicKeyListThen::new(then),
25547 )
25548 })
25549 }
25550
25551 fn instance_start<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25552 where
25553 F: FnOnce(operations::InstanceStartWhen, operations::InstanceStartThen),
25554 {
25555 self.mock(|when, then| {
25556 config_fn(
25557 operations::InstanceStartWhen::new(when),
25558 operations::InstanceStartThen::new(then),
25559 )
25560 })
25561 }
25562
25563 fn instance_stop<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25564 where
25565 F: FnOnce(operations::InstanceStopWhen, operations::InstanceStopThen),
25566 {
25567 self.mock(|when, then| {
25568 config_fn(
25569 operations::InstanceStopWhen::new(when),
25570 operations::InstanceStopThen::new(then),
25571 )
25572 })
25573 }
25574
25575 fn internet_gateway_ip_address_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25576 where
25577 F: FnOnce(
25578 operations::InternetGatewayIpAddressListWhen,
25579 operations::InternetGatewayIpAddressListThen,
25580 ),
25581 {
25582 self.mock(|when, then| {
25583 config_fn(
25584 operations::InternetGatewayIpAddressListWhen::new(when),
25585 operations::InternetGatewayIpAddressListThen::new(then),
25586 )
25587 })
25588 }
25589
25590 fn internet_gateway_ip_address_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25591 where
25592 F: FnOnce(
25593 operations::InternetGatewayIpAddressCreateWhen,
25594 operations::InternetGatewayIpAddressCreateThen,
25595 ),
25596 {
25597 self.mock(|when, then| {
25598 config_fn(
25599 operations::InternetGatewayIpAddressCreateWhen::new(when),
25600 operations::InternetGatewayIpAddressCreateThen::new(then),
25601 )
25602 })
25603 }
25604
25605 fn internet_gateway_ip_address_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25606 where
25607 F: FnOnce(
25608 operations::InternetGatewayIpAddressDeleteWhen,
25609 operations::InternetGatewayIpAddressDeleteThen,
25610 ),
25611 {
25612 self.mock(|when, then| {
25613 config_fn(
25614 operations::InternetGatewayIpAddressDeleteWhen::new(when),
25615 operations::InternetGatewayIpAddressDeleteThen::new(then),
25616 )
25617 })
25618 }
25619
25620 fn internet_gateway_ip_pool_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25621 where
25622 F: FnOnce(
25623 operations::InternetGatewayIpPoolListWhen,
25624 operations::InternetGatewayIpPoolListThen,
25625 ),
25626 {
25627 self.mock(|when, then| {
25628 config_fn(
25629 operations::InternetGatewayIpPoolListWhen::new(when),
25630 operations::InternetGatewayIpPoolListThen::new(then),
25631 )
25632 })
25633 }
25634
25635 fn internet_gateway_ip_pool_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25636 where
25637 F: FnOnce(
25638 operations::InternetGatewayIpPoolCreateWhen,
25639 operations::InternetGatewayIpPoolCreateThen,
25640 ),
25641 {
25642 self.mock(|when, then| {
25643 config_fn(
25644 operations::InternetGatewayIpPoolCreateWhen::new(when),
25645 operations::InternetGatewayIpPoolCreateThen::new(then),
25646 )
25647 })
25648 }
25649
25650 fn internet_gateway_ip_pool_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25651 where
25652 F: FnOnce(
25653 operations::InternetGatewayIpPoolDeleteWhen,
25654 operations::InternetGatewayIpPoolDeleteThen,
25655 ),
25656 {
25657 self.mock(|when, then| {
25658 config_fn(
25659 operations::InternetGatewayIpPoolDeleteWhen::new(when),
25660 operations::InternetGatewayIpPoolDeleteThen::new(then),
25661 )
25662 })
25663 }
25664
25665 fn internet_gateway_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25666 where
25667 F: FnOnce(operations::InternetGatewayListWhen, operations::InternetGatewayListThen),
25668 {
25669 self.mock(|when, then| {
25670 config_fn(
25671 operations::InternetGatewayListWhen::new(when),
25672 operations::InternetGatewayListThen::new(then),
25673 )
25674 })
25675 }
25676
25677 fn internet_gateway_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25678 where
25679 F: FnOnce(operations::InternetGatewayCreateWhen, operations::InternetGatewayCreateThen),
25680 {
25681 self.mock(|when, then| {
25682 config_fn(
25683 operations::InternetGatewayCreateWhen::new(when),
25684 operations::InternetGatewayCreateThen::new(then),
25685 )
25686 })
25687 }
25688
25689 fn internet_gateway_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25690 where
25691 F: FnOnce(operations::InternetGatewayViewWhen, operations::InternetGatewayViewThen),
25692 {
25693 self.mock(|when, then| {
25694 config_fn(
25695 operations::InternetGatewayViewWhen::new(when),
25696 operations::InternetGatewayViewThen::new(then),
25697 )
25698 })
25699 }
25700
25701 fn internet_gateway_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25702 where
25703 F: FnOnce(operations::InternetGatewayDeleteWhen, operations::InternetGatewayDeleteThen),
25704 {
25705 self.mock(|when, then| {
25706 config_fn(
25707 operations::InternetGatewayDeleteWhen::new(when),
25708 operations::InternetGatewayDeleteThen::new(then),
25709 )
25710 })
25711 }
25712
25713 fn ip_pool_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25714 where
25715 F: FnOnce(operations::IpPoolListWhen, operations::IpPoolListThen),
25716 {
25717 self.mock(|when, then| {
25718 config_fn(
25719 operations::IpPoolListWhen::new(when),
25720 operations::IpPoolListThen::new(then),
25721 )
25722 })
25723 }
25724
25725 fn ip_pool_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25726 where
25727 F: FnOnce(operations::IpPoolViewWhen, operations::IpPoolViewThen),
25728 {
25729 self.mock(|when, then| {
25730 config_fn(
25731 operations::IpPoolViewWhen::new(when),
25732 operations::IpPoolViewThen::new(then),
25733 )
25734 })
25735 }
25736
25737 fn login_local<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25738 where
25739 F: FnOnce(operations::LoginLocalWhen, operations::LoginLocalThen),
25740 {
25741 self.mock(|when, then| {
25742 config_fn(
25743 operations::LoginLocalWhen::new(when),
25744 operations::LoginLocalThen::new(then),
25745 )
25746 })
25747 }
25748
25749 fn logout<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25750 where
25751 F: FnOnce(operations::LogoutWhen, operations::LogoutThen),
25752 {
25753 self.mock(|when, then| {
25754 config_fn(
25755 operations::LogoutWhen::new(when),
25756 operations::LogoutThen::new(then),
25757 )
25758 })
25759 }
25760
25761 fn current_user_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25762 where
25763 F: FnOnce(operations::CurrentUserViewWhen, operations::CurrentUserViewThen),
25764 {
25765 self.mock(|when, then| {
25766 config_fn(
25767 operations::CurrentUserViewWhen::new(when),
25768 operations::CurrentUserViewThen::new(then),
25769 )
25770 })
25771 }
25772
25773 fn current_user_access_token_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25774 where
25775 F: FnOnce(
25776 operations::CurrentUserAccessTokenListWhen,
25777 operations::CurrentUserAccessTokenListThen,
25778 ),
25779 {
25780 self.mock(|when, then| {
25781 config_fn(
25782 operations::CurrentUserAccessTokenListWhen::new(when),
25783 operations::CurrentUserAccessTokenListThen::new(then),
25784 )
25785 })
25786 }
25787
25788 fn current_user_access_token_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25789 where
25790 F: FnOnce(
25791 operations::CurrentUserAccessTokenDeleteWhen,
25792 operations::CurrentUserAccessTokenDeleteThen,
25793 ),
25794 {
25795 self.mock(|when, then| {
25796 config_fn(
25797 operations::CurrentUserAccessTokenDeleteWhen::new(when),
25798 operations::CurrentUserAccessTokenDeleteThen::new(then),
25799 )
25800 })
25801 }
25802
25803 fn current_user_groups<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25804 where
25805 F: FnOnce(operations::CurrentUserGroupsWhen, operations::CurrentUserGroupsThen),
25806 {
25807 self.mock(|when, then| {
25808 config_fn(
25809 operations::CurrentUserGroupsWhen::new(when),
25810 operations::CurrentUserGroupsThen::new(then),
25811 )
25812 })
25813 }
25814
25815 fn current_user_ssh_key_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25816 where
25817 F: FnOnce(operations::CurrentUserSshKeyListWhen, operations::CurrentUserSshKeyListThen),
25818 {
25819 self.mock(|when, then| {
25820 config_fn(
25821 operations::CurrentUserSshKeyListWhen::new(when),
25822 operations::CurrentUserSshKeyListThen::new(then),
25823 )
25824 })
25825 }
25826
25827 fn current_user_ssh_key_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25828 where
25829 F: FnOnce(operations::CurrentUserSshKeyCreateWhen, operations::CurrentUserSshKeyCreateThen),
25830 {
25831 self.mock(|when, then| {
25832 config_fn(
25833 operations::CurrentUserSshKeyCreateWhen::new(when),
25834 operations::CurrentUserSshKeyCreateThen::new(then),
25835 )
25836 })
25837 }
25838
25839 fn current_user_ssh_key_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25840 where
25841 F: FnOnce(operations::CurrentUserSshKeyViewWhen, operations::CurrentUserSshKeyViewThen),
25842 {
25843 self.mock(|when, then| {
25844 config_fn(
25845 operations::CurrentUserSshKeyViewWhen::new(when),
25846 operations::CurrentUserSshKeyViewThen::new(then),
25847 )
25848 })
25849 }
25850
25851 fn current_user_ssh_key_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25852 where
25853 F: FnOnce(operations::CurrentUserSshKeyDeleteWhen, operations::CurrentUserSshKeyDeleteThen),
25854 {
25855 self.mock(|when, then| {
25856 config_fn(
25857 operations::CurrentUserSshKeyDeleteWhen::new(when),
25858 operations::CurrentUserSshKeyDeleteThen::new(then),
25859 )
25860 })
25861 }
25862
25863 fn silo_metric<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25864 where
25865 F: FnOnce(operations::SiloMetricWhen, operations::SiloMetricThen),
25866 {
25867 self.mock(|when, then| {
25868 config_fn(
25869 operations::SiloMetricWhen::new(when),
25870 operations::SiloMetricThen::new(then),
25871 )
25872 })
25873 }
25874
25875 fn multicast_group_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25876 where
25877 F: FnOnce(operations::MulticastGroupListWhen, operations::MulticastGroupListThen),
25878 {
25879 self.mock(|when, then| {
25880 config_fn(
25881 operations::MulticastGroupListWhen::new(when),
25882 operations::MulticastGroupListThen::new(then),
25883 )
25884 })
25885 }
25886
25887 fn multicast_group_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25888 where
25889 F: FnOnce(operations::MulticastGroupViewWhen, operations::MulticastGroupViewThen),
25890 {
25891 self.mock(|when, then| {
25892 config_fn(
25893 operations::MulticastGroupViewWhen::new(when),
25894 operations::MulticastGroupViewThen::new(then),
25895 )
25896 })
25897 }
25898
25899 fn multicast_group_member_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25900 where
25901 F: FnOnce(
25902 operations::MulticastGroupMemberListWhen,
25903 operations::MulticastGroupMemberListThen,
25904 ),
25905 {
25906 self.mock(|when, then| {
25907 config_fn(
25908 operations::MulticastGroupMemberListWhen::new(when),
25909 operations::MulticastGroupMemberListThen::new(then),
25910 )
25911 })
25912 }
25913
25914 fn instance_network_interface_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25915 where
25916 F: FnOnce(
25917 operations::InstanceNetworkInterfaceListWhen,
25918 operations::InstanceNetworkInterfaceListThen,
25919 ),
25920 {
25921 self.mock(|when, then| {
25922 config_fn(
25923 operations::InstanceNetworkInterfaceListWhen::new(when),
25924 operations::InstanceNetworkInterfaceListThen::new(then),
25925 )
25926 })
25927 }
25928
25929 fn instance_network_interface_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25930 where
25931 F: FnOnce(
25932 operations::InstanceNetworkInterfaceCreateWhen,
25933 operations::InstanceNetworkInterfaceCreateThen,
25934 ),
25935 {
25936 self.mock(|when, then| {
25937 config_fn(
25938 operations::InstanceNetworkInterfaceCreateWhen::new(when),
25939 operations::InstanceNetworkInterfaceCreateThen::new(then),
25940 )
25941 })
25942 }
25943
25944 fn instance_network_interface_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25945 where
25946 F: FnOnce(
25947 operations::InstanceNetworkInterfaceViewWhen,
25948 operations::InstanceNetworkInterfaceViewThen,
25949 ),
25950 {
25951 self.mock(|when, then| {
25952 config_fn(
25953 operations::InstanceNetworkInterfaceViewWhen::new(when),
25954 operations::InstanceNetworkInterfaceViewThen::new(then),
25955 )
25956 })
25957 }
25958
25959 fn instance_network_interface_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25960 where
25961 F: FnOnce(
25962 operations::InstanceNetworkInterfaceUpdateWhen,
25963 operations::InstanceNetworkInterfaceUpdateThen,
25964 ),
25965 {
25966 self.mock(|when, then| {
25967 config_fn(
25968 operations::InstanceNetworkInterfaceUpdateWhen::new(when),
25969 operations::InstanceNetworkInterfaceUpdateThen::new(then),
25970 )
25971 })
25972 }
25973
25974 fn instance_network_interface_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25975 where
25976 F: FnOnce(
25977 operations::InstanceNetworkInterfaceDeleteWhen,
25978 operations::InstanceNetworkInterfaceDeleteThen,
25979 ),
25980 {
25981 self.mock(|when, then| {
25982 config_fn(
25983 operations::InstanceNetworkInterfaceDeleteWhen::new(when),
25984 operations::InstanceNetworkInterfaceDeleteThen::new(then),
25985 )
25986 })
25987 }
25988
25989 fn ping<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
25990 where
25991 F: FnOnce(operations::PingWhen, operations::PingThen),
25992 {
25993 self.mock(|when, then| {
25994 config_fn(
25995 operations::PingWhen::new(when),
25996 operations::PingThen::new(then),
25997 )
25998 })
25999 }
26000
26001 fn policy_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26002 where
26003 F: FnOnce(operations::PolicyViewWhen, operations::PolicyViewThen),
26004 {
26005 self.mock(|when, then| {
26006 config_fn(
26007 operations::PolicyViewWhen::new(when),
26008 operations::PolicyViewThen::new(then),
26009 )
26010 })
26011 }
26012
26013 fn policy_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26014 where
26015 F: FnOnce(operations::PolicyUpdateWhen, operations::PolicyUpdateThen),
26016 {
26017 self.mock(|when, then| {
26018 config_fn(
26019 operations::PolicyUpdateWhen::new(when),
26020 operations::PolicyUpdateThen::new(then),
26021 )
26022 })
26023 }
26024
26025 fn project_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26026 where
26027 F: FnOnce(operations::ProjectListWhen, operations::ProjectListThen),
26028 {
26029 self.mock(|when, then| {
26030 config_fn(
26031 operations::ProjectListWhen::new(when),
26032 operations::ProjectListThen::new(then),
26033 )
26034 })
26035 }
26036
26037 fn project_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26038 where
26039 F: FnOnce(operations::ProjectCreateWhen, operations::ProjectCreateThen),
26040 {
26041 self.mock(|when, then| {
26042 config_fn(
26043 operations::ProjectCreateWhen::new(when),
26044 operations::ProjectCreateThen::new(then),
26045 )
26046 })
26047 }
26048
26049 fn project_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26050 where
26051 F: FnOnce(operations::ProjectViewWhen, operations::ProjectViewThen),
26052 {
26053 self.mock(|when, then| {
26054 config_fn(
26055 operations::ProjectViewWhen::new(when),
26056 operations::ProjectViewThen::new(then),
26057 )
26058 })
26059 }
26060
26061 fn project_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26062 where
26063 F: FnOnce(operations::ProjectUpdateWhen, operations::ProjectUpdateThen),
26064 {
26065 self.mock(|when, then| {
26066 config_fn(
26067 operations::ProjectUpdateWhen::new(when),
26068 operations::ProjectUpdateThen::new(then),
26069 )
26070 })
26071 }
26072
26073 fn project_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26074 where
26075 F: FnOnce(operations::ProjectDeleteWhen, operations::ProjectDeleteThen),
26076 {
26077 self.mock(|when, then| {
26078 config_fn(
26079 operations::ProjectDeleteWhen::new(when),
26080 operations::ProjectDeleteThen::new(then),
26081 )
26082 })
26083 }
26084
26085 fn project_policy_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26086 where
26087 F: FnOnce(operations::ProjectPolicyViewWhen, operations::ProjectPolicyViewThen),
26088 {
26089 self.mock(|when, then| {
26090 config_fn(
26091 operations::ProjectPolicyViewWhen::new(when),
26092 operations::ProjectPolicyViewThen::new(then),
26093 )
26094 })
26095 }
26096
26097 fn project_policy_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26098 where
26099 F: FnOnce(operations::ProjectPolicyUpdateWhen, operations::ProjectPolicyUpdateThen),
26100 {
26101 self.mock(|when, then| {
26102 config_fn(
26103 operations::ProjectPolicyUpdateWhen::new(when),
26104 operations::ProjectPolicyUpdateThen::new(then),
26105 )
26106 })
26107 }
26108
26109 fn snapshot_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26110 where
26111 F: FnOnce(operations::SnapshotListWhen, operations::SnapshotListThen),
26112 {
26113 self.mock(|when, then| {
26114 config_fn(
26115 operations::SnapshotListWhen::new(when),
26116 operations::SnapshotListThen::new(then),
26117 )
26118 })
26119 }
26120
26121 fn snapshot_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26122 where
26123 F: FnOnce(operations::SnapshotCreateWhen, operations::SnapshotCreateThen),
26124 {
26125 self.mock(|when, then| {
26126 config_fn(
26127 operations::SnapshotCreateWhen::new(when),
26128 operations::SnapshotCreateThen::new(then),
26129 )
26130 })
26131 }
26132
26133 fn snapshot_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26134 where
26135 F: FnOnce(operations::SnapshotViewWhen, operations::SnapshotViewThen),
26136 {
26137 self.mock(|when, then| {
26138 config_fn(
26139 operations::SnapshotViewWhen::new(when),
26140 operations::SnapshotViewThen::new(then),
26141 )
26142 })
26143 }
26144
26145 fn snapshot_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26146 where
26147 F: FnOnce(operations::SnapshotDeleteWhen, operations::SnapshotDeleteThen),
26148 {
26149 self.mock(|when, then| {
26150 config_fn(
26151 operations::SnapshotDeleteWhen::new(when),
26152 operations::SnapshotDeleteThen::new(then),
26153 )
26154 })
26155 }
26156
26157 fn subnet_pool_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26158 where
26159 F: FnOnce(operations::SubnetPoolListWhen, operations::SubnetPoolListThen),
26160 {
26161 self.mock(|when, then| {
26162 config_fn(
26163 operations::SubnetPoolListWhen::new(when),
26164 operations::SubnetPoolListThen::new(then),
26165 )
26166 })
26167 }
26168
26169 fn subnet_pool_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26170 where
26171 F: FnOnce(operations::SubnetPoolViewWhen, operations::SubnetPoolViewThen),
26172 {
26173 self.mock(|when, then| {
26174 config_fn(
26175 operations::SubnetPoolViewWhen::new(when),
26176 operations::SubnetPoolViewThen::new(then),
26177 )
26178 })
26179 }
26180
26181 fn audit_log_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26182 where
26183 F: FnOnce(operations::AuditLogListWhen, operations::AuditLogListThen),
26184 {
26185 self.mock(|when, then| {
26186 config_fn(
26187 operations::AuditLogListWhen::new(when),
26188 operations::AuditLogListThen::new(then),
26189 )
26190 })
26191 }
26192
26193 fn physical_disk_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26194 where
26195 F: FnOnce(operations::PhysicalDiskListWhen, operations::PhysicalDiskListThen),
26196 {
26197 self.mock(|when, then| {
26198 config_fn(
26199 operations::PhysicalDiskListWhen::new(when),
26200 operations::PhysicalDiskListThen::new(then),
26201 )
26202 })
26203 }
26204
26205 fn physical_disk_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26206 where
26207 F: FnOnce(operations::PhysicalDiskViewWhen, operations::PhysicalDiskViewThen),
26208 {
26209 self.mock(|when, then| {
26210 config_fn(
26211 operations::PhysicalDiskViewWhen::new(when),
26212 operations::PhysicalDiskViewThen::new(then),
26213 )
26214 })
26215 }
26216
26217 fn networking_switch_port_lldp_neighbors<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26218 where
26219 F: FnOnce(
26220 operations::NetworkingSwitchPortLldpNeighborsWhen,
26221 operations::NetworkingSwitchPortLldpNeighborsThen,
26222 ),
26223 {
26224 self.mock(|when, then| {
26225 config_fn(
26226 operations::NetworkingSwitchPortLldpNeighborsWhen::new(when),
26227 operations::NetworkingSwitchPortLldpNeighborsThen::new(then),
26228 )
26229 })
26230 }
26231
26232 fn rack_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26233 where
26234 F: FnOnce(operations::RackListWhen, operations::RackListThen),
26235 {
26236 self.mock(|when, then| {
26237 config_fn(
26238 operations::RackListWhen::new(when),
26239 operations::RackListThen::new(then),
26240 )
26241 })
26242 }
26243
26244 fn rack_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26245 where
26246 F: FnOnce(operations::RackViewWhen, operations::RackViewThen),
26247 {
26248 self.mock(|when, then| {
26249 config_fn(
26250 operations::RackViewWhen::new(when),
26251 operations::RackViewThen::new(then),
26252 )
26253 })
26254 }
26255
26256 fn rack_membership_status<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26257 where
26258 F: FnOnce(operations::RackMembershipStatusWhen, operations::RackMembershipStatusThen),
26259 {
26260 self.mock(|when, then| {
26261 config_fn(
26262 operations::RackMembershipStatusWhen::new(when),
26263 operations::RackMembershipStatusThen::new(then),
26264 )
26265 })
26266 }
26267
26268 fn rack_membership_abort<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26269 where
26270 F: FnOnce(operations::RackMembershipAbortWhen, operations::RackMembershipAbortThen),
26271 {
26272 self.mock(|when, then| {
26273 config_fn(
26274 operations::RackMembershipAbortWhen::new(when),
26275 operations::RackMembershipAbortThen::new(then),
26276 )
26277 })
26278 }
26279
26280 fn rack_membership_add_sleds<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26281 where
26282 F: FnOnce(operations::RackMembershipAddSledsWhen, operations::RackMembershipAddSledsThen),
26283 {
26284 self.mock(|when, then| {
26285 config_fn(
26286 operations::RackMembershipAddSledsWhen::new(when),
26287 operations::RackMembershipAddSledsThen::new(then),
26288 )
26289 })
26290 }
26291
26292 fn sled_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26293 where
26294 F: FnOnce(operations::SledListWhen, operations::SledListThen),
26295 {
26296 self.mock(|when, then| {
26297 config_fn(
26298 operations::SledListWhen::new(when),
26299 operations::SledListThen::new(then),
26300 )
26301 })
26302 }
26303
26304 fn sled_add<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26305 where
26306 F: FnOnce(operations::SledAddWhen, operations::SledAddThen),
26307 {
26308 self.mock(|when, then| {
26309 config_fn(
26310 operations::SledAddWhen::new(when),
26311 operations::SledAddThen::new(then),
26312 )
26313 })
26314 }
26315
26316 fn sled_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26317 where
26318 F: FnOnce(operations::SledViewWhen, operations::SledViewThen),
26319 {
26320 self.mock(|when, then| {
26321 config_fn(
26322 operations::SledViewWhen::new(when),
26323 operations::SledViewThen::new(then),
26324 )
26325 })
26326 }
26327
26328 fn sled_physical_disk_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26329 where
26330 F: FnOnce(operations::SledPhysicalDiskListWhen, operations::SledPhysicalDiskListThen),
26331 {
26332 self.mock(|when, then| {
26333 config_fn(
26334 operations::SledPhysicalDiskListWhen::new(when),
26335 operations::SledPhysicalDiskListThen::new(then),
26336 )
26337 })
26338 }
26339
26340 fn sled_instance_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26341 where
26342 F: FnOnce(operations::SledInstanceListWhen, operations::SledInstanceListThen),
26343 {
26344 self.mock(|when, then| {
26345 config_fn(
26346 operations::SledInstanceListWhen::new(when),
26347 operations::SledInstanceListThen::new(then),
26348 )
26349 })
26350 }
26351
26352 fn sled_set_provision_policy<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26353 where
26354 F: FnOnce(operations::SledSetProvisionPolicyWhen, operations::SledSetProvisionPolicyThen),
26355 {
26356 self.mock(|when, then| {
26357 config_fn(
26358 operations::SledSetProvisionPolicyWhen::new(when),
26359 operations::SledSetProvisionPolicyThen::new(then),
26360 )
26361 })
26362 }
26363
26364 fn sled_list_uninitialized<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26365 where
26366 F: FnOnce(operations::SledListUninitializedWhen, operations::SledListUninitializedThen),
26367 {
26368 self.mock(|when, then| {
26369 config_fn(
26370 operations::SledListUninitializedWhen::new(when),
26371 operations::SledListUninitializedThen::new(then),
26372 )
26373 })
26374 }
26375
26376 fn networking_switch_port_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26377 where
26378 F: FnOnce(
26379 operations::NetworkingSwitchPortListWhen,
26380 operations::NetworkingSwitchPortListThen,
26381 ),
26382 {
26383 self.mock(|when, then| {
26384 config_fn(
26385 operations::NetworkingSwitchPortListWhen::new(when),
26386 operations::NetworkingSwitchPortListThen::new(then),
26387 )
26388 })
26389 }
26390
26391 fn networking_switch_port_lldp_config_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26392 where
26393 F: FnOnce(
26394 operations::NetworkingSwitchPortLldpConfigViewWhen,
26395 operations::NetworkingSwitchPortLldpConfigViewThen,
26396 ),
26397 {
26398 self.mock(|when, then| {
26399 config_fn(
26400 operations::NetworkingSwitchPortLldpConfigViewWhen::new(when),
26401 operations::NetworkingSwitchPortLldpConfigViewThen::new(then),
26402 )
26403 })
26404 }
26405
26406 fn networking_switch_port_lldp_config_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26407 where
26408 F: FnOnce(
26409 operations::NetworkingSwitchPortLldpConfigUpdateWhen,
26410 operations::NetworkingSwitchPortLldpConfigUpdateThen,
26411 ),
26412 {
26413 self.mock(|when, then| {
26414 config_fn(
26415 operations::NetworkingSwitchPortLldpConfigUpdateWhen::new(when),
26416 operations::NetworkingSwitchPortLldpConfigUpdateThen::new(then),
26417 )
26418 })
26419 }
26420
26421 fn networking_switch_port_apply_settings<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26422 where
26423 F: FnOnce(
26424 operations::NetworkingSwitchPortApplySettingsWhen,
26425 operations::NetworkingSwitchPortApplySettingsThen,
26426 ),
26427 {
26428 self.mock(|when, then| {
26429 config_fn(
26430 operations::NetworkingSwitchPortApplySettingsWhen::new(when),
26431 operations::NetworkingSwitchPortApplySettingsThen::new(then),
26432 )
26433 })
26434 }
26435
26436 fn networking_switch_port_clear_settings<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26437 where
26438 F: FnOnce(
26439 operations::NetworkingSwitchPortClearSettingsWhen,
26440 operations::NetworkingSwitchPortClearSettingsThen,
26441 ),
26442 {
26443 self.mock(|when, then| {
26444 config_fn(
26445 operations::NetworkingSwitchPortClearSettingsWhen::new(when),
26446 operations::NetworkingSwitchPortClearSettingsThen::new(then),
26447 )
26448 })
26449 }
26450
26451 fn networking_switch_port_status<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26452 where
26453 F: FnOnce(
26454 operations::NetworkingSwitchPortStatusWhen,
26455 operations::NetworkingSwitchPortStatusThen,
26456 ),
26457 {
26458 self.mock(|when, then| {
26459 config_fn(
26460 operations::NetworkingSwitchPortStatusWhen::new(when),
26461 operations::NetworkingSwitchPortStatusThen::new(then),
26462 )
26463 })
26464 }
26465
26466 fn switch_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26467 where
26468 F: FnOnce(operations::SwitchListWhen, operations::SwitchListThen),
26469 {
26470 self.mock(|when, then| {
26471 config_fn(
26472 operations::SwitchListWhen::new(when),
26473 operations::SwitchListThen::new(then),
26474 )
26475 })
26476 }
26477
26478 fn switch_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26479 where
26480 F: FnOnce(operations::SwitchViewWhen, operations::SwitchViewThen),
26481 {
26482 self.mock(|when, then| {
26483 config_fn(
26484 operations::SwitchViewWhen::new(when),
26485 operations::SwitchViewThen::new(then),
26486 )
26487 })
26488 }
26489
26490 fn silo_identity_provider_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26491 where
26492 F: FnOnce(
26493 operations::SiloIdentityProviderListWhen,
26494 operations::SiloIdentityProviderListThen,
26495 ),
26496 {
26497 self.mock(|when, then| {
26498 config_fn(
26499 operations::SiloIdentityProviderListWhen::new(when),
26500 operations::SiloIdentityProviderListThen::new(then),
26501 )
26502 })
26503 }
26504
26505 fn local_idp_user_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26506 where
26507 F: FnOnce(operations::LocalIdpUserCreateWhen, operations::LocalIdpUserCreateThen),
26508 {
26509 self.mock(|when, then| {
26510 config_fn(
26511 operations::LocalIdpUserCreateWhen::new(when),
26512 operations::LocalIdpUserCreateThen::new(then),
26513 )
26514 })
26515 }
26516
26517 fn local_idp_user_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26518 where
26519 F: FnOnce(operations::LocalIdpUserDeleteWhen, operations::LocalIdpUserDeleteThen),
26520 {
26521 self.mock(|when, then| {
26522 config_fn(
26523 operations::LocalIdpUserDeleteWhen::new(when),
26524 operations::LocalIdpUserDeleteThen::new(then),
26525 )
26526 })
26527 }
26528
26529 fn local_idp_user_set_password<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26530 where
26531 F: FnOnce(operations::LocalIdpUserSetPasswordWhen, operations::LocalIdpUserSetPasswordThen),
26532 {
26533 self.mock(|when, then| {
26534 config_fn(
26535 operations::LocalIdpUserSetPasswordWhen::new(when),
26536 operations::LocalIdpUserSetPasswordThen::new(then),
26537 )
26538 })
26539 }
26540
26541 fn saml_identity_provider_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26542 where
26543 F: FnOnce(
26544 operations::SamlIdentityProviderCreateWhen,
26545 operations::SamlIdentityProviderCreateThen,
26546 ),
26547 {
26548 self.mock(|when, then| {
26549 config_fn(
26550 operations::SamlIdentityProviderCreateWhen::new(when),
26551 operations::SamlIdentityProviderCreateThen::new(then),
26552 )
26553 })
26554 }
26555
26556 fn saml_identity_provider_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26557 where
26558 F: FnOnce(
26559 operations::SamlIdentityProviderViewWhen,
26560 operations::SamlIdentityProviderViewThen,
26561 ),
26562 {
26563 self.mock(|when, then| {
26564 config_fn(
26565 operations::SamlIdentityProviderViewWhen::new(when),
26566 operations::SamlIdentityProviderViewThen::new(then),
26567 )
26568 })
26569 }
26570
26571 fn system_ip_pool_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26572 where
26573 F: FnOnce(operations::SystemIpPoolListWhen, operations::SystemIpPoolListThen),
26574 {
26575 self.mock(|when, then| {
26576 config_fn(
26577 operations::SystemIpPoolListWhen::new(when),
26578 operations::SystemIpPoolListThen::new(then),
26579 )
26580 })
26581 }
26582
26583 fn system_ip_pool_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26584 where
26585 F: FnOnce(operations::SystemIpPoolCreateWhen, operations::SystemIpPoolCreateThen),
26586 {
26587 self.mock(|when, then| {
26588 config_fn(
26589 operations::SystemIpPoolCreateWhen::new(when),
26590 operations::SystemIpPoolCreateThen::new(then),
26591 )
26592 })
26593 }
26594
26595 fn system_ip_pool_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26596 where
26597 F: FnOnce(operations::SystemIpPoolViewWhen, operations::SystemIpPoolViewThen),
26598 {
26599 self.mock(|when, then| {
26600 config_fn(
26601 operations::SystemIpPoolViewWhen::new(when),
26602 operations::SystemIpPoolViewThen::new(then),
26603 )
26604 })
26605 }
26606
26607 fn system_ip_pool_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26608 where
26609 F: FnOnce(operations::SystemIpPoolUpdateWhen, operations::SystemIpPoolUpdateThen),
26610 {
26611 self.mock(|when, then| {
26612 config_fn(
26613 operations::SystemIpPoolUpdateWhen::new(when),
26614 operations::SystemIpPoolUpdateThen::new(then),
26615 )
26616 })
26617 }
26618
26619 fn system_ip_pool_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26620 where
26621 F: FnOnce(operations::SystemIpPoolDeleteWhen, operations::SystemIpPoolDeleteThen),
26622 {
26623 self.mock(|when, then| {
26624 config_fn(
26625 operations::SystemIpPoolDeleteWhen::new(when),
26626 operations::SystemIpPoolDeleteThen::new(then),
26627 )
26628 })
26629 }
26630
26631 fn system_ip_pool_range_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26632 where
26633 F: FnOnce(operations::SystemIpPoolRangeListWhen, operations::SystemIpPoolRangeListThen),
26634 {
26635 self.mock(|when, then| {
26636 config_fn(
26637 operations::SystemIpPoolRangeListWhen::new(when),
26638 operations::SystemIpPoolRangeListThen::new(then),
26639 )
26640 })
26641 }
26642
26643 fn system_ip_pool_range_add<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26644 where
26645 F: FnOnce(operations::SystemIpPoolRangeAddWhen, operations::SystemIpPoolRangeAddThen),
26646 {
26647 self.mock(|when, then| {
26648 config_fn(
26649 operations::SystemIpPoolRangeAddWhen::new(when),
26650 operations::SystemIpPoolRangeAddThen::new(then),
26651 )
26652 })
26653 }
26654
26655 fn system_ip_pool_range_remove<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26656 where
26657 F: FnOnce(operations::SystemIpPoolRangeRemoveWhen, operations::SystemIpPoolRangeRemoveThen),
26658 {
26659 self.mock(|when, then| {
26660 config_fn(
26661 operations::SystemIpPoolRangeRemoveWhen::new(when),
26662 operations::SystemIpPoolRangeRemoveThen::new(then),
26663 )
26664 })
26665 }
26666
26667 fn system_ip_pool_silo_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26668 where
26669 F: FnOnce(operations::SystemIpPoolSiloListWhen, operations::SystemIpPoolSiloListThen),
26670 {
26671 self.mock(|when, then| {
26672 config_fn(
26673 operations::SystemIpPoolSiloListWhen::new(when),
26674 operations::SystemIpPoolSiloListThen::new(then),
26675 )
26676 })
26677 }
26678
26679 fn system_ip_pool_silo_link<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26680 where
26681 F: FnOnce(operations::SystemIpPoolSiloLinkWhen, operations::SystemIpPoolSiloLinkThen),
26682 {
26683 self.mock(|when, then| {
26684 config_fn(
26685 operations::SystemIpPoolSiloLinkWhen::new(when),
26686 operations::SystemIpPoolSiloLinkThen::new(then),
26687 )
26688 })
26689 }
26690
26691 fn system_ip_pool_silo_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26692 where
26693 F: FnOnce(operations::SystemIpPoolSiloUpdateWhen, operations::SystemIpPoolSiloUpdateThen),
26694 {
26695 self.mock(|when, then| {
26696 config_fn(
26697 operations::SystemIpPoolSiloUpdateWhen::new(when),
26698 operations::SystemIpPoolSiloUpdateThen::new(then),
26699 )
26700 })
26701 }
26702
26703 fn system_ip_pool_silo_unlink<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26704 where
26705 F: FnOnce(operations::SystemIpPoolSiloUnlinkWhen, operations::SystemIpPoolSiloUnlinkThen),
26706 {
26707 self.mock(|when, then| {
26708 config_fn(
26709 operations::SystemIpPoolSiloUnlinkWhen::new(when),
26710 operations::SystemIpPoolSiloUnlinkThen::new(then),
26711 )
26712 })
26713 }
26714
26715 fn system_ip_pool_utilization_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26716 where
26717 F: FnOnce(
26718 operations::SystemIpPoolUtilizationViewWhen,
26719 operations::SystemIpPoolUtilizationViewThen,
26720 ),
26721 {
26722 self.mock(|when, then| {
26723 config_fn(
26724 operations::SystemIpPoolUtilizationViewWhen::new(when),
26725 operations::SystemIpPoolUtilizationViewThen::new(then),
26726 )
26727 })
26728 }
26729
26730 fn system_ip_pool_service_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26731 where
26732 F: FnOnce(operations::SystemIpPoolServiceViewWhen, operations::SystemIpPoolServiceViewThen),
26733 {
26734 self.mock(|when, then| {
26735 config_fn(
26736 operations::SystemIpPoolServiceViewWhen::new(when),
26737 operations::SystemIpPoolServiceViewThen::new(then),
26738 )
26739 })
26740 }
26741
26742 fn system_ip_pool_service_range_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26743 where
26744 F: FnOnce(
26745 operations::SystemIpPoolServiceRangeListWhen,
26746 operations::SystemIpPoolServiceRangeListThen,
26747 ),
26748 {
26749 self.mock(|when, then| {
26750 config_fn(
26751 operations::SystemIpPoolServiceRangeListWhen::new(when),
26752 operations::SystemIpPoolServiceRangeListThen::new(then),
26753 )
26754 })
26755 }
26756
26757 fn system_ip_pool_service_range_add<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26758 where
26759 F: FnOnce(
26760 operations::SystemIpPoolServiceRangeAddWhen,
26761 operations::SystemIpPoolServiceRangeAddThen,
26762 ),
26763 {
26764 self.mock(|when, then| {
26765 config_fn(
26766 operations::SystemIpPoolServiceRangeAddWhen::new(when),
26767 operations::SystemIpPoolServiceRangeAddThen::new(then),
26768 )
26769 })
26770 }
26771
26772 fn system_ip_pool_service_range_remove<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26773 where
26774 F: FnOnce(
26775 operations::SystemIpPoolServiceRangeRemoveWhen,
26776 operations::SystemIpPoolServiceRangeRemoveThen,
26777 ),
26778 {
26779 self.mock(|when, then| {
26780 config_fn(
26781 operations::SystemIpPoolServiceRangeRemoveWhen::new(when),
26782 operations::SystemIpPoolServiceRangeRemoveThen::new(then),
26783 )
26784 })
26785 }
26786
26787 fn system_metric<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26788 where
26789 F: FnOnce(operations::SystemMetricWhen, operations::SystemMetricThen),
26790 {
26791 self.mock(|when, then| {
26792 config_fn(
26793 operations::SystemMetricWhen::new(when),
26794 operations::SystemMetricThen::new(then),
26795 )
26796 })
26797 }
26798
26799 fn networking_address_lot_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26800 where
26801 F: FnOnce(
26802 operations::NetworkingAddressLotListWhen,
26803 operations::NetworkingAddressLotListThen,
26804 ),
26805 {
26806 self.mock(|when, then| {
26807 config_fn(
26808 operations::NetworkingAddressLotListWhen::new(when),
26809 operations::NetworkingAddressLotListThen::new(then),
26810 )
26811 })
26812 }
26813
26814 fn networking_address_lot_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26815 where
26816 F: FnOnce(
26817 operations::NetworkingAddressLotCreateWhen,
26818 operations::NetworkingAddressLotCreateThen,
26819 ),
26820 {
26821 self.mock(|when, then| {
26822 config_fn(
26823 operations::NetworkingAddressLotCreateWhen::new(when),
26824 operations::NetworkingAddressLotCreateThen::new(then),
26825 )
26826 })
26827 }
26828
26829 fn networking_address_lot_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26830 where
26831 F: FnOnce(
26832 operations::NetworkingAddressLotViewWhen,
26833 operations::NetworkingAddressLotViewThen,
26834 ),
26835 {
26836 self.mock(|when, then| {
26837 config_fn(
26838 operations::NetworkingAddressLotViewWhen::new(when),
26839 operations::NetworkingAddressLotViewThen::new(then),
26840 )
26841 })
26842 }
26843
26844 fn networking_address_lot_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26845 where
26846 F: FnOnce(
26847 operations::NetworkingAddressLotDeleteWhen,
26848 operations::NetworkingAddressLotDeleteThen,
26849 ),
26850 {
26851 self.mock(|when, then| {
26852 config_fn(
26853 operations::NetworkingAddressLotDeleteWhen::new(when),
26854 operations::NetworkingAddressLotDeleteThen::new(then),
26855 )
26856 })
26857 }
26858
26859 fn networking_address_lot_block_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26860 where
26861 F: FnOnce(
26862 operations::NetworkingAddressLotBlockListWhen,
26863 operations::NetworkingAddressLotBlockListThen,
26864 ),
26865 {
26866 self.mock(|when, then| {
26867 config_fn(
26868 operations::NetworkingAddressLotBlockListWhen::new(when),
26869 operations::NetworkingAddressLotBlockListThen::new(then),
26870 )
26871 })
26872 }
26873
26874 fn networking_allow_list_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26875 where
26876 F: FnOnce(operations::NetworkingAllowListViewWhen, operations::NetworkingAllowListViewThen),
26877 {
26878 self.mock(|when, then| {
26879 config_fn(
26880 operations::NetworkingAllowListViewWhen::new(when),
26881 operations::NetworkingAllowListViewThen::new(then),
26882 )
26883 })
26884 }
26885
26886 fn networking_allow_list_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26887 where
26888 F: FnOnce(
26889 operations::NetworkingAllowListUpdateWhen,
26890 operations::NetworkingAllowListUpdateThen,
26891 ),
26892 {
26893 self.mock(|when, then| {
26894 config_fn(
26895 operations::NetworkingAllowListUpdateWhen::new(when),
26896 operations::NetworkingAllowListUpdateThen::new(then),
26897 )
26898 })
26899 }
26900
26901 fn networking_bfd_disable<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26902 where
26903 F: FnOnce(operations::NetworkingBfdDisableWhen, operations::NetworkingBfdDisableThen),
26904 {
26905 self.mock(|when, then| {
26906 config_fn(
26907 operations::NetworkingBfdDisableWhen::new(when),
26908 operations::NetworkingBfdDisableThen::new(then),
26909 )
26910 })
26911 }
26912
26913 fn networking_bfd_enable<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26914 where
26915 F: FnOnce(operations::NetworkingBfdEnableWhen, operations::NetworkingBfdEnableThen),
26916 {
26917 self.mock(|when, then| {
26918 config_fn(
26919 operations::NetworkingBfdEnableWhen::new(when),
26920 operations::NetworkingBfdEnableThen::new(then),
26921 )
26922 })
26923 }
26924
26925 fn networking_bfd_status<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26926 where
26927 F: FnOnce(operations::NetworkingBfdStatusWhen, operations::NetworkingBfdStatusThen),
26928 {
26929 self.mock(|when, then| {
26930 config_fn(
26931 operations::NetworkingBfdStatusWhen::new(when),
26932 operations::NetworkingBfdStatusThen::new(then),
26933 )
26934 })
26935 }
26936
26937 fn networking_bgp_config_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26938 where
26939 F: FnOnce(operations::NetworkingBgpConfigListWhen, operations::NetworkingBgpConfigListThen),
26940 {
26941 self.mock(|when, then| {
26942 config_fn(
26943 operations::NetworkingBgpConfigListWhen::new(when),
26944 operations::NetworkingBgpConfigListThen::new(then),
26945 )
26946 })
26947 }
26948
26949 fn networking_bgp_config_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26950 where
26951 F: FnOnce(
26952 operations::NetworkingBgpConfigCreateWhen,
26953 operations::NetworkingBgpConfigCreateThen,
26954 ),
26955 {
26956 self.mock(|when, then| {
26957 config_fn(
26958 operations::NetworkingBgpConfigCreateWhen::new(when),
26959 operations::NetworkingBgpConfigCreateThen::new(then),
26960 )
26961 })
26962 }
26963
26964 fn networking_bgp_config_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26965 where
26966 F: FnOnce(
26967 operations::NetworkingBgpConfigDeleteWhen,
26968 operations::NetworkingBgpConfigDeleteThen,
26969 ),
26970 {
26971 self.mock(|when, then| {
26972 config_fn(
26973 operations::NetworkingBgpConfigDeleteWhen::new(when),
26974 operations::NetworkingBgpConfigDeleteThen::new(then),
26975 )
26976 })
26977 }
26978
26979 fn networking_bgp_announce_set_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26980 where
26981 F: FnOnce(
26982 operations::NetworkingBgpAnnounceSetListWhen,
26983 operations::NetworkingBgpAnnounceSetListThen,
26984 ),
26985 {
26986 self.mock(|when, then| {
26987 config_fn(
26988 operations::NetworkingBgpAnnounceSetListWhen::new(when),
26989 operations::NetworkingBgpAnnounceSetListThen::new(then),
26990 )
26991 })
26992 }
26993
26994 fn networking_bgp_announce_set_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
26995 where
26996 F: FnOnce(
26997 operations::NetworkingBgpAnnounceSetUpdateWhen,
26998 operations::NetworkingBgpAnnounceSetUpdateThen,
26999 ),
27000 {
27001 self.mock(|when, then| {
27002 config_fn(
27003 operations::NetworkingBgpAnnounceSetUpdateWhen::new(when),
27004 operations::NetworkingBgpAnnounceSetUpdateThen::new(then),
27005 )
27006 })
27007 }
27008
27009 fn networking_bgp_announce_set_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27010 where
27011 F: FnOnce(
27012 operations::NetworkingBgpAnnounceSetDeleteWhen,
27013 operations::NetworkingBgpAnnounceSetDeleteThen,
27014 ),
27015 {
27016 self.mock(|when, then| {
27017 config_fn(
27018 operations::NetworkingBgpAnnounceSetDeleteWhen::new(when),
27019 operations::NetworkingBgpAnnounceSetDeleteThen::new(then),
27020 )
27021 })
27022 }
27023
27024 fn networking_bgp_announcement_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27025 where
27026 F: FnOnce(
27027 operations::NetworkingBgpAnnouncementListWhen,
27028 operations::NetworkingBgpAnnouncementListThen,
27029 ),
27030 {
27031 self.mock(|when, then| {
27032 config_fn(
27033 operations::NetworkingBgpAnnouncementListWhen::new(when),
27034 operations::NetworkingBgpAnnouncementListThen::new(then),
27035 )
27036 })
27037 }
27038
27039 fn networking_bgp_exported<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27040 where
27041 F: FnOnce(operations::NetworkingBgpExportedWhen, operations::NetworkingBgpExportedThen),
27042 {
27043 self.mock(|when, then| {
27044 config_fn(
27045 operations::NetworkingBgpExportedWhen::new(when),
27046 operations::NetworkingBgpExportedThen::new(then),
27047 )
27048 })
27049 }
27050
27051 fn networking_bgp_imported<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27052 where
27053 F: FnOnce(operations::NetworkingBgpImportedWhen, operations::NetworkingBgpImportedThen),
27054 {
27055 self.mock(|when, then| {
27056 config_fn(
27057 operations::NetworkingBgpImportedWhen::new(when),
27058 operations::NetworkingBgpImportedThen::new(then),
27059 )
27060 })
27061 }
27062
27063 fn networking_bgp_message_history<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27064 where
27065 F: FnOnce(
27066 operations::NetworkingBgpMessageHistoryWhen,
27067 operations::NetworkingBgpMessageHistoryThen,
27068 ),
27069 {
27070 self.mock(|when, then| {
27071 config_fn(
27072 operations::NetworkingBgpMessageHistoryWhen::new(when),
27073 operations::NetworkingBgpMessageHistoryThen::new(then),
27074 )
27075 })
27076 }
27077
27078 fn networking_bgp_status<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27079 where
27080 F: FnOnce(operations::NetworkingBgpStatusWhen, operations::NetworkingBgpStatusThen),
27081 {
27082 self.mock(|when, then| {
27083 config_fn(
27084 operations::NetworkingBgpStatusWhen::new(when),
27085 operations::NetworkingBgpStatusThen::new(then),
27086 )
27087 })
27088 }
27089
27090 fn networking_inbound_icmp_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27091 where
27092 F: FnOnce(
27093 operations::NetworkingInboundIcmpViewWhen,
27094 operations::NetworkingInboundIcmpViewThen,
27095 ),
27096 {
27097 self.mock(|when, then| {
27098 config_fn(
27099 operations::NetworkingInboundIcmpViewWhen::new(when),
27100 operations::NetworkingInboundIcmpViewThen::new(then),
27101 )
27102 })
27103 }
27104
27105 fn networking_inbound_icmp_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27106 where
27107 F: FnOnce(
27108 operations::NetworkingInboundIcmpUpdateWhen,
27109 operations::NetworkingInboundIcmpUpdateThen,
27110 ),
27111 {
27112 self.mock(|when, then| {
27113 config_fn(
27114 operations::NetworkingInboundIcmpUpdateWhen::new(when),
27115 operations::NetworkingInboundIcmpUpdateThen::new(then),
27116 )
27117 })
27118 }
27119
27120 fn networking_loopback_address_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27121 where
27122 F: FnOnce(
27123 operations::NetworkingLoopbackAddressListWhen,
27124 operations::NetworkingLoopbackAddressListThen,
27125 ),
27126 {
27127 self.mock(|when, then| {
27128 config_fn(
27129 operations::NetworkingLoopbackAddressListWhen::new(when),
27130 operations::NetworkingLoopbackAddressListThen::new(then),
27131 )
27132 })
27133 }
27134
27135 fn networking_loopback_address_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27136 where
27137 F: FnOnce(
27138 operations::NetworkingLoopbackAddressCreateWhen,
27139 operations::NetworkingLoopbackAddressCreateThen,
27140 ),
27141 {
27142 self.mock(|when, then| {
27143 config_fn(
27144 operations::NetworkingLoopbackAddressCreateWhen::new(when),
27145 operations::NetworkingLoopbackAddressCreateThen::new(then),
27146 )
27147 })
27148 }
27149
27150 fn networking_loopback_address_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27151 where
27152 F: FnOnce(
27153 operations::NetworkingLoopbackAddressDeleteWhen,
27154 operations::NetworkingLoopbackAddressDeleteThen,
27155 ),
27156 {
27157 self.mock(|when, then| {
27158 config_fn(
27159 operations::NetworkingLoopbackAddressDeleteWhen::new(when),
27160 operations::NetworkingLoopbackAddressDeleteThen::new(then),
27161 )
27162 })
27163 }
27164
27165 fn networking_switch_port_settings_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27166 where
27167 F: FnOnce(
27168 operations::NetworkingSwitchPortSettingsListWhen,
27169 operations::NetworkingSwitchPortSettingsListThen,
27170 ),
27171 {
27172 self.mock(|when, then| {
27173 config_fn(
27174 operations::NetworkingSwitchPortSettingsListWhen::new(when),
27175 operations::NetworkingSwitchPortSettingsListThen::new(then),
27176 )
27177 })
27178 }
27179
27180 fn networking_switch_port_settings_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27181 where
27182 F: FnOnce(
27183 operations::NetworkingSwitchPortSettingsCreateWhen,
27184 operations::NetworkingSwitchPortSettingsCreateThen,
27185 ),
27186 {
27187 self.mock(|when, then| {
27188 config_fn(
27189 operations::NetworkingSwitchPortSettingsCreateWhen::new(when),
27190 operations::NetworkingSwitchPortSettingsCreateThen::new(then),
27191 )
27192 })
27193 }
27194
27195 fn networking_switch_port_settings_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27196 where
27197 F: FnOnce(
27198 operations::NetworkingSwitchPortSettingsDeleteWhen,
27199 operations::NetworkingSwitchPortSettingsDeleteThen,
27200 ),
27201 {
27202 self.mock(|when, then| {
27203 config_fn(
27204 operations::NetworkingSwitchPortSettingsDeleteWhen::new(when),
27205 operations::NetworkingSwitchPortSettingsDeleteThen::new(then),
27206 )
27207 })
27208 }
27209
27210 fn networking_switch_port_settings_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27211 where
27212 F: FnOnce(
27213 operations::NetworkingSwitchPortSettingsViewWhen,
27214 operations::NetworkingSwitchPortSettingsViewThen,
27215 ),
27216 {
27217 self.mock(|when, then| {
27218 config_fn(
27219 operations::NetworkingSwitchPortSettingsViewWhen::new(when),
27220 operations::NetworkingSwitchPortSettingsViewThen::new(then),
27221 )
27222 })
27223 }
27224
27225 fn system_policy_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27226 where
27227 F: FnOnce(operations::SystemPolicyViewWhen, operations::SystemPolicyViewThen),
27228 {
27229 self.mock(|when, then| {
27230 config_fn(
27231 operations::SystemPolicyViewWhen::new(when),
27232 operations::SystemPolicyViewThen::new(then),
27233 )
27234 })
27235 }
27236
27237 fn system_policy_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27238 where
27239 F: FnOnce(operations::SystemPolicyUpdateWhen, operations::SystemPolicyUpdateThen),
27240 {
27241 self.mock(|when, then| {
27242 config_fn(
27243 operations::SystemPolicyUpdateWhen::new(when),
27244 operations::SystemPolicyUpdateThen::new(then),
27245 )
27246 })
27247 }
27248
27249 fn scim_token_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27250 where
27251 F: FnOnce(operations::ScimTokenListWhen, operations::ScimTokenListThen),
27252 {
27253 self.mock(|when, then| {
27254 config_fn(
27255 operations::ScimTokenListWhen::new(when),
27256 operations::ScimTokenListThen::new(then),
27257 )
27258 })
27259 }
27260
27261 fn scim_token_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27262 where
27263 F: FnOnce(operations::ScimTokenCreateWhen, operations::ScimTokenCreateThen),
27264 {
27265 self.mock(|when, then| {
27266 config_fn(
27267 operations::ScimTokenCreateWhen::new(when),
27268 operations::ScimTokenCreateThen::new(then),
27269 )
27270 })
27271 }
27272
27273 fn scim_token_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27274 where
27275 F: FnOnce(operations::ScimTokenViewWhen, operations::ScimTokenViewThen),
27276 {
27277 self.mock(|when, then| {
27278 config_fn(
27279 operations::ScimTokenViewWhen::new(when),
27280 operations::ScimTokenViewThen::new(then),
27281 )
27282 })
27283 }
27284
27285 fn scim_token_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27286 where
27287 F: FnOnce(operations::ScimTokenDeleteWhen, operations::ScimTokenDeleteThen),
27288 {
27289 self.mock(|when, then| {
27290 config_fn(
27291 operations::ScimTokenDeleteWhen::new(when),
27292 operations::ScimTokenDeleteThen::new(then),
27293 )
27294 })
27295 }
27296
27297 fn system_quotas_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27298 where
27299 F: FnOnce(operations::SystemQuotasListWhen, operations::SystemQuotasListThen),
27300 {
27301 self.mock(|when, then| {
27302 config_fn(
27303 operations::SystemQuotasListWhen::new(when),
27304 operations::SystemQuotasListThen::new(then),
27305 )
27306 })
27307 }
27308
27309 fn silo_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27310 where
27311 F: FnOnce(operations::SiloListWhen, operations::SiloListThen),
27312 {
27313 self.mock(|when, then| {
27314 config_fn(
27315 operations::SiloListWhen::new(when),
27316 operations::SiloListThen::new(then),
27317 )
27318 })
27319 }
27320
27321 fn silo_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27322 where
27323 F: FnOnce(operations::SiloCreateWhen, operations::SiloCreateThen),
27324 {
27325 self.mock(|when, then| {
27326 config_fn(
27327 operations::SiloCreateWhen::new(when),
27328 operations::SiloCreateThen::new(then),
27329 )
27330 })
27331 }
27332
27333 fn silo_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27334 where
27335 F: FnOnce(operations::SiloViewWhen, operations::SiloViewThen),
27336 {
27337 self.mock(|when, then| {
27338 config_fn(
27339 operations::SiloViewWhen::new(when),
27340 operations::SiloViewThen::new(then),
27341 )
27342 })
27343 }
27344
27345 fn silo_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27346 where
27347 F: FnOnce(operations::SiloDeleteWhen, operations::SiloDeleteThen),
27348 {
27349 self.mock(|when, then| {
27350 config_fn(
27351 operations::SiloDeleteWhen::new(when),
27352 operations::SiloDeleteThen::new(then),
27353 )
27354 })
27355 }
27356
27357 fn silo_ip_pool_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27358 where
27359 F: FnOnce(operations::SiloIpPoolListWhen, operations::SiloIpPoolListThen),
27360 {
27361 self.mock(|when, then| {
27362 config_fn(
27363 operations::SiloIpPoolListWhen::new(when),
27364 operations::SiloIpPoolListThen::new(then),
27365 )
27366 })
27367 }
27368
27369 fn silo_policy_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27370 where
27371 F: FnOnce(operations::SiloPolicyViewWhen, operations::SiloPolicyViewThen),
27372 {
27373 self.mock(|when, then| {
27374 config_fn(
27375 operations::SiloPolicyViewWhen::new(when),
27376 operations::SiloPolicyViewThen::new(then),
27377 )
27378 })
27379 }
27380
27381 fn silo_policy_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27382 where
27383 F: FnOnce(operations::SiloPolicyUpdateWhen, operations::SiloPolicyUpdateThen),
27384 {
27385 self.mock(|when, then| {
27386 config_fn(
27387 operations::SiloPolicyUpdateWhen::new(when),
27388 operations::SiloPolicyUpdateThen::new(then),
27389 )
27390 })
27391 }
27392
27393 fn silo_quotas_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27394 where
27395 F: FnOnce(operations::SiloQuotasViewWhen, operations::SiloQuotasViewThen),
27396 {
27397 self.mock(|when, then| {
27398 config_fn(
27399 operations::SiloQuotasViewWhen::new(when),
27400 operations::SiloQuotasViewThen::new(then),
27401 )
27402 })
27403 }
27404
27405 fn silo_quotas_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27406 where
27407 F: FnOnce(operations::SiloQuotasUpdateWhen, operations::SiloQuotasUpdateThen),
27408 {
27409 self.mock(|when, then| {
27410 config_fn(
27411 operations::SiloQuotasUpdateWhen::new(when),
27412 operations::SiloQuotasUpdateThen::new(then),
27413 )
27414 })
27415 }
27416
27417 fn silo_subnet_pool_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27418 where
27419 F: FnOnce(operations::SiloSubnetPoolListWhen, operations::SiloSubnetPoolListThen),
27420 {
27421 self.mock(|when, then| {
27422 config_fn(
27423 operations::SiloSubnetPoolListWhen::new(when),
27424 operations::SiloSubnetPoolListThen::new(then),
27425 )
27426 })
27427 }
27428
27429 fn system_subnet_pool_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27430 where
27431 F: FnOnce(operations::SystemSubnetPoolListWhen, operations::SystemSubnetPoolListThen),
27432 {
27433 self.mock(|when, then| {
27434 config_fn(
27435 operations::SystemSubnetPoolListWhen::new(when),
27436 operations::SystemSubnetPoolListThen::new(then),
27437 )
27438 })
27439 }
27440
27441 fn system_subnet_pool_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27442 where
27443 F: FnOnce(operations::SystemSubnetPoolCreateWhen, operations::SystemSubnetPoolCreateThen),
27444 {
27445 self.mock(|when, then| {
27446 config_fn(
27447 operations::SystemSubnetPoolCreateWhen::new(when),
27448 operations::SystemSubnetPoolCreateThen::new(then),
27449 )
27450 })
27451 }
27452
27453 fn system_subnet_pool_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27454 where
27455 F: FnOnce(operations::SystemSubnetPoolViewWhen, operations::SystemSubnetPoolViewThen),
27456 {
27457 self.mock(|when, then| {
27458 config_fn(
27459 operations::SystemSubnetPoolViewWhen::new(when),
27460 operations::SystemSubnetPoolViewThen::new(then),
27461 )
27462 })
27463 }
27464
27465 fn system_subnet_pool_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27466 where
27467 F: FnOnce(operations::SystemSubnetPoolUpdateWhen, operations::SystemSubnetPoolUpdateThen),
27468 {
27469 self.mock(|when, then| {
27470 config_fn(
27471 operations::SystemSubnetPoolUpdateWhen::new(when),
27472 operations::SystemSubnetPoolUpdateThen::new(then),
27473 )
27474 })
27475 }
27476
27477 fn system_subnet_pool_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27478 where
27479 F: FnOnce(operations::SystemSubnetPoolDeleteWhen, operations::SystemSubnetPoolDeleteThen),
27480 {
27481 self.mock(|when, then| {
27482 config_fn(
27483 operations::SystemSubnetPoolDeleteWhen::new(when),
27484 operations::SystemSubnetPoolDeleteThen::new(then),
27485 )
27486 })
27487 }
27488
27489 fn system_subnet_pool_member_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27490 where
27491 F: FnOnce(
27492 operations::SystemSubnetPoolMemberListWhen,
27493 operations::SystemSubnetPoolMemberListThen,
27494 ),
27495 {
27496 self.mock(|when, then| {
27497 config_fn(
27498 operations::SystemSubnetPoolMemberListWhen::new(when),
27499 operations::SystemSubnetPoolMemberListThen::new(then),
27500 )
27501 })
27502 }
27503
27504 fn system_subnet_pool_member_add<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27505 where
27506 F: FnOnce(
27507 operations::SystemSubnetPoolMemberAddWhen,
27508 operations::SystemSubnetPoolMemberAddThen,
27509 ),
27510 {
27511 self.mock(|when, then| {
27512 config_fn(
27513 operations::SystemSubnetPoolMemberAddWhen::new(when),
27514 operations::SystemSubnetPoolMemberAddThen::new(then),
27515 )
27516 })
27517 }
27518
27519 fn system_subnet_pool_member_remove<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27520 where
27521 F: FnOnce(
27522 operations::SystemSubnetPoolMemberRemoveWhen,
27523 operations::SystemSubnetPoolMemberRemoveThen,
27524 ),
27525 {
27526 self.mock(|when, then| {
27527 config_fn(
27528 operations::SystemSubnetPoolMemberRemoveWhen::new(when),
27529 operations::SystemSubnetPoolMemberRemoveThen::new(then),
27530 )
27531 })
27532 }
27533
27534 fn system_subnet_pool_silo_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27535 where
27536 F: FnOnce(
27537 operations::SystemSubnetPoolSiloListWhen,
27538 operations::SystemSubnetPoolSiloListThen,
27539 ),
27540 {
27541 self.mock(|when, then| {
27542 config_fn(
27543 operations::SystemSubnetPoolSiloListWhen::new(when),
27544 operations::SystemSubnetPoolSiloListThen::new(then),
27545 )
27546 })
27547 }
27548
27549 fn system_subnet_pool_silo_link<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27550 where
27551 F: FnOnce(
27552 operations::SystemSubnetPoolSiloLinkWhen,
27553 operations::SystemSubnetPoolSiloLinkThen,
27554 ),
27555 {
27556 self.mock(|when, then| {
27557 config_fn(
27558 operations::SystemSubnetPoolSiloLinkWhen::new(when),
27559 operations::SystemSubnetPoolSiloLinkThen::new(then),
27560 )
27561 })
27562 }
27563
27564 fn system_subnet_pool_silo_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27565 where
27566 F: FnOnce(
27567 operations::SystemSubnetPoolSiloUpdateWhen,
27568 operations::SystemSubnetPoolSiloUpdateThen,
27569 ),
27570 {
27571 self.mock(|when, then| {
27572 config_fn(
27573 operations::SystemSubnetPoolSiloUpdateWhen::new(when),
27574 operations::SystemSubnetPoolSiloUpdateThen::new(then),
27575 )
27576 })
27577 }
27578
27579 fn system_subnet_pool_silo_unlink<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27580 where
27581 F: FnOnce(
27582 operations::SystemSubnetPoolSiloUnlinkWhen,
27583 operations::SystemSubnetPoolSiloUnlinkThen,
27584 ),
27585 {
27586 self.mock(|when, then| {
27587 config_fn(
27588 operations::SystemSubnetPoolSiloUnlinkWhen::new(when),
27589 operations::SystemSubnetPoolSiloUnlinkThen::new(then),
27590 )
27591 })
27592 }
27593
27594 fn system_subnet_pool_utilization_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27595 where
27596 F: FnOnce(
27597 operations::SystemSubnetPoolUtilizationViewWhen,
27598 operations::SystemSubnetPoolUtilizationViewThen,
27599 ),
27600 {
27601 self.mock(|when, then| {
27602 config_fn(
27603 operations::SystemSubnetPoolUtilizationViewWhen::new(when),
27604 operations::SystemSubnetPoolUtilizationViewThen::new(then),
27605 )
27606 })
27607 }
27608
27609 fn system_timeseries_query<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27610 where
27611 F: FnOnce(operations::SystemTimeseriesQueryWhen, operations::SystemTimeseriesQueryThen),
27612 {
27613 self.mock(|when, then| {
27614 config_fn(
27615 operations::SystemTimeseriesQueryWhen::new(when),
27616 operations::SystemTimeseriesQueryThen::new(then),
27617 )
27618 })
27619 }
27620
27621 fn system_timeseries_schema_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27622 where
27623 F: FnOnce(
27624 operations::SystemTimeseriesSchemaListWhen,
27625 operations::SystemTimeseriesSchemaListThen,
27626 ),
27627 {
27628 self.mock(|when, then| {
27629 config_fn(
27630 operations::SystemTimeseriesSchemaListWhen::new(when),
27631 operations::SystemTimeseriesSchemaListThen::new(then),
27632 )
27633 })
27634 }
27635
27636 fn system_update_repository_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27637 where
27638 F: FnOnce(
27639 operations::SystemUpdateRepositoryListWhen,
27640 operations::SystemUpdateRepositoryListThen,
27641 ),
27642 {
27643 self.mock(|when, then| {
27644 config_fn(
27645 operations::SystemUpdateRepositoryListWhen::new(when),
27646 operations::SystemUpdateRepositoryListThen::new(then),
27647 )
27648 })
27649 }
27650
27651 fn system_update_repository_upload<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27652 where
27653 F: FnOnce(
27654 operations::SystemUpdateRepositoryUploadWhen,
27655 operations::SystemUpdateRepositoryUploadThen,
27656 ),
27657 {
27658 self.mock(|when, then| {
27659 config_fn(
27660 operations::SystemUpdateRepositoryUploadWhen::new(when),
27661 operations::SystemUpdateRepositoryUploadThen::new(then),
27662 )
27663 })
27664 }
27665
27666 fn system_update_repository_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27667 where
27668 F: FnOnce(
27669 operations::SystemUpdateRepositoryViewWhen,
27670 operations::SystemUpdateRepositoryViewThen,
27671 ),
27672 {
27673 self.mock(|when, then| {
27674 config_fn(
27675 operations::SystemUpdateRepositoryViewWhen::new(when),
27676 operations::SystemUpdateRepositoryViewThen::new(then),
27677 )
27678 })
27679 }
27680
27681 fn system_update_status<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27682 where
27683 F: FnOnce(operations::SystemUpdateStatusWhen, operations::SystemUpdateStatusThen),
27684 {
27685 self.mock(|when, then| {
27686 config_fn(
27687 operations::SystemUpdateStatusWhen::new(when),
27688 operations::SystemUpdateStatusThen::new(then),
27689 )
27690 })
27691 }
27692
27693 fn target_release_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27694 where
27695 F: FnOnce(operations::TargetReleaseUpdateWhen, operations::TargetReleaseUpdateThen),
27696 {
27697 self.mock(|when, then| {
27698 config_fn(
27699 operations::TargetReleaseUpdateWhen::new(when),
27700 operations::TargetReleaseUpdateThen::new(then),
27701 )
27702 })
27703 }
27704
27705 fn system_update_trust_root_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27706 where
27707 F: FnOnce(
27708 operations::SystemUpdateTrustRootListWhen,
27709 operations::SystemUpdateTrustRootListThen,
27710 ),
27711 {
27712 self.mock(|when, then| {
27713 config_fn(
27714 operations::SystemUpdateTrustRootListWhen::new(when),
27715 operations::SystemUpdateTrustRootListThen::new(then),
27716 )
27717 })
27718 }
27719
27720 fn system_update_trust_root_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27721 where
27722 F: FnOnce(
27723 operations::SystemUpdateTrustRootCreateWhen,
27724 operations::SystemUpdateTrustRootCreateThen,
27725 ),
27726 {
27727 self.mock(|when, then| {
27728 config_fn(
27729 operations::SystemUpdateTrustRootCreateWhen::new(when),
27730 operations::SystemUpdateTrustRootCreateThen::new(then),
27731 )
27732 })
27733 }
27734
27735 fn system_update_trust_root_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27736 where
27737 F: FnOnce(
27738 operations::SystemUpdateTrustRootViewWhen,
27739 operations::SystemUpdateTrustRootViewThen,
27740 ),
27741 {
27742 self.mock(|when, then| {
27743 config_fn(
27744 operations::SystemUpdateTrustRootViewWhen::new(when),
27745 operations::SystemUpdateTrustRootViewThen::new(then),
27746 )
27747 })
27748 }
27749
27750 fn system_update_trust_root_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27751 where
27752 F: FnOnce(
27753 operations::SystemUpdateTrustRootDeleteWhen,
27754 operations::SystemUpdateTrustRootDeleteThen,
27755 ),
27756 {
27757 self.mock(|when, then| {
27758 config_fn(
27759 operations::SystemUpdateTrustRootDeleteWhen::new(when),
27760 operations::SystemUpdateTrustRootDeleteThen::new(then),
27761 )
27762 })
27763 }
27764
27765 fn silo_user_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27766 where
27767 F: FnOnce(operations::SiloUserListWhen, operations::SiloUserListThen),
27768 {
27769 self.mock(|when, then| {
27770 config_fn(
27771 operations::SiloUserListWhen::new(when),
27772 operations::SiloUserListThen::new(then),
27773 )
27774 })
27775 }
27776
27777 fn silo_user_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27778 where
27779 F: FnOnce(operations::SiloUserViewWhen, operations::SiloUserViewThen),
27780 {
27781 self.mock(|when, then| {
27782 config_fn(
27783 operations::SiloUserViewWhen::new(when),
27784 operations::SiloUserViewThen::new(then),
27785 )
27786 })
27787 }
27788
27789 fn user_builtin_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27790 where
27791 F: FnOnce(operations::UserBuiltinListWhen, operations::UserBuiltinListThen),
27792 {
27793 self.mock(|when, then| {
27794 config_fn(
27795 operations::UserBuiltinListWhen::new(when),
27796 operations::UserBuiltinListThen::new(then),
27797 )
27798 })
27799 }
27800
27801 fn user_builtin_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27802 where
27803 F: FnOnce(operations::UserBuiltinViewWhen, operations::UserBuiltinViewThen),
27804 {
27805 self.mock(|when, then| {
27806 config_fn(
27807 operations::UserBuiltinViewWhen::new(when),
27808 operations::UserBuiltinViewThen::new(then),
27809 )
27810 })
27811 }
27812
27813 fn silo_utilization_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27814 where
27815 F: FnOnce(operations::SiloUtilizationListWhen, operations::SiloUtilizationListThen),
27816 {
27817 self.mock(|when, then| {
27818 config_fn(
27819 operations::SiloUtilizationListWhen::new(when),
27820 operations::SiloUtilizationListThen::new(then),
27821 )
27822 })
27823 }
27824
27825 fn silo_utilization_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27826 where
27827 F: FnOnce(operations::SiloUtilizationViewWhen, operations::SiloUtilizationViewThen),
27828 {
27829 self.mock(|when, then| {
27830 config_fn(
27831 operations::SiloUtilizationViewWhen::new(when),
27832 operations::SiloUtilizationViewThen::new(then),
27833 )
27834 })
27835 }
27836
27837 fn timeseries_query<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27838 where
27839 F: FnOnce(operations::TimeseriesQueryWhen, operations::TimeseriesQueryThen),
27840 {
27841 self.mock(|when, then| {
27842 config_fn(
27843 operations::TimeseriesQueryWhen::new(when),
27844 operations::TimeseriesQueryThen::new(then),
27845 )
27846 })
27847 }
27848
27849 fn user_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27850 where
27851 F: FnOnce(operations::UserListWhen, operations::UserListThen),
27852 {
27853 self.mock(|when, then| {
27854 config_fn(
27855 operations::UserListWhen::new(when),
27856 operations::UserListThen::new(then),
27857 )
27858 })
27859 }
27860
27861 fn user_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27862 where
27863 F: FnOnce(operations::UserViewWhen, operations::UserViewThen),
27864 {
27865 self.mock(|when, then| {
27866 config_fn(
27867 operations::UserViewWhen::new(when),
27868 operations::UserViewThen::new(then),
27869 )
27870 })
27871 }
27872
27873 fn user_token_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27874 where
27875 F: FnOnce(operations::UserTokenListWhen, operations::UserTokenListThen),
27876 {
27877 self.mock(|when, then| {
27878 config_fn(
27879 operations::UserTokenListWhen::new(when),
27880 operations::UserTokenListThen::new(then),
27881 )
27882 })
27883 }
27884
27885 fn user_logout<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27886 where
27887 F: FnOnce(operations::UserLogoutWhen, operations::UserLogoutThen),
27888 {
27889 self.mock(|when, then| {
27890 config_fn(
27891 operations::UserLogoutWhen::new(when),
27892 operations::UserLogoutThen::new(then),
27893 )
27894 })
27895 }
27896
27897 fn user_session_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27898 where
27899 F: FnOnce(operations::UserSessionListWhen, operations::UserSessionListThen),
27900 {
27901 self.mock(|when, then| {
27902 config_fn(
27903 operations::UserSessionListWhen::new(when),
27904 operations::UserSessionListThen::new(then),
27905 )
27906 })
27907 }
27908
27909 fn utilization_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27910 where
27911 F: FnOnce(operations::UtilizationViewWhen, operations::UtilizationViewThen),
27912 {
27913 self.mock(|when, then| {
27914 config_fn(
27915 operations::UtilizationViewWhen::new(when),
27916 operations::UtilizationViewThen::new(then),
27917 )
27918 })
27919 }
27920
27921 fn vpc_firewall_rules_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27922 where
27923 F: FnOnce(operations::VpcFirewallRulesViewWhen, operations::VpcFirewallRulesViewThen),
27924 {
27925 self.mock(|when, then| {
27926 config_fn(
27927 operations::VpcFirewallRulesViewWhen::new(when),
27928 operations::VpcFirewallRulesViewThen::new(then),
27929 )
27930 })
27931 }
27932
27933 fn vpc_firewall_rules_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27934 where
27935 F: FnOnce(operations::VpcFirewallRulesUpdateWhen, operations::VpcFirewallRulesUpdateThen),
27936 {
27937 self.mock(|when, then| {
27938 config_fn(
27939 operations::VpcFirewallRulesUpdateWhen::new(when),
27940 operations::VpcFirewallRulesUpdateThen::new(then),
27941 )
27942 })
27943 }
27944
27945 fn vpc_router_route_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27946 where
27947 F: FnOnce(operations::VpcRouterRouteListWhen, operations::VpcRouterRouteListThen),
27948 {
27949 self.mock(|when, then| {
27950 config_fn(
27951 operations::VpcRouterRouteListWhen::new(when),
27952 operations::VpcRouterRouteListThen::new(then),
27953 )
27954 })
27955 }
27956
27957 fn vpc_router_route_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27958 where
27959 F: FnOnce(operations::VpcRouterRouteCreateWhen, operations::VpcRouterRouteCreateThen),
27960 {
27961 self.mock(|when, then| {
27962 config_fn(
27963 operations::VpcRouterRouteCreateWhen::new(when),
27964 operations::VpcRouterRouteCreateThen::new(then),
27965 )
27966 })
27967 }
27968
27969 fn vpc_router_route_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27970 where
27971 F: FnOnce(operations::VpcRouterRouteViewWhen, operations::VpcRouterRouteViewThen),
27972 {
27973 self.mock(|when, then| {
27974 config_fn(
27975 operations::VpcRouterRouteViewWhen::new(when),
27976 operations::VpcRouterRouteViewThen::new(then),
27977 )
27978 })
27979 }
27980
27981 fn vpc_router_route_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27982 where
27983 F: FnOnce(operations::VpcRouterRouteUpdateWhen, operations::VpcRouterRouteUpdateThen),
27984 {
27985 self.mock(|when, then| {
27986 config_fn(
27987 operations::VpcRouterRouteUpdateWhen::new(when),
27988 operations::VpcRouterRouteUpdateThen::new(then),
27989 )
27990 })
27991 }
27992
27993 fn vpc_router_route_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
27994 where
27995 F: FnOnce(operations::VpcRouterRouteDeleteWhen, operations::VpcRouterRouteDeleteThen),
27996 {
27997 self.mock(|when, then| {
27998 config_fn(
27999 operations::VpcRouterRouteDeleteWhen::new(when),
28000 operations::VpcRouterRouteDeleteThen::new(then),
28001 )
28002 })
28003 }
28004
28005 fn vpc_router_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
28006 where
28007 F: FnOnce(operations::VpcRouterListWhen, operations::VpcRouterListThen),
28008 {
28009 self.mock(|when, then| {
28010 config_fn(
28011 operations::VpcRouterListWhen::new(when),
28012 operations::VpcRouterListThen::new(then),
28013 )
28014 })
28015 }
28016
28017 fn vpc_router_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
28018 where
28019 F: FnOnce(operations::VpcRouterCreateWhen, operations::VpcRouterCreateThen),
28020 {
28021 self.mock(|when, then| {
28022 config_fn(
28023 operations::VpcRouterCreateWhen::new(when),
28024 operations::VpcRouterCreateThen::new(then),
28025 )
28026 })
28027 }
28028
28029 fn vpc_router_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
28030 where
28031 F: FnOnce(operations::VpcRouterViewWhen, operations::VpcRouterViewThen),
28032 {
28033 self.mock(|when, then| {
28034 config_fn(
28035 operations::VpcRouterViewWhen::new(when),
28036 operations::VpcRouterViewThen::new(then),
28037 )
28038 })
28039 }
28040
28041 fn vpc_router_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
28042 where
28043 F: FnOnce(operations::VpcRouterUpdateWhen, operations::VpcRouterUpdateThen),
28044 {
28045 self.mock(|when, then| {
28046 config_fn(
28047 operations::VpcRouterUpdateWhen::new(when),
28048 operations::VpcRouterUpdateThen::new(then),
28049 )
28050 })
28051 }
28052
28053 fn vpc_router_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
28054 where
28055 F: FnOnce(operations::VpcRouterDeleteWhen, operations::VpcRouterDeleteThen),
28056 {
28057 self.mock(|when, then| {
28058 config_fn(
28059 operations::VpcRouterDeleteWhen::new(when),
28060 operations::VpcRouterDeleteThen::new(then),
28061 )
28062 })
28063 }
28064
28065 fn vpc_subnet_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
28066 where
28067 F: FnOnce(operations::VpcSubnetListWhen, operations::VpcSubnetListThen),
28068 {
28069 self.mock(|when, then| {
28070 config_fn(
28071 operations::VpcSubnetListWhen::new(when),
28072 operations::VpcSubnetListThen::new(then),
28073 )
28074 })
28075 }
28076
28077 fn vpc_subnet_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
28078 where
28079 F: FnOnce(operations::VpcSubnetCreateWhen, operations::VpcSubnetCreateThen),
28080 {
28081 self.mock(|when, then| {
28082 config_fn(
28083 operations::VpcSubnetCreateWhen::new(when),
28084 operations::VpcSubnetCreateThen::new(then),
28085 )
28086 })
28087 }
28088
28089 fn vpc_subnet_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
28090 where
28091 F: FnOnce(operations::VpcSubnetViewWhen, operations::VpcSubnetViewThen),
28092 {
28093 self.mock(|when, then| {
28094 config_fn(
28095 operations::VpcSubnetViewWhen::new(when),
28096 operations::VpcSubnetViewThen::new(then),
28097 )
28098 })
28099 }
28100
28101 fn vpc_subnet_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
28102 where
28103 F: FnOnce(operations::VpcSubnetUpdateWhen, operations::VpcSubnetUpdateThen),
28104 {
28105 self.mock(|when, then| {
28106 config_fn(
28107 operations::VpcSubnetUpdateWhen::new(when),
28108 operations::VpcSubnetUpdateThen::new(then),
28109 )
28110 })
28111 }
28112
28113 fn vpc_subnet_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
28114 where
28115 F: FnOnce(operations::VpcSubnetDeleteWhen, operations::VpcSubnetDeleteThen),
28116 {
28117 self.mock(|when, then| {
28118 config_fn(
28119 operations::VpcSubnetDeleteWhen::new(when),
28120 operations::VpcSubnetDeleteThen::new(then),
28121 )
28122 })
28123 }
28124
28125 fn vpc_subnet_list_network_interfaces<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
28126 where
28127 F: FnOnce(
28128 operations::VpcSubnetListNetworkInterfacesWhen,
28129 operations::VpcSubnetListNetworkInterfacesThen,
28130 ),
28131 {
28132 self.mock(|when, then| {
28133 config_fn(
28134 operations::VpcSubnetListNetworkInterfacesWhen::new(when),
28135 operations::VpcSubnetListNetworkInterfacesThen::new(then),
28136 )
28137 })
28138 }
28139
28140 fn vpc_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
28141 where
28142 F: FnOnce(operations::VpcListWhen, operations::VpcListThen),
28143 {
28144 self.mock(|when, then| {
28145 config_fn(
28146 operations::VpcListWhen::new(when),
28147 operations::VpcListThen::new(then),
28148 )
28149 })
28150 }
28151
28152 fn vpc_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
28153 where
28154 F: FnOnce(operations::VpcCreateWhen, operations::VpcCreateThen),
28155 {
28156 self.mock(|when, then| {
28157 config_fn(
28158 operations::VpcCreateWhen::new(when),
28159 operations::VpcCreateThen::new(then),
28160 )
28161 })
28162 }
28163
28164 fn vpc_view<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
28165 where
28166 F: FnOnce(operations::VpcViewWhen, operations::VpcViewThen),
28167 {
28168 self.mock(|when, then| {
28169 config_fn(
28170 operations::VpcViewWhen::new(when),
28171 operations::VpcViewThen::new(then),
28172 )
28173 })
28174 }
28175
28176 fn vpc_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
28177 where
28178 F: FnOnce(operations::VpcUpdateWhen, operations::VpcUpdateThen),
28179 {
28180 self.mock(|when, then| {
28181 config_fn(
28182 operations::VpcUpdateWhen::new(when),
28183 operations::VpcUpdateThen::new(then),
28184 )
28185 })
28186 }
28187
28188 fn vpc_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
28189 where
28190 F: FnOnce(operations::VpcDeleteWhen, operations::VpcDeleteThen),
28191 {
28192 self.mock(|when, then| {
28193 config_fn(
28194 operations::VpcDeleteWhen::new(when),
28195 operations::VpcDeleteThen::new(then),
28196 )
28197 })
28198 }
28199
28200 fn webhook_receiver_create<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
28201 where
28202 F: FnOnce(operations::WebhookReceiverCreateWhen, operations::WebhookReceiverCreateThen),
28203 {
28204 self.mock(|when, then| {
28205 config_fn(
28206 operations::WebhookReceiverCreateWhen::new(when),
28207 operations::WebhookReceiverCreateThen::new(then),
28208 )
28209 })
28210 }
28211
28212 fn webhook_receiver_update<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
28213 where
28214 F: FnOnce(operations::WebhookReceiverUpdateWhen, operations::WebhookReceiverUpdateThen),
28215 {
28216 self.mock(|when, then| {
28217 config_fn(
28218 operations::WebhookReceiverUpdateWhen::new(when),
28219 operations::WebhookReceiverUpdateThen::new(then),
28220 )
28221 })
28222 }
28223
28224 fn webhook_secrets_list<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
28225 where
28226 F: FnOnce(operations::WebhookSecretsListWhen, operations::WebhookSecretsListThen),
28227 {
28228 self.mock(|when, then| {
28229 config_fn(
28230 operations::WebhookSecretsListWhen::new(when),
28231 operations::WebhookSecretsListThen::new(then),
28232 )
28233 })
28234 }
28235
28236 fn webhook_secrets_add<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
28237 where
28238 F: FnOnce(operations::WebhookSecretsAddWhen, operations::WebhookSecretsAddThen),
28239 {
28240 self.mock(|when, then| {
28241 config_fn(
28242 operations::WebhookSecretsAddWhen::new(when),
28243 operations::WebhookSecretsAddThen::new(then),
28244 )
28245 })
28246 }
28247
28248 fn webhook_secrets_delete<F>(&self, config_fn: F) -> ::httpmock::Mock<'_>
28249 where
28250 F: FnOnce(operations::WebhookSecretsDeleteWhen, operations::WebhookSecretsDeleteThen),
28251 {
28252 self.mock(|when, then| {
28253 config_fn(
28254 operations::WebhookSecretsDeleteWhen::new(when),
28255 operations::WebhookSecretsDeleteThen::new(then),
28256 )
28257 })
28258 }
28259}