File: _models_py3.py

package info (click to toggle)
python-azure 20250603%2Bgit-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 851,724 kB
  • sloc: python: 7,362,925; ansic: 804; javascript: 287; makefile: 195; sh: 145; xml: 109
file content (1381 lines) | stat: -rw-r--r-- 56,742 bytes parent folder | download | duplicates (2)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
# coding=utf-8
# pylint: disable=too-many-lines
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

import datetime
import sys
from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union

from .. import _serialization

if sys.version_info >= (3, 9):
    from collections.abc import MutableMapping
else:
    from typing import MutableMapping  # type: ignore  # pylint: disable=ungrouped-imports

if TYPE_CHECKING:
    # pylint: disable=unused-import,ungrouped-imports
    from .. import models as _models
JSON = MutableMapping[str, Any]  # pylint: disable=unsubscriptable-object


class Column(_serialization.Model):
    """Query result column descriptor.

    All required parameters must be populated in order to send to Azure.

    :ivar name: Column name. Required.
    :vartype name: str
    :ivar type: Column data type. Required. Known values are: "string", "integer", "number",
     "boolean", "object", and "datetime".
    :vartype type: str or ~azure.mgmt.resourcegraph.models.ColumnDataType
    """

    _validation = {
        "name": {"required": True},
        "type": {"required": True},
    }

    _attribute_map = {
        "name": {"key": "name", "type": "str"},
        "type": {"key": "type", "type": "str"},
    }

    def __init__(self, *, name: str, type: Union[str, "_models.ColumnDataType"], **kwargs):
        """
        :keyword name: Column name. Required.
        :paramtype name: str
        :keyword type: Column data type. Required. Known values are: "string", "integer", "number",
         "boolean", "object", and "datetime".
        :paramtype type: str or ~azure.mgmt.resourcegraph.models.ColumnDataType
        """
        super().__init__(**kwargs)
        self.name = name
        self.type = type


class DateTimeInterval(_serialization.Model):
    """An interval in time specifying the date and time for the inclusive start and exclusive end, i.e. ``[start, end)``.

    All required parameters must be populated in order to send to Azure.

    :ivar start: A datetime indicating the inclusive/closed start of the time interval, i.e. ``[``\
     **\ ``start``\ **\ ``, end)``. Specifying a ``start`` that occurs chronologically after ``end``
     will result in an error. Required.
    :vartype start: ~datetime.datetime
    :ivar end: A datetime indicating the exclusive/open end of the time interval, i.e. ``[start,``\
     **\ ``end``\ **\ ``)``. Specifying an ``end`` that occurs chronologically before ``start`` will
     result in an error. Required.
    :vartype end: ~datetime.datetime
    """

    _validation = {
        "start": {"required": True},
        "end": {"required": True},
    }

    _attribute_map = {
        "start": {"key": "start", "type": "iso-8601"},
        "end": {"key": "end", "type": "iso-8601"},
    }

    def __init__(self, *, start: datetime.datetime, end: datetime.datetime, **kwargs):
        """
        :keyword start: A datetime indicating the inclusive/closed start of the time interval, i.e.
         ``[``\ **\ ``start``\ **\ ``, end)``. Specifying a ``start`` that occurs chronologically after
         ``end`` will result in an error. Required.
        :paramtype start: ~datetime.datetime
        :keyword end: A datetime indicating the exclusive/open end of the time interval, i.e.
         ``[start,``\ **\ ``end``\ **\ ``)``. Specifying an ``end`` that occurs chronologically before
         ``start`` will result in an error. Required.
        :paramtype end: ~datetime.datetime
        """
        super().__init__(**kwargs)
        self.start = start
        self.end = end


class Error(_serialization.Model):
    """Error details.

    All required parameters must be populated in order to send to Azure.

    :ivar code: Error code identifying the specific error. Required.
    :vartype code: str
    :ivar message: A human readable error message. Required.
    :vartype message: str
    :ivar details: Error details.
    :vartype details: list[~azure.mgmt.resourcegraph.models.ErrorDetails]
    """

    _validation = {
        "code": {"required": True},
        "message": {"required": True},
    }

    _attribute_map = {
        "code": {"key": "code", "type": "str"},
        "message": {"key": "message", "type": "str"},
        "details": {"key": "details", "type": "[ErrorDetails]"},
    }

    def __init__(self, *, code: str, message: str, details: Optional[List["_models.ErrorDetails"]] = None, **kwargs):
        """
        :keyword code: Error code identifying the specific error. Required.
        :paramtype code: str
        :keyword message: A human readable error message. Required.
        :paramtype message: str
        :keyword details: Error details.
        :paramtype details: list[~azure.mgmt.resourcegraph.models.ErrorDetails]
        """
        super().__init__(**kwargs)
        self.code = code
        self.message = message
        self.details = details


class ErrorDetails(_serialization.Model):
    """Error details.

    All required parameters must be populated in order to send to Azure.

    :ivar additional_properties: Unmatched properties from the message are deserialized to this
     collection.
    :vartype additional_properties: dict[str, JSON]
    :ivar code: Error code identifying the specific error. Required.
    :vartype code: str
    :ivar message: A human readable error message. Required.
    :vartype message: str
    """

    _validation = {
        "code": {"required": True},
        "message": {"required": True},
    }

    _attribute_map = {
        "additional_properties": {"key": "", "type": "{object}"},
        "code": {"key": "code", "type": "str"},
        "message": {"key": "message", "type": "str"},
    }

    def __init__(self, *, code: str, message: str, additional_properties: Optional[Dict[str, JSON]] = None, **kwargs):
        """
        :keyword additional_properties: Unmatched properties from the message are deserialized to this
         collection.
        :paramtype additional_properties: dict[str, JSON]
        :keyword code: Error code identifying the specific error. Required.
        :paramtype code: str
        :keyword message: A human readable error message. Required.
        :paramtype message: str
        """
        super().__init__(**kwargs)
        self.additional_properties = additional_properties
        self.code = code
        self.message = message


