< Summary

Class:Azure.Search.Documents.Indexes.Models.SearchIndexerLimits
Assembly:Azure.Search.Documents
File(s):C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\SearchIndexerLimits.cs
C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\SearchIndexerLimits.Serialization.cs
Covered lines:18
Uncovered lines:5
Coverable lines:23
Total lines:80
Line coverage:78.2% (18 of 23)
Covered branches:8
Total branches:8
Branch coverage:100% (8 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_MaxRunTime()-0%100%
get_MaxDocumentExtractionSize()-0%100%
get_MaxDocumentContentCharactersToExtract()-0%100%
DeserializeSearchIndexerLimits(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\SearchIndexerLimits.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;
 9
 10namespace Azure.Search.Documents.Indexes.Models
 11{
 12    /// <summary> The SearchIndexerLimits. </summary>
 13    public partial class SearchIndexerLimits
 14    {
 15        /// <summary> Initializes a new instance of SearchIndexerLimits. </summary>
 016        internal SearchIndexerLimits()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of SearchIndexerLimits. </summary>
 21        /// <param name="maxRunTime"> The maximum duration that the indexer is permitted to run for one execution. </par
 22        /// <param name="maxDocumentExtractionSize"> The maximum size of a document, in bytes, which will be considered 
 23        /// <param name="maxDocumentContentCharactersToExtract"> The maximum number of characters that will be extracted
 524        internal SearchIndexerLimits(TimeSpan? maxRunTime, long? maxDocumentExtractionSize, long? maxDocumentContentChar
 25        {
 526            MaxRunTime = maxRunTime;
 527            MaxDocumentExtractionSize = maxDocumentExtractionSize;
 528            MaxDocumentContentCharactersToExtract = maxDocumentContentCharactersToExtract;
 529        }
 30
 31        /// <summary> The maximum duration that the indexer is permitted to run for one execution. </summary>
 032        public TimeSpan? MaxRunTime { get; }
 33        /// <summary> The maximum size of a document, in bytes, which will be considered valid for indexing. </summary>
 034        public long? MaxDocumentExtractionSize { get; }
 35        /// <summary> The maximum number of characters that will be extracted from a document picked up for indexing. </
 036        public long? MaxDocumentContentCharactersToExtract { get; }
 37    }
 38}

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\SearchIndexerLimits.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;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.Search.Documents.Indexes.Models
 13{
 14    public partial class SearchIndexerLimits
 15    {
 16        internal static SearchIndexerLimits DeserializeSearchIndexerLimits(JsonElement element)
 17        {
 518            Optional<TimeSpan> maxRunTime = default;
 519            Optional<long> maxDocumentExtractionSize = default;
 520            Optional<long> maxDocumentContentCharactersToExtract = default;
 4021            foreach (var property in element.EnumerateObject())
 22            {
 1523                if (property.NameEquals("maxRunTime"))
 24                {
 525                    maxRunTime = property.Value.GetTimeSpan("P");
 526                    continue;
 27                }
 1028                if (property.NameEquals("maxDocumentExtractionSize"))
 29                {
 530                    maxDocumentExtractionSize = property.Value.GetInt64();
 531                    continue;
 32                }
 533                if (property.NameEquals("maxDocumentContentCharactersToExtract"))
 34                {
 535                    maxDocumentContentCharactersToExtract = property.Value.GetInt64();
 36                    continue;
 37                }
 38            }
 539            return new SearchIndexerLimits(Optional.ToNullable(maxRunTime), Optional.ToNullable(maxDocumentExtractionSiz
 40        }
 41    }
 42}