azure_devops_rust_api 0.7.2

Rust API library for Azure DevOps
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#![allow(non_camel_case_types)]
#![allow(unused_imports)]
use serde::de::{value, Deserializer, IntoDeserializer};
use serde::{Deserialize, Serialize, Serializer};
use std::str::FromStr;
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AuditActionInfo {
    #[doc = "The action id for the event, i.e Git.CreateRepo, Project.RenameProject"]
    #[serde(rename = "actionId", default, skip_serializing_if = "Option::is_none")]
    pub action_id: Option<String>,
    #[doc = "Area of Azure DevOps the action occurred"]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub area: Option<String>,
    #[doc = "Type of action executed"]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub category: Option<audit_action_info::Category>,
}
impl AuditActionInfo {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod audit_action_info {
    use super::*;
    #[doc = "Type of action executed"]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum Category {
        #[serde(rename = "unknown")]
        Unknown,
        #[serde(rename = "modify")]
        Modify,
        #[serde(rename = "remove")]
        Remove,
        #[serde(rename = "create")]
        Create,
        #[serde(rename = "access")]
        Access,
        #[serde(rename = "execute")]
        Execute,
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AuditActionInfoList {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub count: Option<i32>,
    #[serde(
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub value: Vec<AuditActionInfo>,
}
impl AuditActionInfoList {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AuditLogEntry {
    #[doc = "The action if for the event, i.e Git.CreateRepo, Project.RenameProject"]
    #[serde(rename = "actionId", default, skip_serializing_if = "Option::is_none")]
    pub action_id: Option<String>,
    #[doc = "ActivityId"]
    #[serde(
        rename = "activityId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub activity_id: Option<String>,
    #[doc = "The Actor's CUID"]
    #[serde(rename = "actorCUID", default, skip_serializing_if = "Option::is_none")]
    pub actor_cuid: Option<String>,
    #[doc = "The Actor's UPN"]
    #[serde(rename = "actorUPN", default, skip_serializing_if = "Option::is_none")]
    pub actor_upn: Option<String>,
    #[doc = "The Actor's User Id"]
    #[serde(
        rename = "actorUserId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub actor_user_id: Option<String>,
    #[doc = "Type of authentication used by the author"]
    #[serde(
        rename = "authenticationMechanism",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub authentication_mechanism: Option<String>,
    #[doc = "This allows us to group things together, like one user action that caused a cascade of event entries (project creation)."]
    #[serde(
        rename = "correlationId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub correlation_id: Option<String>,
    #[doc = "External data such as CUIDs, item names, etc."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub data: Option<serde_json::Value>,
    #[doc = "EventId, should be unique"]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[doc = "IP Address where the event was originated"]
    #[serde(rename = "ipAddress", default, skip_serializing_if = "Option::is_none")]
    pub ip_address: Option<String>,
    #[doc = "When specified, the id of the project this event is associated to"]
    #[serde(rename = "projectId", default, skip_serializing_if = "Option::is_none")]
    pub project_id: Option<String>,
    #[doc = "The organization Id (Organization is the only scope currently supported)"]
    #[serde(rename = "scopeId", default, skip_serializing_if = "Option::is_none")]
    pub scope_id: Option<String>,
    #[doc = "The type of the scope (Organization is only scope currently supported)"]
    #[serde(rename = "scopeType", default, skip_serializing_if = "Option::is_none")]
    pub scope_type: Option<audit_log_entry::ScopeType>,
    #[doc = "The time when the event occurred in UTC"]
    #[serde(default, with = "crate::date_time::rfc3339::option")]
    pub timestamp: Option<time::OffsetDateTime>,
    #[doc = "The user agent from the request"]
    #[serde(rename = "userAgent", default, skip_serializing_if = "Option::is_none")]
    pub user_agent: Option<String>,
}
impl AuditLogEntry {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod audit_log_entry {
    use super::*;
    #[doc = "The type of the scope (Organization is only scope currently supported)"]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum ScopeType {
        #[serde(rename = "unknown")]
        Unknown,
        #[serde(rename = "deployment")]
        Deployment,
        #[serde(rename = "enterprise")]
        Enterprise,
        #[serde(rename = "organization")]
        Organization,
        #[serde(rename = "project")]
        Project,
    }
}
#[doc = "The object returned when the audit log is queried. It contains the log and the information needed to query more audit entries."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AuditLogQueryResult {
    #[doc = "The continuation token to pass to get the next set of results"]
    #[serde(
        rename = "continuationToken",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub continuation_token: Option<String>,
    #[doc = "The list of audit log entries"]
    #[serde(
        rename = "decoratedAuditLogEntries",
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub decorated_audit_log_entries: Vec<DecoratedAuditLogEntry>,
    #[doc = "True when there are more matching results to be fetched, false otherwise."]
    #[serde(rename = "hasMore", default, skip_serializing_if = "Option::is_none")]
    pub has_more: Option<bool>,
}
impl AuditLogQueryResult {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "This class represents an audit stream"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AuditStream {
    #[doc = "Inputs used to communicate with external service. Inputs could be url, a connection string, a token, etc."]
    #[serde(
        rename = "consumerInputs",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub consumer_inputs: Option<serde_json::Value>,
    #[doc = "Type of the consumer, i.e. splunk, azureEventHub, etc."]
    #[serde(
        rename = "consumerType",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub consumer_type: Option<String>,
    #[doc = "The time when the stream was created"]
    #[serde(
        rename = "createdTime",
        default,
        with = "crate::date_time::rfc3339::option"
    )]
    pub created_time: Option<time::OffsetDateTime>,
    #[doc = "Used to identify individual streams"]
    #[serde(
        rename = "displayName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub display_name: Option<String>,
    #[doc = "Unique stream identifier"]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<i32>,
    #[doc = "Status of the stream, Enabled, Disabled"]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<audit_stream::Status>,
    #[doc = "Reason for the current stream status, i.e. Disabled by the system, Invalid credentials, etc."]
    #[serde(
        rename = "statusReason",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub status_reason: Option<String>,
    #[doc = "The time when the stream was last updated"]
    #[serde(
        rename = "updatedTime",
        default,
        with = "crate::date_time::rfc3339::option"
    )]
    pub updated_time: Option<time::OffsetDateTime>,
}
impl AuditStream {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod audit_stream {
    use super::*;
    #[doc = "Status of the stream, Enabled, Disabled"]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum Status {
        #[serde(rename = "unknown")]
        Unknown,
        #[serde(rename = "enabled")]
        Enabled,
        #[serde(rename = "disabledByUser")]
        DisabledByUser,
        #[serde(rename = "disabledBySystem")]
        DisabledBySystem,
        #[serde(rename = "deleted")]
        Deleted,
        #[serde(rename = "backfilling")]
        Backfilling,
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AuditStreamList {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub count: Option<i32>,
    #[serde(
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub value: Vec<AuditStream>,
}
impl AuditStreamList {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct DecoratedAuditLogEntry {
    #[doc = "The action id for the event, i.e Git.CreateRepo, Project.RenameProject"]
    #[serde(rename = "actionId", default, skip_serializing_if = "Option::is_none")]
    pub action_id: Option<String>,
    #[doc = "ActivityId"]
    #[serde(
        rename = "activityId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub activity_id: Option<String>,
    #[doc = "The Actor's CUID"]
    #[serde(rename = "actorCUID", default, skip_serializing_if = "Option::is_none")]
    pub actor_cuid: Option<String>,
    #[doc = "DisplayName of the user who initiated the action"]
    #[serde(
        rename = "actorDisplayName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub actor_display_name: Option<String>,
    #[doc = "URL of Actor's Profile image"]
    #[serde(
        rename = "actorImageUrl",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub actor_image_url: Option<String>,
    #[doc = "The Actor's UPN"]
    #[serde(rename = "actorUPN", default, skip_serializing_if = "Option::is_none")]
    pub actor_upn: Option<String>,
    #[doc = "The Actor's User Id"]
    #[serde(
        rename = "actorUserId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub actor_user_id: Option<String>,
    #[doc = "Area of Azure DevOps the action occurred"]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub area: Option<String>,
    #[doc = "Type of authentication used by the actor"]
    #[serde(
        rename = "authenticationMechanism",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub authentication_mechanism: Option<String>,
    #[doc = "Type of action executed"]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub category: Option<decorated_audit_log_entry::Category>,
    #[doc = "DisplayName of the category"]
    #[serde(
        rename = "categoryDisplayName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub category_display_name: Option<String>,
    #[doc = "This allows related audit entries to be grouped together. Generally this occurs when a single action causes a cascade of audit entries. For example, project creation."]
    #[serde(
        rename = "correlationId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub correlation_id: Option<String>,
    #[doc = "External data such as CUIDs, item names, etc."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub data: Option<serde_json::Value>,
    #[doc = "Decorated details"]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub details: Option<String>,
    #[doc = "EventId - Needs to be unique per service"]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[doc = "IP Address where the event was originated"]
    #[serde(rename = "ipAddress", default, skip_serializing_if = "Option::is_none")]
    pub ip_address: Option<String>,
    #[doc = "When specified, the id of the project this event is associated to"]
    #[serde(rename = "projectId", default, skip_serializing_if = "Option::is_none")]
    pub project_id: Option<String>,
    #[doc = "When specified, the name of the project this event is associated to"]
    #[serde(
        rename = "projectName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub project_name: Option<String>,
    #[doc = "DisplayName of the scope"]
    #[serde(
        rename = "scopeDisplayName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub scope_display_name: Option<String>,
    #[doc = "The organization Id (Organization is the only scope currently supported)"]
    #[serde(rename = "scopeId", default, skip_serializing_if = "Option::is_none")]
    pub scope_id: Option<String>,
    #[doc = "The type of the scope (Organization is only scope currently supported)"]
    #[serde(rename = "scopeType", default, skip_serializing_if = "Option::is_none")]
    pub scope_type: Option<decorated_audit_log_entry::ScopeType>,
    #[doc = "The time when the event occurred in UTC"]
    #[serde(default, with = "crate::date_time::rfc3339::option")]
    pub timestamp: Option<time::OffsetDateTime>,
    #[doc = "The user agent from the request"]
    #[serde(rename = "userAgent", default, skip_serializing_if = "Option::is_none")]
    pub user_agent: Option<String>,
}
impl DecoratedAuditLogEntry {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod decorated_audit_log_entry {
    use super::*;
    #[doc = "Type of action executed"]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum Category {
        #[serde(rename = "unknown")]
        Unknown,
        #[serde(rename = "modify")]
        Modify,
        #[serde(rename = "remove")]
        Remove,
        #[serde(rename = "create")]
        Create,
        #[serde(rename = "access")]
        Access,
        #[serde(rename = "execute")]
        Execute,
    }
    #[doc = "The type of the scope (Organization is only scope currently supported)"]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum ScopeType {
        #[serde(rename = "unknown")]
        Unknown,
        #[serde(rename = "deployment")]
        Deployment,
        #[serde(rename = "enterprise")]
        Enterprise,
        #[serde(rename = "organization")]
        Organization,
        #[serde(rename = "project")]
        Project,
    }
}
#[doc = "This class is used to serialized collections as a single JSON object on the wire, to avoid serializing JSON arrays directly to the client, which can be a security hole"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct VssJsonCollectionWrapper {
    #[serde(flatten)]
    pub vss_json_collection_wrapper_base: VssJsonCollectionWrapperBase,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub value: Option<String>,
}
impl VssJsonCollectionWrapper {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct VssJsonCollectionWrapperBase {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub count: Option<i32>,
}
impl VssJsonCollectionWrapperBase {
    pub fn new() -> Self {
        Self::default()
    }
}