class ErrorResponse(_serialization.Model):
    """An error response from the API.

    All required parameters must be populated in order to send to Azure.

    :ivar error: Error information. Required.
    :vartype error: ~azure.mgmt.resourcegraph.models.Error
    """

    _validation = {
        "error": {"required": True},
    }

    _attribute_map = {
        "error": {"key": "error", "type": "Error"},
    }

    def __init__(self, *, error: "_models.Error", **kwargs):
        """
        :keyword error: Error information. Required.
        :paramtype error: ~azure.mgmt.resourcegraph.models.Error
        """
        super().__init__(**kwargs)
        self.error = error


class Facet(_serialization.Model):
    """A facet containing additional statistics on the response of a query. Can be either FacetResult or FacetError.

    You probably want to use the sub-classes and not this class directly. Known sub-classes are:
    FacetError, FacetResult

    All required parameters must be populated in order to send to Azure.

    :ivar expression: Facet expression, same as in the corresponding facet request. Required.
    :vartype expression: str
    :ivar result_type: Result type. Required.
    :vartype result_type: str
    """

    _validation = {
        "expression": {"required": True},
        "result_type": {"required": True},
    }

    _attribute_map = {
        "expression": {"key": "expression", "type": "str"},
        "result_type": {"key": "resultType", "type": "str"},
    }

    _subtype_map = {"result_type": {"FacetError": "FacetError", "FacetResult": "FacetResult"}}

    def __init__(self, *, expression: str, **kwargs):
        """
        :keyword expression: Facet expression, same as in the corresponding facet request. Required.
        :paramtype expression: str
        """
        super().__init__(**kwargs)
        self.expression = expression
        self.result_type: Optional[str] = None


class FacetError(Facet):
    """A facet whose execution resulted in an error.

    All required parameters must be populated in order to send to Azure.

    :ivar expression: Facet expression, same as in the corresponding facet request. Required.
    :vartype expression: str
    :ivar result_type: Result type. Required.
    :vartype result_type: str
    :ivar errors: An array containing detected facet errors with details. Required.
    :vartype errors: list[~azure.mgmt.resourcegraph.models.ErrorDetails]
    """

    _validation = {
        "expression": {"required": True},
        "result_type": {"required": True},
        "errors": {"required": True},
    }

    _attribute_map = {
        "expression": {"key": "expression", "type": "str"},
        "result_type": {"key": "resultType", "type": "str"},
        "errors": {"key": "errors", "type": "[ErrorDetails]"},
    }

    def __init__(self, *, expression: str, errors: List["_models.ErrorDetails"], **kwargs):
        """
        :keyword expression: Facet expression, same as in the corresponding facet request. Required.
        :paramtype expression: str
        :keyword errors: An array containing detected facet errors with details. Required.
        :paramtype errors: list[~azure.mgmt.resourcegraph.models.ErrorDetails]
        """
        super().__init__(expression=expression, **kwargs)
        self.result_type: str = "FacetError"
        self.errors = errors


class FacetRequest(_serialization.Model):
    """A request to compute additional statistics (facets) over the query results.

    All required parameters must be populated in order to send to Azure.

    :ivar expression: The column or list of columns to summarize by. Required.
    :vartype expression: str
    :ivar options: The options for facet evaluation.
    :vartype options: ~azure.mgmt.resourcegraph.models.FacetRequestOptions
    """

    _validation = {
        "expression": {"required": True},
    }

    _attribute_map = {
        "expression": {"key": "expression", "type": "str"},
        "options": {"key": "options", "type": "FacetRequestOptions"},
    }

    def __init__(self, *, expression: str, options: Optional["_models.FacetRequestOptions"] = None, **kwargs):
        """
        :keyword expression: The column or list of columns to summarize by. Required.
        :paramtype expression: str
        :keyword options: The options for facet evaluation.
        :paramtype options: ~azure.mgmt.resourcegraph.models.FacetRequestOptions
        """
        super().__init__(**kwargs)
        self.expression = expression
        self.options = options


class FacetRequestOptions(_serialization.Model):
    """The options for facet evaluation.

    :ivar sort_by: The column name or query expression to sort on. Defaults to count if not
     present.
    :vartype sort_by: str
    :ivar sort_order: The sorting order by the selected column (count by default). Known values
     are: "asc" and "desc".
    :vartype sort_order: str or ~azure.mgmt.resourcegraph.models.FacetSortOrder
    :ivar filter: Specifies the filter condition for the 'where' clause which will be run on main
     query's result, just before the actual faceting.
    :vartype filter: str
    :ivar top: The maximum number of facet rows that should be returned.
    :vartype top: int
    """

    _validation = {
        "top": {"maximum": 1000, "minimum": 1},
    }

    _attribute_map = {
        "sort_by": {"key": "sortBy", "type": "str"},
        "sort_order": {"key": "sortOrder", "type": "str"},
        "filter": {"key": "filter", "type": "str"},
        "top": {"key": "$top", "type": "int"},
    }

    def __init__(
        self,
        *,
        sort_by: Optional[str] = None,
        sort_order: Union[str, "_models.FacetSortOrder"] = "desc",
        filter: Optional[str] = None,  # pylint: disable=redefined-builtin
        top: Optional[int] = None,
        **kwargs
    ):
        """
        :keyword sort_by: The column name or query expression to sort on. Defaults to count if not
         present.
        :paramtype sort_by: str
        :keyword sort_order: The sorting order by the selected column (count by default). Known values
         are: "asc" and "desc".
        :paramtype sort_order: str or ~azure.mgmt.resourcegraph.models.FacetSortOrder
        :keyword filter: Specifies the filter condition for the 'where' clause which will be run on
         main query's result, just before the actual faceting.
        :paramtype filter: str
        :keyword top: The maximum number of facet rows that should be returned.
        :paramtype top: int
        """
        super().__init__(**kwargs)
        self.sort_by = sort_by
        self.sort_order = sort_order
        self.filter = filter
        self.top = top


