< Summary

Class:Microsoft.Azure.Search.Models.NamedEntityRecognitionSkillLanguage
Assembly:Microsoft.Azure.Search.Service
File(s):C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Search.Service\src\Customizations\Skillsets\Models\NamedEntityRecognitionSkillLanguage.cs
Covered lines:0
Uncovered lines:25
Coverable lines:25
Total lines:157
Line coverage:0% (0 of 25)
Covered branches:0
Total branches:2
Branch coverage:0% (0 of 2)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.cctor()-0%100%
.ctor(...)-0%100%
op_Implicit(...)-0%100%
op_Explicit(...)-0%100%
op_Equality(...)-0%100%
op_Inequality(...)-0%100%
Equals(...)-0%100%
Equals(...)-0%0%
GetHashCode()-0%100%
ToString()-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Search.Service\src\Customizations\Skillsets\Models\NamedEntityRecognitionSkillLanguage.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License. See License.txt in the project root for
 3// license information.
 4
 5namespace Microsoft.Azure.Search.Models
 6{
 7    using System;
 8    using Microsoft.Azure.Search.Common;
 9    using Newtonsoft.Json;
 10    using Serialization;
 11
 12    /// <summary>
 13    /// Defines the format of NamedEntityRecognitionSkill supported language codes.
 14    /// </summary>
 15    [JsonConverter(typeof(ExtensibleEnumConverter<NamedEntityRecognitionSkillLanguage>))]
 16    [Obsolete("Use EntityRecognitionSkillLanguage instead.")]
 17    public struct NamedEntityRecognitionSkillLanguage : IEquatable<NamedEntityRecognitionSkillLanguage>
 18    {
 19        private readonly string _value;
 20
 21        /// <summary>
 22        /// Indicates language code "ar" (for Arabic)
 23        /// </summary>
 024        public static readonly NamedEntityRecognitionSkillLanguage Ar = new NamedEntityRecognitionSkillLanguage("ar");
 25
 26        /// <summary>
 27        /// Indicates language code "cs" (for Czech)
 28        /// </summary>
 029        public static readonly NamedEntityRecognitionSkillLanguage Cs = new NamedEntityRecognitionSkillLanguage("cs");
 30
 31        /// <summary>
 32        /// Indicates language code "da" (for Danish)
 33        /// </summary>
 034        public static readonly NamedEntityRecognitionSkillLanguage Da = new NamedEntityRecognitionSkillLanguage("da");
 35
 36        /// <summary>
 37        /// Indicates language code "de" (for German)
 38        /// </summary>
 039        public static readonly NamedEntityRecognitionSkillLanguage De = new NamedEntityRecognitionSkillLanguage("de");
 40
 41        /// <summary>
 42        /// Indicates language code "en" (for English)
 43        /// </summary>
 044        public static readonly NamedEntityRecognitionSkillLanguage En = new NamedEntityRecognitionSkillLanguage("en");
 45
 46        /// <summary>
 47        /// Indicates language code "es" (for Spanish)
 48        /// </summary>
 049        public static readonly NamedEntityRecognitionSkillLanguage Es = new NamedEntityRecognitionSkillLanguage("es");
 50
 51        /// <summary>
 52        /// Indicates language code "fi" (for Finnish)
 53        /// </summary>
 054        public static readonly NamedEntityRecognitionSkillLanguage Fi = new NamedEntityRecognitionSkillLanguage("fi");
 55
 56        /// <summary>
 57        /// Indicates language code "fr" (for French)
 58        /// </summary>
 059        public static readonly NamedEntityRecognitionSkillLanguage Fr = new NamedEntityRecognitionSkillLanguage("fr");
 60
 61        /// <summary>
 62        /// Indicates language code "he" (for Hebrew)
 63        /// </summary>
 064        public static readonly NamedEntityRecognitionSkillLanguage He = new NamedEntityRecognitionSkillLanguage("he");
 65
 66        /// <summary>
 67        /// Indicates language code "hu" (for Hungarian)
 68        /// </summary>
 069        public static readonly NamedEntityRecognitionSkillLanguage Hu = new NamedEntityRecognitionSkillLanguage("hu");
 70
 71        /// <summary>
 72        /// Indicates language code "it" (for Italian)
 73        /// </summary>
 074        public static readonly NamedEntityRecognitionSkillLanguage It = new NamedEntityRecognitionSkillLanguage("it");
 75
 76        /// <summary>
 77        /// Indicates language code "ko" (for Korean)
 78        /// </summary>
 079        public static readonly NamedEntityRecognitionSkillLanguage Ko = new NamedEntityRecognitionSkillLanguage("ko");
 80
 81        /// <summary>
 82        /// Indicates language code "pt-br" (for Portuguese (Brazil))
 83        /// </summary>
 084        public static readonly NamedEntityRecognitionSkillLanguage PtBr = new NamedEntityRecognitionSkillLanguage("pt-br
 85
 86        /// <summary>
 87        /// Indicates language code "pt" (for Portuguese)
 88        /// </summary>
 089        public static readonly NamedEntityRecognitionSkillLanguage Pt = new NamedEntityRecognitionSkillLanguage("pt");
 90
 91        private NamedEntityRecognitionSkillLanguage(string language)
 92        {
 093            Throw.IfArgumentNull(language, nameof(language));
 094            _value = language;
 095        }
 96
 97        /// <summary>
 98        /// Defines implicit conversion from string to NamedEntityRecognitionSkillLanguage.
 99        /// </summary>
 100        /// <param name="language">string to convert.</param>
 101        /// <returns>The string as a NamedEntityRecognitionSkillLanguage.</returns>
 102        public static implicit operator NamedEntityRecognitionSkillLanguage(string language) =>
 0103            new NamedEntityRecognitionSkillLanguage(language);
 104
 105        /// <summary>
 106        /// Defines explicit conversion from NamedEntityRecognitionSkillLanguage to string.
 107        /// </summary>
 108        /// <param name="language">NamedEntityRecognitionSkillLanguage to convert.</param>
 109        /// <returns>The NamedEntityRecognitionSkillLanguage as a string.</returns>
 0110        public static explicit operator string(NamedEntityRecognitionSkillLanguage language) => language.ToString();
 111
 112        /// <summary>
 113        /// Compares two NamedEntityRecognitionSkillLanguage values for equality.
 114        /// </summary>
 115        /// <param name="lhs">The first NamedEntityRecognitionSkillLanguage to compare.</param>
 116        /// <param name="rhs">The second NamedEntityRecognitionSkillLanguage to compare.</param>
 117        /// <returns>true if the NamedEntityRecognitionSkillLanguage objects are equal or are both null; false otherwise
 118        public static bool operator ==(NamedEntityRecognitionSkillLanguage lhs, NamedEntityRecognitionSkillLanguage rhs)
 0119            Equals(lhs, rhs);
 120
 121        /// <summary>
 122        /// Compares two NamedEntityRecognitionSkillLanguage values for inequality.
 123        /// </summary>
 124        /// <param name="lhs">The first NamedEntityRecognitionSkillLanguage to compare.</param>
 125        /// <param name="rhs">The second NamedEntityRecognitionSkillLanguage to compare.</param>
 126        /// <returns>true if the NamedEntityRecognitionSkillLanguage objects are not equal; false otherwise.</returns>
 127        public static bool operator !=(NamedEntityRecognitionSkillLanguage lhs, NamedEntityRecognitionSkillLanguage rhs)
 0128            !Equals(lhs, rhs);
 129
 130        /// <summary>
 131        /// Compares the NamedEntityRecognitionSkillLanguage for equality with another NamedEntityRecognitionSkillLangua
 132        /// </summary>
 133        /// <param name="other">The NamedEntityRecognitionSkillLanguage with which to compare.</param>
 134        /// <returns><c>true</c> if the NamedEntityRecognitionSkillLanguage objects are equal; otherwise, <c>false</c>.<
 0135        public bool Equals(NamedEntityRecognitionSkillLanguage other) => _value == other._value;
 136
 137        /// <summary>
 138        /// Determines whether the specified object is equal to the current object.
 139        /// </summary>
 140        /// <param name="obj">The object to compare with the current object.</param>
 141        /// <returns><c>true</c> if the specified object is equal to the current object; otherwise, <c>false</c>.</retur
 142        public override bool Equals(object obj) =>
 0143            obj is NamedEntityRecognitionSkillLanguage ? Equals((NamedEntityRecognitionSkillLanguage)obj) : false;
 144
 145        /// <summary>
 146        /// Serves as the default hash function.
 147        /// </summary>
 148        /// <returns>A hash code for the current object.</returns>
 0149        public override int GetHashCode() => _value.GetHashCode();
 150
 151        /// <summary>
 152        /// Returns a string representation of the NamedEntityRecognitionSkillLanguage.
 153        /// </summary>
 154        /// <returns>The NamedEntityRecognitionSkillLanguage as a string.</returns>
 0155        public override string ToString() => _value;
 156    }
 157}