< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
ToSerialString(...)-0%0%
ToInnerErrorCodeValue(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\Generated\Models\InnerErrorCodeValue.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;
 9
 10namespace Azure.AI.TextAnalytics.Models
 11{
 12    internal static class InnerErrorCodeValueExtensions
 13    {
 014        public static string ToSerialString(this InnerErrorCodeValue value) => value switch
 015        {
 016            InnerErrorCodeValue.InvalidParameterValue => "invalidParameterValue",
 017            InnerErrorCodeValue.InvalidRequestBodyFormat => "invalidRequestBodyFormat",
 018            InnerErrorCodeValue.EmptyRequest => "emptyRequest",
 019            InnerErrorCodeValue.MissingInputRecords => "missingInputRecords",
 020            InnerErrorCodeValue.InvalidDocument => "invalidDocument",
 021            InnerErrorCodeValue.ModelVersionIncorrect => "modelVersionIncorrect",
 022            InnerErrorCodeValue.InvalidDocumentBatch => "invalidDocumentBatch",
 023            InnerErrorCodeValue.UnsupportedLanguageCode => "unsupportedLanguageCode",
 024            InnerErrorCodeValue.InvalidCountryHint => "invalidCountryHint",
 025            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown InnerErrorCodeValue value.")
 026        };
 27
 28        public static InnerErrorCodeValue ToInnerErrorCodeValue(this string value)
 29        {
 030            if (string.Equals(value, "invalidParameterValue", StringComparison.InvariantCultureIgnoreCase)) return Inner
 031            if (string.Equals(value, "invalidRequestBodyFormat", StringComparison.InvariantCultureIgnoreCase)) return In
 032            if (string.Equals(value, "emptyRequest", StringComparison.InvariantCultureIgnoreCase)) return InnerErrorCode
 033            if (string.Equals(value, "missingInputRecords", StringComparison.InvariantCultureIgnoreCase)) return InnerEr
 034            if (string.Equals(value, "invalidDocument", StringComparison.InvariantCultureIgnoreCase)) return InnerErrorC
 035            if (string.Equals(value, "modelVersionIncorrect", StringComparison.InvariantCultureIgnoreCase)) return Inner
 036            if (string.Equals(value, "invalidDocumentBatch", StringComparison.InvariantCultureIgnoreCase)) return InnerE
 037            if (string.Equals(value, "unsupportedLanguageCode", StringComparison.InvariantCultureIgnoreCase)) return Inn
 038            if (string.Equals(value, "invalidCountryHint", StringComparison.InvariantCultureIgnoreCase)) return InnerErr
 039            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown InnerErrorCodeValue value.");
 40        }
 41    }
 42}