class FacetResult(Facet):
    """Successfully executed facet containing additional statistics on the response of a query.

    All required parameters must be populated in order to send to Azure.

    :ivar expression: Facet expression, same as in the corresponding facet request. Required.
    :vartype expression: str
    :ivar result_type: Result type. Required.
    :vartype result_type: str
    :ivar total_records: Number of total records in the facet results. Required.
    :vartype total_records: int
    :ivar count: Number of records returned in the facet response. Required.
    :vartype count: int
    :ivar data: A JObject array or Table containing the desired facets. Only present if the facet
     is valid. Required.
    :vartype data: JSON
    """

    _validation = {
        "expression": {"required": True},
        "result_type": {"required": True},
        "total_records": {"required": True},
        "count": {"required": True},
        "data": {"required": True},
    }

    _attribute_map = {
        "expression": {"key": "expression", "type": "str"},
        "result_type": {"key": "resultType", "type": "str"},
        "total_records": {"key": "totalRecords", "type": "int"},
        "count": {"key": "count", "type": "int"},
        "data": {"key": "data", "type": "object"},
    }

    def __init__(self, *, expression: str, total_records: int, count: int, data: JSON, **kwargs):
        """
        :keyword expression: Facet expression, same as in the corresponding facet request. Required.
        :paramtype expression: str
        :keyword total_records: Number of total records in the facet results. Required.
        :paramtype total_records: int
        :keyword count: Number of records returned in the facet response. Required.
        :paramtype count: int
        :keyword data: A JObject array or Table containing the desired facets. Only present if the
         facet is valid. Required.
        :paramtype data: JSON
        """
        super().__init__(expression=expression, **kwargs)
        self.result_type: str = "FacetResult"
        self.total_records = total_records
        self.count = count
        self.data = data


class Operation(_serialization.Model):
    """Resource Graph REST API operation definition.

    :ivar name: Operation name: {provider}/{resource}/{operation}.
    :vartype name: str
    :ivar display: Display metadata associated with the operation.
    :vartype display: ~azure.mgmt.resourcegraph.models.OperationDisplay
    :ivar origin: The origin of operations.
    :vartype origin: str
    """

    _attribute_map = {
        "name": {"key": "name", "type": "str"},
        "display": {"key": "display", "type": "OperationDisplay"},
        "origin": {"key": "origin", "type": "str"},
    }

    def __init__(
        self,
        *,
        name: Optional[str] = None,
        display: Optional["_models.OperationDisplay"] = None,
        origin: Optional[str] = None,
        **kwargs
    ):
        """
        :keyword name: Operation name: {provider}/{resource}/{operation}.
        :paramtype name: str
        :keyword display: Display metadata associated with the operation.
        :paramtype display: ~azure.mgmt.resourcegraph.models.OperationDisplay
        :keyword origin: The origin of operations.
        :paramtype origin: str
        """
        super().__init__(**kwargs)
        self.name = name
        self.display = display
        self.origin = origin


class OperationDisplay(_serialization.Model):
    """Display metadata associated with the operation.

    :ivar provider: Service provider: Microsoft Resource Graph.
    :vartype provider: str
    :ivar resource: Resource on which the operation is performed etc.
    :vartype resource: str
    :ivar operation: Type of operation: get, read, delete, etc.
    :vartype operation: str
    :ivar description: Description for the operation.
    :vartype description: str
    """

    _attribute_map = {
        "provider": {"key": "provider", "type": "str"},
        "resource": {"key": "resource", "type": "str"},
        "operation": {"key": "operation", "type": "str"},
        "description": {"key": "description", "type": "str"},
    }

    def __init__(
        self,
        *,
        provider: Optional[str] = None,
        resource: Optional[str] = None,
        operation: Optional[str] = None,
        description: Optional[str] = None,
        **kwargs
    ):
        """
        :keyword provider: Service provider: Microsoft Resource Graph.
        :paramtype provider: str
        :keyword resource: Resource on which the operation is performed etc.
        :paramtype resource: str
        :keyword operation: Type of operation: get, read, delete, etc.
        :paramtype operation: str
        :keyword description: Description for the operation.
        :paramtype description: str
        """
        super().__init__(**kwargs)
        self.provider = provider
        self.resource = resource
        self.operation = operation
        self.description = description


class OperationListResult(_serialization.Model):
    """Result of the request to list Resource Graph operations. It contains a list of operations and a URL link to get the next set of results.

    :ivar value: List of Resource Graph operations supported by the Resource Graph resource
     provider.
    :vartype value: list[~azure.mgmt.resourcegraph.models.Operation]
    """

    _attribute_map = {
        "value": {"key": "value", "type": "[Operation]"},
    }

    def __init__(self, *, value: Optional[List["_models.Operation"]] = None, **kwargs):
        """
        :keyword value: List of Resource Graph operations supported by the Resource Graph resource
         provider.
        :paramtype value: list[~azure.mgmt.resourcegraph.models.Operation]
        """
        super().__init__(**kwargs)
        self.value = value


class QueryRequest(_serialization.Model):
    """Describes a query to be executed.

    All required parameters must be populated in order to send to Azure.

    :ivar subscriptions: Azure subscriptions against which to execute the query.
    :vartype subscriptions: list[str]
    :ivar management_groups: Azure management groups against which to execute the query. Example: [
     'mg1', 'mg2' ].
    :vartype management_groups: list[str]
    :ivar query: The resources query. Required.
    :vartype query: str
    :ivar options: The query evaluation options.
    :vartype options: ~azure.mgmt.resourcegraph.models.QueryRequestOptions
    :ivar facets: An array of facet requests to be computed against the query result.
    :vartype facets: list[~azure.mgmt.resourcegraph.models.FacetRequest]
    """

    _validation = {
        "query": {"required": True},
    }

    _attribute_map = {
        "subscriptions": {"key": "subscriptions", "type": "[str]"},
        "management_groups": {"key": "managementGroups", "type": "[str]"},
        "query": {"key": "query", "type": "str"},
        "options": {"key": "options", "type": "QueryRequestOptions"},
        "facets": {"key": "facets", "type": "[FacetRequest]"},
    }

    def __init__(
        self,
        *,
        query: str,
        subscriptions: Optional[List[str]] = None,
        management_groups: Optional[List[str]] = None,
        options: Optional["_models.QueryRequestOptions"] = None,
        facets: Optional[List["_models.FacetRequest"]] = None,
        **kwargs
    ):
        """
        :keyword subscriptions: Azure subscriptions against which to execute the query.
        :paramtype subscriptions: list[str]
        :keyword management_groups: Azure management groups against which to execute the query.
         Example: [ 'mg1', 'mg2' ].
        :paramtype management_groups: list[str]
        :keyword query: The resources query. Required.
        :paramtype query: str
        :keyword options: The query evaluation options.
        :paramtype options: ~azure.mgmt.resourcegraph.models.QueryRequestOptions
        :keyword facets: An array of facet requests to be computed against the query result.
        :paramtype facets: list[~azure.mgmt.resourcegraph.models.FacetRequest]
        """
        super().__init__(**kwargs)
        self.subscriptions = subscriptions
        self.management_groups = management_groups
        self.query = query
        self.options = options
        self.facets = facets


