< Summary

Class:Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring.LUISAuthoringClient
Assembly:Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Language.LUIS.Authoring\src\Generated\LUISAuthoringClient.cs
Covered lines:57
Uncovered lines:23
Coverable lines:80
Total lines:260
Line coverage:71.2% (57 of 80)
Covered branches:3
Total branches:12
Branch coverage:25% (3 of 12)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_BaseUri()-100%100%
get_SerializationSettings()-100%100%
get_DeserializationSettings()-100%100%
get_Endpoint()-100%100%
get_Credentials()-100%100%
get_Features()-100%100%
get_Examples()-100%100%
get_Model()-100%100%
get_Apps()-100%100%
get_Versions()-100%100%
get_Train()-100%100%
get_Pattern()-100%100%
get_Settings()-0%100%
get_AzureAccounts()-0%100%
.ctor(...)-0%100%
.ctor(...)-100%100%
.ctor(...)-0%100%
.ctor(...)-85.71%75%
.ctor(...)-0%0%
.ctor(...)-0%0%
Initialize()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Language.LUIS.Authoring\src\Generated\LUISAuthoringClient.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
 12{
 13    using Microsoft.Rest;
 14    using Microsoft.Rest.Serialization;
 15    using Models;
 16    using Newtonsoft.Json;
 17    using System.Collections;
 18    using System.Collections.Generic;
 19    using System.Net;
 20    using System.Net.Http;
 21
 22    public partial class LUISAuthoringClient : ServiceClient<LUISAuthoringClient>, ILUISAuthoringClient
 23    {
 24        /// <summary>
 25        /// The base URI of the service.
 26        /// </summary>
 74527        internal string BaseUri {get; set;}
 28
 29        /// <summary>
 30        /// Gets or sets json serialization settings.
 31        /// </summary>
 141032        public JsonSerializerSettings SerializationSettings { get; private set; }
 33
 34        /// <summary>
 35        /// Gets or sets json deserialization settings.
 36        /// </summary>
 74337        public JsonSerializerSettings DeserializationSettings { get; private set; }
 38
 39        /// <summary>
 40        /// Supported Cognitive Services endpoints (protocol and hostname, for example:
 41        /// https://westus.api.cognitive.microsoft.com).
 42        /// </summary>
 133443        public string Endpoint { get; set; }
 44
 45        /// <summary>
 46        /// Subscription credentials which uniquely identify client subscription.
 47        /// </summary>
 164648        public ServiceClientCredentials Credentials { get; private set; }
 49
 50        /// <summary>
 51        /// Gets the IFeatures.
 52        /// </summary>
 19253        public virtual IFeatures Features { get; private set; }
 54
 55        /// <summary>
 56        /// Gets the IExamples.
 57        /// </summary>
 16658        public virtual IExamples Examples { get; private set; }
 59
 60        /// <summary>
 61        /// Gets the IModel.
 62        /// </summary>
 53963        public virtual IModel Model { get; private set; }
 64
 65        /// <summary>
 66        /// Gets the IApps.
 67        /// </summary>
 24568        public virtual IApps Apps { get; private set; }
 69
 70        /// <summary>
 71        /// Gets the IVersions.
 72        /// </summary>
 19573        public virtual IVersions Versions { get; private set; }
 74
 75        /// <summary>
 76        /// Gets the ITrain.
 77        /// </summary>
 16678        public virtual ITrain Train { get; private set; }
 79
 80        /// <summary>
 81        /// Gets the IPattern.
 82        /// </summary>
 17883        public virtual IPattern Pattern { get; private set; }
 84
 85        /// <summary>
 86        /// Gets the ISettings.
 87        /// </summary>
 088        public virtual ISettings Settings { get; private set; }
 89
 90        /// <summary>
 91        /// Gets the IAzureAccounts.
 92        /// </summary>
 093        public virtual IAzureAccounts AzureAccounts { get; private set; }
 94
 95        /// <summary>
 96        /// Initializes a new instance of the LUISAuthoringClient class.
 97        /// </summary>
 98        /// <param name='httpClient'>
 99        /// HttpClient to be used
 100        /// </param>
 101        /// <param name='disposeHttpClient'>
 102        /// True: will dispose the provided httpClient on calling LUISAuthoringClient.Dispose(). False: will not dispose
 0103        protected LUISAuthoringClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClien
 104        {
 0105            Initialize();
 0106        }
 107
 108        /// <summary>
 109        /// Initializes a new instance of the LUISAuthoringClient class.
 110        /// </summary>
 111        /// <param name='handlers'>
 112        /// Optional. The delegating handlers to add to the http client pipeline.
 113        /// </param>
 156114        protected LUISAuthoringClient(params DelegatingHandler[] handlers) : base(handlers)
 115        {
 156116            Initialize();
 156117        }
 118
 119        /// <summary>
 120        /// Initializes a new instance of the LUISAuthoringClient class.
 121        /// </summary>
 122        /// <param name='rootHandler'>
 123        /// Optional. The http client handler used to handle http transport.
 124        /// </param>
 125        /// <param name='handlers'>
 126        /// Optional. The delegating handlers to add to the http client pipeline.
 127        /// </param>
 0128        protected LUISAuthoringClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHan
 129        {
 0130            Initialize();
 0131        }
 132
 133        /// <summary>
 134        /// Initializes a new instance of the LUISAuthoringClient class.
 135        /// </summary>
 136        /// <param name='credentials'>
 137        /// Required. Subscription credentials which uniquely identify client subscription.
 138        /// </param>
 139        /// <param name='handlers'>
 140        /// Optional. The delegating handlers to add to the http client pipeline.
 141        /// </param>
 142        /// <exception cref="System.ArgumentNullException">
 143        /// Thrown when a required parameter is null
 144        /// </exception>
 156145        public LUISAuthoringClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(han
 146        {
 156147            if (credentials == null)
 148            {
 0149                throw new System.ArgumentNullException("credentials");
 150            }
 156151            Credentials = credentials;
 156152            if (Credentials != null)
 153            {
 156154                Credentials.InitializeServiceClient(this);
 155            }
 156156        }
 157
 158        /// <summary>
 159        /// Initializes a new instance of the LUISAuthoringClient class.
 160        /// </summary>
 161        /// <param name='credentials'>
 162        /// Required. Subscription credentials which uniquely identify client subscription.
 163        /// </param>
 164        /// <param name='httpClient'>
 165        /// HttpClient to be used
 166        /// </param>
 167        /// <param name='disposeHttpClient'>
 168        /// True: will dispose the provided httpClient on calling LUISAuthoringClient.Dispose(). False: will not dispose
 169        /// <exception cref="System.ArgumentNullException">
 170        /// Thrown when a required parameter is null
 171        /// </exception>
 0172        public LUISAuthoringClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) 
 173        {
 0174            if (credentials == null)
 175            {
 0176                throw new System.ArgumentNullException("credentials");
 177            }
 0178            Credentials = credentials;
 0179            if (Credentials != null)
 180            {
 0181                Credentials.InitializeServiceClient(this);
 182            }
 0183        }
 184
 185        /// <summary>
 186        /// Initializes a new instance of the LUISAuthoringClient class.
 187        /// </summary>
 188        /// <param name='credentials'>
 189        /// Required. Subscription credentials which uniquely identify client subscription.
 190        /// </param>
 191        /// <param name='rootHandler'>
 192        /// Optional. The http client handler used to handle http transport.
 193        /// </param>
 194        /// <param name='handlers'>
 195        /// Optional. The delegating handlers to add to the http client pipeline.
 196        /// </param>
 197        /// <exception cref="System.ArgumentNullException">
 198        /// Thrown when a required parameter is null
 199        /// </exception>
 0200        public LUISAuthoringClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params Delegatin
 201        {
 0202            if (credentials == null)
 203            {
 0204                throw new System.ArgumentNullException("credentials");
 205            }
 0206            Credentials = credentials;
 0207            if (Credentials != null)
 208            {
 0209                Credentials.InitializeServiceClient(this);
 210            }
 0211        }
 212
 213        /// <summary>
 214        /// An optional partial-method to perform custom initialization.
 215        ///</summary>
 216        partial void CustomInitialize();
 217        /// <summary>
 218        /// Initializes client properties.
 219        /// </summary>
 220        private void Initialize()
 221        {
 156222            Features = new Features(this);
 156223            Examples = new Examples(this);
 156224            Model = new Model(this);
 156225            Apps = new Apps(this);
 156226            Versions = new Versions(this);
 156227            Train = new Train(this);
 156228            Pattern = new Pattern(this);
 156229            Settings = new Settings(this);
 156230            AzureAccounts = new AzureAccounts(this);
 156231            BaseUri = "{Endpoint}/luis/authoring/v3.0-preview";
 156232            SerializationSettings = new JsonSerializerSettings
 156233            {
 156234                Formatting = Newtonsoft.Json.Formatting.Indented,
 156235                DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
 156236                DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
 156237                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
 156238                ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
 156239                ContractResolver = new ReadOnlyJsonContractResolver(),
 156240                Converters = new  List<JsonConverter>
 156241                    {
 156242                        new Iso8601TimeSpanConverter()
 156243                    }
 156244            };
 156245            DeserializationSettings = new JsonSerializerSettings
 156246            {
 156247                DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
 156248                DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
 156249                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
 156250                ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
 156251                ContractResolver = new ReadOnlyJsonContractResolver(),
 156252                Converters = new List<JsonConverter>
 156253                    {
 156254                        new Iso8601TimeSpanConverter()
 156255                    }
 156256            };
 257            CustomInitialize();
 156258        }
 259    }
 260}