< Summary

Class:Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime.Models.Error
Assembly:Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Language.LUIS.Runtime\src\Generated\Models\Error.cs
Covered lines:3
Uncovered lines:8
Coverable lines:11
Total lines:67
Line coverage:27.2% (3 of 11)
Covered branches:0
Total branches:4
Branch coverage:0% (0 of 4)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-0%100%
get_ErrorProperty()-100%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Language.LUIS.Runtime\src\Generated\Models\Error.cs

#LineLine coverage
 1// <auto-generated>
 2// Copyright (c) Microsoft Corporation. All rights reserved.
 3// Licensed under the MIT License. See License.txt in the project root for
 4// license information.
 5//
 6// Code generated by Microsoft (R) AutoRest Code Generator.
 7// Changes may cause incorrect behavior and will be lost if the code is
 8// regenerated.
 9// </auto-generated>
 10
 11namespace Microsoft.Azure.CognitiveServices.Language.LUIS.Runtime.Models
 12{
 13    using Microsoft.Rest;
 14    using Newtonsoft.Json;
 15    using System.Linq;
 16
 17    /// <summary>
 18    /// Represents the error that occurred.
 19    /// </summary>
 20    public partial class Error
 21    {
 22        /// <summary>
 23        /// Initializes a new instance of the Error class.
 24        /// </summary>
 225        public Error()
 26        {
 27            CustomInit();
 228        }
 29
 30        /// <summary>
 31        /// Initializes a new instance of the Error class.
 32        /// </summary>
 033        public Error(ErrorBody errorProperty)
 34        {
 035            ErrorProperty = errorProperty;
 36            CustomInit();
 037        }
 38
 39        /// <summary>
 40        /// An initialization method that performs custom operations like setting defaults
 41        /// </summary>
 42        partial void CustomInit();
 43
 44        /// <summary>
 45        /// </summary>
 46        [JsonProperty(PropertyName = "error")]
 647        public ErrorBody ErrorProperty { get; set; }
 48
 49        /// <summary>
 50        /// Validate the object.
 51        /// </summary>
 52        /// <exception cref="ValidationException">
 53        /// Thrown if validation fails
 54        /// </exception>
 55        public virtual void Validate()
 56        {
 057            if (ErrorProperty == null)
 58            {
 059                throw new ValidationException(ValidationRules.CannotBeNull, "ErrorProperty");
 60            }
 061            if (ErrorProperty != null)
 62            {
 063                ErrorProperty.Validate();
 64            }
 065        }
 66    }
 67}