class QueryRequestOptions(_serialization.Model):
    """The options for query evaluation.

    :ivar skip_token: Continuation token for pagination, capturing the next page size and offset,
     as well as the context of the query.
    :vartype skip_token: str
    :ivar top: The maximum number of rows that the query should return. Overrides the page size
     when ``$skipToken`` property is present.
    :vartype top: int
    :ivar skip: The number of rows to skip from the beginning of the results. Overrides the next
     page offset when ``$skipToken`` property is present.
    :vartype skip: int
    :ivar result_format: Defines in which format query result returned. Known values are: "table"
     and "objectArray".
    :vartype result_format: str or ~azure.mgmt.resourcegraph.models.ResultFormat
    :ivar allow_partial_scopes: Only applicable for tenant and management group level queries to
     decide whether to allow partial scopes for result in case the number of subscriptions exceed
     allowed limits.
    :vartype allow_partial_scopes: bool
    :ivar authorization_scope_filter: Defines what level of authorization resources should be
     returned based on the which subscriptions and management groups are passed as scopes. Known
     values are: "AtScopeAndBelow", "AtScopeAndAbove", "AtScopeExact", and "AtScopeAboveAndBelow".
    :vartype authorization_scope_filter: str or
     ~azure.mgmt.resourcegraph.models.AuthorizationScopeFilter
    """

    _validation = {
        "top": {"maximum": 1000, "minimum": 1},
        "skip": {"minimum": 0},
    }

    _attribute_map = {
        "skip_token": {"key": "$skipToken", "type": "str"},
        "top": {"key": "$top", "type": "int"},
        "skip": {"key": "$skip", "type": "int"},
        "result_format": {"key": "resultFormat", "type": "str"},
        "allow_partial_scopes": {"key": "allowPartialScopes", "type": "bool"},
        "authorization_scope_filter": {"key": "authorizationScopeFilter", "type": "str"},
    }

    def __init__(
        self,
        *,
        skip_token: Optional[str] = None,
        top: Optional[int] = None,
        skip: Optional[int] = None,
        result_format: Optional[Union[str, "_models.ResultFormat"]] = None,
        allow_partial_scopes: bool = False,
        authorization_scope_filter: Union[str, "_models.AuthorizationScopeFilter"] = "AtScopeAndBelow",
        **kwargs
    ):
        """
        :keyword skip_token: Continuation token for pagination, capturing the next page size and
         offset, as well as the context of the query.
        :paramtype skip_token: str
        :keyword top: The maximum number of rows that the query should return. Overrides the page size
         when ``$skipToken`` property is present.
        :paramtype top: int
        :keyword skip: The number of rows to skip from the beginning of the results. Overrides the next
         page offset when ``$skipToken`` property is present.
        :paramtype skip: int
        :keyword result_format: Defines in which format query result returned. Known values are:
         "table" and "objectArray".
        :paramtype result_format: str or ~azure.mgmt.resourcegraph.models.ResultFormat
        :keyword allow_partial_scopes: Only applicable for tenant and management group level queries to
         decide whether to allow partial scopes for result in case the number of subscriptions exceed
         allowed limits.
        :paramtype allow_partial_scopes: bool
        :keyword authorization_scope_filter: Defines what level of authorization resources should be
         returned based on the which subscriptions and management groups are passed as scopes. Known
         values are: "AtScopeAndBelow", "AtScopeAndAbove", "AtScopeExact", and "AtScopeAboveAndBelow".
        :paramtype authorization_scope_filter: str or
         ~azure.mgmt.resourcegraph.models.AuthorizationScopeFilter
        """
        super().__init__(**kwargs)
        self.skip_token = skip_token
        self.top = top
        self.skip = skip
        self.result_format = result_format
        self.allow_partial_scopes = allow_partial_scopes
        self.authorization_scope_filter = authorization_scope_filter


class QueryResponse(_serialization.Model):
    """Query result.

    All required parameters must be populated in order to send to Azure.

    :ivar total_records: Number of total records matching the query. Required.
    :vartype total_records: int
    :ivar count: Number of records returned in the current response. In the case of paging, this is
     the number of records in the current page. Required.
    :vartype count: int
    :ivar result_truncated: Indicates whether the query results are truncated. Required. Known
     values are: "true" and "false".
    :vartype result_truncated: str or ~azure.mgmt.resourcegraph.models.ResultTruncated
    :ivar skip_token: When present, the value can be passed to a subsequent query call (together
     with the same query and scopes used in the current request) to retrieve the next page of data.
    :vartype skip_token: str
    :ivar data: Query output in JObject array or Table format. Required.
    :vartype data: JSON
    :ivar facets: Query facets.
    :vartype facets: list[~azure.mgmt.resourcegraph.models.Facet]
    """

    _validation = {
        "total_records": {"required": True},
        "count": {"required": True},
        "result_truncated": {"required": True},
        "data": {"required": True},
    }

    _attribute_map = {
        "total_records": {"key": "totalRecords", "type": "int"},
        "count": {"key": "count", "type": "int"},
        "result_truncated": {"key": "resultTruncated", "type": "str"},
        "skip_token": {"key": "$skipToken", "type": "str"},
        "data": {"key": "data", "type": "object"},
        "facets": {"key": "facets", "type": "[Facet]"},
    }

    def __init__(
        self,
        *,
        total_records: int,
        count: int,
        result_truncated: Union[str, "_models.ResultTruncated"],
        data: JSON,
        skip_token: Optional[str] = None,
        facets: Optional[List["_models.Facet"]] = None,
        **kwargs
    ):
        """
        :keyword total_records: Number of total records matching the query. Required.
        :paramtype total_records: int
        :keyword count: Number of records returned in the current response. In the case of paging, this
         is the number of records in the current page. Required.
        :paramtype count: int
        :keyword result_truncated: Indicates whether the query results are truncated. Required. Known
         values are: "true" and "false".
        :paramtype result_truncated: str or ~azure.mgmt.resourcegraph.models.ResultTruncated
        :keyword skip_token: When present, the value can be passed to a subsequent query call (together
         with the same query and scopes used in the current request) to retrieve the next page of data.
        :paramtype skip_token: str
        :keyword data: Query output in JObject array or Table format. Required.
        :paramtype data: JSON
        :keyword facets: Query facets.
        :paramtype facets: list[~azure.mgmt.resourcegraph.models.Facet]
        """
        super().__init__(**kwargs)
        self.total_records = total_records
        self.count = count
        self.result_truncated = result_truncated
        self.skip_token = skip_token
        self.data = data
        self.facets = facets


