Class LogsBatchQueryResultCollection

java.lang.Object
com.azure.monitor.query.models.LogsBatchQueryResultCollection

public final class LogsBatchQueryResultCollection extends Object
The collection wrapper to hold all results of a batch of logs queries.
  • Constructor Details

    • LogsBatchQueryResultCollection

      public LogsBatchQueryResultCollection(List<LogsBatchQueryResult> batchResults)
      Creates an instance of LogsBatchQueryResultCollection to hold all results of a batch of logs queries.
      Parameters:
      batchResults - The results of a batch of logs queries.
  • Method Details

    • getBatchResults

      public List<LogsBatchQueryResult> getBatchResults()
      Returns the results of a batch of logs queries.
      Returns:
      The results of a batch of logs queries.
    • getResult

      public <T> List<T> getResult(String queryId, Class<T> type)
      Returns the batch query result of a specific query identified by the queryId.
      Type Parameters:
      T - The type parameter.
      Parameters:
      queryId - The query id of a query in the batch request.
      type - The model type to which the result will be deserialized to.
      Returns:
      A list of objects of type T that contain the query result of the given query id.
      Throws:
      IllegalArgumentException - if the result does not contain the query id.
    • getResult

      public LogsBatchQueryResult getResult(String queryId)
      Returns the batch query result of a specific query identified by the queryId.
      Parameters:
      queryId - The query id of a query in the batch request.
      Returns:
      the result of the given query id.
      Throws:
      IllegalArgumentException - if the result does not contain the query id.