< Summary

Class:Azure.Search.Documents.Indexes.Models.SearchIndexerWarning
Assembly:Azure.Search.Documents
File(s):C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\SearchIndexerWarning.cs
C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\SearchIndexerWarning.Serialization.cs
Covered lines:28
Uncovered lines:10
Coverable lines:38
Total lines:107
Line coverage:73.6% (28 of 38)
Covered branches:12
Total branches:14
Branch coverage:85.7% (12 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-100%100%
get_Key()-0%100%
get_Message()-0%100%
get_Name()-0%100%
get_Details()-0%100%
get_DocumentationLink()-0%100%
DeserializeSearchIndexerWarning(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\SearchIndexerWarning.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> Represents an item-level warning. </summary>
 13    public partial class SearchIndexerWarning
 14    {
 15        /// <summary> Initializes a new instance of SearchIndexerWarning. </summary>
 16        /// <param name="message"> The message describing the warning that occurred while processing the item. </param>
 17        /// <exception cref="ArgumentNullException"> <paramref name="message"/> is null. </exception>
 018        internal SearchIndexerWarning(string message)
 19        {
 020            if (message == null)
 21            {
 022                throw new ArgumentNullException(nameof(message));
 23            }
 24
 025            Message = message;
 026        }
 27
 28        /// <summary> Initializes a new instance of SearchIndexerWarning. </summary>
 29        /// <param name="key"> The key of the item which generated a warning. </param>
 30        /// <param name="message"> The message describing the warning that occurred while processing the item. </param>
 31        /// <param name="name"> The name of the source at which the warning originated. For example, this could refer to
 32        /// <param name="details"> Additional, verbose details about the warning to assist in debugging the indexer. Thi
 33        /// <param name="documentationLink"> A link to a troubleshooting guide for these classes of warnings. This may n
 234        internal SearchIndexerWarning(string key, string message, string name, string details, string documentationLink)
 35        {
 236            Key = key;
 237            Message = message;
 238            Name = name;
 239            Details = details;
 240            DocumentationLink = documentationLink;
 241        }
 42
 43        /// <summary> The key of the item which generated a warning. </summary>
 044        public string Key { get; }
 45        /// <summary> The message describing the warning that occurred while processing the item. </summary>
 046        public string Message { get; }
 47        /// <summary> The name of the source at which the warning originated. For example, this could refer to a particu
 048        public string Name { get; }
 49        /// <summary> Additional, verbose details about the warning to assist in debugging the indexer. This may not be 
 050        public string Details { get; }
 51        /// <summary> A link to a troubleshooting guide for these classes of warnings. This may not be always available.
 052        public string DocumentationLink { get; }
 53    }
 54}

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\SearchIndexerWarning.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 SearchIndexerWarning
 14    {
 15        internal static SearchIndexerWarning DeserializeSearchIndexerWarning(JsonElement element)
 16        {
 217            Optional<string> key = default;
 218            string message = default;
 219            Optional<string> name = default;
 220            Optional<string> details = default;
 221            Optional<string> documentationLink = default;
 2422            foreach (var property in element.EnumerateObject())
 23            {
 1024                if (property.NameEquals("key"))
 25                {
 226                    key = property.Value.GetString();
 227                    continue;
 28                }
 829                if (property.NameEquals("message"))
 30                {
 231                    message = property.Value.GetString();
 232                    continue;
 33                }
 634                if (property.NameEquals("name"))
 35                {
 236                    name = property.Value.GetString();
 237                    continue;
 38                }
 439                if (property.NameEquals("details"))
 40                {
 241                    details = property.Value.GetString();
 242                    continue;
 43                }
 244                if (property.NameEquals("documentationLink"))
 45                {
 246                    documentationLink = property.Value.GetString();
 47                    continue;
 48                }
 49            }
 250            return new SearchIndexerWarning(key.Value, message, name.Value, details.Value, documentationLink.Value);
 51        }
 52    }
 53}