class ResourceChangeData(_serialization.Model):
    """Data on a specific change, represented by a pair of before and after resource snapshots.

    All required parameters must be populated in order to send to Azure.

    :ivar resource_id: The resource for a change.
    :vartype resource_id: str
    :ivar change_id: The change ID. Valid and unique within the specified resource only. Required.
    :vartype change_id: str
    :ivar before_snapshot: The snapshot before the change. Required.
    :vartype before_snapshot: ~azure.mgmt.resourcegraph.models.ResourceChangeDataBeforeSnapshot
    :ivar after_snapshot: The snapshot after the change. Required.
    :vartype after_snapshot: ~azure.mgmt.resourcegraph.models.ResourceChangeDataAfterSnapshot
    :ivar change_type: The change type for snapshot. PropertyChanges will be provided in case of
     Update change type. Known values are: "Create", "Update", and "Delete".
    :vartype change_type: str or ~azure.mgmt.resourcegraph.models.ChangeType
    :ivar property_changes: An array of resource property change.
    :vartype property_changes: list[~azure.mgmt.resourcegraph.models.ResourcePropertyChange]
    """

    _validation = {
        "change_id": {"required": True},
        "before_snapshot": {"required": True},
        "after_snapshot": {"required": True},
    }

    _attribute_map = {
        "resource_id": {"key": "resourceId", "type": "str"},
        "change_id": {"key": "changeId", "type": "str"},
        "before_snapshot": {"key": "beforeSnapshot", "type": "ResourceChangeDataBeforeSnapshot"},
        "after_snapshot": {"key": "afterSnapshot", "type": "ResourceChangeDataAfterSnapshot"},
        "change_type": {"key": "changeType", "type": "str"},
        "property_changes": {"key": "propertyChanges", "type": "[ResourcePropertyChange]"},
    }

    def __init__(
        self,
        *,
        change_id: str,
        before_snapshot: "_models.ResourceChangeDataBeforeSnapshot",
        after_snapshot: "_models.ResourceChangeDataAfterSnapshot",
        resource_id: Optional[str] = None,
        change_type: Optional[Union[str, "_models.ChangeType"]] = None,
        property_changes: Optional[List["_models.ResourcePropertyChange"]] = None,
        **kwargs
    ):
        """
        :keyword resource_id: The resource for a change.
        :paramtype resource_id: str
        :keyword change_id: The change ID. Valid and unique within the specified resource only.
         Required.
        :paramtype change_id: str
        :keyword before_snapshot: The snapshot before the change. Required.
        :paramtype before_snapshot: ~azure.mgmt.resourcegraph.models.ResourceChangeDataBeforeSnapshot
        :keyword after_snapshot: The snapshot after the change. Required.
        :paramtype after_snapshot: ~azure.mgmt.resourcegraph.models.ResourceChangeDataAfterSnapshot
        :keyword change_type: The change type for snapshot. PropertyChanges will be provided in case of
         Update change type. Known values are: "Create", "Update", and "Delete".
        :paramtype change_type: str or ~azure.mgmt.resourcegraph.models.ChangeType
        :keyword property_changes: An array of resource property change.
        :paramtype property_changes: list[~azure.mgmt.resourcegraph.models.ResourcePropertyChange]
        """
        super().__init__(**kwargs)
        self.resource_id = resource_id
        self.change_id = change_id
        self.before_snapshot = before_snapshot
        self.after_snapshot = after_snapshot
        self.change_type = change_type
        self.property_changes = property_changes


class ResourceSnapshotData(_serialization.Model):
    """Data on a specific resource snapshot.

    All required parameters must be populated in order to send to Azure.

    :ivar snapshot_id: The ID of the snapshot.
    :vartype snapshot_id: str
    :ivar timestamp: The time when the snapshot was created.
     The snapshot timestamp provides an approximation as to when a modification to a resource was
     detected.  There can be a difference between the actual modification time and the detection
     time.  This is due to differences in how operations that modify a resource are processed,
     versus how operation that record resource snapshots are processed. Required.
    :vartype timestamp: ~datetime.datetime
    :ivar content: The resource snapshot content (in resourceChangeDetails response only).
    :vartype content: JSON
    """

    _validation = {
        "timestamp": {"required": True},
    }

    _attribute_map = {
        "snapshot_id": {"key": "snapshotId", "type": "str"},
        "timestamp": {"key": "timestamp", "type": "iso-8601"},
        "content": {"key": "content", "type": "object"},
    }

    def __init__(
        self,
        *,
        timestamp: datetime.datetime,
        snapshot_id: Optional[str] = None,
        content: Optional[JSON] = None,
        **kwargs
    ):
        """
        :keyword snapshot_id: The ID of the snapshot.
        :paramtype snapshot_id: str
        :keyword timestamp: The time when the snapshot was created.
         The snapshot timestamp provides an approximation as to when a modification to a resource was
         detected.  There can be a difference between the actual modification time and the detection
         time.  This is due to differences in how operations that modify a resource are processed,
         versus how operation that record resource snapshots are processed. Required.
        :paramtype timestamp: ~datetime.datetime
        :keyword content: The resource snapshot content (in resourceChangeDetails response only).
        :paramtype content: JSON
        """
        super().__init__(**kwargs)
        self.snapshot_id = snapshot_id
        self.timestamp = timestamp
        self.content = content


