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
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
// 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 AccessTokenResult {
    #[doc = ""]
    #[serde(
        rename = "accessToken",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub access_token: Option<JsonWebToken>,
    #[serde(
        rename = "accessTokenError",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub access_token_error: Option<access_token_result::AccessTokenError>,
    #[serde(
        rename = "authorizationId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub authorization_id: Option<String>,
    #[serde(
        rename = "errorDescription",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub error_description: Option<String>,
    #[serde(rename = "hasError", default, skip_serializing_if = "Option::is_none")]
    pub has_error: Option<bool>,
    #[serde(
        rename = "isFirstPartyClient",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub is_first_party_client: Option<bool>,
    #[doc = ""]
    #[serde(
        rename = "refreshToken",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub refresh_token: Option<RefreshTokenGrant>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub scope: Option<String>,
    #[serde(rename = "tokenType", default, skip_serializing_if = "Option::is_none")]
    pub token_type: Option<String>,
    #[serde(
        rename = "validTo",
        default,
        with = "crate::date_time::rfc3339::option"
    )]
    pub valid_to: Option<time::OffsetDateTime>,
}
impl AccessTokenResult {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod access_token_result {
    use super::*;
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum AccessTokenError {
        #[serde(rename = "none")]
        None,
        #[serde(rename = "grantTypeRequired")]
        GrantTypeRequired,
        #[serde(rename = "authorizationGrantRequired")]
        AuthorizationGrantRequired,
        #[serde(rename = "clientSecretRequired")]
        ClientSecretRequired,
        #[serde(rename = "redirectUriRequired")]
        RedirectUriRequired,
        #[serde(rename = "invalidAuthorizationGrant")]
        InvalidAuthorizationGrant,
        #[serde(rename = "invalidAuthorizationScopes")]
        InvalidAuthorizationScopes,
        #[serde(rename = "invalidRefreshToken")]
        InvalidRefreshToken,
        #[serde(rename = "authorizationNotFound")]
        AuthorizationNotFound,
        #[serde(rename = "authorizationGrantExpired")]
        AuthorizationGrantExpired,
        #[serde(rename = "accessAlreadyIssued")]
        AccessAlreadyIssued,
        #[serde(rename = "invalidRedirectUri")]
        InvalidRedirectUri,
        #[serde(rename = "accessTokenNotFound")]
        AccessTokenNotFound,
        #[serde(rename = "invalidAccessToken")]
        InvalidAccessToken,
        #[serde(rename = "accessTokenAlreadyRefreshed")]
        AccessTokenAlreadyRefreshed,
        #[serde(rename = "invalidClientSecret")]
        InvalidClientSecret,
        #[serde(rename = "clientSecretExpired")]
        ClientSecretExpired,
        #[serde(rename = "serverError")]
        ServerError,
        #[serde(rename = "accessDenied")]
        AccessDenied,
        #[serde(rename = "accessTokenKeyRequired")]
        AccessTokenKeyRequired,
        #[serde(rename = "invalidAccessTokenKey")]
        InvalidAccessTokenKey,
        #[serde(rename = "failedToGetAccessToken")]
        FailedToGetAccessToken,
        #[serde(rename = "invalidClientId")]
        InvalidClientId,
        #[serde(rename = "invalidClient")]
        InvalidClient,
        #[serde(rename = "invalidValidTo")]
        InvalidValidTo,
        #[serde(rename = "invalidUserId")]
        InvalidUserId,
        #[serde(rename = "failedToIssueAccessToken")]
        FailedToIssueAccessToken,
        #[serde(rename = "authorizationGrantScopeMissing")]
        AuthorizationGrantScopeMissing,
        #[serde(rename = "invalidPublicAccessTokenKey")]
        InvalidPublicAccessTokenKey,
        #[serde(rename = "invalidPublicAccessToken")]
        InvalidPublicAccessToken,
        #[serde(rename = "publicFeatureFlagNotEnabled")]
        PublicFeatureFlagNotEnabled,
        #[serde(rename = "sshPolicyDisabled")]
        SshPolicyDisabled,
        #[serde(rename = "hostAuthorizationNotFound")]
        HostAuthorizationNotFound,
        #[serde(rename = "hostAuthorizationIsNotValid")]
        HostAuthorizationIsNotValid,
        #[serde(rename = "invalidScope")]
        InvalidScope,
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AuthorizationGrant {
    #[serde(rename = "grantType", default, skip_serializing_if = "Option::is_none")]
    pub grant_type: Option<authorization_grant::GrantType>,
}
impl AuthorizationGrant {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod authorization_grant {
    use super::*;
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum GrantType {
        #[serde(rename = "none")]
        None,
        #[serde(rename = "jwtBearer")]
        JwtBearer,
        #[serde(rename = "refreshToken")]
        RefreshToken,
        #[serde(rename = "implicit")]
        Implicit,
        #[serde(rename = "clientCredentials")]
        ClientCredentials,
    }
}
#[doc = "Container class for changed identities"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ChangedIdentities {
    #[doc = "Changed Identities"]
    #[serde(
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub identities: Vec<Identity>,
    #[doc = "More data available, set to true if pagesize is specified."]
    #[serde(rename = "moreData", default, skip_serializing_if = "Option::is_none")]
    pub more_data: Option<bool>,
    #[doc = "Context class for changed identities"]
    #[serde(
        rename = "sequenceContext",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub sequence_context: Option<ChangedIdentitiesContext>,
}
impl ChangedIdentities {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "Context class for changed identities"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ChangedIdentitiesContext {
    #[doc = "Last Group SequenceId"]
    #[serde(
        rename = "groupSequenceId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub group_sequence_id: Option<i32>,
    #[doc = "Last Identity SequenceId"]
    #[serde(
        rename = "identitySequenceId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub identity_sequence_id: Option<i32>,
    #[doc = "Last Group OrganizationIdentitySequenceId"]
    #[serde(
        rename = "organizationIdentitySequenceId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub organization_identity_sequence_id: Option<i32>,
    #[doc = "Page size"]
    #[serde(rename = "pageSize", default, skip_serializing_if = "Option::is_none")]
    pub page_size: Option<i32>,
}
impl ChangedIdentitiesContext {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct CreateScopeInfo {
    #[serde(
        rename = "adminGroupDescription",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub admin_group_description: Option<String>,
    #[serde(
        rename = "adminGroupName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub admin_group_name: Option<String>,
    #[serde(rename = "creatorId", default, skip_serializing_if = "Option::is_none")]
    pub creator_id: Option<String>,
    #[serde(
        rename = "parentScopeId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub parent_scope_id: Option<String>,
    #[serde(rename = "scopeName", default, skip_serializing_if = "Option::is_none")]
    pub scope_name: Option<String>,
    #[serde(rename = "scopeType", default, skip_serializing_if = "Option::is_none")]
    pub scope_type: Option<create_scope_info::ScopeType>,
}
impl CreateScopeInfo {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod create_scope_info {
    use super::*;
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum ScopeType {
        #[serde(rename = "generic")]
        Generic,
        #[serde(rename = "serviceHost")]
        ServiceHost,
        #[serde(rename = "teamProject")]
        TeamProject,
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct FrameworkIdentityInfo {
    #[serde(
        rename = "displayName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub display_name: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub identifier: Option<String>,
    #[serde(
        rename = "identityType",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub identity_type: Option<framework_identity_info::IdentityType>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub role: Option<String>,
}
impl FrameworkIdentityInfo {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod framework_identity_info {
    use super::*;
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum IdentityType {
        #[serde(rename = "none")]
        None,
        #[serde(rename = "serviceIdentity")]
        ServiceIdentity,
        #[serde(rename = "aggregateIdentity")]
        AggregateIdentity,
        #[serde(rename = "importedIdentity")]
        ImportedIdentity,
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct GroupMembership {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub active: Option<bool>,
    #[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."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub descriptor: Option<IdentityDescriptor>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "queriedId", default, skip_serializing_if = "Option::is_none")]
    pub queried_id: Option<String>,
}
impl GroupMembership {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct Identity {
    #[serde(flatten)]
    pub identity_base: IdentityBase,
}
impl Identity {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "Base Identity class to allow \"trimmed\" identity class in the GetConnectionData API Makes sure that on-the-wire representations of the derived classes are compatible with each other (e.g. Server responds with PublicIdentity object while client deserializes it as Identity object) Derived classes should not have additional \\[DataMember\\] properties"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct IdentityBase {
    #[doc = "The custom display name for the identity (if any). Setting this property to an empty string will clear the existing custom display name. Setting this property to null will not affect the existing persisted value (since null values do not get sent over the wire or to the database)"]
    #[serde(
        rename = "customDisplayName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub custom_display_name: Option<String>,
    #[doc = "Identity descriptor"]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub descriptor: Option<String>,
    #[doc = "Identity Identifier. Also called Storage Key, or VSID"]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[doc = "True if the identity has a membership in any Azure Devops group in the organization."]
    #[serde(rename = "isActive", default, skip_serializing_if = "Option::is_none")]
    pub is_active: Option<bool>,
    #[doc = "True if the identity is a group."]
    #[serde(
        rename = "isContainer",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub is_container: Option<bool>,
    #[serde(rename = "masterId", default, skip_serializing_if = "Option::is_none")]
    pub master_id: Option<String>,
    #[doc = "Id of the members of the identity (groups only)."]
    #[serde(
        rename = "memberIds",
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub member_ids: Vec<String>,
    #[serde(
        rename = "memberOf",
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub member_of: Vec<IdentityDescriptor>,
    #[serde(
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub members: Vec<IdentityDescriptor>,
    #[serde(
        rename = "metaTypeId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub meta_type_id: Option<i32>,
    #[doc = "The class represents a property bag as a collection of key-value pairs. Values of all primitive types (any type with a `TypeCode != TypeCode.Object`) except for `DBNull` are accepted. Values of type Byte[], Int32, Double, DateType and String preserve their type, other primitives are retuned as a String. Byte[] expected as base64 encoded string."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub properties: Option<PropertiesCollection>,
    #[doc = "The display name for the identity as specified by the source identity provider."]
    #[serde(
        rename = "providerDisplayName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub provider_display_name: Option<String>,
    #[serde(
        rename = "resourceVersion",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub resource_version: Option<i32>,
    #[serde(
        rename = "socialDescriptor",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub social_descriptor: Option<String>,
    #[doc = "Subject descriptor of a Graph entity."]
    #[serde(
        rename = "subjectDescriptor",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub subject_descriptor: Option<String>,
    #[serde(
        rename = "uniqueUserId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub unique_user_id: Option<i32>,
}
impl IdentityBase {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct IdentityBatchInfo {
    #[serde(
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub descriptors: Vec<IdentityDescriptor>,
    #[serde(
        rename = "identityIds",
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub identity_ids: Vec<String>,
    #[serde(
        rename = "includeRestrictedVisibility",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub include_restricted_visibility: Option<bool>,
    #[serde(
        rename = "propertyNames",
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub property_names: Vec<String>,
    #[serde(
        rename = "queryMembership",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub query_membership: Option<identity_batch_info::QueryMembership>,
    #[serde(
        rename = "socialDescriptors",
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub social_descriptors: Vec<String>,
    #[serde(
        rename = "subjectDescriptors",
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub subject_descriptors: Vec<String>,
}
impl IdentityBatchInfo {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod identity_batch_info {
    use super::*;
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum QueryMembership {
        #[serde(rename = "none")]
        None,
        #[serde(rename = "direct")]
        Direct,
        #[serde(rename = "expanded")]
        Expanded,
        #[serde(rename = "expandedUp")]
        ExpandedUp,
        #[serde(rename = "expandedDown")]
        ExpandedDown,
    }
}
#[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."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct IdentityDescriptor {
    #[doc = "The unique identifier for this identity, not exceeding 256 chars, which will be persisted."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub identifier: Option<String>,
    #[doc = "Type of descriptor (for example, Windows, Passport, etc.)."]
    #[serde(
        rename = "identityType",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub identity_type: Option<String>,
}
impl IdentityDescriptor {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct IdentityList {
    #[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<Identity>,
}
impl IdentityList {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct IdentityRightsTransferData {
    #[serde(
        rename = "userPrincipalNameMappings",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub user_principal_name_mappings: Option<serde_json::Value>,
}
impl IdentityRightsTransferData {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct IdentityScope {
    #[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."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub administrators: Option<IdentityDescriptor>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "isActive", default, skip_serializing_if = "Option::is_none")]
    pub is_active: Option<bool>,
    #[serde(rename = "isGlobal", default, skip_serializing_if = "Option::is_none")]
    pub is_global: Option<bool>,
    #[serde(
        rename = "localScopeId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub local_scope_id: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "parentId", default, skip_serializing_if = "Option::is_none")]
    pub parent_id: Option<String>,
    #[serde(rename = "scopeType", default, skip_serializing_if = "Option::is_none")]
    pub scope_type: Option<identity_scope::ScopeType>,
    #[serde(
        rename = "securingHostId",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub securing_host_id: Option<String>,
    #[serde(
        rename = "subjectDescriptor",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub subject_descriptor: Option<String>,
}
impl IdentityScope {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod identity_scope {
    use super::*;
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum ScopeType {
        #[serde(rename = "generic")]
        Generic,
        #[serde(rename = "serviceHost")]
        ServiceHost,
        #[serde(rename = "teamProject")]
        TeamProject,
    }
}
#[doc = "Identity information."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct IdentitySelf {
    #[doc = "The UserPrincipalName (UPN) of the account. This value comes from the source provider."]
    #[serde(
        rename = "accountName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub account_name: Option<String>,
    #[doc = "The display name. For AAD accounts with multiple tenants this is the display name of the profile in the home tenant."]
    #[serde(
        rename = "displayName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub display_name: Option<String>,
    #[doc = "This represents the name of the container of origin. For AAD accounts this is the tenantID of the home tenant. For MSA accounts this is the string \"Windows Live ID\"."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub domain: Option<String>,
    #[doc = "This is the VSID of the home tenant profile. If the profile is signed into the home tenant or if the profile has no tenants then this Id is the same as the Id returned by the profile/profiles/me endpoint. Going forward it is recommended that you use the combined values of Origin, OriginId and Domain to uniquely identify a user rather than this Id."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[doc = "The type of source provider for the origin identifier. For MSA accounts this is \"msa\". For AAD accounts this is \"aad\"."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub origin: Option<String>,
    #[doc = "The unique identifier from the system of origin. If there are multiple tenants this is the unique identifier of the account in the home tenant. (For MSA this is the PUID in hex notation, for AAD this is the object id.)"]
    #[serde(rename = "originId", default, skip_serializing_if = "Option::is_none")]
    pub origin_id: Option<String>,
    #[doc = "For AAD accounts this is all of the tenants that this account is a member of."]
    #[serde(
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub tenants: Vec<TenantInfo>,
}
impl IdentitySelf {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct IdentitySnapshot {
    #[serde(
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub groups: Vec<Identity>,
    #[serde(
        rename = "identityIds",
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub identity_ids: Vec<String>,
    #[serde(
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub memberships: Vec<GroupMembership>,
    #[serde(rename = "scopeId", default, skip_serializing_if = "Option::is_none")]
    pub scope_id: Option<String>,
    #[serde(
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub scopes: Vec<IdentityScope>,
}
impl IdentitySnapshot {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct IdentityUpdateData {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub index: Option<i32>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub updated: Option<bool>,
}
impl IdentityUpdateData {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct IssuedToken {
    #[serde(
        rename = "isAuthenticated",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub is_authenticated: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub properties: Option<serde_json::Value>,
}
impl IssuedToken {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "Represents a JSON object."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JObject {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub item: Option<String>,
    #[doc = "Gets the node type for this JToken."]
    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
    pub type_: Option<String>,
}
impl JObject {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "The JSON model for JSON Patch Operations"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JsonPatchDocument {}
impl JsonPatchDocument {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "The JSON model for a JSON Patch operation"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JsonPatchOperation {
    #[doc = "The path to copy from for the Move/Copy operation."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub from: Option<String>,
    #[doc = "The patch operation"]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub op: Option<json_patch_operation::Op>,
    #[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/-)."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub path: Option<String>,
    #[doc = "The value for the operation. This is either a primitive or a JToken."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub value: Option<serde_json::Value>,
}
impl JsonPatchOperation {
    pub fn new() -> Self {
        Self::default()
    }
}
pub mod json_patch_operation {
    use super::*;
    #[doc = "The patch operation"]
    #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
    pub enum Op {
        #[serde(rename = "add")]
        Add,
        #[serde(rename = "remove")]
        Remove,
        #[serde(rename = "replace")]
        Replace,
        #[serde(rename = "move")]
        Move,
        #[serde(rename = "copy")]
        Copy,
        #[serde(rename = "test")]
        Test,
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct JsonWebToken {
    #[serde(flatten)]
    pub issued_token: IssuedToken,
}
impl JsonWebToken {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct PagedIdentities {
    #[serde(
        rename = "continuationToken",
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub continuation_token: Vec<String>,
    #[serde(
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub identities: Vec<Identity>,
}
impl PagedIdentities {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = "The class represents a property bag as a collection of key-value pairs. Values of all primitive types (any type with a `TypeCode != TypeCode.Object`) except for `DBNull` are accepted. Values of type Byte[], Int32, Double, DateType and String preserve their type, other primitives are retuned as a String. Byte[] expected as base64 encoded string."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct PropertiesCollection {
    #[doc = "The count of properties in the collection."]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub count: Option<i32>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub item: Option<serde_json::Value>,
    #[doc = "The set of keys in the collection."]
    #[serde(
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub keys: Vec<String>,
    #[doc = "The set of values in the collection."]
    #[serde(
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub values: Vec<String>,
}
impl PropertiesCollection {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct RefreshTokenGrant {
    #[serde(flatten)]
    pub authorization_grant: AuthorizationGrant,
    #[doc = ""]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub jwt: Option<JsonWebToken>,
}
impl RefreshTokenGrant {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct SwapIdentityInfo {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id1: Option<String>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub id2: Option<String>,
}
impl SwapIdentityInfo {
    pub fn new() -> Self {
        Self::default()
    }
}
#[doc = ""]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct TenantInfo {
    #[serde(
        rename = "homeTenant",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub home_tenant: Option<bool>,
    #[serde(rename = "tenantId", default, skip_serializing_if = "Option::is_none")]
    pub tenant_id: Option<String>,
    #[serde(
        rename = "tenantName",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub tenant_name: Option<String>,
    #[serde(
        rename = "verifiedDomains",
        default,
        skip_serializing_if = "Vec::is_empty",
        deserialize_with = "crate::serde::deserialize_null_default"
    )]
    pub verified_domains: Vec<String>,
}
impl TenantInfo {
    pub fn new() -> Self {
        Self::default()
    }
}
#[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()
    }
}