@@ -34,13 +34,10 @@ class BatchResponse(msrest.serialization.Model):
3434
3535 :param responses: An array of responses corresponding to each individual request in a batch.
3636 :type responses: list[~monitor_query_client.models.LogQueryResponse]
37- :param error: Error response for a batch request.
38- :type error: ~monitor_query_client.models.BatchResponseError
3937 """
4038
4139 _attribute_map = {
4240 'responses' : {'key' : 'responses' , 'type' : '[LogQueryResponse]' },
43- 'error' : {'key' : 'error' , 'type' : 'BatchResponseError' },
4441 }
4542
4643 def __init__ (
@@ -49,72 +46,25 @@ def __init__(
4946 ):
5047 super (BatchResponse , self ).__init__ (** kwargs )
5148 self .responses = kwargs .get ('responses' , None )
52- self .error = kwargs .get ('error' , None )
53-
54-
55- class BatchResponseError (msrest .serialization .Model ):
56- """Error response for a batch request.
57-
58- :param message: The error message describing the cause of the error.
59- :type message: str
60- :param code: The error code.
61- :type code: str
62- :param inner_error:
63- :type inner_error: ~monitor_query_client.models.BatchResponseErrorInnerError
64- """
65-
66- _attribute_map = {
67- 'message' : {'key' : 'message' , 'type' : 'str' },
68- 'code' : {'key' : 'code' , 'type' : 'str' },
69- 'inner_error' : {'key' : 'innerError' , 'type' : 'BatchResponseErrorInnerError' },
70- }
71-
72- def __init__ (
73- self ,
74- ** kwargs
75- ):
76- super (BatchResponseError , self ).__init__ (** kwargs )
77- self .message = kwargs .get ('message' , None )
78- self .code = kwargs .get ('code' , None )
79- self .inner_error = kwargs .get ('inner_error' , None )
80-
81-
82- class BatchResponseErrorInnerError (msrest .serialization .Model ):
83- """BatchResponseErrorInnerError.
84-
85- :param code:
86- :type code: str
87- :param message:
88- :type message: str
89- :param details:
90- :type details: list[~monitor_query_client.models.ErrorDetails]
91- """
92-
93- _attribute_map = {
94- 'code' : {'key' : 'code' , 'type' : 'str' },
95- 'message' : {'key' : 'message' , 'type' : 'str' },
96- 'details' : {'key' : 'details' , 'type' : '[ErrorDetails]' },
97- }
98-
99- def __init__ (
100- self ,
101- ** kwargs
102- ):
103- super (BatchResponseErrorInnerError , self ).__init__ (** kwargs )
104- self .code = kwargs .get ('code' , None )
105- self .message = kwargs .get ('message' , None )
106- self .details = kwargs .get ('details' , None )
10749
10850
10951class Column (msrest .serialization .Model ):
11052 """A column in a table.
11153
112- :param name: The name of this column.
54+ All required parameters must be populated in order to send to Azure.
55+
56+ :param name: Required. The name of this column.
11357 :type name: str
114- :param type: The data type of this column.
115- :type type: str
58+ :param type: Required. The data type of this column. Possible values include: "bool",
59+ "datetime", "dynamic", "int", "long", "real", "string".
60+ :type type: str or ~monitor_query_client.models.ColumnDataType
11661 """
11762
63+ _validation = {
64+ 'name' : {'required' : True },
65+ 'type' : {'required' : True },
66+ }
67+
11868 _attribute_map = {
11969 'name' : {'key' : 'name' , 'type' : 'str' },
12070 'type' : {'key' : 'type' , 'type' : 'str' },
@@ -125,8 +75,8 @@ def __init__(
12575 ** kwargs
12676 ):
12777 super (Column , self ).__init__ (** kwargs )
128- self .name = kwargs . get ( 'name' , None )
129- self .type = kwargs . get ( 'type' , None )
78+ self .name = kwargs [ 'name' ]
79+ self .type = kwargs [ 'type' ]
13080
13181
13282class ErrorDetail (msrest .serialization .Model ):
@@ -176,33 +126,6 @@ def __init__(
176126 self .additional_properties = kwargs .get ('additional_properties' , None )
177127
178128
179- class ErrorDetails (msrest .serialization .Model ):
180- """ErrorDetails.
181-
182- :param code:
183- :type code: str
184- :param message:
185- :type message: str
186- :param target:
187- :type target: str
188- """
189-
190- _attribute_map = {
191- 'code' : {'key' : 'code' , 'type' : 'str' },
192- 'message' : {'key' : 'message' , 'type' : 'str' },
193- 'target' : {'key' : 'target' , 'type' : 'str' },
194- }
195-
196- def __init__ (
197- self ,
198- ** kwargs
199- ):
200- super (ErrorDetails , self ).__init__ (** kwargs )
201- self .code = kwargs .get ('code' , None )
202- self .message = kwargs .get ('message' , None )
203- self .target = kwargs .get ('target' , None )
204-
205-
206129class ErrorInfo (msrest .serialization .Model ):
207130 """The code and message for an error.
208131
@@ -378,14 +301,18 @@ class LogQueryResponse(msrest.serialization.Model):
378301 :type id: str
379302 :param status:
380303 :type status: int
381- :param body: Contains the tables, columns & rows resulting from a query.
382- :type body: ~monitor_query_client.models.QueryResults
304+ :param body: Contains the tables, columns & rows resulting from the query or the error details
305+ if the query failed.
306+ :type body: ~monitor_query_client.models.LogQueryResult
307+ :param headers: Dictionary of :code:`<string>`.
308+ :type headers: dict[str, str]
383309 """
384310
385311 _attribute_map = {
386312 'id' : {'key' : 'id' , 'type' : 'str' },
387313 'status' : {'key' : 'status' , 'type' : 'int' },
388- 'body' : {'key' : 'body' , 'type' : 'QueryResults' },
314+ 'body' : {'key' : 'body' , 'type' : 'LogQueryResult' },
315+ 'headers' : {'key' : 'headers' , 'type' : '{str}' },
389316 }
390317
391318 def __init__ (
@@ -396,6 +323,38 @@ def __init__(
396323 self .id = kwargs .get ('id' , None )
397324 self .status = kwargs .get ('status' , None )
398325 self .body = kwargs .get ('body' , None )
326+ self .headers = kwargs .get ('headers' , None )
327+
328+
329+ class LogQueryResult (msrest .serialization .Model ):
330+ """Contains the tables, columns & rows resulting from the query or the error details if the query failed.
331+
332+ :param tables: The list of tables, columns and rows.
333+ :type tables: list[~monitor_query_client.models.Table]
334+ :param error: The code and message for an error.
335+ :type error: ~monitor_query_client.models.ErrorInfo
336+ :param statistics: Any object.
337+ :type statistics: object
338+ :param render: Any object.
339+ :type render: object
340+ """
341+
342+ _attribute_map = {
343+ 'tables' : {'key' : 'tables' , 'type' : '[Table]' },
344+ 'error' : {'key' : 'error' , 'type' : 'ErrorInfo' },
345+ 'statistics' : {'key' : 'statistics' , 'type' : 'object' },
346+ 'render' : {'key' : 'render' , 'type' : 'object' },
347+ }
348+
349+ def __init__ (
350+ self ,
351+ ** kwargs
352+ ):
353+ super (LogQueryResult , self ).__init__ (** kwargs )
354+ self .tables = kwargs .get ('tables' , None )
355+ self .error = kwargs .get ('error' , None )
356+ self .statistics = kwargs .get ('statistics' , None )
357+ self .render = kwargs .get ('render' , None )
399358
400359
401360class MetadataApplication (msrest .serialization .Model ):
@@ -1630,12 +1589,6 @@ class QueryBody(msrest.serialization.Model):
16301589 :type timespan: str
16311590 :param workspaces: A list of workspaces that are included in the query.
16321591 :type workspaces: list[str]
1633- :param qualified_names: A list of qualified workspace names that are included in the query.
1634- :type qualified_names: list[str]
1635- :param workspace_ids: A list of workspace IDs that are included in the query.
1636- :type workspace_ids: list[str]
1637- :param azure_resource_ids: A list of Azure resource IDs that are included in the query.
1638- :type azure_resource_ids: list[str]
16391592 """
16401593
16411594 _validation = {
@@ -1646,9 +1599,6 @@ class QueryBody(msrest.serialization.Model):
16461599 'query' : {'key' : 'query' , 'type' : 'str' },
16471600 'timespan' : {'key' : 'timespan' , 'type' : 'str' },
16481601 'workspaces' : {'key' : 'workspaces' , 'type' : '[str]' },
1649- 'qualified_names' : {'key' : 'qualifiedNames' , 'type' : '[str]' },
1650- 'workspace_ids' : {'key' : 'workspaceIds' , 'type' : '[str]' },
1651- 'azure_resource_ids' : {'key' : 'azureResourceIds' , 'type' : '[str]' },
16521602 }
16531603
16541604 def __init__ (
@@ -1659,32 +1609,39 @@ def __init__(
16591609 self .query = kwargs ['query' ]
16601610 self .timespan = kwargs .get ('timespan' , None )
16611611 self .workspaces = kwargs .get ('workspaces' , None )
1662- self .qualified_names = kwargs .get ('qualified_names' , None )
1663- self .workspace_ids = kwargs .get ('workspace_ids' , None )
1664- self .azure_resource_ids = kwargs .get ('azure_resource_ids' , None )
16651612
16661613
16671614class QueryResults (msrest .serialization .Model ):
16681615 """Contains the tables, columns & rows resulting from a query.
16691616
1670- :param tables: The list of tables, columns and rows.
1617+ All required parameters must be populated in order to send to Azure.
1618+
1619+ :param tables: Required. The list of tables, columns and rows.
16711620 :type tables: list[~monitor_query_client.models.Table]
1672- :param errors:
1673- :type errors: ~monitor_query_client.models.ErrorDetails
1621+ :param statistics: Any object.
1622+ :type statistics: object
1623+ :param render: Any object.
1624+ :type render: object
16741625 """
16751626
1627+ _validation = {
1628+ 'tables' : {'required' : True },
1629+ }
1630+
16761631 _attribute_map = {
16771632 'tables' : {'key' : 'tables' , 'type' : '[Table]' },
1678- 'errors' : {'key' : 'errors' , 'type' : 'ErrorDetails' },
1633+ 'statistics' : {'key' : 'statistics' , 'type' : 'object' },
1634+ 'render' : {'key' : 'render' , 'type' : 'object' },
16791635 }
16801636
16811637 def __init__ (
16821638 self ,
16831639 ** kwargs
16841640 ):
16851641 super (QueryResults , self ).__init__ (** kwargs )
1686- self .tables = kwargs .get ('tables' , None )
1687- self .errors = kwargs .get ('errors' , None )
1642+ self .tables = kwargs ['tables' ]
1643+ self .statistics = kwargs .get ('statistics' , None )
1644+ self .render = kwargs .get ('render' , None )
16881645
16891646
16901647class Response (msrest .serialization .Model ):
0 commit comments