class ResourceChangeDataAfterSnapshot(ResourceSnapshotData):
    """The snapshot after the change.

    All required parameters must be populated in order to send to Azure.

    :ivar snapshot_id: The ID of the snapshot.
    :vartype snapshot_id: str
    :ivar timestamp: The time when the snapshot was created.
     The snapshot timestamp provides an approximation as to when a modification to a resource was
     detected.  There can be a difference between the actual modification time and the detection
     time.  This is due to differences in how operations that modify a resource are processed,
     versus how operation that record resource snapshots are processed. Required.
    :vartype timestamp: ~datetime.datetime
    :ivar content: The resource snapshot content (in resourceChangeDetails response only).
    :vartype content: JSON
    """

    _validation = {
        "timestamp": {"required": True},
    }

    _attribute_map = {
        "snapshot_id": {"key": "snapshotId", "type": "str"},
        "timestamp": {"key": "timestamp", "type": "iso-8601"},
        "content": {"key": "content", "type": "object"},
    }

    def __init__(
        self,
        *,
        timestamp: datetime.datetime,
        snapshot_id: Optional[str] = None,
        content: Optional[JSON] = None,
        **kwargs
    ):
        """
        :keyword snapshot_id: The ID of the snapshot.
        :paramtype snapshot_id: str
        :keyword timestamp: The time when the snapshot was created.
         The snapshot timestamp provides an approximation as to when a modification to a resource was
         detected.  There can be a difference between the actual modification time and the detection
         time.  This is due to differences in how operations that modify a resource are processed,
         versus how operation that record resource snapshots are processed. Required.
        :paramtype timestamp: ~datetime.datetime
        :keyword content: The resource snapshot content (in resourceChangeDetails response only).
        :paramtype content: JSON
        """
        super().__init__(snapshot_id=snapshot_id, timestamp=timestamp, content=content, **kwargs)


class ResourceChangeDataBeforeSnapshot(ResourceSnapshotData):
    """The snapshot before the change.

    All required parameters must be populated in order to send to Azure.

    :ivar snapshot_id: The ID of the snapshot.
    :vartype snapshot_id: str
    :ivar timestamp: The time when the snapshot was created.
     The snapshot timestamp provides an approximation as to when a modification to a resource was
     detected.  There can be a difference between the actual modification time and the detection
     time.  This is due to differences in how operations that modify a resource are processed,
     versus how operation that record resource snapshots are processed. Required.
    :vartype timestamp: ~datetime.datetime
    :ivar content: The resource snapshot content (in resourceChangeDetails response only).
    :vartype content: JSON
    """

    _validation = {
        "timestamp": {"required": True},
    }

    _attribute_map = {
        "snapshot_id": {"key": "snapshotId", "type": "str"},
        "timestamp": {"key": "timestamp", "type": "iso-8601"},
        "content": {"key": "content", "type": "object"},
    }

    def __init__(
        self,
        *,
        timestamp: datetime.datetime,
        snapshot_id: Optional[str] = None,
        content: Optional[JSON] = None,
        **kwargs
    ):
        """
        :keyword snapshot_id: The ID of the snapshot.
        :paramtype snapshot_id: str
        :keyword timestamp: The time when the snapshot was created.
         The snapshot timestamp provides an approximation as to when a modification to a resource was
         detected.  There can be a difference between the actual modification time and the detection
         time.  This is due to differences in how operations that modify a resource are processed,
         versus how operation that record resource snapshots are processed. Required.
        :paramtype timestamp: ~datetime.datetime
        :keyword content: The resource snapshot content (in resourceChangeDetails response only).
        :paramtype content: JSON
        """
        super().__init__(snapshot_id=snapshot_id, timestamp=timestamp, content=content, **kwargs)


class ResourceChangeDetailsRequestParameters(_serialization.Model):
    """The parameters for a specific change details request.

    All required parameters must be populated in order to send to Azure.

    :ivar resource_ids: Specifies the list of resources for a change details request. Required.
    :vartype resource_ids: list[str]
    :ivar change_ids: Specifies the list of change IDs for a change details request. Required.
    :vartype change_ids: list[str]
    """

    _validation = {
        "resource_ids": {"required": True},
        "change_ids": {"required": True},
    }

    _attribute_map = {
        "resource_ids": {"key": "resourceIds", "type": "[str]"},
        "change_ids": {"key": "changeIds", "type": "[str]"},
    }

    def __init__(self, *, resource_ids: List[str], change_ids: List[str], **kwargs):
        """
        :keyword resource_ids: Specifies the list of resources for a change details request. Required.
        :paramtype resource_ids: list[str]
        :keyword change_ids: Specifies the list of change IDs for a change details request. Required.
        :paramtype change_ids: list[str]
        """
        super().__init__(**kwargs)
        self.resource_ids = resource_ids
        self.change_ids = change_ids


class ResourceChangeList(_serialization.Model):
    """A list of changes associated with a resource over a specific time interval.

    :ivar changes: The pageable value returned by the operation, i.e. a list of changes to the
     resource.


     * The list is ordered from the most recent changes to the least recent changes.
     * This list will be empty if there were no changes during the requested interval.
     * The ``Before`` snapshot timestamp value of the oldest change can be outside of the specified
     time interval.
    :vartype changes: list[~azure.mgmt.resourcegraph.models.ResourceChangeData]
    :ivar skip_token: Skip token that encodes the skip information while executing the current
     request.
    :vartype skip_token: any
    """

    _attribute_map = {
        "changes": {"key": "changes", "type": "[ResourceChangeData]"},
        "skip_token": {"key": "$skipToken", "type": "object"},
    }

    def __init__(
        self,
        *,
        changes: Optional[List["_models.ResourceChangeData"]] = None,
        skip_token: Optional[Any] = None,
        **kwargs
    ):
        """
        :keyword changes: The pageable value returned by the operation, i.e. a list of changes to the
         resource.


         * The list is ordered from the most recent changes to the least recent changes.
         * This list will be empty if there were no changes during the requested interval.
         * The ``Before`` snapshot timestamp value of the oldest change can be outside of the specified
         time interval.
        :paramtype changes: list[~azure.mgmt.resourcegraph.models.ResourceChangeData]
        :keyword skip_token: Skip token that encodes the skip information while executing the current
         request.
        :paramtype skip_token: any
        """
        super().__init__(**kwargs)
        self.changes = changes
        self.skip_token = skip_token


