< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_Code()-0%100%
.ctor(...)-0%0%
.ctor(...)-0%100%
get_Message()-0%100%
get_TargetRef()-0%100%
DeserializeTextAnalyticsWarning_internal(...)-0%0%
get_Code()-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\Generated\Models\TextAnalyticsWarning_internal.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.AI.TextAnalytics.Models
 11{
 012    /// <summary> The TextAnalyticsWarning. </summary>
 13    internal partial class TextAnalyticsWarning_internal
 14    {
 15        /// <summary> Initializes a new instance of TextAnalyticsWarning_internal. </summary>
 16        /// <param name="code"> Error code. </param>
 17        /// <param name="message"> Warning message. </param>
 18        /// <exception cref="ArgumentNullException"> <paramref name="code"/> or <paramref name="message"/> is null. </ex
 019        internal TextAnalyticsWarning_internal(string code, string message)
 20        {
 021            if (code == null)
 22            {
 023                throw new ArgumentNullException(nameof(code));
 24            }
 025            if (message == null)
 26            {
 027                throw new ArgumentNullException(nameof(message));
 28            }
 29
 030            Code = code;
 031            Message = message;
 032        }
 33
 34        /// <summary> Initializes a new instance of TextAnalyticsWarning_internal. </summary>
 35        /// <param name="code"> Error code. </param>
 36        /// <param name="message"> Warning message. </param>
 37        /// <param name="targetRef"> A JSON pointer reference indicating the target object. </param>
 038        internal TextAnalyticsWarning_internal(string code, string message, string targetRef)
 39        {
 040            Code = code;
 041            Message = message;
 042            TargetRef = targetRef;
 043        }
 44        /// <summary> Warning message. </summary>
 045        public string Message { get; }
 46        /// <summary> A JSON pointer reference indicating the target object. </summary>
 047        public string TargetRef { get; }
 48    }
 49}

C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\Generated\Models\TextAnalyticsWarning_internal.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.Models
 12{
 13    internal partial class TextAnalyticsWarning_internal
 14    {
 15        internal static TextAnalyticsWarning_internal DeserializeTextAnalyticsWarning_internal(JsonElement element)
 16        {
 017            string code = default;
 018            string message = default;
 019            Optional<string> targetRef = default;
 020            foreach (var property in element.EnumerateObject())
 21            {
 022                if (property.NameEquals("code"))
 23                {
 024                    code = property.Value.GetString();
 025                    continue;
 26                }
 027                if (property.NameEquals("message"))
 28                {
 029                    message = property.Value.GetString();
 030                    continue;
 31                }
 032                if (property.NameEquals("targetRef"))
 33                {
 034                    targetRef = property.Value.GetString();
 35                    continue;
 36                }
 37            }
 038            return new TextAnalyticsWarning_internal(code, message, targetRef.Value);
 39        }
 40    }
 41}

C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\TextAnalyticsWarning_internal.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.Models
 7{
 8    [CodeGenModel("TextAnalyticsWarning")]
 9    internal partial class TextAnalyticsWarning_internal
 10    {
 11        /// <summary> Warning code as string </summary>
 012        public string Code { get; }
 13    }
 14}