< Summary

Class:Azure.AI.TextAnalytics.TextDocumentBatchStatistics
Assembly:Azure.AI.TextAnalytics
File(s):C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\Generated\Models\TextDocumentBatchStatistics.Serialization.cs
C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\TextDocumentBatchStatistics.cs
Covered lines:27
Uncovered lines:0
Coverable lines:27
Total lines:102
Line coverage:100% (27 of 27)
Covered branches:10
Total branches:10
Branch coverage:100% (10 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
DeserializeTextDocumentBatchStatistics(...)-100%100%
.ctor(...)-100%100%
get_DocumentCount()-100%100%
get_ValidDocumentCount()-100%100%
get_InvalidDocumentCount()-100%100%
get_TransactionCount()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\Generated\Models\TextDocumentBatchStatistics.Serialization.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System.Text.Json;
 9using Azure.Core;
 10
 11namespace Azure.AI.TextAnalytics
 12{
 13    public partial class TextDocumentBatchStatistics
 14    {
 15        internal static TextDocumentBatchStatistics DeserializeTextDocumentBatchStatistics(JsonElement element)
 16        {
 817            int documentsCount = default;
 818            int validDocumentsCount = default;
 819            int erroneousDocumentsCount = default;
 820            long transactionsCount = default;
 8021            foreach (var property in element.EnumerateObject())
 22            {
 3223                if (property.NameEquals("documentsCount"))
 24                {
 825                    documentsCount = property.Value.GetInt32();
 826                    continue;
 27                }
 2428                if (property.NameEquals("validDocumentsCount"))
 29                {
 830                    validDocumentsCount = property.Value.GetInt32();
 831                    continue;
 32                }
 1633                if (property.NameEquals("erroneousDocumentsCount"))
 34                {
 835                    erroneousDocumentsCount = property.Value.GetInt32();
 836                    continue;
 37                }
 838                if (property.NameEquals("transactionsCount"))
 39                {
 840                    transactionsCount = property.Value.GetInt64();
 41                    continue;
 42                }
 43            }
 844            return new TextDocumentBatchStatistics(documentsCount, validDocumentsCount, erroneousDocumentsCount, transac
 45        }
 46    }
 47}

C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\TextDocumentBatchStatistics.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using Azure.Core;
 5
 6namespace Azure.AI.TextAnalytics
 7{
 8    /// <summary>
 9    /// A collection of statistics describing the batch of documents submitted
 10    /// to the service for analysis in a given request.  This information is
 11    /// provided on the result collection returned by an operation when the
 12    /// caller passes in a <see cref="TextAnalyticsRequestOptions"/> with
 13    /// IncludeStatistics set to true.
 14    /// </summary>
 15    [CodeGenModel("RequestStatistics")]
 16    public partial class TextDocumentBatchStatistics
 17    {
 4818        internal TextDocumentBatchStatistics(int documentCount, int validDocumentCount, int invalidDocumentCount, long t
 19        {
 4820            DocumentCount = documentCount;
 4821            ValidDocumentCount = validDocumentCount;
 4822            InvalidDocumentCount = invalidDocumentCount;
 4823            TransactionCount = transactionCount;
 4824        }
 25
 26        /// <summary>
 27        /// Gets the number of documents submitted in the request batch.
 28        /// </summary>
 29        [CodeGenMember("DocumentsCount")]
 3630        public int DocumentCount { get; }
 31
 32        /// <summary>
 33        /// Gets the number of valid documents submitted in the request batch.
 34        /// This number excludes empty documents, documents whose size exceeds
 35        /// the service's size limit, and documents in unsupported languages.
 36        /// </summary>
 37        [CodeGenMember("ValidDocumentsCount")]
 3638        public int ValidDocumentCount { get; }
 39
 40        /// <summary>
 41        /// Gets the number of invalid documents submitted in the request batch.
 42        /// This number includes empty documents, documents whose size exceeds
 43        /// the service's size limit, and documents in unsupported languages.
 44        /// </summary>
 45        [CodeGenMember("ErroneousDocumentsCount")]
 3646        public int InvalidDocumentCount { get; }
 47
 48        /// <summary>
 49        /// Gets the number of transactions required to complete the operation
 50        /// on all documents submitted in the request batch.
 51        /// </summary>
 52        [CodeGenMember("TransactionsCount")]
 3653        public long TransactionCount { get; }
 54    }
 55}