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#[doc = "Defines the Board result that matched a Board search request."]
9#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
10pub struct BoardResult {
11 #[doc = "Board Type of the board document."]
12 #[serde(default, skip_serializing_if = "Option::is_none")]
13 pub boardtype: Option<String>,
14 #[doc = "Defines the details of the collection."]
15 #[serde(default, skip_serializing_if = "Option::is_none")]
16 pub collection: Option<Collection>,
17 #[doc = "Defines the details of the project."]
18 #[serde(default, skip_serializing_if = "Option::is_none")]
19 pub project: Option<Project>,
20 #[doc = "Defines the details of the team."]
21 #[serde(default, skip_serializing_if = "Option::is_none")]
22 pub team: Option<Team>,
23}
24impl BoardResult {
25 pub fn new() -> Self {
26 Self::default()
27 }
28}
29#[doc = "Defines a Board search request."]
30#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
31pub struct BoardSearchRequest {
32 #[serde(flatten)]
33 pub entity_search_request: EntitySearchRequest,
34}
35impl BoardSearchRequest {
36 pub fn new() -> Self {
37 Self::default()
38 }
39}
40#[doc = "Defines a Board search response item."]
41#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
42pub struct BoardSearchResponse {
43 #[serde(flatten)]
44 pub entity_search_response: EntitySearchResponse,
45 #[doc = "Total number of matched Board documents."]
46 #[serde(default, skip_serializing_if = "Option::is_none")]
47 pub count: Option<i32>,
48 #[doc = "List of top matched Board documents."]
49 #[serde(
50 default,
51 deserialize_with = "crate::serde::deserialize_null_as_default",
52 skip_serializing_if = "Vec::is_empty"
53 )]
54 pub results: Vec<BoardResult>,
55}
56impl BoardSearchResponse {
57 pub fn new() -> Self {
58 Self::default()
59 }
60}
61#[doc = "Information about the configured branch."]
62#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
63pub struct BranchInfo {
64 #[doc = "Name of the indexed branch"]
65 #[serde(default, skip_serializing_if = "Option::is_none")]
66 pub name: Option<String>,
67}
68impl BranchInfo {
69 pub fn new() -> Self {
70 Self::default()
71 }
72}
73#[doc = "Defines the code result containing information of the searched files and its metadata."]
74#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
75pub struct CodeResult {
76 #[doc = "Defines the details of the collection."]
77 #[serde(default, skip_serializing_if = "Option::is_none")]
78 pub collection: Option<Collection>,
79 #[doc = "ContentId of the result file."]
80 #[serde(rename = "contentId", default, skip_serializing_if = "Option::is_none")]
81 pub content_id: Option<String>,
82 #[doc = "Name of the result file."]
83 #[serde(rename = "fileName", default, skip_serializing_if = "Option::is_none")]
84 pub file_name: Option<String>,
85 #[doc = "Dictionary of field to hit offsets in the result file. Key identifies the area in which hits were found, for ex: file content/file name etc."]
86 #[serde(default, skip_serializing_if = "Option::is_none")]
87 pub matches: Option<serde_json::Value>,
88 #[doc = "Path at which result file is present."]
89 #[serde(default, skip_serializing_if = "Option::is_none")]
90 pub path: Option<String>,
91 #[doc = "Defines the details of the project."]
92 #[serde(default, skip_serializing_if = "Option::is_none")]
93 pub project: Option<Project>,
94 #[doc = "Defines the details of the repository."]
95 #[serde(default, skip_serializing_if = "Option::is_none")]
96 pub repository: Option<Repository>,
97 #[doc = "Versions of the result file."]
98 #[serde(
99 default,
100 deserialize_with = "crate::serde::deserialize_null_as_default",
101 skip_serializing_if = "Vec::is_empty"
102 )]
103 pub versions: Vec<Version>,
104}
105impl CodeResult {
106 pub fn new() -> Self {
107 Self::default()
108 }
109}
110#[doc = "Defines a code search request."]
111#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
112pub struct CodeSearchRequest {
113 #[serde(flatten)]
114 pub entity_search_request: EntitySearchRequest,
115 #[doc = "Flag to opt for including matched code snippet in the result. Default behavior is false."]
116 #[serde(
117 rename = "includeSnippet",
118 default,
119 skip_serializing_if = "Option::is_none"
120 )]
121 pub include_snippet: Option<bool>,
122}
123impl CodeSearchRequest {
124 pub fn new() -> Self {
125 Self::default()
126 }
127}
128#[doc = "Defines a code search response item."]
129#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
130pub struct CodeSearchResponse {
131 #[serde(flatten)]
132 pub entity_search_response: EntitySearchResponse,
133 #[doc = "Total number of matched files."]
134 #[serde(default, skip_serializing_if = "Option::is_none")]
135 pub count: Option<i32>,
136 #[doc = "List of matched files."]
137 #[serde(
138 default,
139 deserialize_with = "crate::serde::deserialize_null_as_default",
140 skip_serializing_if = "Vec::is_empty"
141 )]
142 pub results: Vec<CodeResult>,
143}
144impl CodeSearchResponse {
145 pub fn new() -> Self {
146 Self::default()
147 }
148}
149#[doc = "Defines the details of the collection."]
150#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
151pub struct Collection {
152 #[doc = "Name of the collection."]
153 #[serde(default, skip_serializing_if = "Option::is_none")]
154 pub name: Option<String>,
155}
156impl Collection {
157 pub fn new() -> Self {
158 Self::default()
159 }
160}
161#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
162pub struct CustomRepositoryBranchStatusResponse {
163 #[serde(
164 rename = "lastIndexedChangeId",
165 default,
166 skip_serializing_if = "Option::is_none"
167 )]
168 pub last_indexed_change_id: Option<i64>,
169 #[serde(
170 rename = "lastIndexedChangeIdChangeTime",
171 default,
172 skip_serializing_if = "Option::is_none",
173 with = "crate::date_time::rfc3339::option"
174 )]
175 pub last_indexed_change_id_change_time: Option<time::OffsetDateTime>,
176 #[serde(
177 rename = "latestChangeId",
178 default,
179 skip_serializing_if = "Option::is_none"
180 )]
181 pub latest_change_id: Option<i64>,
182 #[serde(
183 rename = "latestChangeIdChangeTime",
184 default,
185 skip_serializing_if = "Option::is_none",
186 with = "crate::date_time::rfc3339::option"
187 )]
188 pub latest_change_id_change_time: Option<time::OffsetDateTime>,
189}
190impl CustomRepositoryBranchStatusResponse {
191 pub fn new() -> Self {
192 Self::default()
193 }
194}
195#[doc = "Defines the custom repository status."]
196#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
197pub struct CustomRepositoryStatusResponse {
198 #[doc = "Repository Id."]
199 #[serde(default, skip_serializing_if = "Option::is_none")]
200 pub id: Option<String>,
201 #[doc = "List of indexed top level folders info."]
202 #[serde(
203 rename = "indexedTopLevelFolders",
204 default,
205 deserialize_with = "crate::serde::deserialize_null_as_default",
206 skip_serializing_if = "Vec::is_empty"
207 )]
208 pub indexed_top_level_folders: Vec<DepotInfo>,
209 #[doc = "Repository Name."]
210 #[serde(default, skip_serializing_if = "Option::is_none")]
211 pub name: Option<String>,
212}
213impl CustomRepositoryStatusResponse {
214 pub fn new() -> Self {
215 Self::default()
216 }
217}
218#[doc = "Information about the custom repository indexing freshness for configured branches and depots."]
219#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
220pub struct DepotInfo {
221 #[doc = "Name of the indexed top level folder (depot)."]
222 #[serde(default, skip_serializing_if = "Option::is_none")]
223 pub name: Option<String>,
224}
225impl DepotInfo {
226 pub fn new() -> Self {
227 Self::default()
228 }
229}
230#[doc = "Base contract for search request types without scroll support."]
231#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
232pub struct EntitySearchRequest {
233 #[serde(flatten)]
234 pub entity_search_request_base: EntitySearchRequestBase,
235 #[doc = "Options for sorting search results. If set to null, the results will be returned sorted by relevance. If more than one sort option is provided, the results are sorted in the order specified in the OrderBy."]
236 #[serde(
237 rename = "$orderBy",
238 default,
239 deserialize_with = "crate::serde::deserialize_null_as_default",
240 skip_serializing_if = "Vec::is_empty"
241 )]
242 pub order_by: Vec<SortOption>,
243 #[doc = "Number of results to be skipped."]
244 #[serde(rename = "$skip", default, skip_serializing_if = "Option::is_none")]
245 pub skip: Option<i32>,
246 #[doc = "Number of results to be returned."]
247 #[serde(rename = "$top", default, skip_serializing_if = "Option::is_none")]
248 pub top: Option<i32>,
249 #[doc = "Flag to opt for faceting in the result. Default behavior is false."]
250 #[serde(
251 rename = "includeFacets",
252 default,
253 skip_serializing_if = "Option::is_none"
254 )]
255 pub include_facets: Option<bool>,
256}
257impl EntitySearchRequest {
258 pub fn new() -> Self {
259 Self::default()
260 }
261}
262#[doc = "Base class for search request types."]
263#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
264pub struct EntitySearchRequestBase {
265 #[doc = "Filters to be applied. Set it to null if there are no filters to be applied."]
266 #[serde(default, skip_serializing_if = "Option::is_none")]
267 pub filters: Option<serde_json::Value>,
268 #[doc = "The search text."]
269 #[serde(
270 rename = "searchText",
271 default,
272 skip_serializing_if = "Option::is_none"
273 )]
274 pub search_text: Option<String>,
275}
276impl EntitySearchRequestBase {
277 pub fn new() -> Self {
278 Self::default()
279 }
280}
281#[doc = "Defines the base contract for search response."]
282#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
283pub struct EntitySearchResponse {
284 #[doc = "A dictionary storing an array of <code>Filter</code> object against each facet."]
285 #[serde(default, skip_serializing_if = "Option::is_none")]
286 pub facets: Option<serde_json::Value>,
287 #[doc = "Numeric code indicating any additional information: 0 - Ok, 1 - Account is being reindexed, 2 - Account indexing has not started, 3 - Invalid Request, 4 - Prefix wildcard query not supported, 5 - MultiWords with code facet not supported, 6 - Account is being onboarded, 7 - Account is being onboarded or reindexed, 8 - Top value trimmed to maxresult allowed 9 - Branches are being indexed, 10 - Faceting not enabled, 11 - Work items not accessible, 19 - Phrase queries with code type filters not supported, 20 - Wildcard queries with code type filters not supported. Any other info code is used for internal purpose."]
288 #[serde(rename = "infoCode", default, skip_serializing_if = "Option::is_none")]
289 pub info_code: Option<i32>,
290}
291impl EntitySearchResponse {
292 pub fn new() -> Self {
293 Self::default()
294 }
295}
296#[doc = "Defines the details of a feed."]
297#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
298pub struct FeedInfo {
299 #[doc = "Id of the collection."]
300 #[serde(
301 rename = "collectionId",
302 default,
303 skip_serializing_if = "Option::is_none"
304 )]
305 pub collection_id: Option<String>,
306 #[doc = "Name of the collection."]
307 #[serde(
308 rename = "collectionName",
309 default,
310 skip_serializing_if = "Option::is_none"
311 )]
312 pub collection_name: Option<String>,
313 #[doc = "Id of the feed."]
314 #[serde(rename = "feedId", default, skip_serializing_if = "Option::is_none")]
315 pub feed_id: Option<String>,
316 #[doc = "Name of the feed."]
317 #[serde(rename = "feedName", default, skip_serializing_if = "Option::is_none")]
318 pub feed_name: Option<String>,
319 #[doc = "Latest matched version of package in this Feed."]
320 #[serde(
321 rename = "latestMatchedVersion",
322 default,
323 skip_serializing_if = "Option::is_none"
324 )]
325 pub latest_matched_version: Option<String>,
326 #[doc = "Latest version of package in this Feed."]
327 #[serde(
328 rename = "latestVersion",
329 default,
330 skip_serializing_if = "Option::is_none"
331 )]
332 pub latest_version: Option<String>,
333 #[doc = "Url of package in this Feed."]
334 #[serde(
335 rename = "packageUrl",
336 default,
337 skip_serializing_if = "Option::is_none"
338 )]
339 pub package_url: Option<String>,
340 #[doc = "List of views which contain the matched package."]
341 #[serde(
342 default,
343 deserialize_with = "crate::serde::deserialize_null_as_default",
344 skip_serializing_if = "Vec::is_empty"
345 )]
346 pub views: Vec<String>,
347}
348impl FeedInfo {
349 pub fn new() -> Self {
350 Self::default()
351 }
352}
353#[doc = "Describes a filter bucket item representing the total matches of search result, name and id."]
354#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
355pub struct Filter {
356 #[doc = "Id of the filter bucket."]
357 #[serde(default, skip_serializing_if = "Option::is_none")]
358 pub id: Option<String>,
359 #[doc = "Name of the filter bucket."]
360 #[serde(default, skip_serializing_if = "Option::is_none")]
361 pub name: Option<String>,
362 #[doc = "Count of matches in the filter bucket."]
363 #[serde(
364 rename = "resultCount",
365 default,
366 skip_serializing_if = "Option::is_none"
367 )]
368 pub result_count: Option<i32>,
369}
370impl Filter {
371 pub fn new() -> Self {
372 Self::default()
373 }
374}
375#[doc = "Describes the position of a piece of text in a document."]
376#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
377pub struct Hit {
378 #[doc = "Gets or sets the start character offset of a piece of text."]
379 #[serde(
380 rename = "charOffset",
381 default,
382 skip_serializing_if = "Option::is_none"
383 )]
384 pub char_offset: Option<i32>,
385 #[doc = "Gets or sets an extract of code where the match appears. Usually it is the line where there is the match."]
386 #[serde(
387 rename = "codeSnippet",
388 default,
389 skip_serializing_if = "Option::is_none"
390 )]
391 pub code_snippet: Option<String>,
392 #[doc = "Gets or sets the column number where the match appears in the line."]
393 #[serde(default, skip_serializing_if = "Option::is_none")]
394 pub column: Option<i32>,
395 #[doc = "Gets or sets the length of a piece of text."]
396 #[serde(default, skip_serializing_if = "Option::is_none")]
397 pub length: Option<i32>,
398 #[doc = "Gets or sets the line number where the match appears in the file."]
399 #[serde(default, skip_serializing_if = "Option::is_none")]
400 pub line: Option<i32>,
401 #[doc = "Gets or sets the name of type of a piece of text."]
402 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
403 pub type_: Option<String>,
404}
405impl Hit {
406 pub fn new() -> Self {
407 Self::default()
408 }
409}
410#[doc = "Defines the matched terms in the field of the package result."]
411#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
412pub struct PackageHit {
413 #[doc = "Reference name of the highlighted field."]
414 #[serde(
415 rename = "fieldReferenceName",
416 default,
417 skip_serializing_if = "Option::is_none"
418 )]
419 pub field_reference_name: Option<String>,
420 #[doc = "Matched/highlighted snippets of the field."]
421 #[serde(
422 default,
423 deserialize_with = "crate::serde::deserialize_null_as_default",
424 skip_serializing_if = "Vec::is_empty"
425 )]
426 pub highlights: Vec<String>,
427}
428impl PackageHit {
429 pub fn new() -> Self {
430 Self::default()
431 }
432}
433#[doc = "Defines the package result that matched a package search request."]
434#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
435pub struct PackageResult {
436 #[doc = "Description of the package."]
437 #[serde(default, skip_serializing_if = "Option::is_none")]
438 pub description: Option<String>,
439 #[doc = "List of feeds which contain the matching package."]
440 #[serde(
441 default,
442 deserialize_with = "crate::serde::deserialize_null_as_default",
443 skip_serializing_if = "Vec::is_empty"
444 )]
445 pub feeds: Vec<FeedInfo>,
446 #[doc = "List of highlighted fields for the match."]
447 #[serde(
448 default,
449 deserialize_with = "crate::serde::deserialize_null_as_default",
450 skip_serializing_if = "Vec::is_empty"
451 )]
452 pub hits: Vec<PackageHit>,
453 #[doc = "Id of the package."]
454 #[serde(default, skip_serializing_if = "Option::is_none")]
455 pub id: Option<String>,
456 #[doc = "Name of the package."]
457 #[serde(default, skip_serializing_if = "Option::is_none")]
458 pub name: Option<String>,
459 #[doc = "Type of the package."]
460 #[serde(
461 rename = "protocolType",
462 default,
463 skip_serializing_if = "Option::is_none"
464 )]
465 pub protocol_type: Option<String>,
466}
467impl PackageResult {
468 pub fn new() -> Self {
469 Self::default()
470 }
471}
472#[doc = "Defines a package search request."]
473#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
474pub struct PackageSearchRequest {
475 #[serde(flatten)]
476 pub entity_search_request: EntitySearchRequest,
477}
478impl PackageSearchRequest {
479 pub fn new() -> Self {
480 Self::default()
481 }
482}
483#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
484pub struct PackageSearchResponse {
485 #[serde(
486 rename = "activityId",
487 default,
488 deserialize_with = "crate::serde::deserialize_null_as_default",
489 skip_serializing_if = "Vec::is_empty"
490 )]
491 pub activity_id: Vec<String>,
492 #[doc = "Defines a response item that is returned for a package search request."]
493 #[serde(default, skip_serializing_if = "Option::is_none")]
494 pub content: Option<PackageSearchResponseContent>,
495}
496impl PackageSearchResponse {
497 pub fn new() -> Self {
498 Self::default()
499 }
500}
501#[doc = "Defines a response item that is returned for a package search request."]
502#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
503pub struct PackageSearchResponseContent {
504 #[serde(flatten)]
505 pub entity_search_response: EntitySearchResponse,
506 #[doc = "Total number of matched packages."]
507 #[serde(default, skip_serializing_if = "Option::is_none")]
508 pub count: Option<i32>,
509 #[doc = "List of matched packages."]
510 #[serde(
511 default,
512 deserialize_with = "crate::serde::deserialize_null_as_default",
513 skip_serializing_if = "Vec::is_empty"
514 )]
515 pub results: Vec<PackageResult>,
516}
517impl PackageSearchResponseContent {
518 pub fn new() -> Self {
519 Self::default()
520 }
521}
522#[doc = "Defines the details of the project."]
523#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
524pub struct Project {
525 #[doc = "Id of the project."]
526 #[serde(default, skip_serializing_if = "Option::is_none")]
527 pub id: Option<String>,
528 #[doc = "Name of the project."]
529 #[serde(default, skip_serializing_if = "Option::is_none")]
530 pub name: Option<String>,
531}
532impl Project {
533 pub fn new() -> Self {
534 Self::default()
535 }
536}
537#[doc = "Defines the details of the project."]
538#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
539pub struct ProjectReference {
540 #[doc = "ID of the project."]
541 #[serde(default, skip_serializing_if = "Option::is_none")]
542 pub id: Option<String>,
543 #[doc = "Name of the project."]
544 #[serde(default, skip_serializing_if = "Option::is_none")]
545 pub name: Option<String>,
546 #[doc = "Visibility of the project."]
547 #[serde(default, skip_serializing_if = "Option::is_none")]
548 pub visibility: Option<String>,
549}
550impl ProjectReference {
551 pub fn new() -> Self {
552 Self::default()
553 }
554}
555#[doc = "Defines the details of the repository."]
556#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
557pub struct Repository {
558 #[doc = "Id of the repository."]
559 #[serde(default, skip_serializing_if = "Option::is_none")]
560 pub id: Option<String>,
561 #[doc = "Name of the repository."]
562 #[serde(default, skip_serializing_if = "Option::is_none")]
563 pub name: Option<String>,
564 #[doc = "Version control type of the result file."]
565 #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
566 pub type_: Option<repository::Type>,
567}
568impl Repository {
569 pub fn new() -> Self {
570 Self::default()
571 }
572}
573pub mod repository {
574 use super::*;
575 #[doc = "Version control type of the result file."]
576 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
577 pub enum Type {
578 #[serde(rename = "git")]
579 Git,
580 #[serde(rename = "tfvc")]
581 Tfvc,
582 #[serde(rename = "custom")]
583 Custom,
584 }
585}
586#[doc = "Defines the repository status."]
587#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
588pub struct RepositoryStatusResponse {
589 #[doc = "Repository Id."]
590 #[serde(default, skip_serializing_if = "Option::is_none")]
591 pub id: Option<String>,
592 #[doc = "List of Indexed branches info."]
593 #[serde(
594 rename = "indexedBranches",
595 default,
596 deserialize_with = "crate::serde::deserialize_null_as_default",
597 skip_serializing_if = "Vec::is_empty"
598 )]
599 pub indexed_branches: Vec<BranchInfo>,
600 #[doc = "Repository Name."]
601 #[serde(default, skip_serializing_if = "Option::is_none")]
602 pub name: Option<String>,
603}
604impl RepositoryStatusResponse {
605 pub fn new() -> Self {
606 Self::default()
607 }
608}
609#[doc = "Defines a scroll code search request."]
610#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
611pub struct ScrollSearchRequest {
612 #[serde(flatten)]
613 pub entity_search_request_base: EntitySearchRequestBase,
614 #[doc = "Scroll Id for scroll search query."]
615 #[serde(rename = "$scrollId", default, skip_serializing_if = "Option::is_none")]
616 pub scroll_id: Option<String>,
617 #[doc = "Size of data to return for scroll search query. Min value is 201."]
618 #[serde(
619 rename = "$scrollSize",
620 default,
621 skip_serializing_if = "Option::is_none"
622 )]
623 pub scroll_size: Option<i32>,
624}
625impl ScrollSearchRequest {
626 pub fn new() -> Self {
627 Self::default()
628 }
629}
630#[doc = "Defines the setting result that matched a setting search request"]
631#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
632pub struct SettingResult {
633 #[doc = "Description of the settings page"]
634 #[serde(default, skip_serializing_if = "Option::is_none")]
635 pub description: Option<String>,
636 #[doc = "Icon name of the settings page"]
637 #[serde(default, skip_serializing_if = "Option::is_none")]
638 pub icon: Option<String>,
639 #[doc = "Contribution url route id of the corresponding settings page"]
640 #[serde(rename = "routeId", default, skip_serializing_if = "Option::is_none")]
641 pub route_id: Option<String>,
642 #[doc = "Contribution url route parameter of the corresponding settings page"]
643 #[serde(
644 rename = "routeParameterMapping",
645 default,
646 skip_serializing_if = "Option::is_none"
647 )]
648 pub route_parameter_mapping: Option<serde_json::Value>,
649 #[doc = "Scope of the settings page, either organization, project or user"]
650 #[serde(default, skip_serializing_if = "Option::is_none")]
651 pub scope: Option<setting_result::Scope>,
652 #[doc = "Title of the settings page"]
653 #[serde(default, skip_serializing_if = "Option::is_none")]
654 pub title: Option<String>,
655}
656impl SettingResult {
657 pub fn new() -> Self {
658 Self::default()
659 }
660}
661pub mod setting_result {
662 use super::*;
663 #[doc = "Scope of the settings page, either organization, project or user"]
664 #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
665 pub enum Scope {
666 #[serde(rename = "none")]
667 None,
668 #[serde(rename = "organization")]
669 Organization,
670 #[serde(rename = "project")]
671 Project,
672 #[serde(rename = "user")]
673 User,
674 }
675}
676#[doc = "Defines a setting search request"]
677#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
678pub struct SettingSearchRequest {
679 #[serde(flatten)]
680 pub entity_search_request: EntitySearchRequest,
681}
682impl SettingSearchRequest {
683 pub fn new() -> Self {
684 Self::default()
685 }
686}
687#[doc = "Defines a setting search response item"]
688#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
689pub struct SettingSearchResponse {
690 #[serde(flatten)]
691 pub entity_search_response: EntitySearchResponse,
692 #[doc = "Total number of matched setting documents."]
693 #[serde(default, skip_serializing_if = "Option::is_none")]
694 pub count: Option<i32>,
695 #[doc = "List of top matched setting documents."]
696 #[serde(
697 default,
698 deserialize_with = "crate::serde::deserialize_null_as_default",
699 skip_serializing_if = "Vec::is_empty"
700 )]
701 pub results: Vec<SettingResult>,
702}
703impl SettingSearchResponse {
704 pub fn new() -> Self {
705 Self::default()
706 }
707}
708#[doc = "Defines how to sort the result."]
709#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
710pub struct SortOption {
711 #[doc = "Field name on which sorting should be done."]
712 #[serde(default, skip_serializing_if = "Option::is_none")]
713 pub field: Option<String>,
714 #[doc = "Order (ASC/DESC) in which the results should be sorted."]
715 #[serde(rename = "sortOrder", default, skip_serializing_if = "Option::is_none")]
716 pub sort_order: Option<String>,
717}
718impl SortOption {
719 pub fn new() -> Self {
720 Self::default()
721 }
722}
723#[doc = "Defines the details of the team."]
724#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
725pub struct Team {
726 #[doc = "Id of the team."]
727 #[serde(default, skip_serializing_if = "Option::is_none")]
728 pub id: Option<String>,
729 #[doc = "Name of the Team."]
730 #[serde(default, skip_serializing_if = "Option::is_none")]
731 pub name: Option<String>,
732}
733impl Team {
734 pub fn new() -> Self {
735 Self::default()
736 }
737}
738#[doc = "Defines the TFVC repository status."]
739#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
740pub struct TfvcRepositoryStatusResponse {
741 #[doc = "Repository Id."]
742 #[serde(default, skip_serializing_if = "Option::is_none")]
743 pub id: Option<String>,
744 #[doc = "List of Indexing Information for TFVC repository"]
745 #[serde(
746 rename = "indexingInformation",
747 default,
748 deserialize_with = "crate::serde::deserialize_null_as_default",
749 skip_serializing_if = "Vec::is_empty"
750 )]
751 pub indexing_information: Vec<BranchInfo>,
752 #[doc = "Repository Name."]
753 #[serde(default, skip_serializing_if = "Option::is_none")]
754 pub name: Option<String>,
755}
756impl TfvcRepositoryStatusResponse {
757 pub fn new() -> Self {
758 Self::default()
759 }
760}
761#[doc = "Describes the details pertaining to a version of the result file."]
762#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
763pub struct Version {
764 #[doc = "Name of the branch."]
765 #[serde(
766 rename = "branchName",
767 default,
768 skip_serializing_if = "Option::is_none"
769 )]
770 pub branch_name: Option<String>,
771 #[doc = "ChangeId in the given branch associated with this match."]
772 #[serde(rename = "changeId", default, skip_serializing_if = "Option::is_none")]
773 pub change_id: Option<String>,
774}
775impl Version {
776 pub fn new() -> Self {
777 Self::default()
778 }
779}
780#[doc = "Defines the details of wiki."]
781#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
782pub struct Wiki {
783 #[doc = "Id of the wiki."]
784 #[serde(default, skip_serializing_if = "Option::is_none")]
785 pub id: Option<String>,
786 #[doc = "Mapped path for the wiki."]
787 #[serde(
788 rename = "mappedPath",
789 default,
790 skip_serializing_if = "Option::is_none"
791 )]
792 pub mapped_path: Option<String>,
793 #[doc = "Name of the wiki."]
794 #[serde(default, skip_serializing_if = "Option::is_none")]
795 pub name: Option<String>,
796 #[doc = "Version for wiki."]
797 #[serde(default, skip_serializing_if = "Option::is_none")]
798 pub version: Option<String>,
799}
800impl Wiki {
801 pub fn new() -> Self {
802 Self::default()
803 }
804}
805#[doc = "Defines the matched terms in the field of the wiki result."]
806#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
807pub struct WikiHit {
808 #[doc = "Reference name of the highlighted field."]
809 #[serde(
810 rename = "fieldReferenceName",
811 default,
812 skip_serializing_if = "Option::is_none"
813 )]
814 pub field_reference_name: Option<String>,
815 #[doc = "Matched/highlighted snippets of the field."]
816 #[serde(
817 default,
818 deserialize_with = "crate::serde::deserialize_null_as_default",
819 skip_serializing_if = "Vec::is_empty"
820 )]
821 pub highlights: Vec<String>,
822}
823impl WikiHit {
824 pub fn new() -> Self {
825 Self::default()
826 }
827}
828#[doc = "Defines the wiki result that matched a wiki search request."]
829#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
830pub struct WikiResult {
831 #[doc = "Defines the details of the collection."]
832 #[serde(default, skip_serializing_if = "Option::is_none")]
833 pub collection: Option<Collection>,
834 #[doc = "ContentId of the result file."]
835 #[serde(rename = "contentId", default, skip_serializing_if = "Option::is_none")]
836 pub content_id: Option<String>,
837 #[doc = "Name of the result file."]
838 #[serde(rename = "fileName", default, skip_serializing_if = "Option::is_none")]
839 pub file_name: Option<String>,
840 #[doc = "Highlighted snippets of fields that match the search request. The list is sorted by relevance of the snippets."]
841 #[serde(
842 default,
843 deserialize_with = "crate::serde::deserialize_null_as_default",
844 skip_serializing_if = "Vec::is_empty"
845 )]
846 pub hits: Vec<WikiHit>,
847 #[doc = "Path at which result file is present."]
848 #[serde(default, skip_serializing_if = "Option::is_none")]
849 pub path: Option<String>,
850 #[doc = "Defines the details of the project."]
851 #[serde(default, skip_serializing_if = "Option::is_none")]
852 pub project: Option<ProjectReference>,
853 #[doc = "Defines the details of wiki."]
854 #[serde(default, skip_serializing_if = "Option::is_none")]
855 pub wiki: Option<Wiki>,
856}
857impl WikiResult {
858 pub fn new() -> Self {
859 Self::default()
860 }
861}
862#[doc = "Defines a wiki search request."]
863#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
864pub struct WikiSearchRequest {
865 #[serde(flatten)]
866 pub entity_search_request: EntitySearchRequest,
867}
868impl WikiSearchRequest {
869 pub fn new() -> Self {
870 Self::default()
871 }
872}
873#[doc = "Defines a wiki search response item."]
874#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
875pub struct WikiSearchResponse {
876 #[serde(flatten)]
877 pub entity_search_response: EntitySearchResponse,
878 #[doc = "Total number of matched wiki documents."]
879 #[serde(default, skip_serializing_if = "Option::is_none")]
880 pub count: Option<i32>,
881 #[doc = "List of top matched wiki documents."]
882 #[serde(
883 default,
884 deserialize_with = "crate::serde::deserialize_null_as_default",
885 skip_serializing_if = "Vec::is_empty"
886 )]
887 pub results: Vec<WikiResult>,
888}
889impl WikiSearchResponse {
890 pub fn new() -> Self {
891 Self::default()
892 }
893}
894#[doc = "Defines the matched terms in the field of the work item result."]
895#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
896pub struct WorkItemHit {
897 #[doc = "Reference name of the highlighted field."]
898 #[serde(
899 rename = "fieldReferenceName",
900 default,
901 skip_serializing_if = "Option::is_none"
902 )]
903 pub field_reference_name: Option<String>,
904 #[doc = "Matched/highlighted snippets of the field."]
905 #[serde(
906 default,
907 deserialize_with = "crate::serde::deserialize_null_as_default",
908 skip_serializing_if = "Vec::is_empty"
909 )]
910 pub highlights: Vec<String>,
911}
912impl WorkItemHit {
913 pub fn new() -> Self {
914 Self::default()
915 }
916}
917#[doc = "Defines the work item result that matched a work item search request."]
918#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
919pub struct WorkItemResult {
920 #[doc = "A standard set of work item fields and their values."]
921 #[serde(default, skip_serializing_if = "Option::is_none")]
922 pub fields: Option<serde_json::Value>,
923 #[doc = "Highlighted snippets of fields that match the search request. The list is sorted by relevance of the snippets."]
924 #[serde(
925 default,
926 deserialize_with = "crate::serde::deserialize_null_as_default",
927 skip_serializing_if = "Vec::is_empty"
928 )]
929 pub hits: Vec<WorkItemHit>,
930 #[doc = "Defines the details of the project."]
931 #[serde(default, skip_serializing_if = "Option::is_none")]
932 pub project: Option<Project>,
933 #[doc = "Reference to the work item."]
934 #[serde(default, skip_serializing_if = "Option::is_none")]
935 pub url: Option<String>,
936}
937impl WorkItemResult {
938 pub fn new() -> Self {
939 Self::default()
940 }
941}
942#[doc = "Defines a work item search request."]
943#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
944pub struct WorkItemSearchRequest {
945 #[serde(flatten)]
946 pub entity_search_request: EntitySearchRequest,
947}
948impl WorkItemSearchRequest {
949 pub fn new() -> Self {
950 Self::default()
951 }
952}
953#[doc = "Defines a response item that is returned for a work item search request."]
954#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
955pub struct WorkItemSearchResponse {
956 #[serde(flatten)]
957 pub entity_search_response: EntitySearchResponse,
958 #[doc = "Total number of matched work items."]
959 #[serde(default, skip_serializing_if = "Option::is_none")]
960 pub count: Option<i32>,
961 #[doc = "List of top matched work items."]
962 #[serde(
963 default,
964 deserialize_with = "crate::serde::deserialize_null_as_default",
965 skip_serializing_if = "Vec::is_empty"
966 )]
967 pub results: Vec<WorkItemResult>,
968}
969impl WorkItemSearchResponse {
970 pub fn new() -> Self {
971 Self::default()
972 }
973}