1#![allow(non_camel_case_types)]
4#![allow(unused_imports)]
5use serde::de::{value, Deserializer, IntoDeserializer};
6use serde::{Deserialize, Serialize, Serializer};
7use std::str::FromStr;
8#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
9pub struct AggregatedDataForResultTrend {
10 #[doc = "This is tests execution duration."]
11 #[serde(default, skip_serializing_if = "Option::is_none")]
12 pub duration: Option<String>,
13 #[serde(
14 rename = "resultsByOutcome",
15 default,
16 skip_serializing_if = "Option::is_none"
17 )]
18 pub results_by_outcome: Option<serde_json::Value>,
19 #[serde(
20 rename = "runSummaryByState",
21 default,
22 skip_serializing_if = "Option::is_none"
23 )]
24 pub run_summary_by_state: Option<serde_json::Value>,
25 #[serde(
26 rename = "testResultsContext",
27 default,
28 skip_serializing_if = "Option::is_none"
29 )]
30 pub test_results_context: Option<TestResultsContext>,
31 #[serde(
32 rename = "totalTests",
33 default,
34 skip_serializing_if = "Option::is_none"
35 )]
36 pub total_tests: Option<i32>,
37}
38impl AggregatedDataForResultTrend {
39 pub fn new() -> Self {
40 Self::default()
41 }
42}
43#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
44pub struct AggregatedDataForResultTrendList {
45 #[serde(default, skip_serializing_if = "Option::is_none")]
46 pub count: Option<i32>,
47 #[serde(
48 default,
49 deserialize_with = "crate::serde::deserialize_null_as_default",
50 skip_serializing_if = "Vec::is_empty"
51 )]
52 pub value: Vec<AggregatedDataForResultTrend>,
53}
54impl AggregatedDataForResultTrendList {
55 pub fn new() -> Self {
56 Self::default()
57 }
58}
59#[doc = "Result deatils for a particular test result outcome."]
60#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
61pub struct AggregatedResultDetailsByOutcome {
62 #[doc = "Number of results for current outcome."]
63 #[serde(default, skip_serializing_if = "Option::is_none")]
64 pub count: Option<i32>,
65 #[doc = "Time taken by results."]
66 #[serde(default, skip_serializing_if = "Option::is_none")]
67 pub duration: Option<String>,
68 #[doc = "Test result outcome"]
69 #[serde(default, skip_serializing_if = "Option::is_none")]
70 pub outcome: Option<aggregated_result_details_by_outcome::Outcome>,
71 #[doc = "Number of results on rerun"]
72 #[serde(
73 rename = "rerunResultCount",
74 default,
75 skip_serializing_if = "Option::is_none"
76 )]
77 pub rerun_result_count: Option<i32>,
78}
79impl AggregatedResultDetailsByOutcome {
80 pub fn new() -> Self {
81 Self::default()
82 }
83}
84pub mod aggregated_result_details_by_outcome {
85 use super::*;
86 #[doc = "Test result outcome"]
87 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
88 pub enum Outcome {
89 #[serde(rename = "unspecified")]
90 Unspecified,
91 #[serde(rename = "none")]
92 None,
93 #[serde(rename = "passed")]
94 Passed,
95 #[serde(rename = "failed")]
96 Failed,
97 #[serde(rename = "inconclusive")]
98 Inconclusive,
99 #[serde(rename = "timeout")]
100 Timeout,
101 #[serde(rename = "aborted")]
102 Aborted,
103 #[serde(rename = "blocked")]
104 Blocked,
105 #[serde(rename = "notExecuted")]
106 NotExecuted,
107 #[serde(rename = "warning")]
108 Warning,
109 #[serde(rename = "error")]
110 Error,
111 #[serde(rename = "notApplicable")]
112 NotApplicable,
113 #[serde(rename = "paused")]
114 Paused,
115 #[serde(rename = "inProgress")]
116 InProgress,
117 #[serde(rename = "notImpacted")]
118 NotImpacted,
119 }
120}
121#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
122pub struct AggregatedResultsAnalysis {
123 #[serde(default, skip_serializing_if = "Option::is_none")]
124 pub duration: Option<String>,
125 #[serde(
126 rename = "notReportedResultsByOutcome",
127 default,
128 skip_serializing_if = "Option::is_none"
129 )]
130 pub not_reported_results_by_outcome: Option<serde_json::Value>,
131 #[serde(
132 rename = "previousContext",
133 default,
134 skip_serializing_if = "Option::is_none"
135 )]
136 pub previous_context: Option<TestResultsContext>,
137 #[serde(
138 rename = "resultsByOutcome",
139 default,
140 skip_serializing_if = "Option::is_none"
141 )]
142 pub results_by_outcome: Option<serde_json::Value>,
143 #[serde(
144 rename = "resultsDifference",
145 default,
146 skip_serializing_if = "Option::is_none"
147 )]
148 pub results_difference: Option<AggregatedResultsDifference>,
149 #[serde(
150 rename = "runSummaryByOutcome",
151 default,
152 skip_serializing_if = "Option::is_none"
153 )]
154 pub run_summary_by_outcome: Option<serde_json::Value>,
155 #[serde(
156 rename = "runSummaryByState",
157 default,
158 skip_serializing_if = "Option::is_none"
159 )]
160 pub run_summary_by_state: Option<serde_json::Value>,
161 #[serde(
162 rename = "totalTests",
163 default,
164 skip_serializing_if = "Option::is_none"
165 )]
166 pub total_tests: Option<i32>,
167}
168impl AggregatedResultsAnalysis {
169 pub fn new() -> Self {
170 Self::default()
171 }
172}
173#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
174pub struct AggregatedResultsByOutcome {
175 #[serde(default, skip_serializing_if = "Option::is_none")]
176 pub count: Option<i32>,
177 #[serde(default, skip_serializing_if = "Option::is_none")]
178 pub duration: Option<String>,
179 #[serde(
180 rename = "groupByField",
181 default,
182 skip_serializing_if = "Option::is_none"
183 )]
184 pub group_by_field: Option<String>,
185 #[serde(
186 rename = "groupByValue",
187 default,
188 skip_serializing_if = "Option::is_none"
189 )]
190 pub group_by_value: Option<serde_json::Value>,
191 #[serde(default, skip_serializing_if = "Option::is_none")]
192 pub outcome: Option<aggregated_results_by_outcome::Outcome>,
193 #[serde(
194 rename = "rerunResultCount",
195 default,
196 skip_serializing_if = "Option::is_none"
197 )]
198 pub rerun_result_count: Option<i32>,
199}
200impl AggregatedResultsByOutcome {
201 pub fn new() -> Self {
202 Self::default()
203 }
204}
205pub mod aggregated_results_by_outcome {
206 use super::*;
207 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
208 pub enum Outcome {
209 #[serde(rename = "unspecified")]
210 Unspecified,
211 #[serde(rename = "none")]
212 None,
213 #[serde(rename = "passed")]
214 Passed,
215 #[serde(rename = "failed")]
216 Failed,
217 #[serde(rename = "inconclusive")]
218 Inconclusive,
219 #[serde(rename = "timeout")]
220 Timeout,
221 #[serde(rename = "aborted")]
222 Aborted,
223 #[serde(rename = "blocked")]
224 Blocked,
225 #[serde(rename = "notExecuted")]
226 NotExecuted,
227 #[serde(rename = "warning")]
228 Warning,
229 #[serde(rename = "error")]
230 Error,
231 #[serde(rename = "notApplicable")]
232 NotApplicable,
233 #[serde(rename = "paused")]
234 Paused,
235 #[serde(rename = "inProgress")]
236 InProgress,
237 #[serde(rename = "notImpacted")]
238 NotImpacted,
239 }
240}
241#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
242pub struct AggregatedResultsDifference {
243 #[serde(
244 rename = "increaseInDuration",
245 default,
246 skip_serializing_if = "Option::is_none"
247 )]
248 pub increase_in_duration: Option<String>,
249 #[serde(
250 rename = "increaseInFailures",
251 default,
252 skip_serializing_if = "Option::is_none"
253 )]
254 pub increase_in_failures: Option<i32>,
255 #[serde(
256 rename = "increaseInNonImpactedTests",
257 default,
258 skip_serializing_if = "Option::is_none"
259 )]
260 pub increase_in_non_impacted_tests: Option<i32>,
261 #[serde(
262 rename = "increaseInOtherTests",
263 default,
264 skip_serializing_if = "Option::is_none"
265 )]
266 pub increase_in_other_tests: Option<i32>,
267 #[serde(
268 rename = "increaseInPassedTests",
269 default,
270 skip_serializing_if = "Option::is_none"
271 )]
272 pub increase_in_passed_tests: Option<i32>,
273 #[serde(
274 rename = "increaseInTotalTests",
275 default,
276 skip_serializing_if = "Option::is_none"
277 )]
278 pub increase_in_total_tests: Option<i32>,
279}
280impl AggregatedResultsDifference {
281 pub fn new() -> Self {
282 Self::default()
283 }
284}
285#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
286pub struct AggregatedRunsByOutcome {
287 #[serde(default, skip_serializing_if = "Option::is_none")]
288 pub outcome: Option<aggregated_runs_by_outcome::Outcome>,
289 #[serde(rename = "runsCount", default, skip_serializing_if = "Option::is_none")]
290 pub runs_count: Option<i32>,
291}
292impl AggregatedRunsByOutcome {
293 pub fn new() -> Self {
294 Self::default()
295 }
296}
297pub mod aggregated_runs_by_outcome {
298 use super::*;
299 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
300 pub enum Outcome {
301 #[serde(rename = "passed")]
302 Passed,
303 #[serde(rename = "failed")]
304 Failed,
305 #[serde(rename = "notImpacted")]
306 NotImpacted,
307 #[serde(rename = "others")]
308 Others,
309 }
310}
311#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
312pub struct AggregatedRunsByState {
313 #[serde(
314 rename = "resultsByOutcome",
315 default,
316 skip_serializing_if = "Option::is_none"
317 )]
318 pub results_by_outcome: Option<serde_json::Value>,
319 #[serde(rename = "runsCount", default, skip_serializing_if = "Option::is_none")]
320 pub runs_count: Option<i32>,
321 #[serde(default, skip_serializing_if = "Option::is_none")]
322 pub state: Option<aggregated_runs_by_state::State>,
323}
324impl AggregatedRunsByState {
325 pub fn new() -> Self {
326 Self::default()
327 }
328}
329pub mod aggregated_runs_by_state {
330 use super::*;
331 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
332 pub enum State {
333 #[serde(rename = "unspecified")]
334 Unspecified,
335 #[serde(rename = "notStarted")]
336 NotStarted,
337 #[serde(rename = "inProgress")]
338 InProgress,
339 #[serde(rename = "completed")]
340 Completed,
341 #[serde(rename = "aborted")]
342 Aborted,
343 #[serde(rename = "waiting")]
344 Waiting,
345 #[serde(rename = "needsInvestigation")]
346 NeedsInvestigation,
347 }
348}
349#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
350pub struct Attachment {
351 #[serde(
352 rename = "compressionType",
353 default,
354 skip_serializing_if = "Option::is_none"
355 )]
356 pub compression_type: Option<String>,
357 #[serde(rename = "fileName", default, skip_serializing_if = "Option::is_none")]
358 pub file_name: Option<String>,
359 #[serde(default, skip_serializing_if = "Option::is_none")]
360 pub stream: Option<String>,
361}
362impl Attachment {
363 pub fn new() -> Self {
364 Self::default()
365 }
366}
367#[doc = "BuildConfiguration Details."]
368#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
369pub struct BuildConfiguration {
370 #[doc = "Branch name for which build is generated."]
371 #[serde(
372 rename = "branchName",
373 default,
374 skip_serializing_if = "Option::is_none"
375 )]
376 pub branch_name: Option<String>,
377 #[doc = "BuildDefinitionId for build."]
378 #[serde(
379 rename = "buildDefinitionId",
380 default,
381 skip_serializing_if = "Option::is_none"
382 )]
383 pub build_definition_id: Option<i32>,
384 #[doc = "Build system."]
385 #[serde(
386 rename = "buildSystem",
387 default,
388 skip_serializing_if = "Option::is_none"
389 )]
390 pub build_system: Option<String>,
391 #[doc = "Build Creation Date."]
392 #[serde(
393 rename = "creationDate",
394 default,
395 skip_serializing_if = "Option::is_none",
396 with = "crate::date_time::rfc3339::option"
397 )]
398 pub creation_date: Option<time::OffsetDateTime>,
399 #[doc = "Build flavor (eg Build/Release)."]
400 #[serde(default, skip_serializing_if = "Option::is_none")]
401 pub flavor: Option<String>,
402 #[doc = "BuildConfiguration Id."]
403 #[serde(default, skip_serializing_if = "Option::is_none")]
404 pub id: Option<i32>,
405 #[doc = "Build Number."]
406 #[serde(default, skip_serializing_if = "Option::is_none")]
407 pub number: Option<String>,
408 #[doc = "BuildConfiguration Platform."]
409 #[serde(default, skip_serializing_if = "Option::is_none")]
410 pub platform: Option<String>,
411 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
412 #[serde(default, skip_serializing_if = "Option::is_none")]
413 pub project: Option<ShallowReference>,
414 #[doc = "Repository Guid for the Build."]
415 #[serde(
416 rename = "repositoryGuid",
417 default,
418 skip_serializing_if = "Option::is_none"
419 )]
420 pub repository_guid: Option<String>,
421 #[doc = "Repository Type (eg. TFSGit)."]
422 #[serde(
423 rename = "repositoryType",
424 default,
425 skip_serializing_if = "Option::is_none"
426 )]
427 pub repository_type: Option<String>,
428 #[doc = "Source Version(/first commit) for the build was triggered."]
429 #[serde(
430 rename = "sourceVersion",
431 default,
432 skip_serializing_if = "Option::is_none"
433 )]
434 pub source_version: Option<String>,
435 #[doc = "Target BranchName."]
436 #[serde(
437 rename = "targetBranchName",
438 default,
439 skip_serializing_if = "Option::is_none"
440 )]
441 pub target_branch_name: Option<String>,
442 #[doc = "Build Uri."]
443 #[serde(default, skip_serializing_if = "Option::is_none")]
444 pub uri: Option<String>,
445}
446impl BuildConfiguration {
447 pub fn new() -> Self {
448 Self::default()
449 }
450}
451#[doc = "Build Coverage Detail"]
452#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
453pub struct BuildCoverage {
454 #[doc = "Code Coverage File Url"]
455 #[serde(
456 rename = "codeCoverageFileUrl",
457 default,
458 skip_serializing_if = "Option::is_none"
459 )]
460 pub code_coverage_file_url: Option<String>,
461 #[doc = "BuildConfiguration Details."]
462 #[serde(default, skip_serializing_if = "Option::is_none")]
463 pub configuration: Option<BuildConfiguration>,
464 #[doc = "Last Error"]
465 #[serde(rename = "lastError", default, skip_serializing_if = "Option::is_none")]
466 pub last_error: Option<String>,
467 #[doc = "List of Modules"]
468 #[serde(
469 default,
470 deserialize_with = "crate::serde::deserialize_null_as_default",
471 skip_serializing_if = "Vec::is_empty"
472 )]
473 pub modules: Vec<ModuleCoverage>,
474 #[doc = "State"]
475 #[serde(default, skip_serializing_if = "Option::is_none")]
476 pub state: Option<String>,
477}
478impl BuildCoverage {
479 pub fn new() -> Self {
480 Self::default()
481 }
482}
483#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
484pub struct BuildCoverageList {
485 #[serde(default, skip_serializing_if = "Option::is_none")]
486 pub count: Option<i32>,
487 #[serde(
488 default,
489 deserialize_with = "crate::serde::deserialize_null_as_default",
490 skip_serializing_if = "Vec::is_empty"
491 )]
492 pub value: Vec<BuildCoverage>,
493}
494impl BuildCoverageList {
495 pub fn new() -> Self {
496 Self::default()
497 }
498}
499#[doc = "Reference to a build."]
500#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
501pub struct BuildReference {
502 #[doc = "Branch name."]
503 #[serde(
504 rename = "branchName",
505 default,
506 skip_serializing_if = "Option::is_none"
507 )]
508 pub branch_name: Option<String>,
509 #[doc = "Build system."]
510 #[serde(
511 rename = "buildSystem",
512 default,
513 skip_serializing_if = "Option::is_none"
514 )]
515 pub build_system: Option<String>,
516 #[doc = "Build Definition ID."]
517 #[serde(
518 rename = "definitionId",
519 default,
520 skip_serializing_if = "Option::is_none"
521 )]
522 pub definition_id: Option<i32>,
523 #[doc = "Build ID."]
524 #[serde(default, skip_serializing_if = "Option::is_none")]
525 pub id: Option<i32>,
526 #[doc = "Build Number."]
527 #[serde(default, skip_serializing_if = "Option::is_none")]
528 pub number: Option<String>,
529 #[doc = "Repository ID."]
530 #[serde(
531 rename = "repositoryId",
532 default,
533 skip_serializing_if = "Option::is_none"
534 )]
535 pub repository_id: Option<String>,
536 #[doc = "Build URI."]
537 #[serde(default, skip_serializing_if = "Option::is_none")]
538 pub uri: Option<String>,
539}
540impl BuildReference {
541 pub fn new() -> Self {
542 Self::default()
543 }
544}
545#[doc = "Represents the build configuration (platform, flavor) and coverage data for the build"]
546#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
547pub struct CodeCoverageData {
548 #[doc = "Flavor of build for which data is retrieved/published"]
549 #[serde(
550 rename = "buildFlavor",
551 default,
552 skip_serializing_if = "Option::is_none"
553 )]
554 pub build_flavor: Option<String>,
555 #[doc = "Platform of build for which data is retrieved/published"]
556 #[serde(
557 rename = "buildPlatform",
558 default,
559 skip_serializing_if = "Option::is_none"
560 )]
561 pub build_platform: Option<String>,
562 #[doc = "List of coverage data for the build"]
563 #[serde(
564 rename = "coverageStats",
565 default,
566 deserialize_with = "crate::serde::deserialize_null_as_default",
567 skip_serializing_if = "Vec::is_empty"
568 )]
569 pub coverage_stats: Vec<CodeCoverageStatistics>,
570}
571impl CodeCoverageData {
572 pub fn new() -> Self {
573 Self::default()
574 }
575}
576#[doc = "Represents the code coverage statistics for a particular coverage label (modules, statements, blocks, etc.)"]
577#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
578pub struct CodeCoverageStatistics {
579 #[doc = "Covered units"]
580 #[serde(default, skip_serializing_if = "Option::is_none")]
581 pub covered: Option<i32>,
582 #[doc = "Delta of coverage"]
583 #[serde(default, skip_serializing_if = "Option::is_none")]
584 pub delta: Option<f64>,
585 #[doc = "Is delta valid"]
586 #[serde(
587 rename = "isDeltaAvailable",
588 default,
589 skip_serializing_if = "Option::is_none"
590 )]
591 pub is_delta_available: Option<bool>,
592 #[doc = "Label of coverage data (\"Blocks\", \"Statements\", \"Modules\", etc.)"]
593 #[serde(default, skip_serializing_if = "Option::is_none")]
594 pub label: Option<String>,
595 #[doc = "Position of label"]
596 #[serde(default, skip_serializing_if = "Option::is_none")]
597 pub position: Option<i32>,
598 #[doc = "Total units"]
599 #[serde(default, skip_serializing_if = "Option::is_none")]
600 pub total: Option<i32>,
601}
602impl CodeCoverageStatistics {
603 pub fn new() -> Self {
604 Self::default()
605 }
606}
607#[doc = "Represents the code coverage summary results Used to publish or retrieve code coverage summary against a build"]
608#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
609pub struct CodeCoverageSummary {
610 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
611 #[serde(default, skip_serializing_if = "Option::is_none")]
612 pub build: Option<ShallowReference>,
613 #[doc = "List of coverage data and details for the build"]
614 #[serde(
615 rename = "coverageData",
616 default,
617 deserialize_with = "crate::serde::deserialize_null_as_default",
618 skip_serializing_if = "Vec::is_empty"
619 )]
620 pub coverage_data: Vec<CodeCoverageData>,
621 #[serde(
622 rename = "coverageDetailedSummaryStatus",
623 default,
624 skip_serializing_if = "Option::is_none"
625 )]
626 pub coverage_detailed_summary_status:
627 Option<code_coverage_summary::CoverageDetailedSummaryStatus>,
628 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
629 #[serde(
630 rename = "deltaBuild",
631 default,
632 skip_serializing_if = "Option::is_none"
633 )]
634 pub delta_build: Option<ShallowReference>,
635 #[doc = "Uri of build against which difference in coverage is computed"]
636 #[serde(default, skip_serializing_if = "Option::is_none")]
637 pub status: Option<code_coverage_summary::Status>,
638}
639impl CodeCoverageSummary {
640 pub fn new() -> Self {
641 Self::default()
642 }
643}
644pub mod code_coverage_summary {
645 use super::*;
646 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
647 pub enum CoverageDetailedSummaryStatus {
648 #[serde(rename = "none")]
649 None,
650 #[serde(rename = "inProgress")]
651 InProgress,
652 #[serde(rename = "finalized")]
653 Finalized,
654 #[serde(rename = "pending")]
655 Pending,
656 #[serde(rename = "updateRequestQueued")]
657 UpdateRequestQueued,
658 #[serde(rename = "noModulesFound")]
659 NoModulesFound,
660 #[serde(rename = "numberOfFilesExceeded")]
661 NumberOfFilesExceeded,
662 #[serde(rename = "noInputFiles")]
663 NoInputFiles,
664 #[serde(rename = "buildCancelled")]
665 BuildCancelled,
666 #[serde(rename = "failedJobs")]
667 FailedJobs,
668 #[serde(rename = "moduleMergeJobTimeout")]
669 ModuleMergeJobTimeout,
670 #[serde(rename = "codeCoverageSuccess")]
671 CodeCoverageSuccess,
672 #[serde(rename = "invalidBuildConfiguration")]
673 InvalidBuildConfiguration,
674 #[serde(rename = "coverageAnalyzerBuildNotFound")]
675 CoverageAnalyzerBuildNotFound,
676 #[serde(rename = "failedToRequeue")]
677 FailedToRequeue,
678 #[serde(rename = "buildBailedOut")]
679 BuildBailedOut,
680 #[serde(rename = "noCodeCoverageTask")]
681 NoCodeCoverageTask,
682 #[serde(rename = "mergeJobFailed")]
683 MergeJobFailed,
684 #[serde(rename = "mergeInvokerJobFailed")]
685 MergeInvokerJobFailed,
686 #[serde(rename = "monitorJobFailed")]
687 MonitorJobFailed,
688 #[serde(rename = "moduleMergeInvokerJobTimeout")]
689 ModuleMergeInvokerJobTimeout,
690 #[serde(rename = "monitorJobTimeout")]
691 MonitorJobTimeout,
692 #[serde(rename = "invalidCoverageInput")]
693 InvalidCoverageInput,
694 }
695 #[doc = "Uri of build against which difference in coverage is computed"]
696 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
697 pub enum Status {
698 #[serde(rename = "none")]
699 None,
700 #[serde(rename = "inProgress")]
701 InProgress,
702 #[serde(rename = "completed")]
703 Completed,
704 #[serde(rename = "finalized")]
705 Finalized,
706 #[serde(rename = "pending")]
707 Pending,
708 #[serde(rename = "updateRequestQueued")]
709 UpdateRequestQueued,
710 }
711}
712#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
713pub struct CoverageStatistics {
714 #[serde(
715 rename = "blocksCovered",
716 default,
717 skip_serializing_if = "Option::is_none"
718 )]
719 pub blocks_covered: Option<i32>,
720 #[serde(
721 rename = "blocksNotCovered",
722 default,
723 skip_serializing_if = "Option::is_none"
724 )]
725 pub blocks_not_covered: Option<i32>,
726 #[serde(
727 rename = "linesCovered",
728 default,
729 skip_serializing_if = "Option::is_none"
730 )]
731 pub lines_covered: Option<i32>,
732 #[serde(
733 rename = "linesNotCovered",
734 default,
735 skip_serializing_if = "Option::is_none"
736 )]
737 pub lines_not_covered: Option<i32>,
738 #[serde(
739 rename = "linesPartiallyCovered",
740 default,
741 skip_serializing_if = "Option::is_none"
742 )]
743 pub lines_partially_covered: Option<i32>,
744}
745impl CoverageStatistics {
746 pub fn new() -> Self {
747 Self::default()
748 }
749}
750#[doc = "A custom field information. Allowed Key : Value pairs - ( AttemptId: int value, IsTestResultFlaky: bool)"]
751#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
752pub struct CustomTestField {
753 #[doc = "Field Name."]
754 #[serde(rename = "fieldName", default, skip_serializing_if = "Option::is_none")]
755 pub field_name: Option<String>,
756 #[doc = "Field value."]
757 #[serde(default, skip_serializing_if = "Option::is_none")]
758 pub value: Option<serde_json::Value>,
759}
760impl CustomTestField {
761 pub fn new() -> Self {
762 Self::default()
763 }
764}
765#[doc = "This is a temporary class to provide the details for the test run environment."]
766#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
767pub struct DtlEnvironmentDetails {
768 #[serde(
769 rename = "csmContent",
770 default,
771 skip_serializing_if = "Option::is_none"
772 )]
773 pub csm_content: Option<String>,
774 #[serde(
775 rename = "csmParameters",
776 default,
777 skip_serializing_if = "Option::is_none"
778 )]
779 pub csm_parameters: Option<String>,
780 #[serde(
781 rename = "subscriptionName",
782 default,
783 skip_serializing_if = "Option::is_none"
784 )]
785 pub subscription_name: Option<String>,
786}
787impl DtlEnvironmentDetails {
788 pub fn new() -> Self {
789 Self::default()
790 }
791}
792#[doc = "Failing since information of a test result."]
793#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
794pub struct FailingSince {
795 #[doc = "Reference to a build."]
796 #[serde(default, skip_serializing_if = "Option::is_none")]
797 pub build: Option<BuildReference>,
798 #[doc = "Time since failing(UTC)."]
799 #[serde(
800 default,
801 skip_serializing_if = "Option::is_none",
802 with = "crate::date_time::rfc3339::option"
803 )]
804 pub date: Option<time::OffsetDateTime>,
805 #[doc = "Reference to a release."]
806 #[serde(default, skip_serializing_if = "Option::is_none")]
807 pub release: Option<ReleaseReference>,
808}
809impl FailingSince {
810 pub fn new() -> Self {
811 Self::default()
812 }
813}
814#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
815pub struct FieldDetailsForTestResults {
816 #[doc = "Group by field name"]
817 #[serde(rename = "fieldName", default, skip_serializing_if = "Option::is_none")]
818 pub field_name: Option<String>,
819 #[doc = "Group by field values"]
820 #[serde(
821 rename = "groupsForField",
822 default,
823 deserialize_with = "crate::serde::deserialize_null_as_default",
824 skip_serializing_if = "Vec::is_empty"
825 )]
826 pub groups_for_field: Vec<serde_json::Value>,
827}
828impl FieldDetailsForTestResults {
829 pub fn new() -> Self {
830 Self::default()
831 }
832}
833#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
834pub struct FieldDetailsForTestResultsList {
835 #[serde(default, skip_serializing_if = "Option::is_none")]
836 pub count: Option<i32>,
837 #[serde(
838 default,
839 deserialize_with = "crate::serde::deserialize_null_as_default",
840 skip_serializing_if = "Vec::is_empty"
841 )]
842 pub value: Vec<FieldDetailsForTestResults>,
843}
844impl FieldDetailsForTestResultsList {
845 pub fn new() -> Self {
846 Self::default()
847 }
848}
849#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
850pub struct FileCoverageRequest {
851 #[serde(rename = "filePath", default, skip_serializing_if = "Option::is_none")]
852 pub file_path: Option<String>,
853 #[serde(
854 rename = "pullRequestBaseIterationId",
855 default,
856 skip_serializing_if = "Option::is_none"
857 )]
858 pub pull_request_base_iteration_id: Option<i32>,
859 #[serde(
860 rename = "pullRequestId",
861 default,
862 skip_serializing_if = "Option::is_none"
863 )]
864 pub pull_request_id: Option<i32>,
865 #[serde(
866 rename = "pullRequestIterationId",
867 default,
868 skip_serializing_if = "Option::is_none"
869 )]
870 pub pull_request_iteration_id: Option<i32>,
871 #[serde(rename = "repoId", default, skip_serializing_if = "Option::is_none")]
872 pub repo_id: Option<String>,
873}
874impl FileCoverageRequest {
875 pub fn new() -> Self {
876 Self::default()
877 }
878}
879#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
880pub struct FlakyDetection {
881 #[serde(
882 rename = "flakyDetectionPipelines",
883 default,
884 skip_serializing_if = "Option::is_none"
885 )]
886 pub flaky_detection_pipelines: Option<FlakyDetectionPipelines>,
887 #[doc = "FlakyDetectionType defines Detection type i.e. 1. System or 2. Manual."]
888 #[serde(
889 rename = "flakyDetectionType",
890 default,
891 skip_serializing_if = "Option::is_none"
892 )]
893 pub flaky_detection_type: Option<flaky_detection::FlakyDetectionType>,
894}
895impl FlakyDetection {
896 pub fn new() -> Self {
897 Self::default()
898 }
899}
900pub mod flaky_detection {
901 use super::*;
902 #[doc = "FlakyDetectionType defines Detection type i.e. 1. System or 2. Manual."]
903 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
904 pub enum FlakyDetectionType {
905 #[serde(rename = "custom")]
906 Custom,
907 #[serde(rename = "system")]
908 System,
909 }
910}
911#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
912pub struct FlakyDetectionPipelines {
913 #[doc = "AllowedPipelines - List All Pipelines allowed for detection."]
914 #[serde(
915 rename = "allowedPipelines",
916 default,
917 deserialize_with = "crate::serde::deserialize_null_as_default",
918 skip_serializing_if = "Vec::is_empty"
919 )]
920 pub allowed_pipelines: Vec<i32>,
921 #[doc = "IsAllPipelinesAllowed if users configure all system's pipelines."]
922 #[serde(
923 rename = "isAllPipelinesAllowed",
924 default,
925 skip_serializing_if = "Option::is_none"
926 )]
927 pub is_all_pipelines_allowed: Option<bool>,
928}
929impl FlakyDetectionPipelines {
930 pub fn new() -> Self {
931 Self::default()
932 }
933}
934#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
935pub struct FlakySettings {
936 #[serde(
937 rename = "flakyDetection",
938 default,
939 skip_serializing_if = "Option::is_none"
940 )]
941 pub flaky_detection: Option<FlakyDetection>,
942 #[doc = "FlakyInSummaryReport defines flaky data should show in summary report or not."]
943 #[serde(
944 rename = "flakyInSummaryReport",
945 default,
946 skip_serializing_if = "Option::is_none"
947 )]
948 pub flaky_in_summary_report: Option<bool>,
949 #[doc = "IsFlakyBugCreated defines if there is any bug that has been created with flaky testresult."]
950 #[serde(
951 rename = "isFlakyBugCreated",
952 default,
953 skip_serializing_if = "Option::is_none"
954 )]
955 pub is_flaky_bug_created: Option<bool>,
956 #[doc = "ManualMarkUnmarkFlaky defines manual marking unmarking of flaky testcase."]
957 #[serde(
958 rename = "manualMarkUnmarkFlaky",
959 default,
960 skip_serializing_if = "Option::is_none"
961 )]
962 pub manual_mark_unmark_flaky: Option<bool>,
963}
964impl FlakySettings {
965 pub fn new() -> Self {
966 Self::default()
967 }
968}
969#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
970pub struct FunctionCoverage {
971 #[serde(default, skip_serializing_if = "Option::is_none")]
972 pub class: Option<String>,
973 #[serde(default, skip_serializing_if = "Option::is_none")]
974 pub name: Option<String>,
975 #[serde(default, skip_serializing_if = "Option::is_none")]
976 pub namespace: Option<String>,
977 #[serde(
978 rename = "sourceFile",
979 default,
980 skip_serializing_if = "Option::is_none"
981 )]
982 pub source_file: Option<String>,
983 #[serde(default, skip_serializing_if = "Option::is_none")]
984 pub statistics: Option<CoverageStatistics>,
985}
986impl FunctionCoverage {
987 pub fn new() -> Self {
988 Self::default()
989 }
990}
991#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
992pub struct GraphSubjectBase {
993 #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
994 pub links: Option<ReferenceLinks>,
995 #[serde(default, skip_serializing_if = "Option::is_none")]
996 pub descriptor: Option<String>,
997 #[serde(
998 rename = "displayName",
999 default,
1000 skip_serializing_if = "Option::is_none"
1001 )]
1002 pub display_name: Option<String>,
1003 #[serde(default, skip_serializing_if = "Option::is_none")]
1004 pub url: Option<String>,
1005}
1006impl GraphSubjectBase {
1007 pub fn new() -> Self {
1008 Self::default()
1009 }
1010}
1011#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1012pub struct IdentityRef {
1013 #[serde(flatten)]
1014 pub graph_subject_base: GraphSubjectBase,
1015 #[serde(
1016 rename = "directoryAlias",
1017 default,
1018 skip_serializing_if = "Option::is_none"
1019 )]
1020 pub directory_alias: Option<String>,
1021 #[serde(default, skip_serializing_if = "Option::is_none")]
1022 pub id: Option<String>,
1023 #[serde(rename = "imageUrl", default, skip_serializing_if = "Option::is_none")]
1024 pub image_url: Option<String>,
1025 #[serde(default, skip_serializing_if = "Option::is_none")]
1026 pub inactive: Option<bool>,
1027 #[serde(
1028 rename = "isAadIdentity",
1029 default,
1030 skip_serializing_if = "Option::is_none"
1031 )]
1032 pub is_aad_identity: Option<bool>,
1033 #[serde(
1034 rename = "isContainer",
1035 default,
1036 skip_serializing_if = "Option::is_none"
1037 )]
1038 pub is_container: Option<bool>,
1039 #[serde(
1040 rename = "isDeletedInOrigin",
1041 default,
1042 skip_serializing_if = "Option::is_none"
1043 )]
1044 pub is_deleted_in_origin: Option<bool>,
1045 #[serde(
1046 rename = "profileUrl",
1047 default,
1048 skip_serializing_if = "Option::is_none"
1049 )]
1050 pub profile_url: Option<String>,
1051 #[serde(
1052 rename = "uniqueName",
1053 default,
1054 skip_serializing_if = "Option::is_none"
1055 )]
1056 pub unique_name: Option<String>,
1057}
1058impl IdentityRef {
1059 pub fn new() -> Self {
1060 Self::default()
1061 }
1062}
1063#[doc = "Job in pipeline. This is related to matrixing in YAML."]
1064#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1065pub struct JobReference {
1066 #[doc = "Attempt number of the job"]
1067 #[serde(default, skip_serializing_if = "Option::is_none")]
1068 pub attempt: Option<i32>,
1069 #[doc = "Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character."]
1070 #[serde(rename = "jobName", default, skip_serializing_if = "Option::is_none")]
1071 pub job_name: Option<String>,
1072}
1073impl JobReference {
1074 pub fn new() -> Self {
1075 Self::default()
1076 }
1077}
1078#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1079pub struct ModuleCoverage {
1080 #[serde(
1081 rename = "blockCount",
1082 default,
1083 skip_serializing_if = "Option::is_none"
1084 )]
1085 pub block_count: Option<i32>,
1086 #[serde(
1087 rename = "blockData",
1088 default,
1089 deserialize_with = "crate::serde::deserialize_null_as_default",
1090 skip_serializing_if = "Vec::is_empty"
1091 )]
1092 pub block_data: Vec<String>,
1093 #[doc = "Code Coverage File Url"]
1094 #[serde(rename = "fileUrl", default, skip_serializing_if = "Option::is_none")]
1095 pub file_url: Option<String>,
1096 #[serde(
1097 default,
1098 deserialize_with = "crate::serde::deserialize_null_as_default",
1099 skip_serializing_if = "Vec::is_empty"
1100 )]
1101 pub functions: Vec<FunctionCoverage>,
1102 #[serde(default, skip_serializing_if = "Option::is_none")]
1103 pub name: Option<String>,
1104 #[serde(default, skip_serializing_if = "Option::is_none")]
1105 pub signature: Option<String>,
1106 #[serde(
1107 rename = "signatureAge",
1108 default,
1109 skip_serializing_if = "Option::is_none"
1110 )]
1111 pub signature_age: Option<i32>,
1112 #[serde(default, skip_serializing_if = "Option::is_none")]
1113 pub statistics: Option<CoverageStatistics>,
1114}
1115impl ModuleCoverage {
1116 pub fn new() -> Self {
1117 Self::default()
1118 }
1119}
1120#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1121pub struct NewTestResultLoggingSettings {
1122 #[doc = "LogNewTests defines whether or not we will record new test cases coming into the system"]
1123 #[serde(
1124 rename = "logNewTests",
1125 default,
1126 skip_serializing_if = "Option::is_none"
1127 )]
1128 pub log_new_tests: Option<bool>,
1129}
1130impl NewTestResultLoggingSettings {
1131 pub fn new() -> Self {
1132 Self::default()
1133 }
1134}
1135#[doc = "Phase in pipeline"]
1136#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1137pub struct PhaseReference {
1138 #[doc = "Attempt number of the phase"]
1139 #[serde(default, skip_serializing_if = "Option::is_none")]
1140 pub attempt: Option<i32>,
1141 #[doc = "Name of the phase. Maximum supported length for name is 256 character."]
1142 #[serde(rename = "phaseName", default, skip_serializing_if = "Option::is_none")]
1143 pub phase_name: Option<String>,
1144}
1145impl PhaseReference {
1146 pub fn new() -> Self {
1147 Self::default()
1148 }
1149}
1150#[doc = "Pipeline reference"]
1151#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1152pub struct PipelineReference {
1153 #[doc = "Job in pipeline. This is related to matrixing in YAML."]
1154 #[serde(
1155 rename = "jobReference",
1156 default,
1157 skip_serializing_if = "Option::is_none"
1158 )]
1159 pub job_reference: Option<JobReference>,
1160 #[doc = "Phase in pipeline"]
1161 #[serde(
1162 rename = "phaseReference",
1163 default,
1164 skip_serializing_if = "Option::is_none"
1165 )]
1166 pub phase_reference: Option<PhaseReference>,
1167 #[doc = "Reference of the pipeline with which this pipeline instance is related."]
1168 #[serde(
1169 rename = "pipelineId",
1170 default,
1171 skip_serializing_if = "Option::is_none"
1172 )]
1173 pub pipeline_id: Option<i32>,
1174 #[doc = "Stage in pipeline"]
1175 #[serde(
1176 rename = "stageReference",
1177 default,
1178 skip_serializing_if = "Option::is_none"
1179 )]
1180 pub stage_reference: Option<StageReference>,
1181}
1182impl PipelineReference {
1183 pub fn new() -> Self {
1184 Self::default()
1185 }
1186}
1187#[doc = "Test summary of a pipeline instance."]
1188#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1189pub struct PipelineTestMetrics {
1190 #[doc = "Pipeline reference"]
1191 #[serde(
1192 rename = "currentContext",
1193 default,
1194 skip_serializing_if = "Option::is_none"
1195 )]
1196 pub current_context: Option<PipelineReference>,
1197 #[doc = "Results insights for runs with state completed and NeedInvestigation."]
1198 #[serde(
1199 rename = "resultsAnalysis",
1200 default,
1201 skip_serializing_if = "Option::is_none"
1202 )]
1203 pub results_analysis: Option<ResultsAnalysis>,
1204 #[doc = "Summary of results for a pipeline instance."]
1205 #[serde(
1206 rename = "resultSummary",
1207 default,
1208 skip_serializing_if = "Option::is_none"
1209 )]
1210 pub result_summary: Option<ResultSummary>,
1211 #[doc = "Summary of runs for a pipeline instance."]
1212 #[serde(
1213 rename = "runSummary",
1214 default,
1215 skip_serializing_if = "Option::is_none"
1216 )]
1217 pub run_summary: Option<RunSummary>,
1218 #[doc = "Summary at child node."]
1219 #[serde(
1220 rename = "summaryAtChild",
1221 default,
1222 deserialize_with = "crate::serde::deserialize_null_as_default",
1223 skip_serializing_if = "Vec::is_empty"
1224 )]
1225 pub summary_at_child: Vec<PipelineTestMetrics>,
1226}
1227impl PipelineTestMetrics {
1228 pub fn new() -> Self {
1229 Self::default()
1230 }
1231}
1232#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1233pub struct QueryModel {
1234 #[serde(default, skip_serializing_if = "Option::is_none")]
1235 pub query: Option<String>,
1236}
1237impl QueryModel {
1238 pub fn new() -> Self {
1239 Self::default()
1240 }
1241}
1242#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1243pub struct ReferenceLinks {
1244 #[serde(default, skip_serializing_if = "Option::is_none")]
1245 pub links: Option<serde_json::Value>,
1246}
1247impl ReferenceLinks {
1248 pub fn new() -> Self {
1249 Self::default()
1250 }
1251}
1252#[doc = "Reference to a release."]
1253#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1254pub struct ReleaseReference {
1255 #[doc = "Number of Release Attempt."]
1256 #[serde(default, skip_serializing_if = "Option::is_none")]
1257 pub attempt: Option<i32>,
1258 #[doc = "Release Creation Date(UTC)."]
1259 #[serde(
1260 rename = "creationDate",
1261 default,
1262 skip_serializing_if = "Option::is_none",
1263 with = "crate::date_time::rfc3339::option"
1264 )]
1265 pub creation_date: Option<time::OffsetDateTime>,
1266 #[doc = "Release definition ID."]
1267 #[serde(
1268 rename = "definitionId",
1269 default,
1270 skip_serializing_if = "Option::is_none"
1271 )]
1272 pub definition_id: Option<i32>,
1273 #[doc = "Environment creation Date(UTC)."]
1274 #[serde(
1275 rename = "environmentCreationDate",
1276 default,
1277 skip_serializing_if = "Option::is_none",
1278 with = "crate::date_time::rfc3339::option"
1279 )]
1280 pub environment_creation_date: Option<time::OffsetDateTime>,
1281 #[doc = "Release environment definition ID."]
1282 #[serde(
1283 rename = "environmentDefinitionId",
1284 default,
1285 skip_serializing_if = "Option::is_none"
1286 )]
1287 pub environment_definition_id: Option<i32>,
1288 #[doc = "Release environment definition name."]
1289 #[serde(
1290 rename = "environmentDefinitionName",
1291 default,
1292 skip_serializing_if = "Option::is_none"
1293 )]
1294 pub environment_definition_name: Option<String>,
1295 #[doc = "Release environment ID."]
1296 #[serde(
1297 rename = "environmentId",
1298 default,
1299 skip_serializing_if = "Option::is_none"
1300 )]
1301 pub environment_id: Option<i32>,
1302 #[doc = "Release environment name."]
1303 #[serde(
1304 rename = "environmentName",
1305 default,
1306 skip_serializing_if = "Option::is_none"
1307 )]
1308 pub environment_name: Option<String>,
1309 #[doc = "Release ID."]
1310 #[serde(default, skip_serializing_if = "Option::is_none")]
1311 pub id: Option<i32>,
1312 #[doc = "Release name."]
1313 #[serde(default, skip_serializing_if = "Option::is_none")]
1314 pub name: Option<String>,
1315}
1316impl ReleaseReference {
1317 pub fn new() -> Self {
1318 Self::default()
1319 }
1320}
1321#[doc = "Summary of results for a pipeline instance."]
1322#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1323pub struct ResultSummary {
1324 #[doc = "Result summary of pipeline, group by TestRun state."]
1325 #[serde(
1326 rename = "resultSummaryByRunState",
1327 default,
1328 skip_serializing_if = "Option::is_none"
1329 )]
1330 pub result_summary_by_run_state: Option<serde_json::Value>,
1331}
1332impl ResultSummary {
1333 pub fn new() -> Self {
1334 Self::default()
1335 }
1336}
1337#[doc = "Results insights for runs with state completed and NeedInvestigation."]
1338#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1339pub struct ResultsAnalysis {
1340 #[doc = "Pipeline reference"]
1341 #[serde(
1342 rename = "previousContext",
1343 default,
1344 skip_serializing_if = "Option::is_none"
1345 )]
1346 pub previous_context: Option<PipelineReference>,
1347 #[serde(
1348 rename = "resultsDifference",
1349 default,
1350 skip_serializing_if = "Option::is_none"
1351 )]
1352 pub results_difference: Option<AggregatedResultsDifference>,
1353 #[serde(
1354 rename = "testFailuresAnalysis",
1355 default,
1356 skip_serializing_if = "Option::is_none"
1357 )]
1358 pub test_failures_analysis: Option<TestResultFailuresAnalysis>,
1359}
1360impl ResultsAnalysis {
1361 pub fn new() -> Self {
1362 Self::default()
1363 }
1364}
1365#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1366pub struct ResultsFilter {
1367 #[serde(
1368 rename = "automatedTestName",
1369 default,
1370 skip_serializing_if = "Option::is_none"
1371 )]
1372 pub automated_test_name: Option<String>,
1373 #[serde(default, skip_serializing_if = "Option::is_none")]
1374 pub branch: Option<String>,
1375 #[serde(
1376 rename = "executedIn",
1377 default,
1378 skip_serializing_if = "Option::is_none"
1379 )]
1380 pub executed_in: Option<results_filter::ExecutedIn>,
1381 #[serde(rename = "groupBy", default, skip_serializing_if = "Option::is_none")]
1382 pub group_by: Option<String>,
1383 #[serde(
1384 rename = "maxCompleteDate",
1385 default,
1386 skip_serializing_if = "Option::is_none",
1387 with = "crate::date_time::rfc3339::option"
1388 )]
1389 pub max_complete_date: Option<time::OffsetDateTime>,
1390 #[serde(
1391 rename = "resultsCount",
1392 default,
1393 skip_serializing_if = "Option::is_none"
1394 )]
1395 pub results_count: Option<i32>,
1396 #[serde(
1397 rename = "testCaseId",
1398 default,
1399 skip_serializing_if = "Option::is_none"
1400 )]
1401 pub test_case_id: Option<i32>,
1402 #[serde(
1403 rename = "testCaseReferenceIds",
1404 default,
1405 deserialize_with = "crate::serde::deserialize_null_as_default",
1406 skip_serializing_if = "Vec::is_empty"
1407 )]
1408 pub test_case_reference_ids: Vec<i32>,
1409 #[serde(
1410 rename = "testPlanId",
1411 default,
1412 skip_serializing_if = "Option::is_none"
1413 )]
1414 pub test_plan_id: Option<i32>,
1415 #[serde(
1416 rename = "testPointIds",
1417 default,
1418 deserialize_with = "crate::serde::deserialize_null_as_default",
1419 skip_serializing_if = "Vec::is_empty"
1420 )]
1421 pub test_point_ids: Vec<i32>,
1422 #[serde(
1423 rename = "testResultsContext",
1424 default,
1425 skip_serializing_if = "Option::is_none"
1426 )]
1427 pub test_results_context: Option<TestResultsContext>,
1428 #[serde(rename = "trendDays", default, skip_serializing_if = "Option::is_none")]
1429 pub trend_days: Option<i32>,
1430}
1431impl ResultsFilter {
1432 pub fn new() -> Self {
1433 Self::default()
1434 }
1435}
1436pub mod results_filter {
1437 use super::*;
1438 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1439 pub enum ExecutedIn {
1440 #[serde(rename = "any")]
1441 Any,
1442 #[serde(rename = "tcm")]
1443 Tcm,
1444 #[serde(rename = "tfs")]
1445 Tfs,
1446 }
1447}
1448#[doc = "Result summary by the outcome of test results."]
1449#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1450pub struct ResultsSummaryByOutcome {
1451 #[doc = "Aggregated result details for each test result outcome."]
1452 #[serde(
1453 rename = "aggregatedResultDetailsByOutcome",
1454 default,
1455 skip_serializing_if = "Option::is_none"
1456 )]
1457 pub aggregated_result_details_by_outcome: Option<serde_json::Value>,
1458 #[doc = "Time taken by results."]
1459 #[serde(default, skip_serializing_if = "Option::is_none")]
1460 pub duration: Option<String>,
1461 #[doc = "Total number of not reported test results."]
1462 #[serde(
1463 rename = "notReportedTestCount",
1464 default,
1465 skip_serializing_if = "Option::is_none"
1466 )]
1467 pub not_reported_test_count: Option<i32>,
1468 #[doc = "Total number of test results. (It includes NotImpacted test results as well which need to exclude while calculating pass/fail test result percentage)."]
1469 #[serde(
1470 rename = "totalTestCount",
1471 default,
1472 skip_serializing_if = "Option::is_none"
1473 )]
1474 pub total_test_count: Option<i32>,
1475}
1476impl ResultsSummaryByOutcome {
1477 pub fn new() -> Self {
1478 Self::default()
1479 }
1480}
1481#[doc = "Test run create details."]
1482#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1483pub struct RunCreateModel {
1484 #[doc = "true if test run is automated, false otherwise. By default it will be false."]
1485 #[serde(default, skip_serializing_if = "Option::is_none")]
1486 pub automated: Option<bool>,
1487 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
1488 #[serde(default, skip_serializing_if = "Option::is_none")]
1489 pub build: Option<ShallowReference>,
1490 #[doc = "Drop location of the build used for test run."]
1491 #[serde(
1492 rename = "buildDropLocation",
1493 default,
1494 skip_serializing_if = "Option::is_none"
1495 )]
1496 pub build_drop_location: Option<String>,
1497 #[doc = "Flavor of the build used for test run. (E.g: Release, Debug)"]
1498 #[serde(
1499 rename = "buildFlavor",
1500 default,
1501 skip_serializing_if = "Option::is_none"
1502 )]
1503 pub build_flavor: Option<String>,
1504 #[doc = "Platform of the build used for test run. (E.g.: x86, amd64)"]
1505 #[serde(
1506 rename = "buildPlatform",
1507 default,
1508 skip_serializing_if = "Option::is_none"
1509 )]
1510 pub build_platform: Option<String>,
1511 #[doc = "BuildConfiguration Details."]
1512 #[serde(
1513 rename = "buildReference",
1514 default,
1515 skip_serializing_if = "Option::is_none"
1516 )]
1517 pub build_reference: Option<BuildConfiguration>,
1518 #[doc = "Comments entered by those analyzing the run."]
1519 #[serde(default, skip_serializing_if = "Option::is_none")]
1520 pub comment: Option<String>,
1521 #[doc = "Completed date time of the run."]
1522 #[serde(
1523 rename = "completeDate",
1524 default,
1525 skip_serializing_if = "Option::is_none"
1526 )]
1527 pub complete_date: Option<String>,
1528 #[doc = "IDs of the test configurations associated with the run."]
1529 #[serde(
1530 rename = "configurationIds",
1531 default,
1532 deserialize_with = "crate::serde::deserialize_null_as_default",
1533 skip_serializing_if = "Vec::is_empty"
1534 )]
1535 pub configuration_ids: Vec<i32>,
1536 #[doc = "Name of the test controller used for automated run."]
1537 #[serde(default, skip_serializing_if = "Option::is_none")]
1538 pub controller: Option<String>,
1539 #[doc = "Additional properties of test Run."]
1540 #[serde(
1541 rename = "customTestFields",
1542 default,
1543 deserialize_with = "crate::serde::deserialize_null_as_default",
1544 skip_serializing_if = "Vec::is_empty"
1545 )]
1546 pub custom_test_fields: Vec<CustomTestField>,
1547 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
1548 #[serde(
1549 rename = "dtlAutEnvironment",
1550 default,
1551 skip_serializing_if = "Option::is_none"
1552 )]
1553 pub dtl_aut_environment: Option<ShallowReference>,
1554 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
1555 #[serde(
1556 rename = "dtlTestEnvironment",
1557 default,
1558 skip_serializing_if = "Option::is_none"
1559 )]
1560 pub dtl_test_environment: Option<ShallowReference>,
1561 #[doc = "Due date and time for test run."]
1562 #[serde(rename = "dueDate", default, skip_serializing_if = "Option::is_none")]
1563 pub due_date: Option<String>,
1564 #[doc = "This is a temporary class to provide the details for the test run environment."]
1565 #[serde(
1566 rename = "environmentDetails",
1567 default,
1568 skip_serializing_if = "Option::is_none"
1569 )]
1570 pub environment_details: Option<DtlEnvironmentDetails>,
1571 #[doc = "Error message associated with the run."]
1572 #[serde(
1573 rename = "errorMessage",
1574 default,
1575 skip_serializing_if = "Option::is_none"
1576 )]
1577 pub error_message: Option<String>,
1578 #[doc = "This class is used to provide the filters used for discovery"]
1579 #[serde(default, skip_serializing_if = "Option::is_none")]
1580 pub filter: Option<RunFilter>,
1581 #[doc = "The iteration in which to create the run. Root iteration of the team project will be default"]
1582 #[serde(default, skip_serializing_if = "Option::is_none")]
1583 pub iteration: Option<String>,
1584 #[doc = "Name of the test run."]
1585 #[serde(default, skip_serializing_if = "Option::is_none")]
1586 pub name: Option<String>,
1587 #[serde(default, skip_serializing_if = "Option::is_none")]
1588 pub owner: Option<IdentityRef>,
1589 #[doc = "Pipeline reference"]
1590 #[serde(
1591 rename = "pipelineReference",
1592 default,
1593 skip_serializing_if = "Option::is_none"
1594 )]
1595 pub pipeline_reference: Option<PipelineReference>,
1596 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
1597 #[serde(default, skip_serializing_if = "Option::is_none")]
1598 pub plan: Option<ShallowReference>,
1599 #[doc = "IDs of the test points to use in the run."]
1600 #[serde(
1601 rename = "pointIds",
1602 default,
1603 deserialize_with = "crate::serde::deserialize_null_as_default",
1604 skip_serializing_if = "Vec::is_empty"
1605 )]
1606 pub point_ids: Vec<i32>,
1607 #[doc = "URI of release environment associated with the run."]
1608 #[serde(
1609 rename = "releaseEnvironmentUri",
1610 default,
1611 skip_serializing_if = "Option::is_none"
1612 )]
1613 pub release_environment_uri: Option<String>,
1614 #[doc = "Reference to a release."]
1615 #[serde(
1616 rename = "releaseReference",
1617 default,
1618 skip_serializing_if = "Option::is_none"
1619 )]
1620 pub release_reference: Option<ReleaseReference>,
1621 #[doc = "URI of release associated with the run."]
1622 #[serde(
1623 rename = "releaseUri",
1624 default,
1625 skip_serializing_if = "Option::is_none"
1626 )]
1627 pub release_uri: Option<String>,
1628 #[doc = "Run summary for run Type = NoConfigRun."]
1629 #[serde(
1630 rename = "runSummary",
1631 default,
1632 deserialize_with = "crate::serde::deserialize_null_as_default",
1633 skip_serializing_if = "Vec::is_empty"
1634 )]
1635 pub run_summary: Vec<RunSummaryModel>,
1636 #[doc = "Timespan till the run times out."]
1637 #[serde(
1638 rename = "runTimeout",
1639 default,
1640 skip_serializing_if = "Option::is_none"
1641 )]
1642 pub run_timeout: Option<String>,
1643 #[doc = "SourceWorkFlow(CI/CD) of the test run."]
1644 #[serde(
1645 rename = "sourceWorkflow",
1646 default,
1647 skip_serializing_if = "Option::is_none"
1648 )]
1649 pub source_workflow: Option<String>,
1650 #[doc = "Start date time of the run."]
1651 #[serde(rename = "startDate", default, skip_serializing_if = "Option::is_none")]
1652 pub start_date: Option<String>,
1653 #[doc = "The state of the run. Type TestRunState Valid states - NotStarted, InProgress, Waiting"]
1654 #[serde(default, skip_serializing_if = "Option::is_none")]
1655 pub state: Option<String>,
1656 #[doc = "Tags to attach with the test run, maximum of 5 tags can be added to run."]
1657 #[serde(
1658 default,
1659 deserialize_with = "crate::serde::deserialize_null_as_default",
1660 skip_serializing_if = "Vec::is_empty"
1661 )]
1662 pub tags: Vec<TestTag>,
1663 #[doc = "TestConfigurationMapping of the test run."]
1664 #[serde(
1665 rename = "testConfigurationsMapping",
1666 default,
1667 skip_serializing_if = "Option::is_none"
1668 )]
1669 pub test_configurations_mapping: Option<String>,
1670 #[doc = "ID of the test environment associated with the run."]
1671 #[serde(
1672 rename = "testEnvironmentId",
1673 default,
1674 skip_serializing_if = "Option::is_none"
1675 )]
1676 pub test_environment_id: Option<String>,
1677 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
1678 #[serde(
1679 rename = "testSettings",
1680 default,
1681 skip_serializing_if = "Option::is_none"
1682 )]
1683 pub test_settings: Option<ShallowReference>,
1684 #[doc = "Type of the run(RunType) Valid Values : (Unspecified, Normal, Blocking, Web, MtrRunInitiatedFromWeb, RunWithDtlEnv, NoConfigRun)"]
1685 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
1686 pub type_: Option<String>,
1687}
1688impl RunCreateModel {
1689 pub fn new() -> Self {
1690 Self::default()
1691 }
1692}
1693#[doc = "This class is used to provide the filters used for discovery"]
1694#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1695pub struct RunFilter {
1696 #[doc = "filter for the test case sources (test containers)"]
1697 #[serde(
1698 rename = "sourceFilter",
1699 default,
1700 skip_serializing_if = "Option::is_none"
1701 )]
1702 pub source_filter: Option<String>,
1703 #[doc = "filter for the test cases"]
1704 #[serde(
1705 rename = "testCaseFilter",
1706 default,
1707 skip_serializing_if = "Option::is_none"
1708 )]
1709 pub test_case_filter: Option<String>,
1710}
1711impl RunFilter {
1712 pub fn new() -> Self {
1713 Self::default()
1714 }
1715}
1716#[doc = "Test run statistics per outcome."]
1717#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1718pub struct RunStatistic {
1719 #[doc = "Test result count fo the given outcome."]
1720 #[serde(default, skip_serializing_if = "Option::is_none")]
1721 pub count: Option<i32>,
1722 #[doc = "Test result outcome"]
1723 #[serde(default, skip_serializing_if = "Option::is_none")]
1724 pub outcome: Option<String>,
1725 #[doc = "Test Resolution State Details."]
1726 #[serde(
1727 rename = "resolutionState",
1728 default,
1729 skip_serializing_if = "Option::is_none"
1730 )]
1731 pub resolution_state: Option<TestResolutionState>,
1732 #[doc = "ResultMetadata for the given outcome/count."]
1733 #[serde(
1734 rename = "resultMetadata",
1735 default,
1736 skip_serializing_if = "Option::is_none"
1737 )]
1738 pub result_metadata: Option<run_statistic::ResultMetadata>,
1739 #[doc = "State of the test run"]
1740 #[serde(default, skip_serializing_if = "Option::is_none")]
1741 pub state: Option<String>,
1742}
1743impl RunStatistic {
1744 pub fn new() -> Self {
1745 Self::default()
1746 }
1747}
1748pub mod run_statistic {
1749 use super::*;
1750 #[doc = "ResultMetadata for the given outcome/count."]
1751 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1752 pub enum ResultMetadata {
1753 #[serde(rename = "rerun")]
1754 Rerun,
1755 #[serde(rename = "flaky")]
1756 Flaky,
1757 }
1758}
1759#[doc = "Summary of runs for a pipeline instance."]
1760#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1761pub struct RunSummary {
1762 #[doc = "Total time taken by runs with state completed and NeedInvestigation."]
1763 #[serde(default, skip_serializing_if = "Option::is_none")]
1764 pub duration: Option<String>,
1765 #[doc = "NoConfig runs count."]
1766 #[serde(
1767 rename = "noConfigRunsCount",
1768 default,
1769 skip_serializing_if = "Option::is_none"
1770 )]
1771 pub no_config_runs_count: Option<i32>,
1772 #[doc = "Runs count by outcome for runs with state completed and NeedInvestigation runs."]
1773 #[serde(
1774 rename = "runSummaryByOutcome",
1775 default,
1776 skip_serializing_if = "Option::is_none"
1777 )]
1778 pub run_summary_by_outcome: Option<serde_json::Value>,
1779 #[doc = "Runs count by state."]
1780 #[serde(
1781 rename = "runSummaryByState",
1782 default,
1783 skip_serializing_if = "Option::is_none"
1784 )]
1785 pub run_summary_by_state: Option<serde_json::Value>,
1786 #[doc = "Total runs count."]
1787 #[serde(
1788 rename = "totalRunsCount",
1789 default,
1790 skip_serializing_if = "Option::is_none"
1791 )]
1792 pub total_runs_count: Option<i32>,
1793}
1794impl RunSummary {
1795 pub fn new() -> Self {
1796 Self::default()
1797 }
1798}
1799#[doc = "Run summary for each output type of test."]
1800#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1801pub struct RunSummaryModel {
1802 #[doc = "Total time taken in milliseconds."]
1803 #[serde(default, skip_serializing_if = "Option::is_none")]
1804 pub duration: Option<i64>,
1805 #[doc = "Number of results for Outcome TestOutcome"]
1806 #[serde(
1807 rename = "resultCount",
1808 default,
1809 skip_serializing_if = "Option::is_none"
1810 )]
1811 pub result_count: Option<i32>,
1812 #[doc = "Summary is based on outcome"]
1813 #[serde(
1814 rename = "testOutcome",
1815 default,
1816 skip_serializing_if = "Option::is_none"
1817 )]
1818 pub test_outcome: Option<run_summary_model::TestOutcome>,
1819}
1820impl RunSummaryModel {
1821 pub fn new() -> Self {
1822 Self::default()
1823 }
1824}
1825pub mod run_summary_model {
1826 use super::*;
1827 #[doc = "Summary is based on outcome"]
1828 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1829 pub enum TestOutcome {
1830 #[serde(rename = "unspecified")]
1831 Unspecified,
1832 #[serde(rename = "none")]
1833 None,
1834 #[serde(rename = "passed")]
1835 Passed,
1836 #[serde(rename = "failed")]
1837 Failed,
1838 #[serde(rename = "inconclusive")]
1839 Inconclusive,
1840 #[serde(rename = "timeout")]
1841 Timeout,
1842 #[serde(rename = "aborted")]
1843 Aborted,
1844 #[serde(rename = "blocked")]
1845 Blocked,
1846 #[serde(rename = "notExecuted")]
1847 NotExecuted,
1848 #[serde(rename = "warning")]
1849 Warning,
1850 #[serde(rename = "error")]
1851 Error,
1852 #[serde(rename = "notApplicable")]
1853 NotApplicable,
1854 #[serde(rename = "paused")]
1855 Paused,
1856 #[serde(rename = "inProgress")]
1857 InProgress,
1858 #[serde(rename = "notImpacted")]
1859 NotImpacted,
1860 }
1861}
1862#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1863pub struct RunUpdateModel {
1864 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
1865 #[serde(default, skip_serializing_if = "Option::is_none")]
1866 pub build: Option<ShallowReference>,
1867 #[doc = "Drop location of the build used for test run."]
1868 #[serde(
1869 rename = "buildDropLocation",
1870 default,
1871 skip_serializing_if = "Option::is_none"
1872 )]
1873 pub build_drop_location: Option<String>,
1874 #[doc = "Flavor of the build used for test run. (E.g: Release, Debug)"]
1875 #[serde(
1876 rename = "buildFlavor",
1877 default,
1878 skip_serializing_if = "Option::is_none"
1879 )]
1880 pub build_flavor: Option<String>,
1881 #[doc = "Platform of the build used for test run. (E.g.: x86, amd64)"]
1882 #[serde(
1883 rename = "buildPlatform",
1884 default,
1885 skip_serializing_if = "Option::is_none"
1886 )]
1887 pub build_platform: Option<String>,
1888 #[doc = "Comments entered by those analyzing the run."]
1889 #[serde(default, skip_serializing_if = "Option::is_none")]
1890 pub comment: Option<String>,
1891 #[doc = "Completed date time of the run."]
1892 #[serde(
1893 rename = "completedDate",
1894 default,
1895 skip_serializing_if = "Option::is_none"
1896 )]
1897 pub completed_date: Option<String>,
1898 #[doc = "Name of the test controller used for automated run."]
1899 #[serde(default, skip_serializing_if = "Option::is_none")]
1900 pub controller: Option<String>,
1901 #[doc = "true to delete inProgess Results , false otherwise."]
1902 #[serde(
1903 rename = "deleteInProgressResults",
1904 default,
1905 skip_serializing_if = "Option::is_none"
1906 )]
1907 pub delete_in_progress_results: Option<bool>,
1908 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
1909 #[serde(
1910 rename = "dtlAutEnvironment",
1911 default,
1912 skip_serializing_if = "Option::is_none"
1913 )]
1914 pub dtl_aut_environment: Option<ShallowReference>,
1915 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
1916 #[serde(
1917 rename = "dtlEnvironment",
1918 default,
1919 skip_serializing_if = "Option::is_none"
1920 )]
1921 pub dtl_environment: Option<ShallowReference>,
1922 #[doc = "This is a temporary class to provide the details for the test run environment."]
1923 #[serde(
1924 rename = "dtlEnvironmentDetails",
1925 default,
1926 skip_serializing_if = "Option::is_none"
1927 )]
1928 pub dtl_environment_details: Option<DtlEnvironmentDetails>,
1929 #[doc = "Due date and time for test run."]
1930 #[serde(rename = "dueDate", default, skip_serializing_if = "Option::is_none")]
1931 pub due_date: Option<String>,
1932 #[doc = "Error message associated with the run."]
1933 #[serde(
1934 rename = "errorMessage",
1935 default,
1936 skip_serializing_if = "Option::is_none"
1937 )]
1938 pub error_message: Option<String>,
1939 #[doc = "The iteration in which to create the run."]
1940 #[serde(default, skip_serializing_if = "Option::is_none")]
1941 pub iteration: Option<String>,
1942 #[doc = "Log entries associated with the run. Use a comma-separated list of multiple log entry objects. { logEntry }, { logEntry }, ..."]
1943 #[serde(
1944 rename = "logEntries",
1945 default,
1946 deserialize_with = "crate::serde::deserialize_null_as_default",
1947 skip_serializing_if = "Vec::is_empty"
1948 )]
1949 pub log_entries: Vec<TestMessageLogDetails>,
1950 #[doc = "Name of the test run."]
1951 #[serde(default, skip_serializing_if = "Option::is_none")]
1952 pub name: Option<String>,
1953 #[doc = "URI of release environment associated with the run."]
1954 #[serde(
1955 rename = "releaseEnvironmentUri",
1956 default,
1957 skip_serializing_if = "Option::is_none"
1958 )]
1959 pub release_environment_uri: Option<String>,
1960 #[doc = "URI of release associated with the run."]
1961 #[serde(
1962 rename = "releaseUri",
1963 default,
1964 skip_serializing_if = "Option::is_none"
1965 )]
1966 pub release_uri: Option<String>,
1967 #[doc = "Run summary for run Type = NoConfigRun."]
1968 #[serde(
1969 rename = "runSummary",
1970 default,
1971 deserialize_with = "crate::serde::deserialize_null_as_default",
1972 skip_serializing_if = "Vec::is_empty"
1973 )]
1974 pub run_summary: Vec<RunSummaryModel>,
1975 #[doc = "SourceWorkFlow(CI/CD) of the test run."]
1976 #[serde(
1977 rename = "sourceWorkflow",
1978 default,
1979 skip_serializing_if = "Option::is_none"
1980 )]
1981 pub source_workflow: Option<String>,
1982 #[doc = "Start date time of the run."]
1983 #[serde(
1984 rename = "startedDate",
1985 default,
1986 skip_serializing_if = "Option::is_none"
1987 )]
1988 pub started_date: Option<String>,
1989 #[doc = "The state of the test run Below are the valid values - NotStarted, InProgress, Completed, Aborted, Waiting"]
1990 #[serde(default, skip_serializing_if = "Option::is_none")]
1991 pub state: Option<String>,
1992 #[doc = "The types of sub states for test run."]
1993 #[serde(default, skip_serializing_if = "Option::is_none")]
1994 pub substate: Option<run_update_model::Substate>,
1995 #[doc = "Tags to attach with the test run."]
1996 #[serde(
1997 default,
1998 deserialize_with = "crate::serde::deserialize_null_as_default",
1999 skip_serializing_if = "Vec::is_empty"
2000 )]
2001 pub tags: Vec<TestTag>,
2002 #[doc = "ID of the test environment associated with the run."]
2003 #[serde(
2004 rename = "testEnvironmentId",
2005 default,
2006 skip_serializing_if = "Option::is_none"
2007 )]
2008 pub test_environment_id: Option<String>,
2009 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
2010 #[serde(
2011 rename = "testSettings",
2012 default,
2013 skip_serializing_if = "Option::is_none"
2014 )]
2015 pub test_settings: Option<ShallowReference>,
2016}
2017impl RunUpdateModel {
2018 pub fn new() -> Self {
2019 Self::default()
2020 }
2021}
2022pub mod run_update_model {
2023 use super::*;
2024 #[doc = "The types of sub states for test run."]
2025 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2026 pub enum Substate {
2027 #[serde(rename = "none")]
2028 None,
2029 #[serde(rename = "creatingEnvironment")]
2030 CreatingEnvironment,
2031 #[serde(rename = "runningTests")]
2032 RunningTests,
2033 #[serde(rename = "canceledByUser")]
2034 CanceledByUser,
2035 #[serde(rename = "abortedBySystem")]
2036 AbortedBySystem,
2037 #[serde(rename = "timedOut")]
2038 TimedOut,
2039 #[serde(rename = "pendingAnalysis")]
2040 PendingAnalysis,
2041 #[serde(rename = "analyzed")]
2042 Analyzed,
2043 #[serde(rename = "cancellationInProgress")]
2044 CancellationInProgress,
2045 }
2046}
2047#[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
2048#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2049pub struct ShallowReference {
2050 #[doc = "ID of the resource"]
2051 #[serde(default, skip_serializing_if = "Option::is_none")]
2052 pub id: Option<String>,
2053 #[doc = "Name of the linked resource (definition name, controller name, etc.)"]
2054 #[serde(default, skip_serializing_if = "Option::is_none")]
2055 pub name: Option<String>,
2056 #[doc = "Full http link to the resource"]
2057 #[serde(default, skip_serializing_if = "Option::is_none")]
2058 pub url: Option<String>,
2059}
2060impl ShallowReference {
2061 pub fn new() -> Self {
2062 Self::default()
2063 }
2064}
2065#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2066pub struct ShallowTestCaseResult {
2067 #[serde(
2068 rename = "automatedTestName",
2069 default,
2070 skip_serializing_if = "Option::is_none"
2071 )]
2072 pub automated_test_name: Option<String>,
2073 #[serde(
2074 rename = "automatedTestStorage",
2075 default,
2076 skip_serializing_if = "Option::is_none"
2077 )]
2078 pub automated_test_storage: Option<String>,
2079 #[serde(
2080 rename = "durationInMs",
2081 default,
2082 skip_serializing_if = "Option::is_none"
2083 )]
2084 pub duration_in_ms: Option<f64>,
2085 #[serde(default, skip_serializing_if = "Option::is_none")]
2086 pub id: Option<i32>,
2087 #[serde(rename = "isReRun", default, skip_serializing_if = "Option::is_none")]
2088 pub is_re_run: Option<bool>,
2089 #[serde(default, skip_serializing_if = "Option::is_none")]
2090 pub outcome: Option<String>,
2091 #[serde(default, skip_serializing_if = "Option::is_none")]
2092 pub owner: Option<String>,
2093 #[serde(default, skip_serializing_if = "Option::is_none")]
2094 pub priority: Option<i32>,
2095 #[serde(rename = "refId", default, skip_serializing_if = "Option::is_none")]
2096 pub ref_id: Option<i32>,
2097 #[serde(rename = "runId", default, skip_serializing_if = "Option::is_none")]
2098 pub run_id: Option<i32>,
2099 #[serde(
2100 default,
2101 deserialize_with = "crate::serde::deserialize_null_as_default",
2102 skip_serializing_if = "Vec::is_empty"
2103 )]
2104 pub tags: Vec<String>,
2105 #[serde(
2106 rename = "testCaseTitle",
2107 default,
2108 skip_serializing_if = "Option::is_none"
2109 )]
2110 pub test_case_title: Option<String>,
2111}
2112impl ShallowTestCaseResult {
2113 pub fn new() -> Self {
2114 Self::default()
2115 }
2116}
2117#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2118pub struct ShallowTestCaseResultList {
2119 #[serde(default, skip_serializing_if = "Option::is_none")]
2120 pub count: Option<i32>,
2121 #[serde(
2122 default,
2123 deserialize_with = "crate::serde::deserialize_null_as_default",
2124 skip_serializing_if = "Vec::is_empty"
2125 )]
2126 pub value: Vec<ShallowTestCaseResult>,
2127}
2128impl ShallowTestCaseResultList {
2129 pub fn new() -> Self {
2130 Self::default()
2131 }
2132}
2133#[doc = "Reference to shared step workitem."]
2134#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2135pub struct SharedStepModel {
2136 #[doc = "WorkItem shared step ID."]
2137 #[serde(default, skip_serializing_if = "Option::is_none")]
2138 pub id: Option<i32>,
2139 #[doc = "Shared step workitem revision."]
2140 #[serde(default, skip_serializing_if = "Option::is_none")]
2141 pub revision: Option<i32>,
2142}
2143impl SharedStepModel {
2144 pub fn new() -> Self {
2145 Self::default()
2146 }
2147}
2148#[doc = "Stage in pipeline"]
2149#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2150pub struct StageReference {
2151 #[doc = "Attempt number of stage"]
2152 #[serde(default, skip_serializing_if = "Option::is_none")]
2153 pub attempt: Option<i32>,
2154 #[doc = "Name of the stage. Maximum supported length for name is 256 character."]
2155 #[serde(rename = "stageName", default, skip_serializing_if = "Option::is_none")]
2156 pub stage_name: Option<String>,
2157}
2158impl StageReference {
2159 pub fn new() -> Self {
2160 Self::default()
2161 }
2162}
2163#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2164pub struct TeamProjectReference {
2165 #[serde(default, skip_serializing_if = "Option::is_none")]
2166 pub abbreviation: Option<String>,
2167 #[serde(
2168 rename = "defaultTeamImageUrl",
2169 default,
2170 skip_serializing_if = "Option::is_none"
2171 )]
2172 pub default_team_image_url: Option<String>,
2173 #[serde(default, skip_serializing_if = "Option::is_none")]
2174 pub description: Option<String>,
2175 #[serde(default, skip_serializing_if = "Option::is_none")]
2176 pub id: Option<String>,
2177 #[serde(
2178 rename = "lastUpdateTime",
2179 default,
2180 skip_serializing_if = "Option::is_none",
2181 with = "crate::date_time::rfc3339::option"
2182 )]
2183 pub last_update_time: Option<time::OffsetDateTime>,
2184 pub name: String,
2185 #[serde(default, skip_serializing_if = "Option::is_none")]
2186 pub revision: Option<i64>,
2187 #[serde(default, skip_serializing_if = "Option::is_none")]
2188 pub state: Option<team_project_reference::State>,
2189 #[serde(default, skip_serializing_if = "Option::is_none")]
2190 pub url: Option<String>,
2191 pub visibility: team_project_reference::Visibility,
2192}
2193impl TeamProjectReference {
2194 pub fn new(name: String, visibility: team_project_reference::Visibility) -> Self {
2195 Self {
2196 abbreviation: None,
2197 default_team_image_url: None,
2198 description: None,
2199 id: None,
2200 last_update_time: None,
2201 name,
2202 revision: None,
2203 state: None,
2204 url: None,
2205 visibility,
2206 }
2207 }
2208}
2209pub mod team_project_reference {
2210 use super::*;
2211 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2212 pub enum State {
2213 #[serde(rename = "deleting")]
2214 Deleting,
2215 #[serde(rename = "new")]
2216 New,
2217 #[serde(rename = "wellFormed")]
2218 WellFormed,
2219 #[serde(rename = "createPending")]
2220 CreatePending,
2221 #[serde(rename = "all")]
2222 All,
2223 #[serde(rename = "unchanged")]
2224 Unchanged,
2225 #[serde(rename = "deleted")]
2226 Deleted,
2227 }
2228 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2229 pub enum Visibility {
2230 #[serde(rename = "private")]
2231 Private,
2232 #[serde(rename = "public")]
2233 Public,
2234 #[serde(rename = "organization")]
2235 Organization,
2236 #[serde(rename = "unchanged")]
2237 Unchanged,
2238 }
2239}
2240#[doc = "Represents a test step result."]
2241#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2242pub struct TestActionResultModel {
2243 #[serde(flatten)]
2244 pub test_result_model_base: TestResultModelBase,
2245 #[doc = "Path identifier for test step in test case workitem. Note: 1) It is represented in Hexadecimal format with 8 digits for a step. 2) Internally, the step ID value for first step starts with 2 so actionPath = 00000002 step 9, will have an ID = 10 and actionPath = 0000000a step 15, will have an ID =16 and actionPath = 00000010 3) actionPath of shared step is concatenated with the parent step of test case. Example, it would be something of type - 0000000300000001 where 00000003 denotes action path of test step and 00000001 denotes action path for shared step"]
2246 #[serde(
2247 rename = "actionPath",
2248 default,
2249 skip_serializing_if = "Option::is_none"
2250 )]
2251 pub action_path: Option<String>,
2252 #[doc = "Iteration ID of test action result."]
2253 #[serde(
2254 rename = "iterationId",
2255 default,
2256 skip_serializing_if = "Option::is_none"
2257 )]
2258 pub iteration_id: Option<i32>,
2259 #[doc = "Reference to shared step workitem."]
2260 #[serde(
2261 rename = "sharedStepModel",
2262 default,
2263 skip_serializing_if = "Option::is_none"
2264 )]
2265 pub shared_step_model: Option<SharedStepModel>,
2266 #[doc = "This is step Id of test case. For shared step, it is step Id of shared step in test case workitem; step Id in shared step. Example: TestCase workitem has two steps: 1) Normal step with Id = 1 2) Shared Step with Id = 2. Inside shared step: a) Normal Step with Id = 1 Value for StepIdentifier for First step: \"1\" Second step: \"2;1\""]
2267 #[serde(
2268 rename = "stepIdentifier",
2269 default,
2270 skip_serializing_if = "Option::is_none"
2271 )]
2272 pub step_identifier: Option<String>,
2273 #[doc = "Url of test action result. Deprecated in hosted environment."]
2274 #[serde(default, skip_serializing_if = "Option::is_none")]
2275 pub url: Option<String>,
2276}
2277impl TestActionResultModel {
2278 pub fn new() -> Self {
2279 Self::default()
2280 }
2281}
2282#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2283pub struct TestAttachment {
2284 #[doc = "Attachment type."]
2285 #[serde(
2286 rename = "attachmentType",
2287 default,
2288 skip_serializing_if = "Option::is_none"
2289 )]
2290 pub attachment_type: Option<test_attachment::AttachmentType>,
2291 #[doc = "Comment associated with attachment."]
2292 #[serde(default, skip_serializing_if = "Option::is_none")]
2293 pub comment: Option<String>,
2294 #[doc = "Attachment created date."]
2295 #[serde(
2296 rename = "createdDate",
2297 default,
2298 skip_serializing_if = "Option::is_none",
2299 with = "crate::date_time::rfc3339::option"
2300 )]
2301 pub created_date: Option<time::OffsetDateTime>,
2302 #[doc = "Attachment file name"]
2303 #[serde(rename = "fileName", default, skip_serializing_if = "Option::is_none")]
2304 pub file_name: Option<String>,
2305 #[doc = "ID of the attachment."]
2306 #[serde(default, skip_serializing_if = "Option::is_none")]
2307 pub id: Option<i32>,
2308 #[doc = "Attachment size."]
2309 #[serde(default, skip_serializing_if = "Option::is_none")]
2310 pub size: Option<i64>,
2311 #[doc = "Attachment Url."]
2312 #[serde(default, skip_serializing_if = "Option::is_none")]
2313 pub url: Option<String>,
2314}
2315impl TestAttachment {
2316 pub fn new() -> Self {
2317 Self::default()
2318 }
2319}
2320pub mod test_attachment {
2321 use super::*;
2322 #[doc = "Attachment type."]
2323 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2324 pub enum AttachmentType {
2325 #[serde(rename = "generalAttachment")]
2326 GeneralAttachment,
2327 #[serde(rename = "codeCoverage")]
2328 CodeCoverage,
2329 #[serde(rename = "consoleLog")]
2330 ConsoleLog,
2331 }
2332}
2333#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2334pub struct TestAttachmentList {
2335 #[serde(default, skip_serializing_if = "Option::is_none")]
2336 pub count: Option<i32>,
2337 #[serde(
2338 default,
2339 deserialize_with = "crate::serde::deserialize_null_as_default",
2340 skip_serializing_if = "Vec::is_empty"
2341 )]
2342 pub value: Vec<TestAttachment>,
2343}
2344impl TestAttachmentList {
2345 pub fn new() -> Self {
2346 Self::default()
2347 }
2348}
2349#[doc = "Reference to test attachment."]
2350#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2351pub struct TestAttachmentReference {
2352 #[doc = "ID of the attachment."]
2353 #[serde(default, skip_serializing_if = "Option::is_none")]
2354 pub id: Option<i32>,
2355 #[doc = "Url to download the attachment."]
2356 #[serde(default, skip_serializing_if = "Option::is_none")]
2357 pub url: Option<String>,
2358}
2359impl TestAttachmentReference {
2360 pub fn new() -> Self {
2361 Self::default()
2362 }
2363}
2364#[doc = "Test attachment request model"]
2365#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2366pub struct TestAttachmentRequestModel {
2367 #[doc = "Attachment type By Default it will be GeneralAttachment. It can be one of the following type. { GeneralAttachment, AfnStrip, BugFilingData, CodeCoverage, IntermediateCollectorData, RunConfig, TestImpactDetails, TmiTestRunDeploymentFiles, TmiTestRunReverseDeploymentFiles, TmiTestResultDetail, TmiTestRunSummary }"]
2368 #[serde(
2369 rename = "attachmentType",
2370 default,
2371 skip_serializing_if = "Option::is_none"
2372 )]
2373 pub attachment_type: Option<String>,
2374 #[doc = "Comment associated with attachment"]
2375 #[serde(default, skip_serializing_if = "Option::is_none")]
2376 pub comment: Option<String>,
2377 #[doc = "Attachment filename"]
2378 #[serde(rename = "fileName", default, skip_serializing_if = "Option::is_none")]
2379 pub file_name: Option<String>,
2380 #[doc = "Base64 encoded file stream"]
2381 #[serde(default, skip_serializing_if = "Option::is_none")]
2382 pub stream: Option<String>,
2383}
2384impl TestAttachmentRequestModel {
2385 pub fn new() -> Self {
2386 Self::default()
2387 }
2388}
2389#[doc = "Represents a test result."]
2390#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2391pub struct TestCaseResult {
2392 #[doc = "Test attachment ID of action recording."]
2393 #[serde(
2394 rename = "afnStripId",
2395 default,
2396 skip_serializing_if = "Option::is_none"
2397 )]
2398 pub afn_strip_id: Option<i32>,
2399 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
2400 #[serde(default, skip_serializing_if = "Option::is_none")]
2401 pub area: Option<ShallowReference>,
2402 #[doc = "Reference to bugs linked to test result."]
2403 #[serde(
2404 rename = "associatedBugs",
2405 default,
2406 deserialize_with = "crate::serde::deserialize_null_as_default",
2407 skip_serializing_if = "Vec::is_empty"
2408 )]
2409 pub associated_bugs: Vec<ShallowReference>,
2410 #[doc = "ID representing test method in a dll."]
2411 #[serde(
2412 rename = "automatedTestId",
2413 default,
2414 skip_serializing_if = "Option::is_none"
2415 )]
2416 pub automated_test_id: Option<String>,
2417 #[doc = "Fully qualified name of test executed."]
2418 #[serde(
2419 rename = "automatedTestName",
2420 default,
2421 skip_serializing_if = "Option::is_none"
2422 )]
2423 pub automated_test_name: Option<String>,
2424 #[doc = "Container to which test belongs."]
2425 #[serde(
2426 rename = "automatedTestStorage",
2427 default,
2428 skip_serializing_if = "Option::is_none"
2429 )]
2430 pub automated_test_storage: Option<String>,
2431 #[doc = "Type of automated test."]
2432 #[serde(
2433 rename = "automatedTestType",
2434 default,
2435 skip_serializing_if = "Option::is_none"
2436 )]
2437 pub automated_test_type: Option<String>,
2438 #[doc = "TypeId of automated test."]
2439 #[serde(
2440 rename = "automatedTestTypeId",
2441 default,
2442 skip_serializing_if = "Option::is_none"
2443 )]
2444 pub automated_test_type_id: Option<String>,
2445 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
2446 #[serde(default, skip_serializing_if = "Option::is_none")]
2447 pub build: Option<ShallowReference>,
2448 #[doc = "Reference to a build."]
2449 #[serde(
2450 rename = "buildReference",
2451 default,
2452 skip_serializing_if = "Option::is_none"
2453 )]
2454 pub build_reference: Option<BuildReference>,
2455 #[doc = "Comment in a test result with maxSize= 1000 chars."]
2456 #[serde(default, skip_serializing_if = "Option::is_none")]
2457 pub comment: Option<String>,
2458 #[doc = "Time when test execution completed(UTC). Completed date should be greater than StartedDate."]
2459 #[serde(
2460 rename = "completedDate",
2461 default,
2462 skip_serializing_if = "Option::is_none",
2463 with = "crate::date_time::rfc3339::option"
2464 )]
2465 pub completed_date: Option<time::OffsetDateTime>,
2466 #[doc = "Machine name where test executed."]
2467 #[serde(
2468 rename = "computerName",
2469 default,
2470 skip_serializing_if = "Option::is_none"
2471 )]
2472 pub computer_name: Option<String>,
2473 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
2474 #[serde(default, skip_serializing_if = "Option::is_none")]
2475 pub configuration: Option<ShallowReference>,
2476 #[doc = "Timestamp when test result created(UTC)."]
2477 #[serde(
2478 rename = "createdDate",
2479 default,
2480 skip_serializing_if = "Option::is_none",
2481 with = "crate::date_time::rfc3339::option"
2482 )]
2483 pub created_date: Option<time::OffsetDateTime>,
2484 #[doc = "Additional properties of test result."]
2485 #[serde(
2486 rename = "customFields",
2487 default,
2488 deserialize_with = "crate::serde::deserialize_null_as_default",
2489 skip_serializing_if = "Vec::is_empty"
2490 )]
2491 pub custom_fields: Vec<CustomTestField>,
2492 #[doc = "Duration of test execution in milliseconds. If not provided value will be set as CompletedDate - StartedDate"]
2493 #[serde(
2494 rename = "durationInMs",
2495 default,
2496 skip_serializing_if = "Option::is_none"
2497 )]
2498 pub duration_in_ms: Option<f64>,
2499 #[doc = "Error message in test execution."]
2500 #[serde(
2501 rename = "errorMessage",
2502 default,
2503 skip_serializing_if = "Option::is_none"
2504 )]
2505 pub error_message: Option<String>,
2506 #[doc = "Failing since information of a test result."]
2507 #[serde(
2508 rename = "failingSince",
2509 default,
2510 skip_serializing_if = "Option::is_none"
2511 )]
2512 pub failing_since: Option<FailingSince>,
2513 #[doc = "Failure type of test result. Valid Value= (Known Issue, New Issue, Regression, Unknown, None)"]
2514 #[serde(
2515 rename = "failureType",
2516 default,
2517 skip_serializing_if = "Option::is_none"
2518 )]
2519 pub failure_type: Option<String>,
2520 #[doc = "ID of a test result."]
2521 #[serde(default, skip_serializing_if = "Option::is_none")]
2522 pub id: Option<i32>,
2523 #[doc = "Test result details of test iterations used only for Manual Testing."]
2524 #[serde(
2525 rename = "iterationDetails",
2526 default,
2527 deserialize_with = "crate::serde::deserialize_null_as_default",
2528 skip_serializing_if = "Vec::is_empty"
2529 )]
2530 pub iteration_details: Vec<TestIterationDetailsModel>,
2531 #[serde(
2532 rename = "lastUpdatedBy",
2533 default,
2534 skip_serializing_if = "Option::is_none"
2535 )]
2536 pub last_updated_by: Option<IdentityRef>,
2537 #[doc = "Last updated datetime of test result(UTC)."]
2538 #[serde(
2539 rename = "lastUpdatedDate",
2540 default,
2541 skip_serializing_if = "Option::is_none",
2542 with = "crate::date_time::rfc3339::option"
2543 )]
2544 pub last_updated_date: Option<time::OffsetDateTime>,
2545 #[doc = "Test outcome of test result. Valid values = (Unspecified, None, Passed, Failed, Inconclusive, Timeout, Aborted, Blocked, NotExecuted, Warning, Error, NotApplicable, Paused, InProgress, NotImpacted)"]
2546 #[serde(default, skip_serializing_if = "Option::is_none")]
2547 pub outcome: Option<String>,
2548 #[serde(default, skip_serializing_if = "Option::is_none")]
2549 pub owner: Option<IdentityRef>,
2550 #[doc = "Priority of test executed."]
2551 #[serde(default, skip_serializing_if = "Option::is_none")]
2552 pub priority: Option<i32>,
2553 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
2554 #[serde(default, skip_serializing_if = "Option::is_none")]
2555 pub project: Option<ShallowReference>,
2556 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
2557 #[serde(default, skip_serializing_if = "Option::is_none")]
2558 pub release: Option<ShallowReference>,
2559 #[doc = "Reference to a release."]
2560 #[serde(
2561 rename = "releaseReference",
2562 default,
2563 skip_serializing_if = "Option::is_none"
2564 )]
2565 pub release_reference: Option<ReleaseReference>,
2566 #[doc = "ResetCount."]
2567 #[serde(
2568 rename = "resetCount",
2569 default,
2570 skip_serializing_if = "Option::is_none"
2571 )]
2572 pub reset_count: Option<i32>,
2573 #[doc = "Resolution state of test result."]
2574 #[serde(
2575 rename = "resolutionState",
2576 default,
2577 skip_serializing_if = "Option::is_none"
2578 )]
2579 pub resolution_state: Option<String>,
2580 #[doc = "ID of resolution state."]
2581 #[serde(
2582 rename = "resolutionStateId",
2583 default,
2584 skip_serializing_if = "Option::is_none"
2585 )]
2586 pub resolution_state_id: Option<i32>,
2587 #[doc = "Hierarchy type of the result, default value of None means its leaf node."]
2588 #[serde(
2589 rename = "resultGroupType",
2590 default,
2591 skip_serializing_if = "Option::is_none"
2592 )]
2593 pub result_group_type: Option<test_case_result::ResultGroupType>,
2594 #[doc = "Revision number of test result."]
2595 #[serde(default, skip_serializing_if = "Option::is_none")]
2596 pub revision: Option<i32>,
2597 #[serde(rename = "runBy", default, skip_serializing_if = "Option::is_none")]
2598 pub run_by: Option<IdentityRef>,
2599 #[doc = "Stacktrace with maxSize= 1000 chars."]
2600 #[serde(
2601 rename = "stackTrace",
2602 default,
2603 skip_serializing_if = "Option::is_none"
2604 )]
2605 pub stack_trace: Option<String>,
2606 #[doc = "Time when test execution started(UTC)."]
2607 #[serde(
2608 rename = "startedDate",
2609 default,
2610 skip_serializing_if = "Option::is_none",
2611 with = "crate::date_time::rfc3339::option"
2612 )]
2613 pub started_date: Option<time::OffsetDateTime>,
2614 #[doc = "State of test result. Type TestRunState."]
2615 #[serde(default, skip_serializing_if = "Option::is_none")]
2616 pub state: Option<String>,
2617 #[doc = "List of sub results inside a test result, if ResultGroupType is not None, it holds corresponding type sub results."]
2618 #[serde(
2619 rename = "subResults",
2620 default,
2621 deserialize_with = "crate::serde::deserialize_null_as_default",
2622 skip_serializing_if = "Vec::is_empty"
2623 )]
2624 pub sub_results: Vec<TestSubResult>,
2625 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
2626 #[serde(rename = "testCase", default, skip_serializing_if = "Option::is_none")]
2627 pub test_case: Option<ShallowReference>,
2628 #[doc = "Reference ID of test used by test result. Type TestResultMetaData"]
2629 #[serde(
2630 rename = "testCaseReferenceId",
2631 default,
2632 skip_serializing_if = "Option::is_none"
2633 )]
2634 pub test_case_reference_id: Option<i32>,
2635 #[doc = "TestCaseRevision Number."]
2636 #[serde(
2637 rename = "testCaseRevision",
2638 default,
2639 skip_serializing_if = "Option::is_none"
2640 )]
2641 pub test_case_revision: Option<i32>,
2642 #[doc = "Name of test."]
2643 #[serde(
2644 rename = "testCaseTitle",
2645 default,
2646 skip_serializing_if = "Option::is_none"
2647 )]
2648 pub test_case_title: Option<String>,
2649 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
2650 #[serde(rename = "testPlan", default, skip_serializing_if = "Option::is_none")]
2651 pub test_plan: Option<ShallowReference>,
2652 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
2653 #[serde(rename = "testPoint", default, skip_serializing_if = "Option::is_none")]
2654 pub test_point: Option<ShallowReference>,
2655 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
2656 #[serde(rename = "testRun", default, skip_serializing_if = "Option::is_none")]
2657 pub test_run: Option<ShallowReference>,
2658 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
2659 #[serde(rename = "testSuite", default, skip_serializing_if = "Option::is_none")]
2660 pub test_suite: Option<ShallowReference>,
2661 #[doc = "Url of test result."]
2662 #[serde(default, skip_serializing_if = "Option::is_none")]
2663 pub url: Option<String>,
2664}
2665impl TestCaseResult {
2666 pub fn new() -> Self {
2667 Self::default()
2668 }
2669}
2670pub mod test_case_result {
2671 use super::*;
2672 #[doc = "Hierarchy type of the result, default value of None means its leaf node."]
2673 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2674 pub enum ResultGroupType {
2675 #[serde(rename = "none")]
2676 None,
2677 #[serde(rename = "rerun")]
2678 Rerun,
2679 #[serde(rename = "dataDriven")]
2680 DataDriven,
2681 #[serde(rename = "orderedTest")]
2682 OrderedTest,
2683 #[serde(rename = "generic")]
2684 Generic,
2685 }
2686}
2687#[doc = "Test attachment information in a test iteration."]
2688#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2689pub struct TestCaseResultAttachmentModel {
2690 #[doc = "Path identifier test step in test case workitem."]
2691 #[serde(
2692 rename = "actionPath",
2693 default,
2694 skip_serializing_if = "Option::is_none"
2695 )]
2696 pub action_path: Option<String>,
2697 #[doc = "Attachment ID."]
2698 #[serde(default, skip_serializing_if = "Option::is_none")]
2699 pub id: Option<i32>,
2700 #[doc = "Iteration ID."]
2701 #[serde(
2702 rename = "iterationId",
2703 default,
2704 skip_serializing_if = "Option::is_none"
2705 )]
2706 pub iteration_id: Option<i32>,
2707 #[doc = "Name of attachment."]
2708 #[serde(default, skip_serializing_if = "Option::is_none")]
2709 pub name: Option<String>,
2710 #[doc = "Attachment size."]
2711 #[serde(default, skip_serializing_if = "Option::is_none")]
2712 pub size: Option<i64>,
2713 #[doc = "Url to attachment."]
2714 #[serde(default, skip_serializing_if = "Option::is_none")]
2715 pub url: Option<String>,
2716}
2717impl TestCaseResultAttachmentModel {
2718 pub fn new() -> Self {
2719 Self::default()
2720 }
2721}
2722#[doc = "Reference to a test result."]
2723#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2724pub struct TestCaseResultIdentifier {
2725 #[doc = "Test result ID."]
2726 #[serde(
2727 rename = "testResultId",
2728 default,
2729 skip_serializing_if = "Option::is_none"
2730 )]
2731 pub test_result_id: Option<i32>,
2732 #[doc = "Test run ID."]
2733 #[serde(rename = "testRunId", default, skip_serializing_if = "Option::is_none")]
2734 pub test_run_id: Option<i32>,
2735}
2736impl TestCaseResultIdentifier {
2737 pub fn new() -> Self {
2738 Self::default()
2739 }
2740}
2741#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2742pub struct TestCaseResultList {
2743 #[serde(default, skip_serializing_if = "Option::is_none")]
2744 pub count: Option<i32>,
2745 #[serde(
2746 default,
2747 deserialize_with = "crate::serde::deserialize_null_as_default",
2748 skip_serializing_if = "Vec::is_empty"
2749 )]
2750 pub value: Vec<TestCaseResult>,
2751}
2752impl TestCaseResultList {
2753 pub fn new() -> Self {
2754 Self::default()
2755 }
2756}
2757#[doc = "Test environment Detail."]
2758#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2759pub struct TestEnvironment {
2760 #[doc = "Test Environment Id."]
2761 #[serde(
2762 rename = "environmentId",
2763 default,
2764 skip_serializing_if = "Option::is_none"
2765 )]
2766 pub environment_id: Option<String>,
2767 #[doc = "Test Environment Name."]
2768 #[serde(
2769 rename = "environmentName",
2770 default,
2771 skip_serializing_if = "Option::is_none"
2772 )]
2773 pub environment_name: Option<String>,
2774}
2775impl TestEnvironment {
2776 pub fn new() -> Self {
2777 Self::default()
2778 }
2779}
2780#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2781pub struct TestFailureDetails {
2782 #[serde(default, skip_serializing_if = "Option::is_none")]
2783 pub count: Option<i32>,
2784 #[serde(
2785 rename = "testResults",
2786 default,
2787 deserialize_with = "crate::serde::deserialize_null_as_default",
2788 skip_serializing_if = "Vec::is_empty"
2789 )]
2790 pub test_results: Vec<TestCaseResultIdentifier>,
2791}
2792impl TestFailureDetails {
2793 pub fn new() -> Self {
2794 Self::default()
2795 }
2796}
2797#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2798pub struct TestFailuresAnalysis {
2799 #[serde(
2800 rename = "existingFailures",
2801 default,
2802 skip_serializing_if = "Option::is_none"
2803 )]
2804 pub existing_failures: Option<TestFailureDetails>,
2805 #[serde(
2806 rename = "fixedTests",
2807 default,
2808 skip_serializing_if = "Option::is_none"
2809 )]
2810 pub fixed_tests: Option<TestFailureDetails>,
2811 #[serde(
2812 rename = "newFailures",
2813 default,
2814 skip_serializing_if = "Option::is_none"
2815 )]
2816 pub new_failures: Option<TestFailureDetails>,
2817 #[serde(
2818 rename = "previousContext",
2819 default,
2820 skip_serializing_if = "Option::is_none"
2821 )]
2822 pub previous_context: Option<TestResultsContext>,
2823}
2824impl TestFailuresAnalysis {
2825 pub fn new() -> Self {
2826 Self::default()
2827 }
2828}
2829#[doc = "Test Flaky Identifier"]
2830#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2831pub struct TestFlakyIdentifier {
2832 #[doc = "Branch Name where Flakiness has to be Marked/Unmarked"]
2833 #[serde(
2834 rename = "branchName",
2835 default,
2836 skip_serializing_if = "Option::is_none"
2837 )]
2838 pub branch_name: Option<String>,
2839 #[doc = "State for Flakiness"]
2840 #[serde(rename = "isFlaky", default, skip_serializing_if = "Option::is_none")]
2841 pub is_flaky: Option<bool>,
2842}
2843impl TestFlakyIdentifier {
2844 pub fn new() -> Self {
2845 Self::default()
2846 }
2847}
2848#[doc = "Filter to get TestCase result history."]
2849#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2850pub struct TestHistoryQuery {
2851 #[doc = "Automated test name of the TestCase."]
2852 #[serde(
2853 rename = "automatedTestName",
2854 default,
2855 skip_serializing_if = "Option::is_none"
2856 )]
2857 pub automated_test_name: Option<String>,
2858 #[doc = "Results to be get for a particular branches."]
2859 #[serde(default, skip_serializing_if = "Option::is_none")]
2860 pub branch: Option<String>,
2861 #[doc = "Get the results history only for this BuildDefinitionId. This to get used in query GroupBy should be Branch. If this is provided, Branch will have no use."]
2862 #[serde(
2863 rename = "buildDefinitionId",
2864 default,
2865 skip_serializing_if = "Option::is_none"
2866 )]
2867 pub build_definition_id: Option<i32>,
2868 #[doc = "It will be filled by server. If not null means there are some results still to be get, and we need to call this REST API with this ContinuousToken. It is not supposed to be created (or altered, if received from server in last batch) by user."]
2869 #[serde(
2870 rename = "continuationToken",
2871 default,
2872 skip_serializing_if = "Option::is_none"
2873 )]
2874 pub continuation_token: Option<String>,
2875 #[doc = "Group the result on the basis of TestResultGroupBy. This can be Branch, Environment or null(if results are fetched by BuildDefinitionId)"]
2876 #[serde(rename = "groupBy", default, skip_serializing_if = "Option::is_none")]
2877 pub group_by: Option<test_history_query::GroupBy>,
2878 #[doc = "History to get between time interval MaxCompleteDate and (MaxCompleteDate - TrendDays). Default is current date time."]
2879 #[serde(
2880 rename = "maxCompleteDate",
2881 default,
2882 skip_serializing_if = "Option::is_none",
2883 with = "crate::date_time::rfc3339::option"
2884 )]
2885 pub max_complete_date: Option<time::OffsetDateTime>,
2886 #[doc = "Get the results history only for this ReleaseEnvDefinitionId. This to get used in query GroupBy should be Environment."]
2887 #[serde(
2888 rename = "releaseEnvDefinitionId",
2889 default,
2890 skip_serializing_if = "Option::is_none"
2891 )]
2892 pub release_env_definition_id: Option<i32>,
2893 #[doc = "List of TestResultHistoryForGroup which are grouped by GroupBy"]
2894 #[serde(
2895 rename = "resultsForGroup",
2896 default,
2897 deserialize_with = "crate::serde::deserialize_null_as_default",
2898 skip_serializing_if = "Vec::is_empty"
2899 )]
2900 pub results_for_group: Vec<TestResultHistoryForGroup>,
2901 #[doc = "Get the results history only for this testCaseId. This to get used in query to filter the result along with automatedtestname"]
2902 #[serde(
2903 rename = "testCaseId",
2904 default,
2905 skip_serializing_if = "Option::is_none"
2906 )]
2907 pub test_case_id: Option<i32>,
2908 #[doc = "Number of days for which history to collect. Maximum supported value is 7 days. Default is 7 days."]
2909 #[serde(rename = "trendDays", default, skip_serializing_if = "Option::is_none")]
2910 pub trend_days: Option<i32>,
2911}
2912impl TestHistoryQuery {
2913 pub fn new() -> Self {
2914 Self::default()
2915 }
2916}
2917pub mod test_history_query {
2918 use super::*;
2919 #[doc = "Group the result on the basis of TestResultGroupBy. This can be Branch, Environment or null(if results are fetched by BuildDefinitionId)"]
2920 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
2921 pub enum GroupBy {
2922 #[serde(rename = "branch")]
2923 Branch,
2924 #[serde(rename = "environment")]
2925 Environment,
2926 }
2927}
2928#[doc = "Represents a test iteration result."]
2929#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
2930pub struct TestIterationDetailsModel {
2931 #[doc = "Test step results in an iteration."]
2932 #[serde(
2933 rename = "actionResults",
2934 default,
2935 deserialize_with = "crate::serde::deserialize_null_as_default",
2936 skip_serializing_if = "Vec::is_empty"
2937 )]
2938 pub action_results: Vec<TestActionResultModel>,
2939 #[doc = "Reference to attachments in test iteration result."]
2940 #[serde(
2941 default,
2942 deserialize_with = "crate::serde::deserialize_null_as_default",
2943 skip_serializing_if = "Vec::is_empty"
2944 )]
2945 pub attachments: Vec<TestCaseResultAttachmentModel>,
2946 #[doc = "Comment in test iteration result."]
2947 #[serde(default, skip_serializing_if = "Option::is_none")]
2948 pub comment: Option<String>,
2949 #[doc = "Time when execution completed(UTC)."]
2950 #[serde(
2951 rename = "completedDate",
2952 default,
2953 skip_serializing_if = "Option::is_none",
2954 with = "crate::date_time::rfc3339::option"
2955 )]
2956 pub completed_date: Option<time::OffsetDateTime>,
2957 #[doc = "Duration of execution."]
2958 #[serde(
2959 rename = "durationInMs",
2960 default,
2961 skip_serializing_if = "Option::is_none"
2962 )]
2963 pub duration_in_ms: Option<f64>,
2964 #[doc = "Error message in test iteration result execution."]
2965 #[serde(
2966 rename = "errorMessage",
2967 default,
2968 skip_serializing_if = "Option::is_none"
2969 )]
2970 pub error_message: Option<String>,
2971 #[doc = "ID of test iteration result."]
2972 #[serde(default, skip_serializing_if = "Option::is_none")]
2973 pub id: Option<i32>,
2974 #[doc = "Test outcome if test iteration result."]
2975 #[serde(default, skip_serializing_if = "Option::is_none")]
2976 pub outcome: Option<String>,
2977 #[doc = "Test parameters in an iteration."]
2978 #[serde(
2979 default,
2980 deserialize_with = "crate::serde::deserialize_null_as_default",
2981 skip_serializing_if = "Vec::is_empty"
2982 )]
2983 pub parameters: Vec<TestResultParameterModel>,
2984 #[doc = "Time when execution started(UTC)."]
2985 #[serde(
2986 rename = "startedDate",
2987 default,
2988 skip_serializing_if = "Option::is_none",
2989 with = "crate::date_time::rfc3339::option"
2990 )]
2991 pub started_date: Option<time::OffsetDateTime>,
2992 #[doc = "Url to test iteration result."]
2993 #[serde(default, skip_serializing_if = "Option::is_none")]
2994 pub url: Option<String>,
2995}
2996impl TestIterationDetailsModel {
2997 pub fn new() -> Self {
2998 Self::default()
2999 }
3000}
3001#[doc = "Represents Test Log Result object."]
3002#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3003pub struct TestLog {
3004 #[doc = "Test Log Reference object"]
3005 #[serde(
3006 rename = "logReference",
3007 default,
3008 skip_serializing_if = "Option::is_none"
3009 )]
3010 pub log_reference: Option<TestLogReference>,
3011 #[doc = "Meta data for Log file"]
3012 #[serde(rename = "metaData", default, skip_serializing_if = "Option::is_none")]
3013 pub meta_data: Option<serde_json::Value>,
3014 #[doc = "LastUpdatedDate for Log file"]
3015 #[serde(
3016 rename = "modifiedOn",
3017 default,
3018 skip_serializing_if = "Option::is_none",
3019 with = "crate::date_time::rfc3339::option"
3020 )]
3021 pub modified_on: Option<time::OffsetDateTime>,
3022 #[doc = "Size in Bytes for Log file"]
3023 #[serde(default, skip_serializing_if = "Option::is_none")]
3024 pub size: Option<i64>,
3025}
3026impl TestLog {
3027 pub fn new() -> Self {
3028 Self::default()
3029 }
3030}
3031#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3032pub struct TestLogList {
3033 #[serde(default, skip_serializing_if = "Option::is_none")]
3034 pub count: Option<i32>,
3035 #[serde(
3036 default,
3037 deserialize_with = "crate::serde::deserialize_null_as_default",
3038 skip_serializing_if = "Vec::is_empty"
3039 )]
3040 pub value: Vec<TestLog>,
3041}
3042impl TestLogList {
3043 pub fn new() -> Self {
3044 Self::default()
3045 }
3046}
3047#[doc = "Test Log Reference object"]
3048#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3049pub struct TestLogReference {
3050 #[doc = "BuildId for test log, if context is build"]
3051 #[serde(rename = "buildId", default, skip_serializing_if = "Option::is_none")]
3052 pub build_id: Option<i32>,
3053 #[doc = "FileName for log file"]
3054 #[serde(rename = "filePath", default, skip_serializing_if = "Option::is_none")]
3055 pub file_path: Option<String>,
3056 #[doc = "ReleaseEnvId for test log, if context is Release"]
3057 #[serde(
3058 rename = "releaseEnvId",
3059 default,
3060 skip_serializing_if = "Option::is_none"
3061 )]
3062 pub release_env_id: Option<i32>,
3063 #[doc = "ReleaseId for test log, if context is Release"]
3064 #[serde(rename = "releaseId", default, skip_serializing_if = "Option::is_none")]
3065 pub release_id: Option<i32>,
3066 #[doc = "Resultid for test log, if context is run and log is related to result"]
3067 #[serde(rename = "resultId", default, skip_serializing_if = "Option::is_none")]
3068 pub result_id: Option<i32>,
3069 #[doc = "runid for test log, if context is run"]
3070 #[serde(rename = "runId", default, skip_serializing_if = "Option::is_none")]
3071 pub run_id: Option<i32>,
3072 #[doc = "Test Log Scope"]
3073 #[serde(default, skip_serializing_if = "Option::is_none")]
3074 pub scope: Option<test_log_reference::Scope>,
3075 #[doc = "SubResultid for test log, if context is run and log is related to subresult"]
3076 #[serde(
3077 rename = "subResultId",
3078 default,
3079 skip_serializing_if = "Option::is_none"
3080 )]
3081 pub sub_result_id: Option<i32>,
3082 #[doc = "Log Type"]
3083 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
3084 pub type_: Option<test_log_reference::Type>,
3085}
3086impl TestLogReference {
3087 pub fn new() -> Self {
3088 Self::default()
3089 }
3090}
3091pub mod test_log_reference {
3092 use super::*;
3093 #[doc = "Test Log Scope"]
3094 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3095 pub enum Scope {
3096 #[serde(rename = "run")]
3097 Run,
3098 }
3099 #[doc = "Log Type"]
3100 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3101 pub enum Type {
3102 #[serde(rename = "generalAttachment")]
3103 GeneralAttachment,
3104 }
3105}
3106#[doc = "Attachment metadata for test attachments from LogStore."]
3107#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3108pub struct TestLogStoreAttachment {
3109 #[doc = "Attachment type."]
3110 #[serde(
3111 rename = "attachmentType",
3112 default,
3113 skip_serializing_if = "Option::is_none"
3114 )]
3115 pub attachment_type: Option<test_log_store_attachment::AttachmentType>,
3116 #[doc = "Comment associated with attachment."]
3117 #[serde(default, skip_serializing_if = "Option::is_none")]
3118 pub comment: Option<String>,
3119 #[doc = "Attachment created date."]
3120 #[serde(
3121 rename = "createdDate",
3122 default,
3123 skip_serializing_if = "Option::is_none",
3124 with = "crate::date_time::rfc3339::option"
3125 )]
3126 pub created_date: Option<time::OffsetDateTime>,
3127 #[doc = "Attachment file name."]
3128 #[serde(rename = "fileName", default, skip_serializing_if = "Option::is_none")]
3129 pub file_name: Option<String>,
3130 #[doc = "Attachment size."]
3131 #[serde(default, skip_serializing_if = "Option::is_none")]
3132 pub size: Option<i64>,
3133 #[doc = "Attachment Url."]
3134 #[serde(default, skip_serializing_if = "Option::is_none")]
3135 pub url: Option<String>,
3136}
3137impl TestLogStoreAttachment {
3138 pub fn new() -> Self {
3139 Self::default()
3140 }
3141}
3142pub mod test_log_store_attachment {
3143 use super::*;
3144 #[doc = "Attachment type."]
3145 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3146 pub enum AttachmentType {
3147 #[serde(rename = "generalAttachment")]
3148 GeneralAttachment,
3149 #[serde(rename = "codeCoverage")]
3150 CodeCoverage,
3151 #[serde(rename = "consoleLog")]
3152 ConsoleLog,
3153 }
3154}
3155#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3156pub struct TestLogStoreAttachmentList {
3157 #[serde(default, skip_serializing_if = "Option::is_none")]
3158 pub count: Option<i32>,
3159 #[serde(
3160 default,
3161 deserialize_with = "crate::serde::deserialize_null_as_default",
3162 skip_serializing_if = "Vec::is_empty"
3163 )]
3164 pub value: Vec<TestLogStoreAttachment>,
3165}
3166impl TestLogStoreAttachmentList {
3167 pub fn new() -> Self {
3168 Self::default()
3169 }
3170}
3171#[doc = "Reference to test attachment."]
3172#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3173pub struct TestLogStoreAttachmentReference {
3174 #[doc = "Url to download the attachment."]
3175 #[serde(default, skip_serializing_if = "Option::is_none")]
3176 pub url: Option<String>,
3177}
3178impl TestLogStoreAttachmentReference {
3179 pub fn new() -> Self {
3180 Self::default()
3181 }
3182}
3183#[doc = "Represents Test Log store endpoint details."]
3184#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3185pub struct TestLogStoreEndpointDetails {
3186 #[doc = "Test log store connection Uri."]
3187 #[serde(
3188 rename = "endpointSASUri",
3189 default,
3190 skip_serializing_if = "Option::is_none"
3191 )]
3192 pub endpoint_sas_uri: Option<String>,
3193 #[doc = "Test log store endpoint type."]
3194 #[serde(
3195 rename = "endpointType",
3196 default,
3197 skip_serializing_if = "Option::is_none"
3198 )]
3199 pub endpoint_type: Option<test_log_store_endpoint_details::EndpointType>,
3200 #[doc = "Test log store status code"]
3201 #[serde(default, skip_serializing_if = "Option::is_none")]
3202 pub status: Option<test_log_store_endpoint_details::Status>,
3203}
3204impl TestLogStoreEndpointDetails {
3205 pub fn new() -> Self {
3206 Self::default()
3207 }
3208}
3209pub mod test_log_store_endpoint_details {
3210 use super::*;
3211 #[doc = "Test log store endpoint type."]
3212 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3213 pub enum EndpointType {
3214 #[serde(rename = "root")]
3215 Root,
3216 #[serde(rename = "file")]
3217 File,
3218 }
3219 #[doc = "Test log store status code"]
3220 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3221 pub enum Status {
3222 #[serde(rename = "success")]
3223 Success,
3224 #[serde(rename = "failed")]
3225 Failed,
3226 #[serde(rename = "fileAlreadyExists")]
3227 FileAlreadyExists,
3228 #[serde(rename = "invalidInput")]
3229 InvalidInput,
3230 #[serde(rename = "invalidFileName")]
3231 InvalidFileName,
3232 #[serde(rename = "invalidContainer")]
3233 InvalidContainer,
3234 #[serde(rename = "transferFailed")]
3235 TransferFailed,
3236 #[serde(rename = "featureDisabled")]
3237 FeatureDisabled,
3238 #[serde(rename = "buildDoesNotExist")]
3239 BuildDoesNotExist,
3240 #[serde(rename = "runDoesNotExist")]
3241 RunDoesNotExist,
3242 #[serde(rename = "containerNotCreated")]
3243 ContainerNotCreated,
3244 #[serde(rename = "apiNotSupported")]
3245 ApiNotSupported,
3246 #[serde(rename = "fileSizeExceeds")]
3247 FileSizeExceeds,
3248 #[serde(rename = "containerNotFound")]
3249 ContainerNotFound,
3250 #[serde(rename = "fileNotFound")]
3251 FileNotFound,
3252 #[serde(rename = "directoryNotFound")]
3253 DirectoryNotFound,
3254 #[serde(rename = "storageCapacityExceeded")]
3255 StorageCapacityExceeded,
3256 }
3257}
3258#[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
3259#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3260pub struct TestMessageLogDetails {
3261 #[doc = "Date when the resource is created"]
3262 #[serde(
3263 rename = "dateCreated",
3264 default,
3265 skip_serializing_if = "Option::is_none",
3266 with = "crate::date_time::rfc3339::option"
3267 )]
3268 pub date_created: Option<time::OffsetDateTime>,
3269 #[doc = "Id of the resource"]
3270 #[serde(rename = "entryId", default, skip_serializing_if = "Option::is_none")]
3271 pub entry_id: Option<i32>,
3272 #[doc = "Message of the resource"]
3273 #[serde(default, skip_serializing_if = "Option::is_none")]
3274 pub message: Option<String>,
3275}
3276impl TestMessageLogDetails {
3277 pub fn new() -> Self {
3278 Self::default()
3279 }
3280}
3281#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3282pub struct TestMessageLogDetailsList {
3283 #[serde(default, skip_serializing_if = "Option::is_none")]
3284 pub count: Option<i32>,
3285 #[serde(
3286 default,
3287 deserialize_with = "crate::serde::deserialize_null_as_default",
3288 skip_serializing_if = "Vec::is_empty"
3289 )]
3290 pub value: Vec<TestMessageLogDetails>,
3291}
3292impl TestMessageLogDetailsList {
3293 pub fn new() -> Self {
3294 Self::default()
3295 }
3296}
3297#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3298pub struct TestMethod {
3299 #[serde(default, skip_serializing_if = "Option::is_none")]
3300 pub container: Option<String>,
3301 #[serde(default, skip_serializing_if = "Option::is_none")]
3302 pub name: Option<String>,
3303}
3304impl TestMethod {
3305 pub fn new() -> Self {
3306 Self::default()
3307 }
3308}
3309#[doc = "Class representing a reference to an operation."]
3310#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3311pub struct TestOperationReference {
3312 #[serde(default, skip_serializing_if = "Option::is_none")]
3313 pub id: Option<String>,
3314 #[serde(default, skip_serializing_if = "Option::is_none")]
3315 pub status: Option<String>,
3316 #[serde(default, skip_serializing_if = "Option::is_none")]
3317 pub url: Option<String>,
3318}
3319impl TestOperationReference {
3320 pub fn new() -> Self {
3321 Self::default()
3322 }
3323}
3324#[doc = "Test Resolution State Details."]
3325#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3326pub struct TestResolutionState {
3327 #[doc = "Test Resolution state Id."]
3328 #[serde(default, skip_serializing_if = "Option::is_none")]
3329 pub id: Option<i32>,
3330 #[doc = "Test Resolution State Name."]
3331 #[serde(default, skip_serializing_if = "Option::is_none")]
3332 pub name: Option<String>,
3333 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
3334 #[serde(default, skip_serializing_if = "Option::is_none")]
3335 pub project: Option<ShallowReference>,
3336}
3337impl TestResolutionState {
3338 pub fn new() -> Self {
3339 Self::default()
3340 }
3341}
3342#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3343pub struct TestResultDocument {
3344 #[doc = "Class representing a reference to an operation."]
3345 #[serde(
3346 rename = "operationReference",
3347 default,
3348 skip_serializing_if = "Option::is_none"
3349 )]
3350 pub operation_reference: Option<TestOperationReference>,
3351 #[serde(default, skip_serializing_if = "Option::is_none")]
3352 pub payload: Option<TestResultPayload>,
3353}
3354impl TestResultDocument {
3355 pub fn new() -> Self {
3356 Self::default()
3357 }
3358}
3359#[doc = "The test failure type resource"]
3360#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3361pub struct TestResultFailureType {
3362 #[doc = "ID of the test failure type"]
3363 #[serde(default, skip_serializing_if = "Option::is_none")]
3364 pub id: Option<i32>,
3365 #[doc = "Name of the test failure type"]
3366 #[serde(default, skip_serializing_if = "Option::is_none")]
3367 pub name: Option<String>,
3368}
3369impl TestResultFailureType {
3370 pub fn new() -> Self {
3371 Self::default()
3372 }
3373}
3374#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3375pub struct TestResultFailureTypeList {
3376 #[serde(default, skip_serializing_if = "Option::is_none")]
3377 pub count: Option<i32>,
3378 #[serde(
3379 default,
3380 deserialize_with = "crate::serde::deserialize_null_as_default",
3381 skip_serializing_if = "Vec::is_empty"
3382 )]
3383 pub value: Vec<TestResultFailureType>,
3384}
3385impl TestResultFailureTypeList {
3386 pub fn new() -> Self {
3387 Self::default()
3388 }
3389}
3390#[doc = "The test failure type request model"]
3391#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3392pub struct TestResultFailureTypeRequestModel {
3393 #[doc = "Name of the test failure type"]
3394 #[serde(default, skip_serializing_if = "Option::is_none")]
3395 pub name: Option<String>,
3396}
3397impl TestResultFailureTypeRequestModel {
3398 pub fn new() -> Self {
3399 Self::default()
3400 }
3401}
3402#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3403pub struct TestResultFailuresAnalysis {
3404 #[serde(
3405 rename = "existingFailures",
3406 default,
3407 skip_serializing_if = "Option::is_none"
3408 )]
3409 pub existing_failures: Option<TestFailureDetails>,
3410 #[serde(
3411 rename = "fixedTests",
3412 default,
3413 skip_serializing_if = "Option::is_none"
3414 )]
3415 pub fixed_tests: Option<TestFailureDetails>,
3416 #[serde(
3417 rename = "newFailures",
3418 default,
3419 skip_serializing_if = "Option::is_none"
3420 )]
3421 pub new_failures: Option<TestFailureDetails>,
3422}
3423impl TestResultFailuresAnalysis {
3424 pub fn new() -> Self {
3425 Self::default()
3426 }
3427}
3428#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3429pub struct TestResultHistory {
3430 #[serde(
3431 rename = "groupByField",
3432 default,
3433 skip_serializing_if = "Option::is_none"
3434 )]
3435 pub group_by_field: Option<String>,
3436 #[serde(
3437 rename = "resultsForGroup",
3438 default,
3439 deserialize_with = "crate::serde::deserialize_null_as_default",
3440 skip_serializing_if = "Vec::is_empty"
3441 )]
3442 pub results_for_group: Vec<TestResultHistoryDetailsForGroup>,
3443}
3444impl TestResultHistory {
3445 pub fn new() -> Self {
3446 Self::default()
3447 }
3448}
3449#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3450pub struct TestResultHistoryDetailsForGroup {
3451 #[serde(
3452 rename = "groupByValue",
3453 default,
3454 skip_serializing_if = "Option::is_none"
3455 )]
3456 pub group_by_value: Option<serde_json::Value>,
3457 #[doc = "Represents a test result."]
3458 #[serde(
3459 rename = "latestResult",
3460 default,
3461 skip_serializing_if = "Option::is_none"
3462 )]
3463 pub latest_result: Option<TestCaseResult>,
3464}
3465impl TestResultHistoryDetailsForGroup {
3466 pub fn new() -> Self {
3467 Self::default()
3468 }
3469}
3470#[doc = "List of test results filtered on the basis of GroupByValue"]
3471#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3472pub struct TestResultHistoryForGroup {
3473 #[doc = "Display name of the group."]
3474 #[serde(
3475 rename = "displayName",
3476 default,
3477 skip_serializing_if = "Option::is_none"
3478 )]
3479 pub display_name: Option<String>,
3480 #[doc = "Name or Id of the group identifier by which results are grouped together."]
3481 #[serde(
3482 rename = "groupByValue",
3483 default,
3484 skip_serializing_if = "Option::is_none"
3485 )]
3486 pub group_by_value: Option<String>,
3487 #[doc = "List of results for GroupByValue"]
3488 #[serde(
3489 default,
3490 deserialize_with = "crate::serde::deserialize_null_as_default",
3491 skip_serializing_if = "Vec::is_empty"
3492 )]
3493 pub results: Vec<TestCaseResult>,
3494}
3495impl TestResultHistoryForGroup {
3496 pub fn new() -> Self {
3497 Self::default()
3498 }
3499}
3500#[doc = "Represents a Meta Data of a test result."]
3501#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3502pub struct TestResultMetaData {
3503 #[doc = "AutomatedTestName of test result."]
3504 #[serde(
3505 rename = "automatedTestName",
3506 default,
3507 skip_serializing_if = "Option::is_none"
3508 )]
3509 pub automated_test_name: Option<String>,
3510 #[doc = "AutomatedTestStorage of test result."]
3511 #[serde(
3512 rename = "automatedTestStorage",
3513 default,
3514 skip_serializing_if = "Option::is_none"
3515 )]
3516 pub automated_test_storage: Option<String>,
3517 #[doc = "List of Flaky Identifier for TestCaseReferenceId"]
3518 #[serde(
3519 rename = "flakyIdentifiers",
3520 default,
3521 deserialize_with = "crate::serde::deserialize_null_as_default",
3522 skip_serializing_if = "Vec::is_empty"
3523 )]
3524 pub flaky_identifiers: Vec<TestFlakyIdentifier>,
3525 #[doc = "Owner of test result."]
3526 #[serde(default, skip_serializing_if = "Option::is_none")]
3527 pub owner: Option<String>,
3528 #[doc = "Priority of test result."]
3529 #[serde(default, skip_serializing_if = "Option::is_none")]
3530 pub priority: Option<i32>,
3531 #[doc = "ID of TestCaseReference."]
3532 #[serde(
3533 rename = "testCaseReferenceId",
3534 default,
3535 skip_serializing_if = "Option::is_none"
3536 )]
3537 pub test_case_reference_id: Option<i32>,
3538 #[doc = "TestCaseTitle of test result."]
3539 #[serde(
3540 rename = "testCaseTitle",
3541 default,
3542 skip_serializing_if = "Option::is_none"
3543 )]
3544 pub test_case_title: Option<String>,
3545}
3546impl TestResultMetaData {
3547 pub fn new() -> Self {
3548 Self::default()
3549 }
3550}
3551#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3552pub struct TestResultMetaDataList {
3553 #[serde(default, skip_serializing_if = "Option::is_none")]
3554 pub count: Option<i32>,
3555 #[serde(
3556 default,
3557 deserialize_with = "crate::serde::deserialize_null_as_default",
3558 skip_serializing_if = "Vec::is_empty"
3559 )]
3560 pub value: Vec<TestResultMetaData>,
3561}
3562impl TestResultMetaDataList {
3563 pub fn new() -> Self {
3564 Self::default()
3565 }
3566}
3567#[doc = "Represents a TestResultMetaData Input"]
3568#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3569pub struct TestResultMetaDataUpdateInput {
3570 #[doc = "List of Flaky Identifiers"]
3571 #[serde(
3572 rename = "flakyIdentifiers",
3573 default,
3574 deserialize_with = "crate::serde::deserialize_null_as_default",
3575 skip_serializing_if = "Vec::is_empty"
3576 )]
3577 pub flaky_identifiers: Vec<TestFlakyIdentifier>,
3578}
3579impl TestResultMetaDataUpdateInput {
3580 pub fn new() -> Self {
3581 Self::default()
3582 }
3583}
3584#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3585pub struct TestResultModelBase {
3586 #[doc = "Comment in result."]
3587 #[serde(default, skip_serializing_if = "Option::is_none")]
3588 pub comment: Option<String>,
3589 #[doc = "Time when execution completed(UTC)."]
3590 #[serde(
3591 rename = "completedDate",
3592 default,
3593 skip_serializing_if = "Option::is_none",
3594 with = "crate::date_time::rfc3339::option"
3595 )]
3596 pub completed_date: Option<time::OffsetDateTime>,
3597 #[doc = "Duration of execution."]
3598 #[serde(
3599 rename = "durationInMs",
3600 default,
3601 skip_serializing_if = "Option::is_none"
3602 )]
3603 pub duration_in_ms: Option<f64>,
3604 #[doc = "Error message in result."]
3605 #[serde(
3606 rename = "errorMessage",
3607 default,
3608 skip_serializing_if = "Option::is_none"
3609 )]
3610 pub error_message: Option<String>,
3611 #[doc = "Test outcome of result."]
3612 #[serde(default, skip_serializing_if = "Option::is_none")]
3613 pub outcome: Option<String>,
3614 #[doc = "Time when execution started(UTC)."]
3615 #[serde(
3616 rename = "startedDate",
3617 default,
3618 skip_serializing_if = "Option::is_none",
3619 with = "crate::date_time::rfc3339::option"
3620 )]
3621 pub started_date: Option<time::OffsetDateTime>,
3622}
3623impl TestResultModelBase {
3624 pub fn new() -> Self {
3625 Self::default()
3626 }
3627}
3628#[doc = "Test parameter information in a test iteration."]
3629#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3630pub struct TestResultParameterModel {
3631 #[doc = "Test step path where parameter is referenced."]
3632 #[serde(
3633 rename = "actionPath",
3634 default,
3635 skip_serializing_if = "Option::is_none"
3636 )]
3637 pub action_path: Option<String>,
3638 #[doc = "Iteration ID."]
3639 #[serde(
3640 rename = "iterationId",
3641 default,
3642 skip_serializing_if = "Option::is_none"
3643 )]
3644 pub iteration_id: Option<i32>,
3645 #[doc = "Name of parameter."]
3646 #[serde(
3647 rename = "parameterName",
3648 default,
3649 skip_serializing_if = "Option::is_none"
3650 )]
3651 pub parameter_name: Option<String>,
3652 #[doc = "This is step Id of test case. For shared step, it is step Id of shared step in test case workitem; step Id in shared step. Example: TestCase workitem has two steps: 1) Normal step with Id = 1 2) Shared Step with Id = 2. Inside shared step: a) Normal Step with Id = 1 Value for StepIdentifier for First step: \"1\" Second step: \"2;1\""]
3653 #[serde(
3654 rename = "stepIdentifier",
3655 default,
3656 skip_serializing_if = "Option::is_none"
3657 )]
3658 pub step_identifier: Option<String>,
3659 #[doc = "Url of test parameter. Deprecated in hosted environment."]
3660 #[serde(default, skip_serializing_if = "Option::is_none")]
3661 pub url: Option<String>,
3662 #[doc = "Value of parameter."]
3663 #[serde(default, skip_serializing_if = "Option::is_none")]
3664 pub value: Option<String>,
3665}
3666impl TestResultParameterModel {
3667 pub fn new() -> Self {
3668 Self::default()
3669 }
3670}
3671#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3672pub struct TestResultPayload {
3673 #[serde(default, skip_serializing_if = "Option::is_none")]
3674 pub comment: Option<String>,
3675 #[serde(default, skip_serializing_if = "Option::is_none")]
3676 pub name: Option<String>,
3677 #[serde(default, skip_serializing_if = "Option::is_none")]
3678 pub stream: Option<String>,
3679}
3680impl TestResultPayload {
3681 pub fn new() -> Self {
3682 Self::default()
3683 }
3684}
3685#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3686pub struct TestResultSummary {
3687 #[serde(
3688 rename = "aggregatedResultsAnalysis",
3689 default,
3690 skip_serializing_if = "Option::is_none"
3691 )]
3692 pub aggregated_results_analysis: Option<AggregatedResultsAnalysis>,
3693 #[serde(
3694 rename = "noConfigRunsCount",
3695 default,
3696 skip_serializing_if = "Option::is_none"
3697 )]
3698 pub no_config_runs_count: Option<i32>,
3699 #[serde(
3700 rename = "teamProject",
3701 default,
3702 skip_serializing_if = "Option::is_none"
3703 )]
3704 pub team_project: Option<TeamProjectReference>,
3705 #[serde(
3706 rename = "testFailures",
3707 default,
3708 skip_serializing_if = "Option::is_none"
3709 )]
3710 pub test_failures: Option<TestFailuresAnalysis>,
3711 #[serde(
3712 rename = "testResultsContext",
3713 default,
3714 skip_serializing_if = "Option::is_none"
3715 )]
3716 pub test_results_context: Option<TestResultsContext>,
3717 #[serde(
3718 rename = "totalRunsCount",
3719 default,
3720 skip_serializing_if = "Option::is_none"
3721 )]
3722 pub total_runs_count: Option<i32>,
3723}
3724impl TestResultSummary {
3725 pub fn new() -> Self {
3726 Self::default()
3727 }
3728}
3729#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3730pub struct TestResultSummaryList {
3731 #[serde(default, skip_serializing_if = "Option::is_none")]
3732 pub count: Option<i32>,
3733 #[serde(
3734 default,
3735 deserialize_with = "crate::serde::deserialize_null_as_default",
3736 skip_serializing_if = "Vec::is_empty"
3737 )]
3738 pub value: Vec<TestResultSummary>,
3739}
3740impl TestResultSummaryList {
3741 pub fn new() -> Self {
3742 Self::default()
3743 }
3744}
3745#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3746pub struct TestResultTrendFilter {
3747 #[serde(
3748 rename = "branchNames",
3749 default,
3750 deserialize_with = "crate::serde::deserialize_null_as_default",
3751 skip_serializing_if = "Vec::is_empty"
3752 )]
3753 pub branch_names: Vec<String>,
3754 #[serde(
3755 rename = "buildCount",
3756 default,
3757 skip_serializing_if = "Option::is_none"
3758 )]
3759 pub build_count: Option<i32>,
3760 #[serde(
3761 rename = "definitionIds",
3762 default,
3763 deserialize_with = "crate::serde::deserialize_null_as_default",
3764 skip_serializing_if = "Vec::is_empty"
3765 )]
3766 pub definition_ids: Vec<i32>,
3767 #[serde(
3768 rename = "envDefinitionIds",
3769 default,
3770 deserialize_with = "crate::serde::deserialize_null_as_default",
3771 skip_serializing_if = "Vec::is_empty"
3772 )]
3773 pub env_definition_ids: Vec<i32>,
3774 #[serde(
3775 rename = "maxCompleteDate",
3776 default,
3777 skip_serializing_if = "Option::is_none",
3778 with = "crate::date_time::rfc3339::option"
3779 )]
3780 pub max_complete_date: Option<time::OffsetDateTime>,
3781 #[serde(
3782 rename = "publishContext",
3783 default,
3784 skip_serializing_if = "Option::is_none"
3785 )]
3786 pub publish_context: Option<String>,
3787 #[serde(
3788 rename = "testRunTitles",
3789 default,
3790 deserialize_with = "crate::serde::deserialize_null_as_default",
3791 skip_serializing_if = "Vec::is_empty"
3792 )]
3793 pub test_run_titles: Vec<String>,
3794 #[serde(rename = "trendDays", default, skip_serializing_if = "Option::is_none")]
3795 pub trend_days: Option<i32>,
3796}
3797impl TestResultTrendFilter {
3798 pub fn new() -> Self {
3799 Self::default()
3800 }
3801}
3802#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3803pub struct TestResultsContext {
3804 #[doc = "Reference to a build."]
3805 #[serde(default, skip_serializing_if = "Option::is_none")]
3806 pub build: Option<BuildReference>,
3807 #[serde(
3808 rename = "contextType",
3809 default,
3810 skip_serializing_if = "Option::is_none"
3811 )]
3812 pub context_type: Option<test_results_context::ContextType>,
3813 #[doc = "Pipeline reference"]
3814 #[serde(
3815 rename = "pipelineReference",
3816 default,
3817 skip_serializing_if = "Option::is_none"
3818 )]
3819 pub pipeline_reference: Option<PipelineReference>,
3820 #[doc = "Reference to a release."]
3821 #[serde(default, skip_serializing_if = "Option::is_none")]
3822 pub release: Option<ReleaseReference>,
3823}
3824impl TestResultsContext {
3825 pub fn new() -> Self {
3826 Self::default()
3827 }
3828}
3829pub mod test_results_context {
3830 use super::*;
3831 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
3832 pub enum ContextType {
3833 #[serde(rename = "build")]
3834 Build,
3835 #[serde(rename = "release")]
3836 Release,
3837 #[serde(rename = "pipeline")]
3838 Pipeline,
3839 }
3840}
3841#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3842pub struct TestResultsDetails {
3843 #[serde(
3844 rename = "groupByField",
3845 default,
3846 skip_serializing_if = "Option::is_none"
3847 )]
3848 pub group_by_field: Option<String>,
3849 #[serde(
3850 rename = "resultsForGroup",
3851 default,
3852 deserialize_with = "crate::serde::deserialize_null_as_default",
3853 skip_serializing_if = "Vec::is_empty"
3854 )]
3855 pub results_for_group: Vec<TestResultsDetailsForGroup>,
3856}
3857impl TestResultsDetails {
3858 pub fn new() -> Self {
3859 Self::default()
3860 }
3861}
3862#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3863pub struct TestResultsDetailsForGroup {
3864 #[serde(
3865 rename = "groupByValue",
3866 default,
3867 skip_serializing_if = "Option::is_none"
3868 )]
3869 pub group_by_value: Option<serde_json::Value>,
3870 #[serde(
3871 default,
3872 deserialize_with = "crate::serde::deserialize_null_as_default",
3873 skip_serializing_if = "Vec::is_empty"
3874 )]
3875 pub results: Vec<TestCaseResult>,
3876 #[serde(
3877 rename = "resultsCountByOutcome",
3878 default,
3879 skip_serializing_if = "Option::is_none"
3880 )]
3881 pub results_count_by_outcome: Option<serde_json::Value>,
3882 #[serde(
3883 default,
3884 deserialize_with = "crate::serde::deserialize_null_as_default",
3885 skip_serializing_if = "Vec::is_empty"
3886 )]
3887 pub tags: Vec<String>,
3888}
3889impl TestResultsDetailsForGroup {
3890 pub fn new() -> Self {
3891 Self::default()
3892 }
3893}
3894#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3895pub struct TestResultsQuery {
3896 #[serde(
3897 default,
3898 deserialize_with = "crate::serde::deserialize_null_as_default",
3899 skip_serializing_if = "Vec::is_empty"
3900 )]
3901 pub fields: Vec<String>,
3902 #[serde(
3903 default,
3904 deserialize_with = "crate::serde::deserialize_null_as_default",
3905 skip_serializing_if = "Vec::is_empty"
3906 )]
3907 pub results: Vec<TestCaseResult>,
3908 #[serde(
3909 rename = "resultsFilter",
3910 default,
3911 skip_serializing_if = "Option::is_none"
3912 )]
3913 pub results_filter: Option<ResultsFilter>,
3914}
3915impl TestResultsQuery {
3916 pub fn new() -> Self {
3917 Self::default()
3918 }
3919}
3920#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3921pub struct TestResultsSettings {
3922 #[serde(
3923 rename = "flakySettings",
3924 default,
3925 skip_serializing_if = "Option::is_none"
3926 )]
3927 pub flaky_settings: Option<FlakySettings>,
3928 #[serde(
3929 rename = "newTestResultLoggingSettings",
3930 default,
3931 skip_serializing_if = "Option::is_none"
3932 )]
3933 pub new_test_result_logging_settings: Option<NewTestResultLoggingSettings>,
3934}
3935impl TestResultsSettings {
3936 pub fn new() -> Self {
3937 Self::default()
3938 }
3939}
3940#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3941pub struct TestResultsUpdateSettings {
3942 #[serde(
3943 rename = "flakySettings",
3944 default,
3945 skip_serializing_if = "Option::is_none"
3946 )]
3947 pub flaky_settings: Option<FlakySettings>,
3948 #[serde(
3949 rename = "newTestResultLoggingSettings",
3950 default,
3951 skip_serializing_if = "Option::is_none"
3952 )]
3953 pub new_test_result_logging_settings: Option<NewTestResultLoggingSettings>,
3954}
3955impl TestResultsUpdateSettings {
3956 pub fn new() -> Self {
3957 Self::default()
3958 }
3959}
3960#[doc = "Test run details."]
3961#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
3962pub struct TestRun {
3963 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
3964 #[serde(default, skip_serializing_if = "Option::is_none")]
3965 pub build: Option<ShallowReference>,
3966 #[doc = "BuildConfiguration Details."]
3967 #[serde(
3968 rename = "buildConfiguration",
3969 default,
3970 skip_serializing_if = "Option::is_none"
3971 )]
3972 pub build_configuration: Option<BuildConfiguration>,
3973 #[doc = "Comments entered by those analyzing the run."]
3974 #[serde(default, skip_serializing_if = "Option::is_none")]
3975 pub comment: Option<String>,
3976 #[doc = "Completed date time of the run."]
3977 #[serde(
3978 rename = "completedDate",
3979 default,
3980 skip_serializing_if = "Option::is_none",
3981 with = "crate::date_time::rfc3339::option"
3982 )]
3983 pub completed_date: Option<time::OffsetDateTime>,
3984 #[doc = "Test Run Controller."]
3985 #[serde(default, skip_serializing_if = "Option::is_none")]
3986 pub controller: Option<String>,
3987 #[doc = "Test Run CreatedDate."]
3988 #[serde(
3989 rename = "createdDate",
3990 default,
3991 skip_serializing_if = "Option::is_none",
3992 with = "crate::date_time::rfc3339::option"
3993 )]
3994 pub created_date: Option<time::OffsetDateTime>,
3995 #[doc = "List of Custom Fields for TestRun."]
3996 #[serde(
3997 rename = "customFields",
3998 default,
3999 deserialize_with = "crate::serde::deserialize_null_as_default",
4000 skip_serializing_if = "Vec::is_empty"
4001 )]
4002 pub custom_fields: Vec<CustomTestField>,
4003 #[doc = "Drop Location for the test Run."]
4004 #[serde(
4005 rename = "dropLocation",
4006 default,
4007 skip_serializing_if = "Option::is_none"
4008 )]
4009 pub drop_location: Option<String>,
4010 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
4011 #[serde(
4012 rename = "dtlAutEnvironment",
4013 default,
4014 skip_serializing_if = "Option::is_none"
4015 )]
4016 pub dtl_aut_environment: Option<ShallowReference>,
4017 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
4018 #[serde(
4019 rename = "dtlEnvironment",
4020 default,
4021 skip_serializing_if = "Option::is_none"
4022 )]
4023 pub dtl_environment: Option<ShallowReference>,
4024 #[doc = "This is a temporary class to provide the details for the test run environment."]
4025 #[serde(
4026 rename = "dtlEnvironmentCreationDetails",
4027 default,
4028 skip_serializing_if = "Option::is_none"
4029 )]
4030 pub dtl_environment_creation_details: Option<DtlEnvironmentDetails>,
4031 #[doc = "Due date and time for test run."]
4032 #[serde(
4033 rename = "dueDate",
4034 default,
4035 skip_serializing_if = "Option::is_none",
4036 with = "crate::date_time::rfc3339::option"
4037 )]
4038 pub due_date: Option<time::OffsetDateTime>,
4039 #[doc = "Error message associated with the run."]
4040 #[serde(
4041 rename = "errorMessage",
4042 default,
4043 skip_serializing_if = "Option::is_none"
4044 )]
4045 pub error_message: Option<String>,
4046 #[doc = "This class is used to provide the filters used for discovery"]
4047 #[serde(default, skip_serializing_if = "Option::is_none")]
4048 pub filter: Option<RunFilter>,
4049 #[doc = "ID of the test run."]
4050 #[serde(default, skip_serializing_if = "Option::is_none")]
4051 pub id: Option<i32>,
4052 #[doc = "Number of Incomplete Tests."]
4053 #[serde(
4054 rename = "incompleteTests",
4055 default,
4056 skip_serializing_if = "Option::is_none"
4057 )]
4058 pub incomplete_tests: Option<i32>,
4059 #[doc = "true if test run is automated, false otherwise."]
4060 #[serde(
4061 rename = "isAutomated",
4062 default,
4063 skip_serializing_if = "Option::is_none"
4064 )]
4065 pub is_automated: Option<bool>,
4066 #[doc = "The iteration to which the run belongs."]
4067 #[serde(default, skip_serializing_if = "Option::is_none")]
4068 pub iteration: Option<String>,
4069 #[serde(
4070 rename = "lastUpdatedBy",
4071 default,
4072 skip_serializing_if = "Option::is_none"
4073 )]
4074 pub last_updated_by: Option<IdentityRef>,
4075 #[doc = "Last updated date and time"]
4076 #[serde(
4077 rename = "lastUpdatedDate",
4078 default,
4079 skip_serializing_if = "Option::is_none",
4080 with = "crate::date_time::rfc3339::option"
4081 )]
4082 pub last_updated_date: Option<time::OffsetDateTime>,
4083 #[doc = "Name of the test run."]
4084 #[serde(default, skip_serializing_if = "Option::is_none")]
4085 pub name: Option<String>,
4086 #[doc = "Number of Not Applicable Tests."]
4087 #[serde(
4088 rename = "notApplicableTests",
4089 default,
4090 skip_serializing_if = "Option::is_none"
4091 )]
4092 pub not_applicable_tests: Option<i32>,
4093 #[serde(default, skip_serializing_if = "Option::is_none")]
4094 pub owner: Option<IdentityRef>,
4095 #[doc = "Number of passed tests in the run"]
4096 #[serde(
4097 rename = "passedTests",
4098 default,
4099 skip_serializing_if = "Option::is_none"
4100 )]
4101 pub passed_tests: Option<i32>,
4102 #[doc = "Phase/State for the testRun."]
4103 #[serde(default, skip_serializing_if = "Option::is_none")]
4104 pub phase: Option<String>,
4105 #[doc = "Pipeline reference"]
4106 #[serde(
4107 rename = "pipelineReference",
4108 default,
4109 skip_serializing_if = "Option::is_none"
4110 )]
4111 pub pipeline_reference: Option<PipelineReference>,
4112 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
4113 #[serde(default, skip_serializing_if = "Option::is_none")]
4114 pub plan: Option<ShallowReference>,
4115 #[doc = "Post Process State."]
4116 #[serde(
4117 rename = "postProcessState",
4118 default,
4119 skip_serializing_if = "Option::is_none"
4120 )]
4121 pub post_process_state: Option<String>,
4122 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
4123 #[serde(default, skip_serializing_if = "Option::is_none")]
4124 pub project: Option<ShallowReference>,
4125 #[doc = "Reference to a release."]
4126 #[serde(default, skip_serializing_if = "Option::is_none")]
4127 pub release: Option<ReleaseReference>,
4128 #[doc = "Release Environment Uri for TestRun."]
4129 #[serde(
4130 rename = "releaseEnvironmentUri",
4131 default,
4132 skip_serializing_if = "Option::is_none"
4133 )]
4134 pub release_environment_uri: Option<String>,
4135 #[doc = "Release Uri for TestRun."]
4136 #[serde(
4137 rename = "releaseUri",
4138 default,
4139 skip_serializing_if = "Option::is_none"
4140 )]
4141 pub release_uri: Option<String>,
4142 #[serde(default, skip_serializing_if = "Option::is_none")]
4143 pub revision: Option<i32>,
4144 #[doc = "RunSummary by outcome."]
4145 #[serde(
4146 rename = "runStatistics",
4147 default,
4148 deserialize_with = "crate::serde::deserialize_null_as_default",
4149 skip_serializing_if = "Vec::is_empty"
4150 )]
4151 pub run_statistics: Vec<RunStatistic>,
4152 #[doc = "Start date time of the run."]
4153 #[serde(
4154 rename = "startedDate",
4155 default,
4156 skip_serializing_if = "Option::is_none",
4157 with = "crate::date_time::rfc3339::option"
4158 )]
4159 pub started_date: Option<time::OffsetDateTime>,
4160 #[doc = "The state of the run. Type TestRunState Valid states - Unspecified ,NotStarted, InProgress, Completed, Waiting, Aborted, NeedsInvestigation"]
4161 #[serde(default, skip_serializing_if = "Option::is_none")]
4162 pub state: Option<String>,
4163 #[doc = "TestRun Substate."]
4164 #[serde(default, skip_serializing_if = "Option::is_none")]
4165 pub substate: Option<test_run::Substate>,
4166 #[doc = "Tags attached with this test run."]
4167 #[serde(
4168 default,
4169 deserialize_with = "crate::serde::deserialize_null_as_default",
4170 skip_serializing_if = "Vec::is_empty"
4171 )]
4172 pub tags: Vec<TestTag>,
4173 #[doc = "Test environment Detail."]
4174 #[serde(
4175 rename = "testEnvironment",
4176 default,
4177 skip_serializing_if = "Option::is_none"
4178 )]
4179 pub test_environment: Option<TestEnvironment>,
4180 #[serde(
4181 rename = "testMessageLogId",
4182 default,
4183 skip_serializing_if = "Option::is_none"
4184 )]
4185 pub test_message_log_id: Option<i32>,
4186 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
4187 #[serde(
4188 rename = "testSettings",
4189 default,
4190 skip_serializing_if = "Option::is_none"
4191 )]
4192 pub test_settings: Option<ShallowReference>,
4193 #[doc = "Total tests in the run"]
4194 #[serde(
4195 rename = "totalTests",
4196 default,
4197 skip_serializing_if = "Option::is_none"
4198 )]
4199 pub total_tests: Option<i32>,
4200 #[doc = "Number of failed tests in the run."]
4201 #[serde(
4202 rename = "unanalyzedTests",
4203 default,
4204 skip_serializing_if = "Option::is_none"
4205 )]
4206 pub unanalyzed_tests: Option<i32>,
4207 #[doc = "Url of the test run"]
4208 #[serde(default, skip_serializing_if = "Option::is_none")]
4209 pub url: Option<String>,
4210 #[doc = "Web Access Url for TestRun."]
4211 #[serde(
4212 rename = "webAccessUrl",
4213 default,
4214 skip_serializing_if = "Option::is_none"
4215 )]
4216 pub web_access_url: Option<String>,
4217}
4218impl TestRun {
4219 pub fn new() -> Self {
4220 Self::default()
4221 }
4222}
4223pub mod test_run {
4224 use super::*;
4225 #[doc = "TestRun Substate."]
4226 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4227 pub enum Substate {
4228 #[serde(rename = "none")]
4229 None,
4230 #[serde(rename = "creatingEnvironment")]
4231 CreatingEnvironment,
4232 #[serde(rename = "runningTests")]
4233 RunningTests,
4234 #[serde(rename = "canceledByUser")]
4235 CanceledByUser,
4236 #[serde(rename = "abortedBySystem")]
4237 AbortedBySystem,
4238 #[serde(rename = "timedOut")]
4239 TimedOut,
4240 #[serde(rename = "pendingAnalysis")]
4241 PendingAnalysis,
4242 #[serde(rename = "analyzed")]
4243 Analyzed,
4244 #[serde(rename = "cancellationInProgress")]
4245 CancellationInProgress,
4246 }
4247}
4248#[doc = "Test Run Code Coverage Details"]
4249#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4250pub struct TestRunCoverage {
4251 #[doc = "Last Error"]
4252 #[serde(rename = "lastError", default, skip_serializing_if = "Option::is_none")]
4253 pub last_error: Option<String>,
4254 #[doc = "List of Modules Coverage"]
4255 #[serde(
4256 default,
4257 deserialize_with = "crate::serde::deserialize_null_as_default",
4258 skip_serializing_if = "Vec::is_empty"
4259 )]
4260 pub modules: Vec<ModuleCoverage>,
4261 #[doc = "State"]
4262 #[serde(default, skip_serializing_if = "Option::is_none")]
4263 pub state: Option<String>,
4264 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
4265 #[serde(rename = "testRun", default, skip_serializing_if = "Option::is_none")]
4266 pub test_run: Option<ShallowReference>,
4267}
4268impl TestRunCoverage {
4269 pub fn new() -> Self {
4270 Self::default()
4271 }
4272}
4273#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4274pub struct TestRunCoverageList {
4275 #[serde(default, skip_serializing_if = "Option::is_none")]
4276 pub count: Option<i32>,
4277 #[serde(
4278 default,
4279 deserialize_with = "crate::serde::deserialize_null_as_default",
4280 skip_serializing_if = "Vec::is_empty"
4281 )]
4282 pub value: Vec<TestRunCoverage>,
4283}
4284impl TestRunCoverageList {
4285 pub fn new() -> Self {
4286 Self::default()
4287 }
4288}
4289#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4290pub struct TestRunList {
4291 #[serde(default, skip_serializing_if = "Option::is_none")]
4292 pub count: Option<i32>,
4293 #[serde(
4294 default,
4295 deserialize_with = "crate::serde::deserialize_null_as_default",
4296 skip_serializing_if = "Vec::is_empty"
4297 )]
4298 pub value: Vec<TestRun>,
4299}
4300impl TestRunList {
4301 pub fn new() -> Self {
4302 Self::default()
4303 }
4304}
4305#[doc = "Test run statistics."]
4306#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4307pub struct TestRunStatistic {
4308 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
4309 #[serde(default, skip_serializing_if = "Option::is_none")]
4310 pub run: Option<ShallowReference>,
4311 #[serde(
4312 rename = "runStatistics",
4313 default,
4314 deserialize_with = "crate::serde::deserialize_null_as_default",
4315 skip_serializing_if = "Vec::is_empty"
4316 )]
4317 pub run_statistics: Vec<RunStatistic>,
4318}
4319impl TestRunStatistic {
4320 pub fn new() -> Self {
4321 Self::default()
4322 }
4323}
4324#[doc = "Represents the test settings of the run. Used to create test settings and fetch test settings"]
4325#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4326pub struct TestSettings {
4327 #[doc = "Area path required to create test settings"]
4328 #[serde(rename = "areaPath", default, skip_serializing_if = "Option::is_none")]
4329 pub area_path: Option<String>,
4330 #[doc = "Description of the test settings. Used in create test settings."]
4331 #[serde(default, skip_serializing_if = "Option::is_none")]
4332 pub description: Option<String>,
4333 #[doc = "Indicates if the tests settings is public or private.Used in create test settings."]
4334 #[serde(rename = "isPublic", default, skip_serializing_if = "Option::is_none")]
4335 pub is_public: Option<bool>,
4336 #[doc = "Xml string of machine roles. Used in create test settings."]
4337 #[serde(
4338 rename = "machineRoles",
4339 default,
4340 skip_serializing_if = "Option::is_none"
4341 )]
4342 pub machine_roles: Option<String>,
4343 #[doc = "Test settings content."]
4344 #[serde(
4345 rename = "testSettingsContent",
4346 default,
4347 skip_serializing_if = "Option::is_none"
4348 )]
4349 pub test_settings_content: Option<String>,
4350 #[doc = "Test settings id."]
4351 #[serde(
4352 rename = "testSettingsId",
4353 default,
4354 skip_serializing_if = "Option::is_none"
4355 )]
4356 pub test_settings_id: Option<i32>,
4357 #[doc = "Test settings name."]
4358 #[serde(
4359 rename = "testSettingsName",
4360 default,
4361 skip_serializing_if = "Option::is_none"
4362 )]
4363 pub test_settings_name: Option<String>,
4364}
4365impl TestSettings {
4366 pub fn new() -> Self {
4367 Self::default()
4368 }
4369}
4370#[doc = "Represents a sub result of a test result."]
4371#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4372pub struct TestSubResult {
4373 #[doc = "Comment in sub result."]
4374 #[serde(default, skip_serializing_if = "Option::is_none")]
4375 pub comment: Option<String>,
4376 #[doc = "Time when test execution completed(UTC)."]
4377 #[serde(
4378 rename = "completedDate",
4379 default,
4380 skip_serializing_if = "Option::is_none",
4381 with = "crate::date_time::rfc3339::option"
4382 )]
4383 pub completed_date: Option<time::OffsetDateTime>,
4384 #[doc = "Machine where test executed."]
4385 #[serde(
4386 rename = "computerName",
4387 default,
4388 skip_serializing_if = "Option::is_none"
4389 )]
4390 pub computer_name: Option<String>,
4391 #[doc = "An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links."]
4392 #[serde(default, skip_serializing_if = "Option::is_none")]
4393 pub configuration: Option<ShallowReference>,
4394 #[doc = "Additional properties of sub result."]
4395 #[serde(
4396 rename = "customFields",
4397 default,
4398 deserialize_with = "crate::serde::deserialize_null_as_default",
4399 skip_serializing_if = "Vec::is_empty"
4400 )]
4401 pub custom_fields: Vec<CustomTestField>,
4402 #[doc = "Name of sub result."]
4403 #[serde(
4404 rename = "displayName",
4405 default,
4406 skip_serializing_if = "Option::is_none"
4407 )]
4408 pub display_name: Option<String>,
4409 #[doc = "Duration of test execution."]
4410 #[serde(
4411 rename = "durationInMs",
4412 default,
4413 skip_serializing_if = "Option::is_none"
4414 )]
4415 pub duration_in_ms: Option<i64>,
4416 #[doc = "Error message in sub result."]
4417 #[serde(
4418 rename = "errorMessage",
4419 default,
4420 skip_serializing_if = "Option::is_none"
4421 )]
4422 pub error_message: Option<String>,
4423 #[doc = "ID of sub result."]
4424 #[serde(default, skip_serializing_if = "Option::is_none")]
4425 pub id: Option<i32>,
4426 #[doc = "Time when result last updated(UTC)."]
4427 #[serde(
4428 rename = "lastUpdatedDate",
4429 default,
4430 skip_serializing_if = "Option::is_none",
4431 with = "crate::date_time::rfc3339::option"
4432 )]
4433 pub last_updated_date: Option<time::OffsetDateTime>,
4434 #[doc = "Outcome of sub result."]
4435 #[serde(default, skip_serializing_if = "Option::is_none")]
4436 pub outcome: Option<String>,
4437 #[doc = "Immediate parent ID of sub result."]
4438 #[serde(rename = "parentId", default, skip_serializing_if = "Option::is_none")]
4439 pub parent_id: Option<i32>,
4440 #[doc = "Hierarchy type of the result, default value of None means its leaf node."]
4441 #[serde(
4442 rename = "resultGroupType",
4443 default,
4444 skip_serializing_if = "Option::is_none"
4445 )]
4446 pub result_group_type: Option<test_sub_result::ResultGroupType>,
4447 #[doc = "Index number of sub result."]
4448 #[serde(
4449 rename = "sequenceId",
4450 default,
4451 skip_serializing_if = "Option::is_none"
4452 )]
4453 pub sequence_id: Option<i32>,
4454 #[doc = "Stacktrace."]
4455 #[serde(
4456 rename = "stackTrace",
4457 default,
4458 skip_serializing_if = "Option::is_none"
4459 )]
4460 pub stack_trace: Option<String>,
4461 #[doc = "Time when test execution started(UTC)."]
4462 #[serde(
4463 rename = "startedDate",
4464 default,
4465 skip_serializing_if = "Option::is_none",
4466 with = "crate::date_time::rfc3339::option"
4467 )]
4468 pub started_date: Option<time::OffsetDateTime>,
4469 #[doc = "List of sub results inside a sub result, if ResultGroupType is not None, it holds corresponding type sub results."]
4470 #[serde(
4471 rename = "subResults",
4472 default,
4473 deserialize_with = "crate::serde::deserialize_null_as_default",
4474 skip_serializing_if = "Vec::is_empty"
4475 )]
4476 pub sub_results: Vec<TestSubResult>,
4477 #[doc = "Reference to a test result."]
4478 #[serde(
4479 rename = "testResult",
4480 default,
4481 skip_serializing_if = "Option::is_none"
4482 )]
4483 pub test_result: Option<TestCaseResultIdentifier>,
4484 #[doc = "Url of sub result."]
4485 #[serde(default, skip_serializing_if = "Option::is_none")]
4486 pub url: Option<String>,
4487}
4488impl TestSubResult {
4489 pub fn new() -> Self {
4490 Self::default()
4491 }
4492}
4493pub mod test_sub_result {
4494 use super::*;
4495 #[doc = "Hierarchy type of the result, default value of None means its leaf node."]
4496 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4497 pub enum ResultGroupType {
4498 #[serde(rename = "none")]
4499 None,
4500 #[serde(rename = "rerun")]
4501 Rerun,
4502 #[serde(rename = "dataDriven")]
4503 DataDriven,
4504 #[serde(rename = "orderedTest")]
4505 OrderedTest,
4506 #[serde(rename = "generic")]
4507 Generic,
4508 }
4509}
4510#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4511pub struct TestSummaryForWorkItem {
4512 #[serde(default, skip_serializing_if = "Option::is_none")]
4513 pub summary: Option<AggregatedDataForResultTrend>,
4514 #[doc = "WorkItem reference Details."]
4515 #[serde(rename = "workItem", default, skip_serializing_if = "Option::is_none")]
4516 pub work_item: Option<WorkItemReference>,
4517}
4518impl TestSummaryForWorkItem {
4519 pub fn new() -> Self {
4520 Self::default()
4521 }
4522}
4523#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4524pub struct TestSummaryForWorkItemList {
4525 #[serde(default, skip_serializing_if = "Option::is_none")]
4526 pub count: Option<i32>,
4527 #[serde(
4528 default,
4529 deserialize_with = "crate::serde::deserialize_null_as_default",
4530 skip_serializing_if = "Vec::is_empty"
4531 )]
4532 pub value: Vec<TestSummaryForWorkItem>,
4533}
4534impl TestSummaryForWorkItemList {
4535 pub fn new() -> Self {
4536 Self::default()
4537 }
4538}
4539#[doc = "Tag attached to a run or result."]
4540#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4541pub struct TestTag {
4542 #[doc = "Name of the tag, alphanumeric value less than 30 chars"]
4543 #[serde(default, skip_serializing_if = "Option::is_none")]
4544 pub name: Option<String>,
4545}
4546impl TestTag {
4547 pub fn new() -> Self {
4548 Self::default()
4549 }
4550}
4551#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4552pub struct TestTagList {
4553 #[serde(default, skip_serializing_if = "Option::is_none")]
4554 pub count: Option<i32>,
4555 #[serde(
4556 default,
4557 deserialize_with = "crate::serde::deserialize_null_as_default",
4558 skip_serializing_if = "Vec::is_empty"
4559 )]
4560 pub value: Vec<TestTag>,
4561}
4562impl TestTagList {
4563 pub fn new() -> Self {
4564 Self::default()
4565 }
4566}
4567#[doc = "Test tag summary for build or release grouped by test run."]
4568#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4569pub struct TestTagSummary {
4570 #[doc = "Dictionary which contains tags associated with a test run."]
4571 #[serde(
4572 rename = "tagsGroupByTestArtifact",
4573 default,
4574 skip_serializing_if = "Option::is_none"
4575 )]
4576 pub tags_group_by_test_artifact: Option<serde_json::Value>,
4577}
4578impl TestTagSummary {
4579 pub fn new() -> Self {
4580 Self::default()
4581 }
4582}
4583#[doc = "Tags to update to a run or result."]
4584#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4585pub struct TestTagsUpdateModel {
4586 #[serde(
4587 default,
4588 deserialize_with = "crate::serde::deserialize_null_as_default",
4589 skip_serializing_if = "Vec::is_empty"
4590 )]
4591 pub tags: Vec<serde_json::Value>,
4592}
4593impl TestTagsUpdateModel {
4594 pub fn new() -> Self {
4595 Self::default()
4596 }
4597}
4598#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4599pub struct TestToWorkItemLinks {
4600 #[serde(default, skip_serializing_if = "Option::is_none")]
4601 pub test: Option<TestMethod>,
4602 #[serde(
4603 rename = "workItems",
4604 default,
4605 deserialize_with = "crate::serde::deserialize_null_as_default",
4606 skip_serializing_if = "Vec::is_empty"
4607 )]
4608 pub work_items: Vec<WorkItemReference>,
4609}
4610impl TestToWorkItemLinks {
4611 pub fn new() -> Self {
4612 Self::default()
4613 }
4614}
4615#[doc = "This class is used to serialize collections as a single JSON object on the wire."]
4616#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4617pub struct VssJsonCollectionWrapper {
4618 #[serde(flatten)]
4619 pub vss_json_collection_wrapper_base: VssJsonCollectionWrapperBase,
4620 #[doc = "The serialized item."]
4621 #[serde(default, skip_serializing_if = "Option::is_none")]
4622 pub value: Option<String>,
4623}
4624impl VssJsonCollectionWrapper {
4625 pub fn new() -> Self {
4626 Self::default()
4627 }
4628}
4629#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4630pub struct VssJsonCollectionWrapperBase {
4631 #[doc = "The number of serialized items."]
4632 #[serde(default, skip_serializing_if = "Option::is_none")]
4633 pub count: Option<i32>,
4634}
4635impl VssJsonCollectionWrapperBase {
4636 pub fn new() -> Self {
4637 Self::default()
4638 }
4639}
4640#[doc = "WorkItem reference Details."]
4641#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4642pub struct WorkItemReference {
4643 #[doc = "WorkItem Id."]
4644 #[serde(default, skip_serializing_if = "Option::is_none")]
4645 pub id: Option<String>,
4646 #[doc = "WorkItem Name."]
4647 #[serde(default, skip_serializing_if = "Option::is_none")]
4648 pub name: Option<String>,
4649 #[doc = "WorkItem Type."]
4650 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
4651 pub type_: Option<String>,
4652 #[doc = "WorkItem Url. Valid Values : (Bug, Task, User Story, Test Case)"]
4653 #[serde(default, skip_serializing_if = "Option::is_none")]
4654 pub url: Option<String>,
4655 #[doc = "WorkItem WebUrl."]
4656 #[serde(rename = "webUrl", default, skip_serializing_if = "Option::is_none")]
4657 pub web_url: Option<String>,
4658}
4659impl WorkItemReference {
4660 pub fn new() -> Self {
4661 Self::default()
4662 }
4663}
4664#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4665pub struct WorkItemReferenceList {
4666 #[serde(default, skip_serializing_if = "Option::is_none")]
4667 pub count: Option<i32>,
4668 #[serde(
4669 default,
4670 deserialize_with = "crate::serde::deserialize_null_as_default",
4671 skip_serializing_if = "Vec::is_empty"
4672 )]
4673 pub value: Vec<WorkItemReference>,
4674}
4675impl WorkItemReferenceList {
4676 pub fn new() -> Self {
4677 Self::default()
4678 }
4679}
4680#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
4681pub struct WorkItemToTestLinks {
4682 #[serde(
4683 rename = "executedIn",
4684 default,
4685 skip_serializing_if = "Option::is_none"
4686 )]
4687 pub executed_in: Option<work_item_to_test_links::ExecutedIn>,
4688 #[serde(
4689 default,
4690 deserialize_with = "crate::serde::deserialize_null_as_default",
4691 skip_serializing_if = "Vec::is_empty"
4692 )]
4693 pub tests: Vec<TestMethod>,
4694 #[doc = "WorkItem reference Details."]
4695 #[serde(rename = "workItem", default, skip_serializing_if = "Option::is_none")]
4696 pub work_item: Option<WorkItemReference>,
4697}
4698impl WorkItemToTestLinks {
4699 pub fn new() -> Self {
4700 Self::default()
4701 }
4702}
4703pub mod work_item_to_test_links {
4704 use super::*;
4705 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
4706 pub enum ExecutedIn {
4707 #[serde(rename = "any")]
4708 Any,
4709 #[serde(rename = "tcm")]
4710 Tcm,
4711 #[serde(rename = "tfs")]
4712 Tfs,
4713 }
4714}