forked from microsoft/azure-devops-rust-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.rs
More file actions
1984 lines (1984 loc) · 68.9 KB
/
Copy pathmodels.rs
File metadata and controls
1984 lines (1984 loc) · 68.9 KB
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
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// 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;
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AadOauthTokenRequest {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub refresh: Option<bool>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub resource: Option<String>,
#[serde(rename = "tenantId", default, skip_serializing_if = "Option::is_none")]
pub tenant_id: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub token: Option<String>,
}
impl AadOauthTokenRequest {
pub fn new() -> Self {
Self::default()
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AadOauthTokenResult {
#[serde(
rename = "accessToken",
default,
skip_serializing_if = "Option::is_none"
)]
pub access_token: Option<String>,
#[serde(
rename = "refreshTokenCache",
default,
skip_serializing_if = "Option::is_none"
)]
pub refresh_token_cache: Option<String>,
}
impl AadOauthTokenResult {
pub fn new() -> Self {
Self::default()
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AuthConfiguration {
#[serde(flatten)]
pub o_auth_configuration: OAuthConfiguration,
#[doc = "Gets or sets parameters contained in configuration object."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub parameters: Option<serde_json::Value>,
}
impl AuthConfiguration {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Specifies the authentication scheme to be used for authentication."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AuthenticationSchemeReference {
#[doc = "Gets or sets the key and value of the fields used for authentication."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub inputs: Option<serde_json::Value>,
#[doc = "Gets or sets the type of authentication scheme of an endpoint."]
#[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
impl AuthenticationSchemeReference {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Represents the header of the REST request."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AuthorizationHeader {
#[doc = "Gets or sets the name of authorization header."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[doc = "Gets or sets the value of authorization header."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
impl AuthorizationHeader {
pub fn new() -> Self {
Self::default()
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AzureAppService {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
impl AzureAppService {
pub fn new() -> Self {
Self::default()
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AzureKeyVaultPermission {
#[serde(flatten)]
pub azure_resource_permission: AzureResourcePermission,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub vault: Option<String>,
}
impl AzureKeyVaultPermission {
pub fn new() -> Self {
Self::default()
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AzureMlWorkspace {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub location: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
impl AzureMlWorkspace {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Azure Management Group"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AzureManagementGroup {
#[doc = "Display name of azure management group"]
#[serde(
rename = "displayName",
default,
skip_serializing_if = "Option::is_none"
)]
pub display_name: Option<String>,
#[doc = "Id of azure management group"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[doc = "Azure management group name"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[doc = "Id of tenant from which azure management group belogs"]
#[serde(rename = "tenantId", default, skip_serializing_if = "Option::is_none")]
pub tenant_id: Option<String>,
}
impl AzureManagementGroup {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Azure management group query result"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AzureManagementGroupQueryResult {
#[doc = "Error message in case of an exception"]
#[serde(
rename = "errorMessage",
default,
skip_serializing_if = "Option::is_none"
)]
pub error_message: Option<String>,
#[doc = "List of azure management groups"]
#[serde(
default,
deserialize_with = "crate::serde::deserialize_null_as_default",
skip_serializing_if = "Vec::is_empty"
)]
pub value: Vec<AzureManagementGroup>,
}
impl AzureManagementGroupQueryResult {
pub fn new() -> Self {
Self::default()
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AzurePermission {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub provisioned: Option<bool>,
#[serde(
rename = "resourceProvider",
default,
skip_serializing_if = "Option::is_none"
)]
pub resource_provider: Option<String>,
}
impl AzurePermission {
pub fn new() -> Self {
Self::default()
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AzureResourcePermission {
#[serde(flatten)]
pub azure_permission: AzurePermission,
#[serde(
rename = "resourceGroup",
default,
skip_serializing_if = "Option::is_none"
)]
pub resource_group: Option<String>,
}
impl AzureResourcePermission {
pub fn new() -> Self {
Self::default()
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AzureRoleAssignmentPermission {
#[serde(flatten)]
pub azure_permission: AzurePermission,
#[serde(
rename = "roleAssignmentId",
default,
skip_serializing_if = "Option::is_none"
)]
pub role_assignment_id: Option<String>,
}
impl AzureRoleAssignmentPermission {
pub fn new() -> Self {
Self::default()
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AzureSpnOperationStatus {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub severity: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(
rename = "statusMessage",
default,
skip_serializing_if = "Option::is_none"
)]
pub status_message: Option<String>,
}
impl AzureSpnOperationStatus {
pub fn new() -> Self {
Self::default()
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AzureSubscription {
#[serde(
rename = "displayName",
default,
skip_serializing_if = "Option::is_none"
)]
pub display_name: Option<String>,
#[serde(
rename = "subscriptionId",
default,
skip_serializing_if = "Option::is_none"
)]
pub subscription_id: Option<String>,
#[serde(
rename = "subscriptionTenantId",
default,
skip_serializing_if = "Option::is_none"
)]
pub subscription_tenant_id: Option<String>,
#[serde(
rename = "subscriptionTenantName",
default,
skip_serializing_if = "Option::is_none"
)]
pub subscription_tenant_name: Option<String>,
}
impl AzureSubscription {
pub fn new() -> Self {
Self::default()
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct AzureSubscriptionQueryResult {
#[serde(
rename = "errorMessage",
default,
skip_serializing_if = "Option::is_none"
)]
pub error_message: Option<String>,
#[serde(
default,
deserialize_with = "crate::serde::deserialize_null_as_default",
skip_serializing_if = "Vec::is_empty"
)]
pub value: Vec<AzureSubscription>,
}
impl AzureSubscriptionQueryResult {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Specifies the client certificate to be used for the endpoint request."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ClientCertificate {
#[doc = "Gets or sets the value of client certificate."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
impl ClientCertificate {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Specifies the data sources for this endpoint."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct DataSource {
#[doc = "Specifies the authentication scheme to be used for authentication."]
#[serde(
rename = "authenticationScheme",
default,
skip_serializing_if = "Option::is_none"
)]
pub authentication_scheme: Option<AuthenticationSchemeReference>,
#[doc = "Gets or sets the pagination format supported by this data source(ContinuationToken/SkipTop)."]
#[serde(
rename = "callbackContextTemplate",
default,
skip_serializing_if = "Option::is_none"
)]
pub callback_context_template: Option<String>,
#[doc = "Gets or sets the template to check if subsequent call is needed."]
#[serde(
rename = "callbackRequiredTemplate",
default,
skip_serializing_if = "Option::is_none"
)]
pub callback_required_template: Option<String>,
#[doc = "Gets or sets the endpoint url of the data source."]
#[serde(
rename = "endpointUrl",
default,
skip_serializing_if = "Option::is_none"
)]
pub endpoint_url: Option<String>,
#[doc = "Gets or sets the authorization headers of the request."]
#[serde(
default,
deserialize_with = "crate::serde::deserialize_null_as_default",
skip_serializing_if = "Vec::is_empty"
)]
pub headers: Vec<AuthorizationHeader>,
#[doc = "Gets or sets the initial value of the query params."]
#[serde(
rename = "initialContextTemplate",
default,
skip_serializing_if = "Option::is_none"
)]
pub initial_context_template: Option<String>,
#[doc = "Gets or sets the name of the data source."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[doc = "Gets or sets the request content of the endpoint request."]
#[serde(
rename = "requestContent",
default,
skip_serializing_if = "Option::is_none"
)]
pub request_content: Option<String>,
#[doc = "Gets or sets the request method of the endpoint request."]
#[serde(
rename = "requestVerb",
default,
skip_serializing_if = "Option::is_none"
)]
pub request_verb: Option<String>,
#[doc = "Gets or sets the resource url of the endpoint request."]
#[serde(
rename = "resourceUrl",
default,
skip_serializing_if = "Option::is_none"
)]
pub resource_url: Option<String>,
#[doc = "Gets or sets the result selector to filter the response of the endpoint request."]
#[serde(
rename = "resultSelector",
default,
skip_serializing_if = "Option::is_none"
)]
pub result_selector: Option<String>,
}
impl DataSource {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Represents the data source binding of the endpoint."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct DataSourceBinding {
#[serde(flatten)]
pub data_source_binding_base: DataSourceBindingBase,
}
impl DataSourceBinding {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Represents binding of data source for the service endpoint request."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct DataSourceBindingBase {
#[doc = "Pagination format supported by this data source(ContinuationToken/SkipTop)."]
#[serde(
rename = "callbackContextTemplate",
default,
skip_serializing_if = "Option::is_none"
)]
pub callback_context_template: Option<String>,
#[doc = "Subsequent calls needed?"]
#[serde(
rename = "callbackRequiredTemplate",
default,
skip_serializing_if = "Option::is_none"
)]
pub callback_required_template: Option<String>,
#[doc = "Gets or sets the name of the data source."]
#[serde(
rename = "dataSourceName",
default,
skip_serializing_if = "Option::is_none"
)]
pub data_source_name: Option<String>,
#[doc = "Gets or sets the endpoint Id."]
#[serde(
rename = "endpointId",
default,
skip_serializing_if = "Option::is_none"
)]
pub endpoint_id: Option<String>,
#[doc = "Gets or sets the url of the service endpoint."]
#[serde(
rename = "endpointUrl",
default,
skip_serializing_if = "Option::is_none"
)]
pub endpoint_url: Option<String>,
#[doc = "Gets or sets the authorization headers."]
#[serde(
default,
deserialize_with = "crate::serde::deserialize_null_as_default",
skip_serializing_if = "Vec::is_empty"
)]
pub headers: Vec<AuthorizationHeader>,
#[doc = "Defines the initial value of the query params"]
#[serde(
rename = "initialContextTemplate",
default,
skip_serializing_if = "Option::is_none"
)]
pub initial_context_template: Option<String>,
#[doc = "Gets or sets the parameters for the data source."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub parameters: Option<serde_json::Value>,
#[doc = "Gets or sets http request body"]
#[serde(
rename = "requestContent",
default,
skip_serializing_if = "Option::is_none"
)]
pub request_content: Option<String>,
#[doc = "Gets or sets http request verb"]
#[serde(
rename = "requestVerb",
default,
skip_serializing_if = "Option::is_none"
)]
pub request_verb: Option<String>,
#[doc = "Gets or sets the result selector."]
#[serde(
rename = "resultSelector",
default,
skip_serializing_if = "Option::is_none"
)]
pub result_selector: Option<String>,
#[doc = "Gets or sets the result template."]
#[serde(
rename = "resultTemplate",
default,
skip_serializing_if = "Option::is_none"
)]
pub result_template: Option<String>,
#[doc = "Gets or sets the target of the data source."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub target: Option<String>,
}
impl DataSourceBindingBase {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Represents details of the service endpoint data source."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct DataSourceDetails {
#[doc = "Gets or sets the data source name."]
#[serde(
rename = "dataSourceName",
default,
skip_serializing_if = "Option::is_none"
)]
pub data_source_name: Option<String>,
#[doc = "Gets or sets the data source url."]
#[serde(
rename = "dataSourceUrl",
default,
skip_serializing_if = "Option::is_none"
)]
pub data_source_url: Option<String>,
#[doc = "Gets or sets the request headers."]
#[serde(
default,
deserialize_with = "crate::serde::deserialize_null_as_default",
skip_serializing_if = "Vec::is_empty"
)]
pub headers: Vec<AuthorizationHeader>,
#[doc = "Gets or sets the initialization context used for the initial call to the data source"]
#[serde(
rename = "initialContextTemplate",
default,
skip_serializing_if = "Option::is_none"
)]
pub initial_context_template: Option<String>,
#[doc = "Gets the parameters of data source."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub parameters: Option<serde_json::Value>,
#[doc = "Gets or sets the data source request content."]
#[serde(
rename = "requestContent",
default,
skip_serializing_if = "Option::is_none"
)]
pub request_content: Option<String>,
#[doc = "Gets or sets the data source request verb. Get/Post are the only implemented types"]
#[serde(
rename = "requestVerb",
default,
skip_serializing_if = "Option::is_none"
)]
pub request_verb: Option<String>,
#[doc = "Gets or sets the resource url of data source."]
#[serde(
rename = "resourceUrl",
default,
skip_serializing_if = "Option::is_none"
)]
pub resource_url: Option<String>,
#[doc = "Gets or sets the result selector."]
#[serde(
rename = "resultSelector",
default,
skip_serializing_if = "Option::is_none"
)]
pub result_selector: Option<String>,
}
impl DataSourceDetails {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Represents the details of the input on which a given input is dependent."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct DependencyBinding {
#[doc = "Gets or sets the value of the field on which url is dependent."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
#[doc = "Gets or sets the corresponding value of url."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
impl DependencyBinding {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Represents the dependency data for the endpoint inputs."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct DependencyData {
#[doc = "Gets or sets the category of dependency data."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub input: Option<String>,
#[doc = "Gets or sets the key-value pair to specify properties and their values."]
#[serde(
default,
deserialize_with = "crate::serde::deserialize_null_as_default",
skip_serializing_if = "Vec::is_empty"
)]
pub map: Vec<serde_json::Value>,
}
impl DependencyData {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Represents the inputs on which any given input is dependent."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct DependsOn {
#[doc = "Gets or sets the ID of the field on which URL's value is dependent."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub input: Option<String>,
#[doc = "Gets or sets key-value pair containing other's field value and corresponding url value."]
#[serde(
default,
deserialize_with = "crate::serde::deserialize_null_as_default",
skip_serializing_if = "Vec::is_empty"
)]
pub map: Vec<DependencyBinding>,
}
impl DependsOn {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Represents the authorization used for service endpoint."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct EndpointAuthorization {
#[doc = "Gets or sets the parameters for the selected authorization scheme."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub parameters: Option<serde_json::Value>,
#[doc = "Gets or sets the scheme used for service endpoint authentication."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub scheme: Option<String>,
}
impl EndpointAuthorization {
pub fn new() -> Self {
Self::default()
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct EndpointOperationStatus {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(
rename = "statusMessage",
default,
skip_serializing_if = "Option::is_none"
)]
pub status_message: Option<String>,
}
impl EndpointOperationStatus {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Represents url of the service endpoint."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct EndpointUrl {
#[doc = "Represents the inputs on which any given input is dependent."]
#[serde(rename = "dependsOn", default, skip_serializing_if = "Option::is_none")]
pub depends_on: Option<DependsOn>,
#[doc = "Gets or sets the display name of service endpoint url."]
#[serde(
rename = "displayName",
default,
skip_serializing_if = "Option::is_none"
)]
pub display_name: Option<String>,
#[doc = "Gets or sets the format of the url."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub format: Option<String>,
#[doc = "Gets or sets the help text of service endpoint url."]
#[serde(rename = "helpText", default, skip_serializing_if = "Option::is_none")]
pub help_text: Option<String>,
#[doc = "Gets or sets the visibility of service endpoint url."]
#[serde(rename = "isVisible", default, skip_serializing_if = "Option::is_none")]
pub is_visible: Option<String>,
#[doc = "Gets or sets the value of service endpoint url."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
impl EndpointUrl {
pub fn new() -> Self {
Self::default()
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct GraphSubjectBase {
#[doc = "Links"]
#[serde(rename = "_links", default, skip_serializing_if = "Option::is_none")]
pub links: Option<serde_json::Value>,
#[doc = "The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub descriptor: Option<String>,
#[doc = "This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider."]
#[serde(
rename = "displayName",
default,
skip_serializing_if = "Option::is_none"
)]
pub display_name: Option<String>,
#[doc = "This url is the full route to the source resource of this graph subject."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
impl GraphSubjectBase {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Specifies the public url of the help documentation."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct HelpLink {
#[doc = "Gets or sets the help text."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub text: Option<String>,
#[doc = "Gets or sets the public url of the help documentation."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
impl HelpLink {
pub fn new() -> Self {
Self::default()
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct IdentityRef {
#[serde(flatten)]
pub graph_subject_base: GraphSubjectBase,
#[doc = "Deprecated - Can be retrieved by querying the Graph user referenced in the \"self\" entry of the IdentityRef \"_links\" dictionary"]
#[serde(
rename = "directoryAlias",
default,
skip_serializing_if = "Option::is_none"
)]
pub directory_alias: Option<String>,
pub id: String,
#[doc = "Deprecated - Available in the \"avatar\" entry of the IdentityRef \"_links\" dictionary"]
#[serde(rename = "imageUrl", default, skip_serializing_if = "Option::is_none")]
pub image_url: Option<String>,
#[doc = "Deprecated - Can be retrieved by querying the Graph membership state referenced in the \"membershipState\" entry of the GraphUser \"_links\" dictionary"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub inactive: Option<bool>,
#[doc = "Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsAadUserType/Descriptor.IsAadGroupType)"]
#[serde(
rename = "isAadIdentity",
default,
skip_serializing_if = "Option::is_none"
)]
pub is_aad_identity: Option<bool>,
#[doc = "Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsGroupType)"]
#[serde(
rename = "isContainer",
default,
skip_serializing_if = "Option::is_none"
)]
pub is_container: Option<bool>,
#[serde(
rename = "isDeletedInOrigin",
default,
skip_serializing_if = "Option::is_none"
)]
pub is_deleted_in_origin: Option<bool>,
#[doc = "Deprecated - not in use in most preexisting implementations of ToIdentityRef"]
#[serde(
rename = "profileUrl",
default,
skip_serializing_if = "Option::is_none"
)]
pub profile_url: Option<String>,
#[doc = "Deprecated - use Domain+PrincipalName instead"]
#[serde(
rename = "uniqueName",
default,
skip_serializing_if = "Option::is_none"
)]
pub unique_name: Option<String>,
}
impl IdentityRef {
pub fn new(id: String) -> Self {
Self {
graph_subject_base: GraphSubjectBase::default(),
directory_alias: None,
id,
image_url: None,
inactive: None,
is_aad_identity: None,
is_container: None,
is_deleted_in_origin: None,
profile_url: None,
unique_name: None,
}
}
}
#[doc = "Describes an input for subscriptions."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct InputDescriptor {
#[doc = "The ids of all inputs that the value of this input is dependent on."]
#[serde(
rename = "dependencyInputIds",
default,
deserialize_with = "crate::serde::deserialize_null_as_default",
skip_serializing_if = "Vec::is_empty"
)]
pub dependency_input_ids: Vec<String>,
#[doc = "Description of what this input is used for"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[doc = "The group localized name to which this input belongs and can be shown as a header for the container that will include all the inputs in the group."]
#[serde(rename = "groupName", default, skip_serializing_if = "Option::is_none")]
pub group_name: Option<String>,
#[doc = "If true, the value information for this input is dynamic and should be fetched when the value of dependency inputs change."]
#[serde(
rename = "hasDynamicValueInformation",
default,
skip_serializing_if = "Option::is_none"
)]
pub has_dynamic_value_information: Option<bool>,
#[doc = "Identifier for the subscription input"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[doc = "Mode in which the value of this input should be entered"]
#[serde(rename = "inputMode", default, skip_serializing_if = "Option::is_none")]
pub input_mode: Option<input_descriptor::InputMode>,
#[doc = "Gets whether this input is confidential, such as for a password or application key"]
#[serde(
rename = "isConfidential",
default,
skip_serializing_if = "Option::is_none"
)]
pub is_confidential: Option<bool>,
#[doc = "Localized name which can be shown as a label for the subscription input"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[doc = "Custom properties for the input which can be used by the service provider"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub properties: Option<serde_json::Value>,
#[doc = "Underlying data type for the input value. When this value is specified, InputMode, Validation and Values are optional."]
#[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
#[doc = "Gets whether this input is included in the default generated action description."]
#[serde(
rename = "useInDefaultDescription",
default,
skip_serializing_if = "Option::is_none"
)]
pub use_in_default_description: Option<bool>,
#[doc = "Describes what values are valid for a subscription input"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub validation: Option<InputValidation>,
#[doc = "A hint for input value. It can be used in the UI as the input placeholder."]
#[serde(rename = "valueHint", default, skip_serializing_if = "Option::is_none")]
pub value_hint: Option<String>,
#[doc = "Information about the possible/allowed values for a given subscription input"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub values: Option<InputValues>,
}
impl InputDescriptor {
pub fn new() -> Self {
Self::default()
}
}
pub mod input_descriptor {
use super::*;
#[doc = "Mode in which the value of this input should be entered"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum InputMode {
#[serde(rename = "none")]
None,
#[serde(rename = "textBox")]
TextBox,
#[serde(rename = "passwordBox")]
PasswordBox,
#[serde(rename = "combo")]
Combo,
#[serde(rename = "radioButtons")]
RadioButtons,
#[serde(rename = "checkBox")]
CheckBox,
#[serde(rename = "textArea")]
TextArea,
}
}
#[doc = "Describes what values are valid for a subscription input"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct InputValidation {
#[doc = "Gets or sets the data type to validate."]
#[serde(rename = "dataType", default, skip_serializing_if = "Option::is_none")]
pub data_type: Option<input_validation::DataType>,
#[doc = "Gets or sets if this is a required field."]
#[serde(
rename = "isRequired",
default,
skip_serializing_if = "Option::is_none"
)]
pub is_required: Option<bool>,
#[doc = "Gets or sets the maximum length of this descriptor."]
#[serde(rename = "maxLength", default, skip_serializing_if = "Option::is_none")]
pub max_length: Option<i32>,
#[doc = "Gets or sets the minimum value for this descriptor."]
#[serde(rename = "maxValue", default, skip_serializing_if = "Option::is_none")]
pub max_value: Option<String>,
#[doc = "Gets or sets the minimum length of this descriptor."]
#[serde(rename = "minLength", default, skip_serializing_if = "Option::is_none")]
pub min_length: Option<i32>,
#[doc = "Gets or sets the minimum value for this descriptor."]
#[serde(rename = "minValue", default, skip_serializing_if = "Option::is_none")]
pub min_value: Option<String>,
#[doc = "Gets or sets the pattern to validate."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub pattern: Option<String>,
#[doc = "Gets or sets the error on pattern mismatch."]
#[serde(
rename = "patternMismatchErrorMessage",
default,
skip_serializing_if = "Option::is_none"
)]
pub pattern_mismatch_error_message: Option<String>,
}
impl InputValidation {
pub fn new() -> Self {
Self::default()
}
}
pub mod input_validation {
use super::*;
#[doc = "Gets or sets the data type to validate."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum DataType {
#[serde(rename = "none")]
None,
#[serde(rename = "string")]
String,
#[serde(rename = "number")]
Number,
#[serde(rename = "boolean")]
Boolean,
#[serde(rename = "guid")]
Guid,
#[serde(rename = "uri")]
Uri,
}
}
#[doc = "Information about a single value for an input"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct InputValue {
#[doc = "Any other data about this input"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub data: Option<serde_json::Value>,
#[doc = "The text to show for the display of this value"]
#[serde(
rename = "displayValue",
default,
skip_serializing_if = "Option::is_none"
)]
pub display_value: Option<String>,
#[doc = "The value to store for this input"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
impl InputValue {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Information about the possible/allowed values for a given subscription input"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct InputValues {
#[doc = "The default value to use for this input"]
#[serde(
rename = "defaultValue",
default,
skip_serializing_if = "Option::is_none"
)]
pub default_value: Option<String>,
#[doc = "Error information related to a subscription input value."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub error: Option<InputValuesError>,
#[doc = "The id of the input"]
#[serde(rename = "inputId", default, skip_serializing_if = "Option::is_none")]
pub input_id: Option<String>,
#[doc = "Should this input be disabled"]
#[serde(
rename = "isDisabled",
default,
skip_serializing_if = "Option::is_none"
)]
pub is_disabled: Option<bool>,
#[doc = "Should the value be restricted to one of the values in the PossibleValues (True) or are the values in PossibleValues just a suggestion (False)"]
#[serde(
rename = "isLimitedToPossibleValues",
default,
skip_serializing_if = "Option::is_none"
)]
pub is_limited_to_possible_values: Option<bool>,
#[doc = "Should this input be made read-only"]
#[serde(
rename = "isReadOnly",
default,
skip_serializing_if = "Option::is_none"
)]
pub is_read_only: Option<bool>,
#[doc = "Possible values that this input can take"]
#[serde(
rename = "possibleValues",
default,
deserialize_with = "crate::serde::deserialize_null_as_default",
skip_serializing_if = "Vec::is_empty"
)]
pub possible_values: Vec<InputValue>,
}
impl InputValues {
pub fn new() -> Self {
Self::default()
}
}