1616)
1717
1818
19- class LogsQueryResultTable (object ):
19+ class LogsTable (object ):
2020 """Contains the columns and rows for one table in a query response.
2121
2222 All required parameters must be populated in order to send to Azure.
2323
2424 :param name: Required. The name of the table.
2525 :type name: str
2626 :param columns: Required. The list of columns in this table.
27- :type columns: list[~azure.monitor.query.LogsQueryResultColumn ]
27+ :type columns: list[~azure.monitor.query.LogsTableColumn ]
2828 :param rows: Required. The resulting rows from this query.
2929 :type rows: list[list[str]]
3030 """
3131 def __init__ (self , name , columns , rows ):
32- # type: (str, List[LogsQueryResultColumn ], List[List[str]]) -> None
32+ # type: (str, List[LogsTableColumn ], List[List[str]]) -> None
3333 self .name = name
3434 self .columns = columns
3535 self .rows = [process_row (self .columns , row ) for row in rows ]
@@ -38,12 +38,12 @@ def __init__(self, name, columns, rows):
3838 def _from_generated (cls , generated ):
3939 return cls (
4040 name = generated .name ,
41- columns = [LogsQueryResultColumn (name = col .name , type = col .type ) for col in generated .columns ],
41+ columns = [LogsTableColumn (name = col .name , type = col .type ) for col in generated .columns ],
4242 rows = generated .rows
4343 )
4444
4545
46- class LogsQueryResultColumn (InternalColumn ):
46+ class LogsTableColumn (InternalColumn ):
4747 """A column in a table.
4848
4949 :ivar name: The name of this column.
@@ -59,7 +59,7 @@ class LogsQueryResultColumn(InternalColumn):
5959
6060 def __init__ (self , ** kwargs ):
6161 # type: (Any) -> None
62- super (LogsQueryResultColumn , self ).__init__ (** kwargs )
62+ super (LogsTableColumn , self ).__init__ (** kwargs )
6363 self .name = kwargs .get ("name" , None )
6464 self .type = kwargs .get ("type" , None )
6565
@@ -68,7 +68,7 @@ class LogsQueryResult(object):
6868 """Contains the tables, columns & rows resulting from a query.
6969
7070 :ivar tables: The list of tables, columns and rows.
71- :vartype tables: list[~azure.monitor.query.LogsQueryResultTable ]
71+ :vartype tables: list[~azure.monitor.query.LogsTable ]
7272 :ivar statistics: This will include a statistics property in the response that describes various
7373 performance statistics such as query execution time and resource usage.
7474 :vartype statistics: object
@@ -92,7 +92,7 @@ def _from_generated(cls, generated):
9292 tables = None
9393 if generated .tables is not None :
9494 tables = [
95- LogsQueryResultTable ._from_generated ( # pylint: disable=protected-access
95+ LogsTable ._from_generated ( # pylint: disable=protected-access
9696 table
9797 ) for table in generated .tables
9898 ]
@@ -222,7 +222,7 @@ class LogsBatchQueryResult(object):
222222 :ivar status: status code of the response.
223223 :vartype status: int
224224 :ivar tables: The list of tables, columns and rows.
225- :vartype tables: list[~azure.monitor.query.LogsQueryResultTable ]
225+ :vartype tables: list[~azure.monitor.query.LogsTable ]
226226 :ivar statistics: This will include a statistics property in the response that describes various
227227 performance statistics such as query execution time and resource usage.
228228 :vartype statistics: object
@@ -250,7 +250,7 @@ def _from_generated(cls, generated):
250250 tables = None
251251 if generated .body .tables is not None :
252252 tables = [
253- LogsQueryResultTable ._from_generated ( # pylint: disable=protected-access
253+ LogsTable ._from_generated ( # pylint: disable=protected-access
254254 table
255255 ) for table in generated .body .tables
256256 ]
@@ -264,31 +264,13 @@ def _from_generated(cls, generated):
264264 )
265265
266266
267- class LogsBatchResultError (object ):
268- """Error response for a batch request.
269-
270- :ivar message: The error message describing the cause of the error.
271- :vartype message: str
272- :param code: The error code.
273- :vartype code: str
274- :param details: The details of the error.
275- :vartype inner_error: list[~azure.monitor.query.ErrorDetails]
267+ class MetricNamespaceClassification (str , Enum ):
268+ """Kind of namespace
276269 """
277- def __init__ (self , ** kwargs ):
278- # type: (Any) -> None
279- self .message = kwargs .get ("message" , None )
280- self .code = kwargs .get ("code" , None )
281- self .details = kwargs .get ("details" , None )
282270
283- @classmethod
284- def _from_generated (cls , generated ):
285- if not generated :
286- return cls ()
287- return cls (
288- message = generated .inner_error .message ,
289- code = generated .code ,
290- details = generated .inner_error .details
291- )
271+ PLATFORM = "Platform"
272+ CUSTOM = "Custom"
273+ QOS = "Qos"
292274
293275
294276class MetricNamespace (object ):
@@ -302,6 +284,8 @@ class MetricNamespace(object):
302284 :paramtype name: str
303285 :keyword fully_qualified_namespace: The fully qualified namespace name.
304286 :paramtype fully_qualified_namespace: str
287+ :keyword namespace_classification: Kind of namespace. Possible values include: "Platform", "Custom", "Qos".
288+ :paramtype namespace_classification: str or ~azure.monitor.query.MetricNamespaceClassification
305289 """
306290 def __init__ (
307291 self ,
@@ -311,6 +295,7 @@ def __init__(
311295 self .type = kwargs .get ('type' , None )
312296 self .name = kwargs .get ('name' , None )
313297 self .fully_qualified_namespace = kwargs .get ('fully_qualified_namespace' , None )
298+ self .namespace_classification = kwargs .get ('namespace_classification' , None )
314299
315300 @classmethod
316301 def _from_generated (cls , generated ):
@@ -323,10 +308,23 @@ def _from_generated(cls, generated):
323308 id = generated .id ,
324309 type = generated .type ,
325310 name = generated .name ,
326- fully_qualified_namespace = fully_qualified_namespace
311+ fully_qualified_namespace = fully_qualified_namespace ,
312+ namespace_classification = generated .classification
327313 )
328314
329- class MetricDefinition (object ):
315+
316+ class MetricClass (str , Enum ):
317+ """The class of the metric.
318+ """
319+
320+ AVAILABILITY = "Availability"
321+ TRANSACTIONS = "Transactions"
322+ ERRORS = "Errors"
323+ LATENCY = "Latency"
324+ SATURATION = "Saturation"
325+
326+
327+ class MetricDefinition (object ): #pylint: disable=too-many-instance-attributes
330328 """Metric definition class specifies the metadata for a metric.
331329
332330 :keyword dimension_required: Flag to indicate whether the dimension is required.
@@ -344,12 +342,15 @@ class MetricDefinition(object):
344342 :keyword primary_aggregation_type: the primary aggregation type value defining how to use the
345343 values for display. Possible values include: "None", "Average", "Count", "Minimum", "Maximum",
346344 "Total".
347- :paramtype primary_aggregation_type: str or ~monitor_query_client.models.AggregationType
345+ :paramtype primary_aggregation_type: str or ~azure.monitor.query.MetricAggregationType
346+ :keyword metric_class: The class of the metric. Possible values include: "Availability",
347+ "Transactions", "Errors", "Latency", "Saturation".
348+ :paramtype metric_class: str or ~azure.monitor.query.MetricClass
348349 :keyword supported_aggregation_types: the collection of what aggregation types are supported.
349- :paramtype supported_aggregation_types: list[str or ~monitor_query_client.models.AggregationType ]
350+ :paramtype supported_aggregation_types: list[str or ~azure.monitor.query.MetricAggregationType ]
350351 :keyword metric_availabilities: the collection of what aggregation intervals are available to be
351352 queried.
352- :paramtype metric_availabilities: list[~monitor_query_client.models .MetricAvailability]
353+ :paramtype metric_availabilities: list[~azure.monitor.query .MetricAvailability]
353354 :keyword id: the resource identifier of the metric definition.
354355 :paramtype id: str
355356 :keyword dimensions: the name and the display name of the dimension, i.e. it is a localizable
@@ -371,6 +372,7 @@ def __init__(
371372 self .metric_availabilities = kwargs .get ('metric_availabilities' , None ) # type: List[MetricAvailability]
372373 self .id = kwargs .get ('id' , None ) # type: Optional[str]
373374 self .dimensions = kwargs .get ('dimensions' , None ) # type: Optional[List[str]]
375+ self .metric_class = kwargs .get ('metric_class' , None ) # type: Optional[str]
374376
375377 @classmethod
376378 def _from_generated (cls , generated ):
@@ -387,6 +389,7 @@ def _from_generated(cls, generated):
387389 unit = generated .unit ,
388390 primary_aggregation_type = generated .primary_aggregation_type ,
389391 supported_aggregation_types = generated .supported_aggregation_types ,
392+ metric_class = generated .metric_class ,
390393 metric_availabilities = [
391394 MetricAvailability ._from_generated ( # pylint: disable=protected-access
392395 val
@@ -401,8 +404,8 @@ class MetricValue(object):
401404
402405 All required parameters must be populated in order to send to Azure.
403406
404- :ivar time_stamp : Required. The timestamp for the metric value in ISO 8601 format.
405- :vartype time_stamp : ~datetime.datetime
407+ :ivar timestamp : Required. The timestamp for the metric value in ISO 8601 format.
408+ :vartype timestamp : ~datetime.datetime
406409 :ivar average: The average value in the time range.
407410 :vartype average: float
408411 :ivar minimum: The least value in the time range.
@@ -420,7 +423,7 @@ def __init__(
420423 ** kwargs
421424 ):
422425 # type: (Any) -> None
423- self .time_stamp = kwargs ['time_stamp ' ]
426+ self .timestamp = kwargs ['timestamp ' ]
424427 self .average = kwargs .get ('average' , None )
425428 self .minimum = kwargs .get ('minimum' , None )
426429 self .maximum = kwargs .get ('maximum' , None )
@@ -432,7 +435,7 @@ def _from_generated(cls, generated):
432435 if not generated :
433436 return cls ()
434437 return cls (
435- time_stamp = generated .time_stamp ,
438+ timestamp = generated .time_stamp ,
436439 average = generated .average ,
437440 minimum = generated .minimum ,
438441 maximum = generated .maximum ,
@@ -552,7 +555,7 @@ def _from_generated(cls, generated):
552555 )
553556
554557
555- class AggregationType (str , Enum ):
558+ class MetricAggregationType (str , Enum ):
556559 """The aggregation type of the metric.
557560 """
558561
0 commit comments