class ResourceChangesRequestParameters(_serialization.Model):
    """The parameters for a specific changes request.

    All required parameters must be populated in order to send to Azure.

    :ivar resource_ids: Specifies the list of resources for a changes request.
    :vartype resource_ids: list[str]
    :ivar subscription_id: The subscription id of resources to query the changes from.
    :vartype subscription_id: str
    :ivar interval: Specifies the date and time interval for a changes request. Required.
    :vartype interval: ~azure.mgmt.resourcegraph.models.ResourceChangesRequestParametersInterval
    :ivar skip_token: Acts as the continuation token for paged responses.
    :vartype skip_token: str
    :ivar top: The maximum number of changes the client can accept in a paged response.
    :vartype top: int
    :ivar table: The table name to query resources from.
    :vartype table: str
    :ivar fetch_property_changes: The flag if set to true will fetch property changes.
    :vartype fetch_property_changes: bool
    :ivar fetch_snapshots: The flag if set to true will fetch change snapshots.
    :vartype fetch_snapshots: bool
    """

    _validation = {
        "interval": {"required": True},
        "top": {"maximum": 1000, "minimum": 1},
    }

    _attribute_map = {
        "resource_ids": {"key": "resourceIds", "type": "[str]"},
        "subscription_id": {"key": "subscriptionId", "type": "str"},
        "interval": {"key": "interval", "type": "ResourceChangesRequestParametersInterval"},
        "skip_token": {"key": "$skipToken", "type": "str"},
        "top": {"key": "$top", "type": "int"},
        "table": {"key": "table", "type": "str"},
        "fetch_property_changes": {"key": "fetchPropertyChanges", "type": "bool"},
        "fetch_snapshots": {"key": "fetchSnapshots", "type": "bool"},
    }

    def __init__(
        self,
        *,
        interval: "_models.ResourceChangesRequestParametersInterval",
        resource_ids: Optional[List[str]] = None,
        subscription_id: Optional[str] = None,
        skip_token: Optional[str] = None,
        top: Optional[int] = None,
        table: Optional[str] = None,
        fetch_property_changes: Optional[bool] = None,
        fetch_snapshots: Optional[bool] = None,
        **kwargs
    ):
        """
        :keyword resource_ids: Specifies the list of resources for a changes request.
        :paramtype resource_ids: list[str]
        :keyword subscription_id: The subscription id of resources to query the changes from.
        :paramtype subscription_id: str
        :keyword interval: Specifies the date and time interval for a changes request. Required.
        :paramtype interval: ~azure.mgmt.resourcegraph.models.ResourceChangesRequestParametersInterval
        :keyword skip_token: Acts as the continuation token for paged responses.
        :paramtype skip_token: str
        :keyword top: The maximum number of changes the client can accept in a paged response.
        :paramtype top: int
        :keyword table: The table name to query resources from.
        :paramtype table: str
        :keyword fetch_property_changes: The flag if set to true will fetch property changes.
        :paramtype fetch_property_changes: bool
        :keyword fetch_snapshots: The flag if set to true will fetch change snapshots.
        :paramtype fetch_snapshots: bool
        """
        super().__init__(**kwargs)
        self.resource_ids = resource_ids
        self.subscription_id = subscription_id
        self.interval = interval
        self.skip_token = skip_token
        self.top = top
        self.table = table
        self.fetch_property_changes = fetch_property_changes
        self.fetch_snapshots = fetch_snapshots


class ResourceChangesRequestParametersInterval(DateTimeInterval):
    """Specifies the date and time interval for a changes request.

    All required parameters must be populated in order to send to Azure.

    :ivar start: A datetime indicating the inclusive/closed start of the time interval, i.e. ``[``\
     **\ ``start``\ **\ ``, end)``. Specifying a ``start`` that occurs chronologically after ``end``
     will result in an error. Required.
    :vartype start: ~datetime.datetime
    :ivar end: A datetime indicating the exclusive/open end of the time interval, i.e. ``[start,``\
     **\ ``end``\ **\ ``)``. Specifying an ``end`` that occurs chronologically before ``start`` will
     result in an error. Required.
    :vartype end: ~datetime.datetime
    """

    _validation = {
        "start": {"required": True},
        "end": {"required": True},
    }

    _attribute_map = {
        "start": {"key": "start", "type": "iso-8601"},
        "end": {"key": "end", "type": "iso-8601"},
    }

    def __init__(self, *, start: datetime.datetime, end: datetime.datetime, **kwargs):
        """
        :keyword start: A datetime indicating the inclusive/closed start of the time interval, i.e.
         ``[``\ **\ ``start``\ **\ ``, end)``. Specifying a ``start`` that occurs chronologically after
         ``end`` will result in an error. Required.
        :paramtype start: ~datetime.datetime
        :keyword end: A datetime indicating the exclusive/open end of the time interval, i.e.
         ``[start,``\ **\ ``end``\ **\ ``)``. Specifying an ``end`` that occurs chronologically before
         ``start`` will result in an error. Required.
        :paramtype end: ~datetime.datetime
        """
        super().__init__(start=start, end=end, **kwargs)


class ResourcePropertyChange(_serialization.Model):
    """The resource property change.

    All required parameters must be populated in order to send to Azure.

    :ivar property_name: The property name. Required.
    :vartype property_name: str
    :ivar before_value: The property value in before snapshot.
    :vartype before_value: str
    :ivar after_value: The property value in after snapshot.
    :vartype after_value: str
    :ivar change_category: The change category. Required. Known values are: "User" and "System".
    :vartype change_category: str or ~azure.mgmt.resourcegraph.models.ChangeCategory
    :ivar property_change_type: The property change Type. Required. Known values are: "Insert",
     "Update", and "Remove".
    :vartype property_change_type: str or ~azure.mgmt.resourcegraph.models.PropertyChangeType
    """

    _validation = {
        "property_name": {"required": True},
        "change_category": {"required": True},
        "property_change_type": {"required": True},
    }

    _attribute_map = {
        "property_name": {"key": "propertyName", "type": "str"},
        "before_value": {"key": "beforeValue", "type": "str"},
        "after_value": {"key": "afterValue", "type": "str"},
        "change_category": {"key": "changeCategory", "type": "str"},
        "property_change_type": {"key": "propertyChangeType", "type": "str"},
    }

    def __init__(
        self,
        *,
        property_name: str,
        change_category: Union[str, "_models.ChangeCategory"],
        property_change_type: Union[str, "_models.PropertyChangeType"],
        before_value: Optional[str] = None,
        after_value: Optional[str] = None,
        **kwargs
    ):
        """
        :keyword property_name: The property name. Required.
        :paramtype property_name: str
        :keyword before_value: The property value in before snapshot.
        :paramtype before_value: str
        :keyword after_value: The property value in after snapshot.
        :paramtype after_value: str
        :keyword change_category: The change category. Required. Known values are: "User" and "System".
        :paramtype change_category: str or ~azure.mgmt.resourcegraph.models.ChangeCategory
        :keyword property_change_type: The property change Type. Required. Known values are: "Insert",
         "Update", and "Remove".
        :paramtype property_change_type: str or ~azure.mgmt.resourcegraph.models.PropertyChangeType
        """
        super().__init__(**kwargs)
        self.property_name = property_name
        self.before_value = before_value
        self.after_value = after_value
        self.change_category = change_category
        self.property_change_type = property_change_type


