< Summary

Class:Azure.Search.Documents.Indexes.Models.SearchServiceLimits
Assembly:Azure.Search.Documents
File(s):C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\SearchServiceLimits.cs
C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\SearchServiceLimits.Serialization.cs
Covered lines:27
Uncovered lines:14
Coverable lines:41
Total lines:107
Line coverage:65.8% (27 of 41)
Covered branches:14
Total branches:18
Branch coverage:77.7% (14 of 18)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_MaxFieldsPerIndex()-0%100%
get_MaxFieldNestingDepthPerIndex()-0%100%
get_MaxComplexCollectionFieldsPerIndex()-0%100%
get_MaxComplexObjectsInCollectionsPerDocument()-0%100%
DeserializeSearchServiceLimits(...)-72.41%77.78%

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\SearchServiceLimits.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
 8namespace Azure.Search.Documents.Indexes.Models
 9{
 10    /// <summary> Represents various service level limits. </summary>
 11    public partial class SearchServiceLimits
 12    {
 13        /// <summary> Initializes a new instance of SearchServiceLimits. </summary>
 014        internal SearchServiceLimits()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of SearchServiceLimits. </summary>
 19        /// <param name="maxFieldsPerIndex"> The maximum allowed fields per index. </param>
 20        /// <param name="maxFieldNestingDepthPerIndex"> The maximum depth which you can nest sub-fields in an index, inc
 21        /// <param name="maxComplexCollectionFieldsPerIndex"> The maximum number of fields of type Collection(Edm.Comple
 22        /// <param name="maxComplexObjectsInCollectionsPerDocument"> The maximum number of objects in complex collection
 623        internal SearchServiceLimits(int? maxFieldsPerIndex, int? maxFieldNestingDepthPerIndex, int? maxComplexCollectio
 24        {
 625            MaxFieldsPerIndex = maxFieldsPerIndex;
 626            MaxFieldNestingDepthPerIndex = maxFieldNestingDepthPerIndex;
 627            MaxComplexCollectionFieldsPerIndex = maxComplexCollectionFieldsPerIndex;
 628            MaxComplexObjectsInCollectionsPerDocument = maxComplexObjectsInCollectionsPerDocument;
 629        }
 30
 31        /// <summary> The maximum allowed fields per index. </summary>
 032        public int? MaxFieldsPerIndex { get; }
 33        /// <summary> The maximum depth which you can nest sub-fields in an index, including the top-level complex field
 034        public int? MaxFieldNestingDepthPerIndex { get; }
 35        /// <summary> The maximum number of fields of type Collection(Edm.ComplexType) allowed in an index. </summary>
 036        public int? MaxComplexCollectionFieldsPerIndex { get; }
 37        /// <summary> The maximum number of objects in complex collections allowed per document. </summary>
 038        public int? MaxComplexObjectsInCollectionsPerDocument { get; }
 39    }
 40}

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\SearchServiceLimits.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.Search.Documents.Indexes.Models
 12{
 13    public partial class SearchServiceLimits
 14    {
 15        internal static SearchServiceLimits DeserializeSearchServiceLimits(JsonElement element)
 16        {
 617            Optional<int?> maxFieldsPerIndex = default;
 618            Optional<int?> maxFieldNestingDepthPerIndex = default;
 619            Optional<int?> maxComplexCollectionFieldsPerIndex = default;
 620            Optional<int?> maxComplexObjectsInCollectionsPerDocument = default;
 6021            foreach (var property in element.EnumerateObject())
 22            {
 2423                if (property.NameEquals("maxFieldsPerIndex"))
 24                {
 625                    if (property.Value.ValueKind == JsonValueKind.Null)
 26                    {
 027                        maxFieldsPerIndex = null;
 028                        continue;
 29                    }
 630                    maxFieldsPerIndex = property.Value.GetInt32();
 631                    continue;
 32                }
 1833                if (property.NameEquals("maxFieldNestingDepthPerIndex"))
 34                {
 635                    if (property.Value.ValueKind == JsonValueKind.Null)
 36                    {
 037                        maxFieldNestingDepthPerIndex = null;
 038                        continue;
 39                    }
 640                    maxFieldNestingDepthPerIndex = property.Value.GetInt32();
 641                    continue;
 42                }
 1243                if (property.NameEquals("maxComplexCollectionFieldsPerIndex"))
 44                {
 645                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 047                        maxComplexCollectionFieldsPerIndex = null;
 048                        continue;
 49                    }
 650                    maxComplexCollectionFieldsPerIndex = property.Value.GetInt32();
 651                    continue;
 52                }
 653                if (property.NameEquals("maxComplexObjectsInCollectionsPerDocument"))
 54                {
 655                    if (property.Value.ValueKind == JsonValueKind.Null)
 56                    {
 057                        maxComplexObjectsInCollectionsPerDocument = null;
 058                        continue;
 59                    }
 660                    maxComplexObjectsInCollectionsPerDocument = property.Value.GetInt32();
 61                    continue;
 62                }
 63            }
 664            return new SearchServiceLimits(Optional.ToNullable(maxFieldsPerIndex), Optional.ToNullable(maxFieldNestingDe
 65        }
 66    }
 67}