azure_devops_rust_api/artifacts/
models.rs

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3#![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 BuildPackage {
10    #[doc = "Display name of the feed."]
11    #[serde(rename = "feedName", default, skip_serializing_if = "Option::is_none")]
12    pub feed_name: Option<String>,
13    #[doc = "Package version description."]
14    #[serde(
15        rename = "packageDescription",
16        default,
17        skip_serializing_if = "Option::is_none"
18    )]
19    pub package_description: Option<String>,
20    #[doc = "Display name of the package."]
21    #[serde(
22        rename = "packageName",
23        default,
24        skip_serializing_if = "Option::is_none"
25    )]
26    pub package_name: Option<String>,
27    #[doc = "Version of the package."]
28    #[serde(
29        rename = "packageVersion",
30        default,
31        skip_serializing_if = "Option::is_none"
32    )]
33    pub package_version: Option<String>,
34    #[doc = "TFS project id."]
35    #[serde(rename = "projectId", default, skip_serializing_if = "Option::is_none")]
36    pub project_id: Option<String>,
37    #[doc = "Type of the package."]
38    #[serde(
39        rename = "protocolType",
40        default,
41        skip_serializing_if = "Option::is_none"
42    )]
43    pub protocol_type: Option<String>,
44}
45impl BuildPackage {
46    pub fn new() -> Self {
47        Self::default()
48    }
49}
50#[doc = "This holds the configuration for the ManifestTool. The values in this file are populated from the command line, config file and default."]
51#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
52pub struct Configuration {
53    #[doc = "Encapsulates a configuration setting to provide metadata about the setting source and type."]
54    #[serde(
55        rename = "additionalComponentDetectorArgs",
56        default,
57        skip_serializing_if = "Option::is_none"
58    )]
59    pub additional_component_detector_args: Option<ConfigurationSetting>,
60    #[doc = "Encapsulates a configuration setting to provide metadata about the setting source and type."]
61    #[serde(
62        rename = "buildComponentPath",
63        default,
64        skip_serializing_if = "Option::is_none"
65    )]
66    pub build_component_path: Option<ConfigurationSetting>,
67    #[doc = "Encapsulates a configuration setting to provide metadata about the setting source and type."]
68    #[serde(
69        rename = "buildDropPath",
70        default,
71        skip_serializing_if = "Option::is_none"
72    )]
73    pub build_drop_path: Option<ConfigurationSetting>,
74    #[doc = "Encapsulates a configuration setting to provide metadata about the setting source and type."]
75    #[serde(
76        rename = "buildListFile",
77        default,
78        skip_serializing_if = "Option::is_none"
79    )]
80    pub build_list_file: Option<ConfigurationSetting>,
81    #[doc = "Encapsulates a configuration setting to provide metadata about the setting source and type."]
82    #[serde(
83        rename = "catalogFilePath",
84        default,
85        skip_serializing_if = "Option::is_none"
86    )]
87    pub catalog_file_path: Option<ConfigurationSetting>,
88    #[doc = "Encapsulates a configuration setting to provide metadata about the setting source and type."]
89    #[serde(
90        rename = "configFilePath",
91        default,
92        skip_serializing_if = "Option::is_none"
93    )]
94    pub config_file_path: Option<ConfigurationSetting>,
95    #[doc = "Encapsulates a configuration setting to provide metadata about the setting source and type."]
96    #[serde(
97        rename = "dockerImagesToScan",
98        default,
99        skip_serializing_if = "Option::is_none"
100    )]
101    pub docker_images_to_scan: Option<ConfigurationSetting>,
102    #[doc = "Encapsulates a configuration setting to provide metadata about the setting source and type."]
103    #[serde(
104        rename = "externalDocumentReferenceListFile",
105        default,
106        skip_serializing_if = "Option::is_none"
107    )]
108    pub external_document_reference_list_file: Option<ConfigurationSetting>,
109    #[doc = "Encapsulates a configuration setting to provide metadata about the setting source and type."]
110    #[serde(
111        rename = "hashAlgorithm",
112        default,
113        skip_serializing_if = "Option::is_none"
114    )]
115    pub hash_algorithm: Option<ConfigurationSetting>,
116    #[doc = "Encapsulates a configuration setting to provide metadata about the setting source and type."]
117    #[serde(
118        rename = "ignoreMissing",
119        default,
120        skip_serializing_if = "Option::is_none"
121    )]
122    pub ignore_missing: Option<ConfigurationSetting>,
123    #[doc = "Encapsulates a configuration setting to provide metadata about the setting source and type."]
124    #[serde(
125        rename = "manifestDirPath",
126        default,
127        skip_serializing_if = "Option::is_none"
128    )]
129    pub manifest_dir_path: Option<ConfigurationSetting>,
130    #[doc = "Encapsulates a configuration setting to provide metadata about the setting source and type."]
131    #[serde(
132        rename = "manifestInfo",
133        default,
134        skip_serializing_if = "Option::is_none"
135    )]
136    pub manifest_info: Option<ConfigurationSetting>,
137    #[doc = "The action currently being performed by the manifest tool."]
138    #[serde(
139        rename = "manifestToolAction",
140        default,
141        skip_serializing_if = "Option::is_none"
142    )]
143    pub manifest_tool_action: Option<configuration::ManifestToolAction>,
144    #[doc = "Encapsulates a configuration setting to provide metadata about the setting source and type."]
145    #[serde(
146        rename = "packageName",
147        default,
148        skip_serializing_if = "Option::is_none"
149    )]
150    pub package_name: Option<ConfigurationSetting>,
151    #[doc = "Encapsulates a configuration setting to provide metadata about the setting source and type."]
152    #[serde(
153        rename = "packageVersion",
154        default,
155        skip_serializing_if = "Option::is_none"
156    )]
157    pub package_version: Option<ConfigurationSetting>,
158    #[doc = "Encapsulates a configuration setting to provide metadata about the setting source and type."]
159    #[serde(default, skip_serializing_if = "Option::is_none")]
160    pub parallelism: Option<ConfigurationSetting>,
161    #[doc = "Encapsulates a configuration setting to provide metadata about the setting source and type."]
162    #[serde(
163        rename = "rootPathFilter",
164        default,
165        skip_serializing_if = "Option::is_none"
166    )]
167    pub root_path_filter: Option<ConfigurationSetting>,
168    #[doc = "Encapsulates a configuration setting to provide metadata about the setting source and type."]
169    #[serde(
170        rename = "telemetryFilePath",
171        default,
172        skip_serializing_if = "Option::is_none"
173    )]
174    pub telemetry_file_path: Option<ConfigurationSetting>,
175    #[doc = "Encapsulates a configuration setting to provide metadata about the setting source and type."]
176    #[serde(
177        rename = "validateSignature",
178        default,
179        skip_serializing_if = "Option::is_none"
180    )]
181    pub validate_signature: Option<ConfigurationSetting>,
182}
183impl Configuration {
184    pub fn new() -> Self {
185        Self::default()
186    }
187}
188pub mod configuration {
189    use super::*;
190    #[doc = "The action currently being performed by the manifest tool."]
191    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
192    pub enum ManifestToolAction {
193        #[serde(rename = "none")]
194        None,
195        #[serde(rename = "validate")]
196        Validate,
197        #[serde(rename = "generate")]
198        Generate,
199        #[serde(rename = "all")]
200        All,
201    }
202}
203#[doc = "Encapsulates a configuration setting to provide metadata about the setting source and type."]
204#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
205pub struct ConfigurationSetting {
206    #[doc = "The source where this setting came from."]
207    #[serde(default, skip_serializing_if = "Option::is_none")]
208    pub source: Option<String>,
209    #[doc = "The actual value of the setting."]
210    #[serde(default, skip_serializing_if = "Option::is_none")]
211    pub value: Option<String>,
212}
213impl ConfigurationSetting {
214    pub fn new() -> Self {
215        Self::default()
216    }
217}
218#[doc = "A container for artifacts."]
219#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
220pub struct Feed {
221    #[serde(flatten)]
222    pub feed_core: FeedCore,
223    #[doc = "Links"]
224    #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
225    pub links: Option<serde_json::Value>,
226    #[doc = "If set, this feed supports generation of package badges."]
227    #[serde(
228        rename = "badgesEnabled",
229        default,
230        skip_serializing_if = "Option::is_none"
231    )]
232    pub badges_enabled: Option<bool>,
233    #[doc = "The view that the feed administrator has indicated is the default experience for readers."]
234    #[serde(
235        rename = "defaultViewId",
236        default,
237        skip_serializing_if = "Option::is_none"
238    )]
239    pub default_view_id: Option<String>,
240    #[doc = "The date that this feed was deleted."]
241    #[serde(
242        rename = "deletedDate",
243        default,
244        skip_serializing_if = "Option::is_none",
245        with = "crate::date_time::rfc3339::option"
246    )]
247    pub deleted_date: Option<time::OffsetDateTime>,
248    #[doc = "A description for the feed.  Descriptions must not exceed 255 characters."]
249    #[serde(default, skip_serializing_if = "Option::is_none")]
250    pub description: Option<String>,
251    #[doc = "If set, the feed will hide all deleted/unpublished versions"]
252    #[serde(
253        rename = "hideDeletedPackageVersions",
254        default,
255        skip_serializing_if = "Option::is_none"
256    )]
257    pub hide_deleted_package_versions: Option<bool>,
258    #[doc = "The date that this feed was permanently deleted."]
259    #[serde(
260        rename = "permanentDeletedDate",
261        default,
262        skip_serializing_if = "Option::is_none",
263        with = "crate::date_time::rfc3339::option"
264    )]
265    pub permanent_deleted_date: Option<time::OffsetDateTime>,
266    #[doc = "Explicit permissions for the feed."]
267    #[serde(
268        default,
269        deserialize_with = "crate::serde::deserialize_null_as_default",
270        skip_serializing_if = "Vec::is_empty"
271    )]
272    pub permissions: Vec<FeedPermission>,
273    #[doc = "The date that this feed is scheduled to be permanently deleted."]
274    #[serde(
275        rename = "scheduledPermanentDeleteDate",
276        default,
277        skip_serializing_if = "Option::is_none",
278        with = "crate::date_time::rfc3339::option"
279    )]
280    pub scheduled_permanent_delete_date: Option<time::OffsetDateTime>,
281    #[doc = "If set, time that the UpstreamEnabled property was changed. Will be null if UpstreamEnabled was never changed after Feed creation."]
282    #[serde(
283        rename = "upstreamEnabledChangedDate",
284        default,
285        skip_serializing_if = "Option::is_none",
286        with = "crate::date_time::rfc3339::option"
287    )]
288    pub upstream_enabled_changed_date: Option<time::OffsetDateTime>,
289    #[doc = "The URL of the base feed in GUID form."]
290    #[serde(default, skip_serializing_if = "Option::is_none")]
291    pub url: Option<String>,
292}
293impl Feed {
294    pub fn new() -> Self {
295        Self::default()
296    }
297}
298#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
299pub struct FeedBatchData {
300    #[serde(default, skip_serializing_if = "Option::is_none")]
301    pub data: Option<FeedBatchOperationData>,
302    #[serde(default, skip_serializing_if = "Option::is_none")]
303    pub operation: Option<feed_batch_data::Operation>,
304}
305impl FeedBatchData {
306    pub fn new() -> Self {
307        Self::default()
308    }
309}
310pub mod feed_batch_data {
311    use super::*;
312    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
313    pub enum Operation {
314        #[serde(rename = "saveCachedPackages")]
315        SaveCachedPackages,
316    }
317}
318#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
319pub struct FeedBatchOperationData {}
320impl FeedBatchOperationData {
321    pub fn new() -> Self {
322        Self::default()
323    }
324}
325#[doc = "A container that encapsulates the state of the feed after a create, update, or delete."]
326#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
327pub struct FeedChange {
328    #[doc = "The type of operation."]
329    #[serde(
330        rename = "changeType",
331        default,
332        skip_serializing_if = "Option::is_none"
333    )]
334    pub change_type: Option<feed_change::ChangeType>,
335    #[doc = "A container for artifacts."]
336    #[serde(default, skip_serializing_if = "Option::is_none")]
337    pub feed: Option<Feed>,
338    #[doc = "A token that identifies the next change in the log of changes."]
339    #[serde(
340        rename = "feedContinuationToken",
341        default,
342        skip_serializing_if = "Option::is_none"
343    )]
344    pub feed_continuation_token: Option<i64>,
345    #[doc = "A token that identifies the latest package change for this feed.  This can be used to quickly determine if there have been any changes to packages in a specific feed."]
346    #[serde(
347        rename = "latestPackageContinuationToken",
348        default,
349        skip_serializing_if = "Option::is_none"
350    )]
351    pub latest_package_continuation_token: Option<i64>,
352}
353impl FeedChange {
354    pub fn new() -> Self {
355        Self::default()
356    }
357}
358pub mod feed_change {
359    use super::*;
360    #[doc = "The type of operation."]
361    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
362    pub enum ChangeType {
363        #[serde(rename = "addOrUpdate")]
364        AddOrUpdate,
365        #[serde(rename = "delete")]
366        Delete,
367        #[serde(rename = "permanentDelete")]
368        PermanentDelete,
369    }
370}
371#[doc = "A result set containing the feed changes for the range that was requested."]
372#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
373pub struct FeedChangesResponse {
374    #[doc = "The class to represent a collection of REST reference links."]
375    #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
376    pub links: Option<ReferenceLinks>,
377    #[doc = "The number of changes in this set."]
378    #[serde(default, skip_serializing_if = "Option::is_none")]
379    pub count: Option<i32>,
380    #[doc = "A container that encapsulates the state of the feed after a create, update, or delete."]
381    #[serde(
382        rename = "feedChanges",
383        default,
384        deserialize_with = "crate::serde::deserialize_null_as_default",
385        skip_serializing_if = "Vec::is_empty"
386    )]
387    pub feed_changes: Vec<FeedChange>,
388    #[doc = "When iterating through the log of changes this value indicates the value that should be used for the next continuation token."]
389    #[serde(
390        rename = "nextFeedContinuationToken",
391        default,
392        skip_serializing_if = "Option::is_none"
393    )]
394    pub next_feed_continuation_token: Option<i64>,
395}
396impl FeedChangesResponse {
397    pub fn new() -> Self {
398        Self::default()
399    }
400}
401#[doc = "An object that contains all of the settings for a specific feed."]
402#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
403pub struct FeedCore {
404    #[doc = "Supported capabilities of a feed."]
405    #[serde(default, skip_serializing_if = "Option::is_none")]
406    pub capabilities: Option<feed_core::Capabilities>,
407    #[doc = "This will either be the feed GUID or the feed GUID and view GUID depending on how the feed was accessed."]
408    #[serde(
409        rename = "fullyQualifiedId",
410        default,
411        skip_serializing_if = "Option::is_none"
412    )]
413    pub fully_qualified_id: Option<String>,
414    #[doc = "Full name of the view, in feed@view format."]
415    #[serde(
416        rename = "fullyQualifiedName",
417        default,
418        skip_serializing_if = "Option::is_none"
419    )]
420    pub fully_qualified_name: Option<String>,
421    #[doc = "A GUID that uniquely identifies this feed."]
422    #[serde(default, skip_serializing_if = "Option::is_none")]
423    pub id: Option<String>,
424    #[doc = "If set, all packages in the feed are immutable.  It is important to note that feed views are immutable; therefore, this flag will always be set for views."]
425    #[serde(
426        rename = "isReadOnly",
427        default,
428        skip_serializing_if = "Option::is_none"
429    )]
430    pub is_read_only: Option<bool>,
431    #[doc = "A name for the feed. feed names must follow these rules: <list type=\"bullet\"><item><description> Must not exceed 64 characters </description></item><item><description> Must not contain whitespaces </description></item><item><description> Must not start with an underscore or a period </description></item><item><description> Must not end with a period </description></item><item><description> Must not contain any of the following illegal characters: <!\\[CDATA\\[ @, ~, ;, {, }, \\\\, +, =, <, >, |, /, \\\\\\\\, ?, :, &, $, *, \\\", #, \\[, \\] \\]\\]></description></item></list>"]
432    #[serde(default, skip_serializing_if = "Option::is_none")]
433    pub name: Option<String>,
434    #[serde(default, skip_serializing_if = "Option::is_none")]
435    pub project: Option<ProjectReference>,
436    #[doc = "This should always be true. Setting to false will override all sources in UpstreamSources."]
437    #[serde(
438        rename = "upstreamEnabled",
439        default,
440        skip_serializing_if = "Option::is_none"
441    )]
442    pub upstream_enabled: Option<bool>,
443    #[doc = "A list of sources that this feed will fetch packages from.  An empty list indicates that this feed will not search any additional sources for packages."]
444    #[serde(
445        rename = "upstreamSources",
446        default,
447        deserialize_with = "crate::serde::deserialize_null_as_default",
448        skip_serializing_if = "Vec::is_empty"
449    )]
450    pub upstream_sources: Vec<UpstreamSource>,
451    #[doc = "A view on top of a feed."]
452    #[serde(default, skip_serializing_if = "Option::is_none")]
453    pub view: Option<FeedView>,
454    #[doc = "View Id."]
455    #[serde(rename = "viewId", default, skip_serializing_if = "Option::is_none")]
456    pub view_id: Option<String>,
457    #[doc = "View name."]
458    #[serde(rename = "viewName", default, skip_serializing_if = "Option::is_none")]
459    pub view_name: Option<String>,
460}
461impl FeedCore {
462    pub fn new() -> Self {
463        Self::default()
464    }
465}
466pub mod feed_core {
467    use super::*;
468    #[doc = "Supported capabilities of a feed."]
469    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
470    pub enum Capabilities {
471        #[serde(rename = "none")]
472        None,
473        #[serde(rename = "upstreamV2")]
474        UpstreamV2,
475        #[serde(rename = "underMaintenance")]
476        UnderMaintenance,
477        #[serde(rename = "defaultCapabilities")]
478        DefaultCapabilities,
479    }
480}
481#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
482pub struct FeedIdsResult {
483    #[serde(default, skip_serializing_if = "Option::is_none")]
484    pub id: Option<String>,
485    #[serde(default, skip_serializing_if = "Option::is_none")]
486    pub name: Option<String>,
487    #[serde(rename = "projectId", default, skip_serializing_if = "Option::is_none")]
488    pub project_id: Option<String>,
489    #[serde(
490        rename = "projectName",
491        default,
492        skip_serializing_if = "Option::is_none"
493    )]
494    pub project_name: Option<String>,
495}
496impl FeedIdsResult {
497    pub fn new() -> Self {
498        Self::default()
499    }
500}
501#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
502pub struct FeedList {
503    #[serde(default, skip_serializing_if = "Option::is_none")]
504    pub count: Option<i32>,
505    #[serde(
506        default,
507        deserialize_with = "crate::serde::deserialize_null_as_default",
508        skip_serializing_if = "Vec::is_empty"
509    )]
510    pub value: Vec<Feed>,
511}
512impl FeedList {
513    pub fn new() -> Self {
514        Self::default()
515    }
516}
517#[doc = "Permissions for a feed."]
518#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
519pub struct FeedPermission {
520    #[doc = "Display name for the identity."]
521    #[serde(
522        rename = "displayName",
523        default,
524        skip_serializing_if = "Option::is_none"
525    )]
526    pub display_name: Option<String>,
527    #[doc = "Identity associated with this role."]
528    #[serde(
529        rename = "identityDescriptor",
530        default,
531        skip_serializing_if = "Option::is_none"
532    )]
533    pub identity_descriptor: Option<String>,
534    #[doc = "Id of the identity associated with this role."]
535    #[serde(
536        rename = "identityId",
537        default,
538        skip_serializing_if = "Option::is_none"
539    )]
540    pub identity_id: Option<String>,
541    #[doc = "Boolean indicating whether the role is inherited or set directly."]
542    #[serde(
543        rename = "isInheritedRole",
544        default,
545        skip_serializing_if = "Option::is_none"
546    )]
547    pub is_inherited_role: Option<bool>,
548    #[doc = "The role for this identity on a feed."]
549    #[serde(default, skip_serializing_if = "Option::is_none")]
550    pub role: Option<feed_permission::Role>,
551}
552impl FeedPermission {
553    pub fn new() -> Self {
554        Self::default()
555    }
556}
557pub mod feed_permission {
558    use super::*;
559    #[doc = "The role for this identity on a feed."]
560    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
561    pub enum Role {
562        #[serde(rename = "custom")]
563        Custom,
564        #[serde(rename = "none")]
565        None,
566        #[serde(rename = "reader")]
567        Reader,
568        #[serde(rename = "contributor")]
569        Contributor,
570        #[serde(rename = "administrator")]
571        Administrator,
572        #[serde(rename = "collaborator")]
573        Collaborator,
574    }
575}
576#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
577pub struct FeedPermissionList {
578    #[serde(default, skip_serializing_if = "Option::is_none")]
579    pub count: Option<i32>,
580    #[serde(
581        default,
582        deserialize_with = "crate::serde::deserialize_null_as_default",
583        skip_serializing_if = "Vec::is_empty"
584    )]
585    pub value: Vec<FeedPermission>,
586}
587impl FeedPermissionList {
588    pub fn new() -> Self {
589        Self::default()
590    }
591}
592#[doc = "Retention policy settings."]
593#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
594pub struct FeedRetentionPolicy {
595    #[doc = "This attribute is deprecated and is not honoured by retention"]
596    #[serde(
597        rename = "ageLimitInDays",
598        default,
599        skip_serializing_if = "Option::is_none"
600    )]
601    pub age_limit_in_days: Option<i32>,
602    #[doc = "Maximum versions to preserve per package and package type."]
603    #[serde(
604        rename = "countLimit",
605        default,
606        skip_serializing_if = "Option::is_none"
607    )]
608    pub count_limit: Option<i32>,
609    #[doc = "Number of days to preserve a package version after its latest download."]
610    #[serde(
611        rename = "daysToKeepRecentlyDownloadedPackages",
612        default,
613        skip_serializing_if = "Option::is_none"
614    )]
615    pub days_to_keep_recently_downloaded_packages: Option<i32>,
616}
617impl FeedRetentionPolicy {
618    pub fn new() -> Self {
619        Self::default()
620    }
621}
622#[doc = "Update a feed definition with these new values."]
623#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
624pub struct FeedUpdate {
625    #[doc = "If set, the feed will allow upload of packages that exist on the upstream"]
626    #[serde(
627        rename = "allowUpstreamNameConflict",
628        default,
629        skip_serializing_if = "Option::is_none"
630    )]
631    pub allow_upstream_name_conflict: Option<bool>,
632    #[doc = "If set, this feed supports generation of package badges."]
633    #[serde(
634        rename = "badgesEnabled",
635        default,
636        skip_serializing_if = "Option::is_none"
637    )]
638    pub badges_enabled: Option<bool>,
639    #[doc = "The view that the feed administrator has indicated is the default experience for readers."]
640    #[serde(
641        rename = "defaultViewId",
642        default,
643        skip_serializing_if = "Option::is_none"
644    )]
645    pub default_view_id: Option<String>,
646    #[doc = "A description for the feed.  Descriptions must not exceed 255 characters."]
647    #[serde(default, skip_serializing_if = "Option::is_none")]
648    pub description: Option<String>,
649    #[doc = "If set, feed will hide all deleted/unpublished versions"]
650    #[serde(
651        rename = "hideDeletedPackageVersions",
652        default,
653        skip_serializing_if = "Option::is_none"
654    )]
655    pub hide_deleted_package_versions: Option<bool>,
656    #[doc = "A GUID that uniquely identifies this feed."]
657    #[serde(default, skip_serializing_if = "Option::is_none")]
658    pub id: Option<String>,
659    #[doc = "A name for the feed. feed names must follow these rules: <list type=\"bullet\"><item><description> Must not exceed 64 characters </description></item><item><description> Must not contain whitespaces </description></item><item><description> Must not start with an underscore or a period </description></item><item><description> Must not end with a period </description></item><item><description> Must not contain any of the following illegal characters: <!\\[CDATA\\[ @, ~, ;, {, }, \\\\, +, =, <, >, |, /, \\\\\\\\, ?, :, &, $, *, \\\", #, \\[, \\] \\]\\]></description></item></list>"]
660    #[serde(default, skip_serializing_if = "Option::is_none")]
661    pub name: Option<String>,
662    #[doc = "If set, the feed can proxy packages from an upstream feed"]
663    #[serde(
664        rename = "upstreamEnabled",
665        default,
666        skip_serializing_if = "Option::is_none"
667    )]
668    pub upstream_enabled: Option<bool>,
669    #[doc = "A list of sources that this feed will fetch packages from.  An empty list indicates that this feed will not search any additional sources for packages."]
670    #[serde(
671        rename = "upstreamSources",
672        default,
673        deserialize_with = "crate::serde::deserialize_null_as_default",
674        skip_serializing_if = "Vec::is_empty"
675    )]
676    pub upstream_sources: Vec<UpstreamSource>,
677}
678impl FeedUpdate {
679    pub fn new() -> Self {
680        Self::default()
681    }
682}
683#[doc = "A view on top of a feed."]
684#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
685pub struct FeedView {
686    #[doc = "Links"]
687    #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
688    pub links: Option<serde_json::Value>,
689    #[doc = "Id of the view."]
690    #[serde(default, skip_serializing_if = "Option::is_none")]
691    pub id: Option<String>,
692    #[doc = "Name of the view."]
693    #[serde(default, skip_serializing_if = "Option::is_none")]
694    pub name: Option<String>,
695    #[doc = "Type of view."]
696    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
697    pub type_: Option<feed_view::Type>,
698    #[doc = "Url of the view."]
699    #[serde(default, skip_serializing_if = "Option::is_none")]
700    pub url: Option<String>,
701    #[doc = "Visibility status of the view."]
702    #[serde(default, skip_serializing_if = "Option::is_none")]
703    pub visibility: Option<feed_view::Visibility>,
704}
705impl FeedView {
706    pub fn new() -> Self {
707        Self::default()
708    }
709}
710pub mod feed_view {
711    use super::*;
712    #[doc = "Type of view."]
713    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
714    pub enum Type {
715        #[serde(rename = "none")]
716        None,
717        #[serde(rename = "release")]
718        Release,
719        #[serde(rename = "implicit")]
720        Implicit,
721    }
722    #[doc = "Visibility status of the view."]
723    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
724    pub enum Visibility {
725        #[serde(rename = "private")]
726        Private,
727        #[serde(rename = "collection")]
728        Collection,
729        #[serde(rename = "organization")]
730        Organization,
731        #[serde(rename = "aadTenant")]
732        AadTenant,
733    }
734}
735#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
736pub struct FeedViewList {
737    #[serde(default, skip_serializing_if = "Option::is_none")]
738    pub count: Option<i32>,
739    #[serde(
740        default,
741        deserialize_with = "crate::serde::deserialize_null_as_default",
742        skip_serializing_if = "Vec::is_empty"
743    )]
744    pub value: Vec<FeedView>,
745}
746impl FeedViewList {
747    pub fn new() -> Self {
748        Self::default()
749    }
750}
751#[doc = "Used to provide the filename and hash of the SBOM file to be added to the catalog file."]
752#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
753pub struct FileHash {
754    #[doc = "The filename of the SBOM."]
755    #[serde(rename = "fileName", default, skip_serializing_if = "Option::is_none")]
756    pub file_name: Option<String>,
757    #[doc = "The string hash of the SBOM file."]
758    #[serde(default, skip_serializing_if = "Option::is_none")]
759    pub hash: Option<String>,
760    #[doc = "The HashAlgorithmName used to generate the hash of the file."]
761    #[serde(
762        rename = "hashAlgorithmName",
763        default,
764        skip_serializing_if = "Option::is_none"
765    )]
766    pub hash_algorithm_name: Option<String>,
767}
768impl FileHash {
769    pub fn new() -> Self {
770        Self::default()
771    }
772}
773#[doc = "Permissions for feed service-wide operations such as the creation of new feeds."]
774#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
775pub struct GlobalPermission {
776    #[doc = "Identity of the user with the provided Role."]
777    #[serde(
778        rename = "identityDescriptor",
779        default,
780        skip_serializing_if = "Option::is_none"
781    )]
782    pub identity_descriptor: Option<String>,
783    #[doc = "IdentityId corresponding to the IdentityDescriptor"]
784    #[serde(
785        rename = "identityId",
786        default,
787        skip_serializing_if = "Option::is_none"
788    )]
789    pub identity_id: Option<String>,
790    #[doc = "Role associated with the Identity."]
791    #[serde(default, skip_serializing_if = "Option::is_none")]
792    pub role: Option<global_permission::Role>,
793}
794impl GlobalPermission {
795    pub fn new() -> Self {
796        Self::default()
797    }
798}
799pub mod global_permission {
800    use super::*;
801    #[doc = "Role associated with the Identity."]
802    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
803    pub enum Role {
804        #[serde(rename = "custom")]
805        Custom,
806        #[serde(rename = "none")]
807        None,
808        #[serde(rename = "feedCreator")]
809        FeedCreator,
810        #[serde(rename = "administrator")]
811        Administrator,
812    }
813}
814#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
815pub struct GlobalPermissionList {
816    #[serde(default, skip_serializing_if = "Option::is_none")]
817    pub count: Option<i32>,
818    #[serde(
819        default,
820        deserialize_with = "crate::serde::deserialize_null_as_default",
821        skip_serializing_if = "Vec::is_empty"
822    )]
823    pub value: Vec<GlobalPermission>,
824}
825impl GlobalPermissionList {
826    pub fn new() -> Self {
827        Self::default()
828    }
829}
830#[doc = "An Identity descriptor is a wrapper for the identity type (Windows SID, Passport) along with a unique identifier such as the SID or PUID."]
831#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
832pub struct IdentityDescriptor {
833    #[doc = "The unique identifier for this identity, not exceeding 256 chars, which will be persisted."]
834    #[serde(default, skip_serializing_if = "Option::is_none")]
835    pub identifier: Option<String>,
836    #[doc = "Type of descriptor (for example, Windows, Passport, etc.)."]
837    #[serde(
838        rename = "identityType",
839        default,
840        skip_serializing_if = "Option::is_none"
841    )]
842    pub identity_type: Option<String>,
843}
844impl IdentityDescriptor {
845    pub fn new() -> Self {
846        Self::default()
847    }
848}
849#[doc = "The JSON model for JSON Patch Operations"]
850#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
851pub struct JsonPatchDocument {}
852impl JsonPatchDocument {
853    pub fn new() -> Self {
854        Self::default()
855    }
856}
857#[doc = "The JSON model for a JSON Patch operation"]
858#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
859pub struct JsonPatchOperation {
860    #[doc = "The path to copy from for the Move/Copy operation."]
861    #[serde(default, skip_serializing_if = "Option::is_none")]
862    pub from: Option<String>,
863    #[doc = "The patch operation"]
864    #[serde(default, skip_serializing_if = "Option::is_none")]
865    pub op: Option<json_patch_operation::Op>,
866    #[doc = "The path for the operation. In the case of an array, a zero based index can be used to specify the position in the array (e.g. /biscuits/0/name). The \"-\" character can be used instead of an index to insert at the end of the array (e.g. /biscuits/-)."]
867    #[serde(default, skip_serializing_if = "Option::is_none")]
868    pub path: Option<String>,
869    #[doc = "The value for the operation. This is either a primitive or a JToken."]
870    #[serde(default, skip_serializing_if = "Option::is_none")]
871    pub value: Option<serde_json::Value>,
872}
873impl JsonPatchOperation {
874    pub fn new() -> Self {
875        Self::default()
876    }
877}
878pub mod json_patch_operation {
879    use super::*;
880    #[doc = "The patch operation"]
881    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
882    pub enum Op {
883        #[serde(rename = "add")]
884        Add,
885        #[serde(rename = "remove")]
886        Remove,
887        #[serde(rename = "replace")]
888        Replace,
889        #[serde(rename = "move")]
890        Move,
891        #[serde(rename = "copy")]
892        Copy,
893        #[serde(rename = "test")]
894        Test,
895    }
896}
897#[doc = "Defines a manifest name and version."]
898#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
899pub struct ManifestInfo {
900    #[doc = "The name of the manifest."]
901    #[serde(default, skip_serializing_if = "Option::is_none")]
902    pub name: Option<String>,
903    #[doc = "The version of the manifest."]
904    #[serde(default, skip_serializing_if = "Option::is_none")]
905    pub version: Option<String>,
906}
907impl ManifestInfo {
908    pub fn new() -> Self {
909        Self::default()
910    }
911}
912#[doc = "Core data about any package, including its id and version information and basic state."]
913#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
914pub struct MinimalPackageVersion {
915    #[doc = "Upstream source this package was ingested from."]
916    #[serde(
917        rename = "directUpstreamSourceId",
918        default,
919        skip_serializing_if = "Option::is_none"
920    )]
921    pub direct_upstream_source_id: Option<String>,
922    #[doc = "Id for the package."]
923    #[serde(default, skip_serializing_if = "Option::is_none")]
924    pub id: Option<String>,
925    #[doc = "\\[Obsolete\\] Used for legacy scenarios and may be removed in future versions."]
926    #[serde(
927        rename = "isCachedVersion",
928        default,
929        skip_serializing_if = "Option::is_none"
930    )]
931    pub is_cached_version: Option<bool>,
932    #[doc = "True if this package has been deleted."]
933    #[serde(rename = "isDeleted", default, skip_serializing_if = "Option::is_none")]
934    pub is_deleted: Option<bool>,
935    #[doc = "True if this is the latest version of the package by package type sort order."]
936    #[serde(rename = "isLatest", default, skip_serializing_if = "Option::is_none")]
937    pub is_latest: Option<bool>,
938    #[doc = "(NuGet and Cargo Only) True if this package is listed."]
939    #[serde(rename = "isListed", default, skip_serializing_if = "Option::is_none")]
940    pub is_listed: Option<bool>,
941    #[doc = "Normalized version using normalization rules specific to a package type."]
942    #[serde(
943        rename = "normalizedVersion",
944        default,
945        skip_serializing_if = "Option::is_none"
946    )]
947    pub normalized_version: Option<String>,
948    #[doc = "Package description."]
949    #[serde(
950        rename = "packageDescription",
951        default,
952        skip_serializing_if = "Option::is_none"
953    )]
954    pub package_description: Option<String>,
955    #[doc = "UTC Date the package was published to the service."]
956    #[serde(
957        rename = "publishDate",
958        default,
959        skip_serializing_if = "Option::is_none",
960        with = "crate::date_time::rfc3339::option"
961    )]
962    pub publish_date: Option<time::OffsetDateTime>,
963    #[doc = "Internal storage id."]
964    #[serde(rename = "storageId", default, skip_serializing_if = "Option::is_none")]
965    pub storage_id: Option<String>,
966    #[doc = "Display version."]
967    #[serde(default, skip_serializing_if = "Option::is_none")]
968    pub version: Option<String>,
969    #[doc = "List of views containing this package version."]
970    #[serde(
971        default,
972        deserialize_with = "crate::serde::deserialize_null_as_default",
973        skip_serializing_if = "Vec::is_empty"
974    )]
975    pub views: Vec<FeedView>,
976}
977impl MinimalPackageVersion {
978    pub fn new() -> Self {
979        Self::default()
980    }
981}
982#[doc = "Reference for an async operation."]
983#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
984pub struct OperationReference {
985    #[doc = "Unique identifier for the operation."]
986    #[serde(default, skip_serializing_if = "Option::is_none")]
987    pub id: Option<String>,
988    #[doc = "Unique identifier for the plugin."]
989    #[serde(rename = "pluginId", default, skip_serializing_if = "Option::is_none")]
990    pub plugin_id: Option<String>,
991    #[doc = "The current status of the operation."]
992    #[serde(default, skip_serializing_if = "Option::is_none")]
993    pub status: Option<operation_reference::Status>,
994    #[doc = "URL to get the full operation object."]
995    #[serde(default, skip_serializing_if = "Option::is_none")]
996    pub url: Option<String>,
997}
998impl OperationReference {
999    pub fn new() -> Self {
1000        Self::default()
1001    }
1002}
1003pub mod operation_reference {
1004    use super::*;
1005    #[doc = "The current status of the operation."]
1006    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1007    pub enum Status {
1008        #[serde(rename = "notSet")]
1009        NotSet,
1010        #[serde(rename = "queued")]
1011        Queued,
1012        #[serde(rename = "inProgress")]
1013        InProgress,
1014        #[serde(rename = "cancelled")]
1015        Cancelled,
1016        #[serde(rename = "succeeded")]
1017        Succeeded,
1018        #[serde(rename = "failed")]
1019        Failed,
1020    }
1021}
1022#[doc = "A package, which is a container for one or more package versions."]
1023#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1024pub struct Package {
1025    #[doc = "Links"]
1026    #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
1027    pub links: Option<serde_json::Value>,
1028    #[doc = "Id of the package."]
1029    #[serde(default, skip_serializing_if = "Option::is_none")]
1030    pub id: Option<String>,
1031    #[doc = "Used for legacy scenarios and may be removed in future versions."]
1032    #[serde(rename = "isCached", default, skip_serializing_if = "Option::is_none")]
1033    pub is_cached: Option<bool>,
1034    #[doc = "The display name of the package."]
1035    #[serde(default, skip_serializing_if = "Option::is_none")]
1036    pub name: Option<String>,
1037    #[doc = "The normalized name representing the identity of this package within its package type."]
1038    #[serde(
1039        rename = "normalizedName",
1040        default,
1041        skip_serializing_if = "Option::is_none"
1042    )]
1043    pub normalized_name: Option<String>,
1044    #[doc = "Type of the package."]
1045    #[serde(
1046        rename = "protocolType",
1047        default,
1048        skip_serializing_if = "Option::is_none"
1049    )]
1050    pub protocol_type: Option<String>,
1051    #[doc = "\\[Obsolete\\] - this field is unused and will be removed in a future release."]
1052    #[serde(rename = "starCount", default, skip_serializing_if = "Option::is_none")]
1053    pub star_count: Option<i32>,
1054    #[doc = "Url for this package."]
1055    #[serde(default, skip_serializing_if = "Option::is_none")]
1056    pub url: Option<String>,
1057    #[doc = "All versions for this package within its feed."]
1058    #[serde(
1059        default,
1060        deserialize_with = "crate::serde::deserialize_null_as_default",
1061        skip_serializing_if = "Vec::is_empty"
1062    )]
1063    pub versions: Vec<MinimalPackageVersion>,
1064}
1065impl Package {
1066    pub fn new() -> Self {
1067        Self::default()
1068    }
1069}
1070#[doc = "A single change to a feed's packages."]
1071#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1072pub struct PackageChange {
1073    #[doc = "A package, which is a container for one or more package versions."]
1074    #[serde(default, skip_serializing_if = "Option::is_none")]
1075    pub package: Option<Package>,
1076    #[doc = "A change to a single package version."]
1077    #[serde(
1078        rename = "packageVersionChange",
1079        default,
1080        skip_serializing_if = "Option::is_none"
1081    )]
1082    pub package_version_change: Option<PackageVersionChange>,
1083}
1084impl PackageChange {
1085    pub fn new() -> Self {
1086        Self::default()
1087    }
1088}
1089#[doc = "A set of change operations to a feed's packages."]
1090#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1091pub struct PackageChangesResponse {
1092    #[doc = "Links"]
1093    #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
1094    pub links: Option<serde_json::Value>,
1095    #[doc = "Number of changes in this batch."]
1096    #[serde(default, skip_serializing_if = "Option::is_none")]
1097    pub count: Option<i32>,
1098    #[doc = "Token that should be used in future calls for this feed to retrieve new changes."]
1099    #[serde(
1100        rename = "nextPackageContinuationToken",
1101        default,
1102        skip_serializing_if = "Option::is_none"
1103    )]
1104    pub next_package_continuation_token: Option<i64>,
1105    #[doc = "List of changes."]
1106    #[serde(
1107        rename = "packageChanges",
1108        default,
1109        deserialize_with = "crate::serde::deserialize_null_as_default",
1110        skip_serializing_if = "Vec::is_empty"
1111    )]
1112    pub package_changes: Vec<PackageChange>,
1113}
1114impl PackageChangesResponse {
1115    pub fn new() -> Self {
1116        Self::default()
1117    }
1118}
1119#[doc = "A dependency on another package version."]
1120#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1121pub struct PackageDependency {
1122    #[doc = "Dependency package group (an optional classification within some package types)."]
1123    #[serde(default, skip_serializing_if = "Option::is_none")]
1124    pub group: Option<String>,
1125    #[doc = "Dependency package name."]
1126    #[serde(
1127        rename = "packageName",
1128        default,
1129        skip_serializing_if = "Option::is_none"
1130    )]
1131    pub package_name: Option<String>,
1132    #[doc = "Dependency package version range."]
1133    #[serde(
1134        rename = "versionRange",
1135        default,
1136        skip_serializing_if = "Option::is_none"
1137    )]
1138    pub version_range: Option<String>,
1139}
1140impl PackageDependency {
1141    pub fn new() -> Self {
1142        Self::default()
1143    }
1144}
1145#[doc = "A package file for a specific package version, only relevant to package types that contain multiple files per version."]
1146#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1147pub struct PackageFile {
1148    #[doc = "Hierarchical representation of files."]
1149    #[serde(
1150        default,
1151        deserialize_with = "crate::serde::deserialize_null_as_default",
1152        skip_serializing_if = "Vec::is_empty"
1153    )]
1154    pub children: Vec<PackageFile>,
1155    #[doc = "File name."]
1156    #[serde(default, skip_serializing_if = "Option::is_none")]
1157    pub name: Option<String>,
1158    #[doc = "Extended metadata for a specific package type."]
1159    #[serde(
1160        rename = "protocolMetadata",
1161        default,
1162        skip_serializing_if = "Option::is_none"
1163    )]
1164    pub protocol_metadata: Option<ProtocolMetadata>,
1165}
1166impl PackageFile {
1167    pub fn new() -> Self {
1168        Self::default()
1169    }
1170}
1171#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1172pub struct PackageList {
1173    #[serde(default, skip_serializing_if = "Option::is_none")]
1174    pub count: Option<i32>,
1175    #[serde(
1176        default,
1177        deserialize_with = "crate::serde::deserialize_null_as_default",
1178        skip_serializing_if = "Vec::is_empty"
1179    )]
1180    pub value: Vec<Package>,
1181}
1182impl PackageList {
1183    pub fn new() -> Self {
1184        Self::default()
1185    }
1186}
1187#[doc = "All metrics for a certain package id"]
1188#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1189pub struct PackageMetrics {
1190    #[doc = "Total count of downloads per package id."]
1191    #[serde(
1192        rename = "downloadCount",
1193        default,
1194        skip_serializing_if = "Option::is_none"
1195    )]
1196    pub download_count: Option<f64>,
1197    #[doc = "Number of downloads per unique user per package id."]
1198    #[serde(
1199        rename = "downloadUniqueUsers",
1200        default,
1201        skip_serializing_if = "Option::is_none"
1202    )]
1203    pub download_unique_users: Option<f64>,
1204    #[doc = "UTC date and time when package was last downloaded."]
1205    #[serde(
1206        rename = "lastDownloaded",
1207        default,
1208        skip_serializing_if = "Option::is_none",
1209        with = "crate::date_time::rfc3339::option"
1210    )]
1211    pub last_downloaded: Option<time::OffsetDateTime>,
1212    #[doc = "Package id."]
1213    #[serde(rename = "packageId", default, skip_serializing_if = "Option::is_none")]
1214    pub package_id: Option<String>,
1215}
1216impl PackageMetrics {
1217    pub fn new() -> Self {
1218        Self::default()
1219    }
1220}
1221#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1222pub struct PackageMetricsList {
1223    #[serde(default, skip_serializing_if = "Option::is_none")]
1224    pub count: Option<i32>,
1225    #[serde(
1226        default,
1227        deserialize_with = "crate::serde::deserialize_null_as_default",
1228        skip_serializing_if = "Vec::is_empty"
1229    )]
1230    pub value: Vec<PackageMetrics>,
1231}
1232impl PackageMetricsList {
1233    pub fn new() -> Self {
1234        Self::default()
1235    }
1236}
1237#[doc = "Query to get package metrics"]
1238#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1239pub struct PackageMetricsQuery {
1240    #[doc = "List of package ids"]
1241    #[serde(
1242        rename = "packageIds",
1243        default,
1244        deserialize_with = "crate::serde::deserialize_null_as_default",
1245        skip_serializing_if = "Vec::is_empty"
1246    )]
1247    pub package_ids: Vec<String>,
1248}
1249impl PackageMetricsQuery {
1250    pub fn new() -> Self {
1251        Self::default()
1252    }
1253}
1254#[doc = "A specific version of a package."]
1255#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1256pub struct PackageVersion {
1257    #[serde(flatten)]
1258    pub minimal_package_version: MinimalPackageVersion,
1259    #[doc = "Links"]
1260    #[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
1261    pub links: Option<serde_json::Value>,
1262    #[doc = "Package version author."]
1263    #[serde(default, skip_serializing_if = "Option::is_none")]
1264    pub author: Option<String>,
1265    #[doc = "UTC date that this package version was deleted."]
1266    #[serde(
1267        rename = "deletedDate",
1268        default,
1269        skip_serializing_if = "Option::is_none",
1270        with = "crate::date_time::rfc3339::option"
1271    )]
1272    pub deleted_date: Option<time::OffsetDateTime>,
1273    #[doc = "List of dependencies for this package version."]
1274    #[serde(
1275        default,
1276        deserialize_with = "crate::serde::deserialize_null_as_default",
1277        skip_serializing_if = "Vec::is_empty"
1278    )]
1279    pub dependencies: Vec<PackageDependency>,
1280    #[doc = "Package version description."]
1281    #[serde(default, skip_serializing_if = "Option::is_none")]
1282    pub description: Option<String>,
1283    #[doc = "Files associated with this package version, only relevant for multi-file package types."]
1284    #[serde(
1285        default,
1286        deserialize_with = "crate::serde::deserialize_null_as_default",
1287        skip_serializing_if = "Vec::is_empty"
1288    )]
1289    pub files: Vec<PackageFile>,
1290    #[doc = "Other versions of this package."]
1291    #[serde(
1292        rename = "otherVersions",
1293        default,
1294        deserialize_with = "crate::serde::deserialize_null_as_default",
1295        skip_serializing_if = "Vec::is_empty"
1296    )]
1297    pub other_versions: Vec<MinimalPackageVersion>,
1298    #[doc = "Extended metadata for a specific package type."]
1299    #[serde(
1300        rename = "protocolMetadata",
1301        default,
1302        skip_serializing_if = "Option::is_none"
1303    )]
1304    pub protocol_metadata: Option<ProtocolMetadata>,
1305    #[doc = "List of upstream sources through which a package version moved to land in this feed."]
1306    #[serde(
1307        rename = "sourceChain",
1308        default,
1309        deserialize_with = "crate::serde::deserialize_null_as_default",
1310        skip_serializing_if = "Vec::is_empty"
1311    )]
1312    pub source_chain: Vec<UpstreamSource>,
1313    #[doc = "Package version summary."]
1314    #[serde(default, skip_serializing_if = "Option::is_none")]
1315    pub summary: Option<String>,
1316    #[doc = "Package version tags."]
1317    #[serde(
1318        default,
1319        deserialize_with = "crate::serde::deserialize_null_as_default",
1320        skip_serializing_if = "Vec::is_empty"
1321    )]
1322    pub tags: Vec<String>,
1323    #[doc = "Package version url."]
1324    #[serde(default, skip_serializing_if = "Option::is_none")]
1325    pub url: Option<String>,
1326}
1327impl PackageVersion {
1328    pub fn new() -> Self {
1329        Self::default()
1330    }
1331}
1332#[doc = "A change to a single package version."]
1333#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1334pub struct PackageVersionChange {
1335    #[doc = "The type of change that was performed."]
1336    #[serde(
1337        rename = "changeType",
1338        default,
1339        skip_serializing_if = "Option::is_none"
1340    )]
1341    pub change_type: Option<package_version_change::ChangeType>,
1342    #[doc = "Token marker for this change, allowing the caller to send this value back to the service and receive changes beyond this one."]
1343    #[serde(
1344        rename = "continuationToken",
1345        default,
1346        skip_serializing_if = "Option::is_none"
1347    )]
1348    pub continuation_token: Option<i64>,
1349    #[doc = "A specific version of a package."]
1350    #[serde(
1351        rename = "packageVersion",
1352        default,
1353        skip_serializing_if = "Option::is_none"
1354    )]
1355    pub package_version: Option<PackageVersion>,
1356}
1357impl PackageVersionChange {
1358    pub fn new() -> Self {
1359        Self::default()
1360    }
1361}
1362pub mod package_version_change {
1363    use super::*;
1364    #[doc = "The type of change that was performed."]
1365    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1366    pub enum ChangeType {
1367        #[serde(rename = "addOrUpdate")]
1368        AddOrUpdate,
1369        #[serde(rename = "delete")]
1370        Delete,
1371        #[serde(rename = "permanentDelete")]
1372        PermanentDelete,
1373    }
1374}
1375#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1376pub struct PackageVersionList {
1377    #[serde(default, skip_serializing_if = "Option::is_none")]
1378    pub count: Option<i32>,
1379    #[serde(
1380        default,
1381        deserialize_with = "crate::serde::deserialize_null_as_default",
1382        skip_serializing_if = "Vec::is_empty"
1383    )]
1384    pub value: Vec<PackageVersion>,
1385}
1386impl PackageVersionList {
1387    pub fn new() -> Self {
1388        Self::default()
1389    }
1390}
1391#[doc = "All metrics for a certain package version id"]
1392#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1393pub struct PackageVersionMetrics {
1394    #[doc = "Total count of downloads per package version id."]
1395    #[serde(
1396        rename = "downloadCount",
1397        default,
1398        skip_serializing_if = "Option::is_none"
1399    )]
1400    pub download_count: Option<f64>,
1401    #[doc = "Number of downloads per unique user per package version id."]
1402    #[serde(
1403        rename = "downloadUniqueUsers",
1404        default,
1405        skip_serializing_if = "Option::is_none"
1406    )]
1407    pub download_unique_users: Option<f64>,
1408    #[doc = "UTC date and time when package version was last downloaded."]
1409    #[serde(
1410        rename = "lastDownloaded",
1411        default,
1412        skip_serializing_if = "Option::is_none",
1413        with = "crate::date_time::rfc3339::option"
1414    )]
1415    pub last_downloaded: Option<time::OffsetDateTime>,
1416    #[doc = "Package id."]
1417    #[serde(rename = "packageId", default, skip_serializing_if = "Option::is_none")]
1418    pub package_id: Option<String>,
1419    #[doc = "Package version id."]
1420    #[serde(
1421        rename = "packageVersionId",
1422        default,
1423        skip_serializing_if = "Option::is_none"
1424    )]
1425    pub package_version_id: Option<String>,
1426}
1427impl PackageVersionMetrics {
1428    pub fn new() -> Self {
1429        Self::default()
1430    }
1431}
1432#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1433pub struct PackageVersionMetricsList {
1434    #[serde(default, skip_serializing_if = "Option::is_none")]
1435    pub count: Option<i32>,
1436    #[serde(
1437        default,
1438        deserialize_with = "crate::serde::deserialize_null_as_default",
1439        skip_serializing_if = "Vec::is_empty"
1440    )]
1441    pub value: Vec<PackageVersionMetrics>,
1442}
1443impl PackageVersionMetricsList {
1444    pub fn new() -> Self {
1445        Self::default()
1446    }
1447}
1448#[doc = "Query to get package version metrics"]
1449#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1450pub struct PackageVersionMetricsQuery {
1451    #[doc = "List of package version ids"]
1452    #[serde(
1453        rename = "packageVersionIds",
1454        default,
1455        deserialize_with = "crate::serde::deserialize_null_as_default",
1456        skip_serializing_if = "Vec::is_empty"
1457    )]
1458    pub package_version_ids: Vec<String>,
1459}
1460impl PackageVersionMetricsQuery {
1461    pub fn new() -> Self {
1462        Self::default()
1463    }
1464}
1465#[doc = "Provenance for a published package version"]
1466#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1467pub struct PackageVersionProvenance {
1468    #[doc = "Name or Id of the feed."]
1469    #[serde(rename = "feedId", default, skip_serializing_if = "Option::is_none")]
1470    pub feed_id: Option<String>,
1471    #[doc = "Id of the package (GUID Id, not name)."]
1472    #[serde(rename = "packageId", default, skip_serializing_if = "Option::is_none")]
1473    pub package_id: Option<String>,
1474    #[doc = "Id of the package version (GUID Id, not name)."]
1475    #[serde(
1476        rename = "packageVersionId",
1477        default,
1478        skip_serializing_if = "Option::is_none"
1479    )]
1480    pub package_version_id: Option<String>,
1481    #[doc = "Data about the origin of a published package"]
1482    #[serde(default, skip_serializing_if = "Option::is_none")]
1483    pub provenance: Option<Provenance>,
1484}
1485impl PackageVersionProvenance {
1486    pub fn new() -> Self {
1487        Self::default()
1488    }
1489}
1490#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1491pub struct ProjectReference {
1492    #[doc = "Gets or sets id of the project."]
1493    #[serde(default, skip_serializing_if = "Option::is_none")]
1494    pub id: Option<String>,
1495    #[doc = "Gets or sets name of the project."]
1496    #[serde(default, skip_serializing_if = "Option::is_none")]
1497    pub name: Option<String>,
1498    #[doc = "Gets or sets visibility of the project."]
1499    #[serde(default, skip_serializing_if = "Option::is_none")]
1500    pub visibility: Option<String>,
1501}
1502impl ProjectReference {
1503    pub fn new() -> Self {
1504        Self::default()
1505    }
1506}
1507#[doc = "Extended metadata for a specific package type."]
1508#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1509pub struct ProtocolMetadata {
1510    #[doc = "Extended metadata for a specific package type, formatted to the associated schema version definition."]
1511    #[serde(default, skip_serializing_if = "Option::is_none")]
1512    pub data: Option<serde_json::Value>,
1513    #[doc = "Schema version."]
1514    #[serde(
1515        rename = "schemaVersion",
1516        default,
1517        skip_serializing_if = "Option::is_none"
1518    )]
1519    pub schema_version: Option<i32>,
1520}
1521impl ProtocolMetadata {
1522    pub fn new() -> Self {
1523        Self::default()
1524    }
1525}
1526#[doc = "Data about the origin of a published package"]
1527#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1528pub struct Provenance {
1529    #[doc = "Other provenance data."]
1530    #[serde(default, skip_serializing_if = "Option::is_none")]
1531    pub data: Option<serde_json::Value>,
1532    #[doc = "Type of provenance source, for example \"InternalBuild\", \"InternalRelease\""]
1533    #[serde(
1534        rename = "provenanceSource",
1535        default,
1536        skip_serializing_if = "Option::is_none"
1537    )]
1538    pub provenance_source: Option<String>,
1539    #[doc = "Identity of user that published the package"]
1540    #[serde(
1541        rename = "publisherUserIdentity",
1542        default,
1543        skip_serializing_if = "Option::is_none"
1544    )]
1545    pub publisher_user_identity: Option<String>,
1546    #[doc = "HTTP User-Agent used when pushing the package."]
1547    #[serde(rename = "userAgent", default, skip_serializing_if = "Option::is_none")]
1548    pub user_agent: Option<String>,
1549}
1550impl Provenance {
1551    pub fn new() -> Self {
1552        Self::default()
1553    }
1554}
1555#[doc = "A single package version within the recycle bin."]
1556#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1557pub struct RecycleBinPackageVersion {
1558    #[serde(flatten)]
1559    pub package_version: PackageVersion,
1560    #[doc = "UTC date on which the package will automatically be removed from the recycle bin and permanently deleted."]
1561    #[serde(
1562        rename = "scheduledPermanentDeleteDate",
1563        default,
1564        skip_serializing_if = "Option::is_none",
1565        with = "crate::date_time::rfc3339::option"
1566    )]
1567    pub scheduled_permanent_delete_date: Option<time::OffsetDateTime>,
1568}
1569impl RecycleBinPackageVersion {
1570    pub fn new() -> Self {
1571        Self::default()
1572    }
1573}
1574#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1575pub struct RecycleBinPackageVersionList {
1576    #[serde(default, skip_serializing_if = "Option::is_none")]
1577    pub count: Option<i32>,
1578    #[serde(
1579        default,
1580        deserialize_with = "crate::serde::deserialize_null_as_default",
1581        skip_serializing_if = "Vec::is_empty"
1582    )]
1583    pub value: Vec<RecycleBinPackageVersion>,
1584}
1585impl RecycleBinPackageVersionList {
1586    pub fn new() -> Self {
1587        Self::default()
1588    }
1589}
1590#[doc = "The class to represent a collection of REST reference links."]
1591#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1592pub struct ReferenceLinks {
1593    #[doc = "The readonly view of the links.  Because Reference links are readonly, we only want to expose them as read only."]
1594    #[serde(default, skip_serializing_if = "Option::is_none")]
1595    pub links: Option<serde_json::Value>,
1596}
1597impl ReferenceLinks {
1598    pub fn new() -> Self {
1599        Self::default()
1600    }
1601}
1602#[doc = "Represents a SBOM file object and contains additional properties related to the file."]
1603#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1604pub struct SbomFile {
1605    #[doc = "The size of the SBOM file in bytes."]
1606    #[serde(
1607        rename = "fileSizeInBytes",
1608        default,
1609        skip_serializing_if = "Option::is_none"
1610    )]
1611    pub file_size_in_bytes: Option<i64>,
1612    #[doc = "The path where the final generated SBOM is placed."]
1613    #[serde(
1614        rename = "sbomFilePath",
1615        default,
1616        skip_serializing_if = "Option::is_none"
1617    )]
1618    pub sbom_file_path: Option<String>,
1619    #[doc = "Defines a manifest name and version."]
1620    #[serde(
1621        rename = "sbomFormatName",
1622        default,
1623        skip_serializing_if = "Option::is_none"
1624    )]
1625    pub sbom_format_name: Option<ManifestInfo>,
1626}
1627impl SbomFile {
1628    pub fn new() -> Self {
1629        Self::default()
1630    }
1631}
1632#[doc = "The telemetry that is logged to a file/console for the given SBOM execution."]
1633#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1634pub struct SbomTelemetry {
1635    #[doc = "All available bsi data from the task build execution which includes build and system environment variables like repository and build information."]
1636    #[serde(rename = "bsiData", default, skip_serializing_if = "Option::is_none")]
1637    pub bsi_data: Option<serde_json::Value>,
1638    #[doc = "The source of the bsi data."]
1639    #[serde(rename = "bsiSource", default, skip_serializing_if = "Option::is_none")]
1640    pub bsi_source: Option<String>,
1641    #[doc = "The end to end results of the extension task."]
1642    #[serde(
1643        rename = "e2ETaskResult",
1644        default,
1645        skip_serializing_if = "Option::is_none"
1646    )]
1647    pub e2_e_task_result: Option<String>,
1648    #[doc = "This holds the configuration for the ManifestTool. The values in this file are populated from the command line, config file and default."]
1649    #[serde(default, skip_serializing_if = "Option::is_none")]
1650    pub parameters: Option<Configuration>,
1651    #[doc = "The result of the execution"]
1652    #[serde(default, skip_serializing_if = "Option::is_none")]
1653    pub result: Option<String>,
1654    #[doc = "A list of the SBOM formats and related file properties that was used in the generation/validation of the SBOM."]
1655    #[serde(
1656        rename = "sbomFormatsUsed",
1657        default,
1658        deserialize_with = "crate::serde::deserialize_null_as_default",
1659        skip_serializing_if = "Vec::is_empty"
1660    )]
1661    pub sbom_formats_used: Vec<SbomFile>,
1662    #[doc = "Any internal switches and their value that were used during the execution. A switch can be something that was provided through a configuraiton or an environment variable."]
1663    #[serde(default, skip_serializing_if = "Option::is_none")]
1664    pub switches: Option<serde_json::Value>,
1665    #[doc = "Error messages that came from the extension task."]
1666    #[serde(
1667        rename = "taskErrorMessage",
1668        default,
1669        skip_serializing_if = "Option::is_none"
1670    )]
1671    pub task_error_message: Option<String>,
1672    #[doc = "The name of the task that logged SBOM telemetry"]
1673    #[serde(rename = "taskName", default, skip_serializing_if = "Option::is_none")]
1674    pub task_name: Option<String>,
1675    #[doc = "The unique id for this telemetry"]
1676    #[serde(
1677        rename = "telemetryId",
1678        default,
1679        skip_serializing_if = "Option::is_none"
1680    )]
1681    pub telemetry_id: Option<String>,
1682    #[doc = "The result of the tool as a numeric value."]
1683    #[serde(
1684        rename = "toolExecutionResult",
1685        default,
1686        skip_serializing_if = "Option::is_none"
1687    )]
1688    pub tool_execution_result: Option<i32>,
1689}
1690impl SbomTelemetry {
1691    pub fn new() -> Self {
1692        Self::default()
1693    }
1694}
1695#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1696pub struct SaveCachedPackagesData {
1697    #[serde(
1698        rename = "normalizedPackageNames",
1699        default,
1700        deserialize_with = "crate::serde::deserialize_null_as_default",
1701        skip_serializing_if = "Vec::is_empty"
1702    )]
1703    pub normalized_package_names: Vec<String>,
1704    #[serde(
1705        rename = "viewsForPromotion",
1706        default,
1707        deserialize_with = "crate::serde::deserialize_null_as_default",
1708        skip_serializing_if = "Vec::is_empty"
1709    )]
1710    pub views_for_promotion: Vec<String>,
1711}
1712impl SaveCachedPackagesData {
1713    pub fn new() -> Self {
1714        Self::default()
1715    }
1716}
1717#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1718pub struct SessionRequest {
1719    #[doc = "Generic property bag to store data about the session"]
1720    #[serde(default, skip_serializing_if = "Option::is_none")]
1721    pub data: Option<serde_json::Value>,
1722    #[doc = "The feed name or id for the session"]
1723    #[serde(default, skip_serializing_if = "Option::is_none")]
1724    pub feed: Option<String>,
1725    #[doc = "The type of session If a known value is provided, the Data dictionary will be validated for the presence of properties required by that type"]
1726    #[serde(default, skip_serializing_if = "Option::is_none")]
1727    pub source: Option<String>,
1728}
1729impl SessionRequest {
1730    pub fn new() -> Self {
1731        Self::default()
1732    }
1733}
1734#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1735pub struct SessionResponse {
1736    #[doc = "The unique identifier for the session"]
1737    #[serde(rename = "sessionId", default, skip_serializing_if = "Option::is_none")]
1738    pub session_id: Option<String>,
1739    #[doc = "The name for the session"]
1740    #[serde(
1741        rename = "sessionName",
1742        default,
1743        skip_serializing_if = "Option::is_none"
1744    )]
1745    pub session_name: Option<String>,
1746}
1747impl SessionResponse {
1748    pub fn new() -> Self {
1749        Self::default()
1750    }
1751}
1752#[doc = "The base reponse object for all responses from the signing api."]
1753#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1754pub struct SignResponseBase {
1755    #[doc = "The customer correlation id that is sent to ESRP for correlating the current request to ESRP."]
1756    #[serde(
1757        rename = "customerCorrelationId",
1758        default,
1759        skip_serializing_if = "Option::is_none"
1760    )]
1761    pub customer_correlation_id: Option<String>,
1762    #[doc = "If this is an error response, it will have more information about the error."]
1763    #[serde(rename = "errorInfo", default, skip_serializing_if = "Option::is_none")]
1764    pub error_info: Option<String>,
1765    #[doc = "The result of the response."]
1766    #[serde(default, skip_serializing_if = "Option::is_none")]
1767    pub result: Option<sign_response_base::Result>,
1768}
1769impl SignResponseBase {
1770    pub fn new() -> Self {
1771        Self::default()
1772    }
1773}
1774pub mod sign_response_base {
1775    use super::*;
1776    #[doc = "The result of the response."]
1777    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1778    pub enum Result {
1779        #[serde(rename = "success")]
1780        Success,
1781        #[serde(rename = "failure")]
1782        Failure,
1783        #[serde(rename = "inProgress")]
1784        InProgress,
1785        #[serde(rename = "failCanRetry")]
1786        FailCanRetry,
1787    }
1788}
1789#[doc = "The response returned by the sign status api."]
1790#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1791pub struct SignStatusResponse {
1792    #[serde(flatten)]
1793    pub sign_response_base: SignResponseBase,
1794    #[doc = "The pre-signed download url used to download the signed catalog file."]
1795    #[serde(
1796        rename = "downloadUrl",
1797        default,
1798        skip_serializing_if = "Option::is_none"
1799    )]
1800    pub download_url: Option<String>,
1801}
1802impl SignStatusResponse {
1803    pub fn new() -> Self {
1804        Self::default()
1805    }
1806}
1807#[doc = "Upstream source definition, including its Identity, package type, and other associated information."]
1808#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1809pub struct UpstreamSource {
1810    #[doc = "UTC date that this upstream was deleted."]
1811    #[serde(
1812        rename = "deletedDate",
1813        default,
1814        skip_serializing_if = "Option::is_none",
1815        with = "crate::date_time::rfc3339::option"
1816    )]
1817    pub deleted_date: Option<time::OffsetDateTime>,
1818    #[doc = "Locator for connecting to the upstream source in a user friendly format, that may potentially change over time"]
1819    #[serde(
1820        rename = "displayLocation",
1821        default,
1822        skip_serializing_if = "Option::is_none"
1823    )]
1824    pub display_location: Option<String>,
1825    #[doc = "Identity of the upstream source."]
1826    #[serde(default, skip_serializing_if = "Option::is_none")]
1827    pub id: Option<String>,
1828    #[doc = "For an internal upstream type, track the Azure DevOps organization that contains it."]
1829    #[serde(
1830        rename = "internalUpstreamCollectionId",
1831        default,
1832        skip_serializing_if = "Option::is_none"
1833    )]
1834    pub internal_upstream_collection_id: Option<String>,
1835    #[doc = "For an internal upstream type, track the feed id being referenced."]
1836    #[serde(
1837        rename = "internalUpstreamFeedId",
1838        default,
1839        skip_serializing_if = "Option::is_none"
1840    )]
1841    pub internal_upstream_feed_id: Option<String>,
1842    #[doc = "For an internal upstream type, track the project of the feed being referenced."]
1843    #[serde(
1844        rename = "internalUpstreamProjectId",
1845        default,
1846        skip_serializing_if = "Option::is_none"
1847    )]
1848    pub internal_upstream_project_id: Option<String>,
1849    #[doc = "For an internal upstream type, track the view of the feed being referenced."]
1850    #[serde(
1851        rename = "internalUpstreamViewId",
1852        default,
1853        skip_serializing_if = "Option::is_none"
1854    )]
1855    pub internal_upstream_view_id: Option<String>,
1856    #[doc = "Consistent locator for connecting to the upstream source."]
1857    #[serde(default, skip_serializing_if = "Option::is_none")]
1858    pub location: Option<String>,
1859    #[doc = "Display name."]
1860    #[serde(default, skip_serializing_if = "Option::is_none")]
1861    pub name: Option<String>,
1862    #[doc = "Package type associated with the upstream source."]
1863    #[serde(default, skip_serializing_if = "Option::is_none")]
1864    pub protocol: Option<String>,
1865    #[doc = "The identity of the service endpoint that holds credentials to use when accessing the upstream."]
1866    #[serde(
1867        rename = "serviceEndpointId",
1868        default,
1869        skip_serializing_if = "Option::is_none"
1870    )]
1871    pub service_endpoint_id: Option<String>,
1872    #[doc = "Specifies the projectId of the Service Endpoint."]
1873    #[serde(
1874        rename = "serviceEndpointProjectId",
1875        default,
1876        skip_serializing_if = "Option::is_none"
1877    )]
1878    pub service_endpoint_project_id: Option<String>,
1879    #[doc = "Specifies the status of the upstream."]
1880    #[serde(default, skip_serializing_if = "Option::is_none")]
1881    pub status: Option<upstream_source::Status>,
1882    #[doc = "Provides a human-readable reason for the status of the upstream."]
1883    #[serde(
1884        rename = "statusDetails",
1885        default,
1886        deserialize_with = "crate::serde::deserialize_null_as_default",
1887        skip_serializing_if = "Vec::is_empty"
1888    )]
1889    pub status_details: Vec<UpstreamStatusDetail>,
1890    #[doc = "Source type, such as Public or Internal."]
1891    #[serde(
1892        rename = "upstreamSourceType",
1893        default,
1894        skip_serializing_if = "Option::is_none"
1895    )]
1896    pub upstream_source_type: Option<upstream_source::UpstreamSourceType>,
1897}
1898impl UpstreamSource {
1899    pub fn new() -> Self {
1900        Self::default()
1901    }
1902}
1903pub mod upstream_source {
1904    use super::*;
1905    #[doc = "Specifies the status of the upstream."]
1906    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1907    pub enum Status {
1908        #[serde(rename = "ok")]
1909        Ok,
1910        #[serde(rename = "disabled")]
1911        Disabled,
1912    }
1913    #[doc = "Source type, such as Public or Internal."]
1914    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
1915    pub enum UpstreamSourceType {
1916        #[serde(rename = "public")]
1917        Public,
1918        #[serde(rename = "internal")]
1919        Internal,
1920    }
1921}
1922#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1923pub struct UpstreamStatusDetail {
1924    #[doc = "Provides a human-readable reason for the status of the upstream."]
1925    #[serde(default, skip_serializing_if = "Option::is_none")]
1926    pub reason: Option<String>,
1927}
1928impl UpstreamStatusDetail {
1929    pub fn new() -> Self {
1930        Self::default()
1931    }
1932}
1933#[doc = "This class is used to serialize collections as a single JSON object on the wire."]
1934#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1935pub struct VssJsonCollectionWrapper {
1936    #[serde(flatten)]
1937    pub vss_json_collection_wrapper_base: VssJsonCollectionWrapperBase,
1938    #[doc = "The serialized item."]
1939    #[serde(default, skip_serializing_if = "Option::is_none")]
1940    pub value: Option<String>,
1941}
1942impl VssJsonCollectionWrapper {
1943    pub fn new() -> Self {
1944        Self::default()
1945    }
1946}
1947#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
1948pub struct VssJsonCollectionWrapperBase {
1949    #[doc = "The number of serialized items."]
1950    #[serde(default, skip_serializing_if = "Option::is_none")]
1951    pub count: Option<i32>,
1952}
1953impl VssJsonCollectionWrapperBase {
1954    pub fn new() -> Self {
1955        Self::default()
1956    }
1957}