< Summary

Class:Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring.Models.AzureAccountInfoObject
Assembly:Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Language.LUIS.Authoring\src\Generated\Models\AzureAccountInfoObject.cs
Covered lines:0
Uncovered lines:17
Coverable lines:17
Total lines:90
Line coverage:0% (0 of 17)
Covered branches:0
Total branches:6
Branch coverage:0% (0 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_AzureSubscriptionId()-0%100%
get_ResourceGroup()-0%100%
get_AccountName()-0%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Language.LUIS.Authoring\src\Generated\Models\AzureAccountInfoObject.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.Authoring.Models
 12{
 13    using Microsoft.Rest;
 14    using Newtonsoft.Json;
 15    using System.Linq;
 16
 17    /// <summary>
 18    /// Defines the Azure account information object.
 19    /// </summary>
 20    public partial class AzureAccountInfoObject
 21    {
 22        /// <summary>
 23        /// Initializes a new instance of the AzureAccountInfoObject class.
 24        /// </summary>
 025        public AzureAccountInfoObject()
 26        {
 27            CustomInit();
 028        }
 29
 30        /// <summary>
 31        /// Initializes a new instance of the AzureAccountInfoObject class.
 32        /// </summary>
 33        /// <param name="azureSubscriptionId">The id for the Azure
 34        /// subscription.</param>
 35        /// <param name="resourceGroup">The Azure resource group name.</param>
 36        /// <param name="accountName">The Azure account name.</param>
 037        public AzureAccountInfoObject(string azureSubscriptionId, string resourceGroup, string accountName)
 38        {
 039            AzureSubscriptionId = azureSubscriptionId;
 040            ResourceGroup = resourceGroup;
 041            AccountName = accountName;
 42            CustomInit();
 043        }
 44
 45        /// <summary>
 46        /// An initialization method that performs custom operations like setting defaults
 47        /// </summary>
 48        partial void CustomInit();
 49
 50        /// <summary>
 51        /// Gets or sets the id for the Azure subscription.
 52        /// </summary>
 53        [JsonProperty(PropertyName = "azureSubscriptionId")]
 054        public string AzureSubscriptionId { get; set; }
 55
 56        /// <summary>
 57        /// Gets or sets the Azure resource group name.
 58        /// </summary>
 59        [JsonProperty(PropertyName = "resourceGroup")]
 060        public string ResourceGroup { get; set; }
 61
 62        /// <summary>
 63        /// Gets or sets the Azure account name.
 64        /// </summary>
 65        [JsonProperty(PropertyName = "accountName")]
 066        public string AccountName { get; set; }
 67
 68        /// <summary>
 69        /// Validate the object.
 70        /// </summary>
 71        /// <exception cref="ValidationException">
 72        /// Thrown if validation fails
 73        /// </exception>
 74        public virtual void Validate()
 75        {
 076            if (AzureSubscriptionId == null)
 77            {
 078                throw new ValidationException(ValidationRules.CannotBeNull, "AzureSubscriptionId");
 79            }
 080            if (ResourceGroup == null)
 81            {
 082                throw new ValidationException(ValidationRules.CannotBeNull, "ResourceGroup");
 83            }
 084            if (AccountName == null)
 85            {
 086                throw new ValidationException(ValidationRules.CannotBeNull, "AccountName");
 87            }
 088        }
 89    }
 90}