class ResourcesHistoryRequest(_serialization.Model):
    """Describes a history request to be executed.

    :ivar subscriptions: Azure subscriptions against which to execute the query.
    :vartype subscriptions: list[str]
    :ivar query: The resources query.
    :vartype query: str
    :ivar options: The history request evaluation options.
    :vartype options: ~azure.mgmt.resourcegraph.models.ResourcesHistoryRequestOptions
    :ivar management_groups: Azure management groups against which to execute the query. Example: [
     'mg1', 'mg2' ].
    :vartype management_groups: list[str]
    """

    _attribute_map = {
        "subscriptions": {"key": "subscriptions", "type": "[str]"},
        "query": {"key": "query", "type": "str"},
        "options": {"key": "options", "type": "ResourcesHistoryRequestOptions"},
        "management_groups": {"key": "managementGroups", "type": "[str]"},
    }

    def __init__(
        self,
        *,
        subscriptions: Optional[List[str]] = None,
        query: Optional[str] = None,
        options: Optional["_models.ResourcesHistoryRequestOptions"] = None,
        management_groups: Optional[List[str]] = None,
        **kwargs
    ):
        """
        :keyword subscriptions: Azure subscriptions against which to execute the query.
        :paramtype subscriptions: list[str]
        :keyword query: The resources query.
        :paramtype query: str
        :keyword options: The history request evaluation options.
        :paramtype options: ~azure.mgmt.resourcegraph.models.ResourcesHistoryRequestOptions
        :keyword management_groups: Azure management groups against which to execute the query.
         Example: [ 'mg1', 'mg2' ].
        :paramtype management_groups: list[str]
        """
        super().__init__(**kwargs)
        self.subscriptions = subscriptions
        self.query = query
        self.options = options
        self.management_groups = management_groups


class ResourcesHistoryRequestOptions(_serialization.Model):
    """The options for history request evaluation.

    :ivar interval: The time interval used to fetch history.
    :vartype interval: ~azure.mgmt.resourcegraph.models.DateTimeInterval
    :ivar top: The maximum number of rows that the query should return. Overrides the page size
     when ``$skipToken`` property is present.
    :vartype top: int
    :ivar skip: The number of rows to skip from the beginning of the results. Overrides the next
     page offset when ``$skipToken`` property is present.
    :vartype skip: int
    :ivar skip_token: Continuation token for pagination, capturing the next page size and offset,
     as well as the context of the query.
    :vartype skip_token: str
    :ivar result_format: Defines in which format query result returned. Known values are: "table"
     and "objectArray".
    :vartype result_format: str or ~azure.mgmt.resourcegraph.models.ResultFormat
    """

    _validation = {
        "top": {"maximum": 1000, "minimum": 1},
        "skip": {"minimum": 0},
    }

    _attribute_map = {
        "interval": {"key": "interval", "type": "DateTimeInterval"},
        "top": {"key": "$top", "type": "int"},
        "skip": {"key": "$skip", "type": "int"},
        "skip_token": {"key": "$skipToken", "type": "str"},
        "result_format": {"key": "resultFormat", "type": "str"},
    }

    def __init__(
        self,
        *,
        interval: Optional["_models.DateTimeInterval"] = None,
        top: Optional[int] = None,
        skip: Optional[int] = None,
        skip_token: Optional[str] = None,
        result_format: Optional[Union[str, "_models.ResultFormat"]] = None,
        **kwargs
    ):
        """
        :keyword interval: The time interval used to fetch history.
        :paramtype interval: ~azure.mgmt.resourcegraph.models.DateTimeInterval
        :keyword top: The maximum number of rows that the query should return. Overrides the page size
         when ``$skipToken`` property is present.
        :paramtype top: int
        :keyword skip: The number of rows to skip from the beginning of the results. Overrides the next
         page offset when ``$skipToken`` property is present.
        :paramtype skip: int
        :keyword skip_token: Continuation token for pagination, capturing the next page size and
         offset, as well as the context of the query.
        :paramtype skip_token: str
        :keyword result_format: Defines in which format query result returned. Known values are:
         "table" and "objectArray".
        :paramtype result_format: str or ~azure.mgmt.resourcegraph.models.ResultFormat
        """
        super().__init__(**kwargs)
        self.interval = interval
        self.top = top
        self.skip = skip
        self.skip_token = skip_token
        self.result_format = result_format


class Table(_serialization.Model):
    """Query output in tabular format.

    All required parameters must be populated in order to send to Azure.

    :ivar columns: Query result column descriptors. Required.
    :vartype columns: list[~azure.mgmt.resourcegraph.models.Column]
    :ivar rows: Query result rows. Required.
    :vartype rows: list[list[JSON]]
    """

    _validation = {
        "columns": {"required": True},
        "rows": {"required": True},
    }

    _attribute_map = {
        "columns": {"key": "columns", "type": "[Column]"},
        "rows": {"key": "rows", "type": "[[object]]"},
    }

    def __init__(self, *, columns: List["_models.Column"], rows: List[List[JSON]], **kwargs):
        """
        :keyword columns: Query result column descriptors. Required.
        :paramtype columns: list[~azure.mgmt.resourcegraph.models.Column]
        :keyword rows: Query result rows. Required.
        :paramtype rows: list[list[JSON]]
        """
        super().__init__(**kwargs)
        self.columns = columns
        self.rows = rows