< Summary

Class:Microsoft.Azure.Graph.RBAC.GraphRbacManagementClient
Assembly:Microsoft.Azure.Graph.RBAC
File(s):C:\Git\azure-sdk-for-net\sdk\graphrbac\Microsoft.Azure.Graph.RBAC\src\Generated\GraphRbacManagementClient.cs
Covered lines:68
Uncovered lines:55
Coverable lines:123
Total lines:410
Line coverage:55.2% (68 of 123)
Covered branches:4
Total branches:28
Branch coverage:14.2% (4 of 28)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_BaseUri()-100%100%
get_SerializationSettings()-100%100%
get_DeserializationSettings()-100%100%
get_Credentials()-100%100%
get_ApiVersion()-100%100%
get_TenantID()-100%100%
get_AcceptLanguage()-100%100%
get_LongRunningOperationRetryTimeout()-0%100%
get_GenerateClientRequestId()-100%100%
get_SignedInUser()-0%100%
get_Applications()-0%100%
get_DeletedApplications()-0%100%
get_Groups()-100%100%
get_ServicePrincipals()-100%100%
get_Users()-100%100%
get_Objects()-100%100%
get_Domains()-0%100%
get_OAuth2PermissionGrant()-0%100%
.ctor(...)-0%100%
.ctor(...)-100%100%
.ctor(...)-0%100%
.ctor(...)-0%0%
.ctor(...)-0%0%
.ctor(...)-0%0%
.ctor(...)-0%0%
.ctor(...)-0%0%
.ctor(...)-80%66.67%
.ctor(...)-0%0%
Initialize()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\graphrbac\Microsoft.Azure.Graph.RBAC\src\Generated\GraphRbacManagementClient.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.Graph.RBAC
 12{
 13    using Microsoft.Rest;
 14    using Microsoft.Rest.Azure;
 15    using Microsoft.Rest.Serialization;
 16    using Models;
 17    using Newtonsoft.Json;
 18    using System.Collections;
 19    using System.Collections.Generic;
 20    using System.Linq;
 21    using System.Net;
 22    using System.Net.Http;
 23
 24    /// <summary>
 25    /// The Graph RBAC Management Client
 26    /// </summary>
 27    public partial class GraphRbacManagementClient : ServiceClient<GraphRbacManagementClient>, IGraphRbacManagementClien
 28    {
 29        /// <summary>
 30        /// The base URI of the service.
 31        /// </summary>
 16032        public System.Uri BaseUri { get; set; }
 33
 34        /// <summary>
 35        /// Gets or sets json serialization settings.
 36        /// </summary>
 16037        public JsonSerializerSettings SerializationSettings { get; private set; }
 38
 39        /// <summary>
 40        /// Gets or sets json deserialization settings.
 41        /// </summary>
 23842        public JsonSerializerSettings DeserializationSettings { get; private set; }
 43
 44        /// <summary>
 45        /// Credentials needed for the client to connect to Azure.
 46        /// </summary>
 27047        public ServiceClientCredentials Credentials { get; private set; }
 48
 49        /// <summary>
 50        /// Client API version.
 51        /// </summary>
 24452        public string ApiVersion { get; private set; }
 53
 54        /// <summary>
 55        /// The tenant ID.
 56        /// </summary>
 18057        public string TenantID { get; set; }
 58
 59        /// <summary>
 60        /// The preferred language for the response.
 61        /// </summary>
 17862        public string AcceptLanguage { get; set; }
 63
 64        /// <summary>
 65        /// The retry timeout in seconds for Long Running Operations. Default value is
 66        /// 30.
 67        /// </summary>
 068        public int? LongRunningOperationRetryTimeout { get; set; }
 69
 70        /// <summary>
 71        /// Whether a unique x-ms-client-request-id should be generated. When set to
 72        /// true a unique x-ms-client-request-id value is generated and included in
 73        /// each request. Default is true.
 74        /// </summary>
 17875        public bool? GenerateClientRequestId { get; set; }
 76
 77        /// <summary>
 78        /// Gets the ISignedInUserOperations.
 79        /// </summary>
 080        public virtual ISignedInUserOperations SignedInUser { get; private set; }
 81
 82        /// <summary>
 83        /// Gets the IApplicationsOperations.
 84        /// </summary>
 085        public virtual IApplicationsOperations Applications { get; private set; }
 86
 87        /// <summary>
 88        /// Gets the IDeletedApplicationsOperations.
 89        /// </summary>
 090        public virtual IDeletedApplicationsOperations DeletedApplications { get; private set; }
 91
 92        /// <summary>
 93        /// Gets the IGroupsOperations.
 94        /// </summary>
 6895        public virtual IGroupsOperations Groups { get; private set; }
 96
 97        /// <summary>
 98        /// Gets the IServicePrincipalsOperations.
 99        /// </summary>
 56100        public virtual IServicePrincipalsOperations ServicePrincipals { get; private set; }
 101
 102        /// <summary>
 103        /// Gets the IUsersOperations.
 104        /// </summary>
 74105        public virtual IUsersOperations Users { get; private set; }
 106
 107        /// <summary>
 108        /// Gets the IObjectsOperations.
 109        /// </summary>
 52110        public virtual IObjectsOperations Objects { get; private set; }
 111
 112        /// <summary>
 113        /// Gets the IDomainsOperations.
 114        /// </summary>
 0115        public virtual IDomainsOperations Domains { get; private set; }
 116
 117        /// <summary>
 118        /// Gets the IOAuth2PermissionGrantOperations.
 119        /// </summary>
 0120        public virtual IOAuth2PermissionGrantOperations OAuth2PermissionGrant { get; private set; }
 121
 122        /// <summary>
 123        /// Initializes a new instance of the GraphRbacManagementClient class.
 124        /// </summary>
 125        /// <param name='httpClient'>
 126        /// HttpClient to be used
 127        /// </param>
 128        /// <param name='disposeHttpClient'>
 129        /// True: will dispose the provided httpClient on calling GraphRbacManagementClient.Dispose(). False: will not d
 0130        protected GraphRbacManagementClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHtt
 131        {
 0132            Initialize();
 0133        }
 134
 135        /// <summary>
 136        /// Initializes a new instance of the GraphRbacManagementClient class.
 137        /// </summary>
 138        /// <param name='handlers'>
 139        /// Optional. The delegating handlers to add to the http client pipeline.
 140        /// </param>
 46141        protected GraphRbacManagementClient(params DelegatingHandler[] handlers) : base(handlers)
 142        {
 46143            Initialize();
 46144        }
 145
 146        /// <summary>
 147        /// Initializes a new instance of the GraphRbacManagementClient class.
 148        /// </summary>
 149        /// <param name='rootHandler'>
 150        /// Optional. The http client handler used to handle http transport.
 151        /// </param>
 152        /// <param name='handlers'>
 153        /// Optional. The delegating handlers to add to the http client pipeline.
 154        /// </param>
 0155        protected GraphRbacManagementClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(r
 156        {
 0157            Initialize();
 0158        }
 159
 160        /// <summary>
 161        /// Initializes a new instance of the GraphRbacManagementClient class.
 162        /// </summary>
 163        /// <param name='baseUri'>
 164        /// Optional. The base URI of the service.
 165        /// </param>
 166        /// <param name='handlers'>
 167        /// Optional. The delegating handlers to add to the http client pipeline.
 168        /// </param>
 169        /// <exception cref="System.ArgumentNullException">
 170        /// Thrown when a required parameter is null
 171        /// </exception>
 0172        protected GraphRbacManagementClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers)
 173        {
 0174            if (baseUri == null)
 175            {
 0176                throw new System.ArgumentNullException("baseUri");
 177            }
 0178            BaseUri = baseUri;
 0179        }
 180
 181        /// <summary>
 182        /// Initializes a new instance of the GraphRbacManagementClient class.
 183        /// </summary>
 184        /// <param name='baseUri'>
 185        /// Optional. The base URI of the service.
 186        /// </param>
 187        /// <param name='rootHandler'>
 188        /// Optional. The http client handler used to handle http transport.
 189        /// </param>
 190        /// <param name='handlers'>
 191        /// Optional. The delegating handlers to add to the http client pipeline.
 192        /// </param>
 193        /// <exception cref="System.ArgumentNullException">
 194        /// Thrown when a required parameter is null
 195        /// </exception>
 0196        protected GraphRbacManagementClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[
 197        {
 0198            if (baseUri == null)
 199            {
 0200                throw new System.ArgumentNullException("baseUri");
 201            }
 0202            BaseUri = baseUri;
 0203        }
 204
 205        /// <summary>
 206        /// Initializes a new instance of the GraphRbacManagementClient class.
 207        /// </summary>
 208        /// <param name='credentials'>
 209        /// Required. Credentials needed for the client to connect to Azure.
 210        /// </param>
 211        /// <param name='handlers'>
 212        /// Optional. The delegating handlers to add to the http client pipeline.
 213        /// </param>
 214        /// <exception cref="System.ArgumentNullException">
 215        /// Thrown when a required parameter is null
 216        /// </exception>
 0217        public GraphRbacManagementClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : th
 218        {
 0219            if (credentials == null)
 220            {
 0221                throw new System.ArgumentNullException("credentials");
 222            }
 0223            Credentials = credentials;
 0224            if (Credentials != null)
 225            {
 0226                Credentials.InitializeServiceClient(this);
 227            }
 0228        }
 229
 230        /// <summary>
 231        /// Initializes a new instance of the GraphRbacManagementClient class.
 232        /// </summary>
 233        /// <param name='credentials'>
 234        /// Required. Credentials needed for the client to connect to Azure.
 235        /// </param>
 236        /// <param name='httpClient'>
 237        /// HttpClient to be used
 238        /// </param>
 239        /// <param name='disposeHttpClient'>
 240        /// True: will dispose the provided httpClient on calling GraphRbacManagementClient.Dispose(). False: will not d
 241        /// <exception cref="System.ArgumentNullException">
 242        /// Thrown when a required parameter is null
 243        /// </exception>
 0244        public GraphRbacManagementClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpCl
 245        {
 0246            if (credentials == null)
 247            {
 0248                throw new System.ArgumentNullException("credentials");
 249            }
 0250            Credentials = credentials;
 0251            if (Credentials != null)
 252            {
 0253                Credentials.InitializeServiceClient(this);
 254            }
 0255        }
 256
 257        /// <summary>
 258        /// Initializes a new instance of the GraphRbacManagementClient class.
 259        /// </summary>
 260        /// <param name='credentials'>
 261        /// Required. Credentials needed for the client to connect to Azure.
 262        /// </param>
 263        /// <param name='rootHandler'>
 264        /// Optional. The http client handler used to handle http transport.
 265        /// </param>
 266        /// <param name='handlers'>
 267        /// Optional. The delegating handlers to add to the http client pipeline.
 268        /// </param>
 269        /// <exception cref="System.ArgumentNullException">
 270        /// Thrown when a required parameter is null
 271        /// </exception>
 0272        public GraphRbacManagementClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params Del
 273        {
 0274            if (credentials == null)
 275            {
 0276                throw new System.ArgumentNullException("credentials");
 277            }
 0278            Credentials = credentials;
 0279            if (Credentials != null)
 280            {
 0281                Credentials.InitializeServiceClient(this);
 282            }
 0283        }
 284
 285        /// <summary>
 286        /// Initializes a new instance of the GraphRbacManagementClient class.
 287        /// </summary>
 288        /// <param name='baseUri'>
 289        /// Optional. The base URI of the service.
 290        /// </param>
 291        /// <param name='credentials'>
 292        /// Required. Credentials needed for the client to connect to Azure.
 293        /// </param>
 294        /// <param name='handlers'>
 295        /// Optional. The delegating handlers to add to the http client pipeline.
 296        /// </param>
 297        /// <exception cref="System.ArgumentNullException">
 298        /// Thrown when a required parameter is null
 299        /// </exception>
 46300        public GraphRbacManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHand
 301        {
 46302            if (baseUri == null)
 303            {
 0304                throw new System.ArgumentNullException("baseUri");
 305            }
 46306            if (credentials == null)
 307            {
 0308                throw new System.ArgumentNullException("credentials");
 309            }
 46310            BaseUri = baseUri;
 46311            Credentials = credentials;
 46312            if (Credentials != null)
 313            {
 46314                Credentials.InitializeServiceClient(this);
 315            }
 46316        }
 317
 318        /// <summary>
 319        /// Initializes a new instance of the GraphRbacManagementClient class.
 320        /// </summary>
 321        /// <param name='baseUri'>
 322        /// Optional. The base URI of the service.
 323        /// </param>
 324        /// <param name='credentials'>
 325        /// Required. Credentials needed for the client to connect to Azure.
 326        /// </param>
 327        /// <param name='rootHandler'>
 328        /// Optional. The http client handler used to handle http transport.
 329        /// </param>
 330        /// <param name='handlers'>
 331        /// Optional. The delegating handlers to add to the http client pipeline.
 332        /// </param>
 333        /// <exception cref="System.ArgumentNullException">
 334        /// Thrown when a required parameter is null
 335        /// </exception>
 0336        public GraphRbacManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler roo
 337        {
 0338            if (baseUri == null)
 339            {
 0340                throw new System.ArgumentNullException("baseUri");
 341            }
 0342            if (credentials == null)
 343            {
 0344                throw new System.ArgumentNullException("credentials");
 345            }
 0346            BaseUri = baseUri;
 0347            Credentials = credentials;
 0348            if (Credentials != null)
 349            {
 0350                Credentials.InitializeServiceClient(this);
 351            }
 0352        }
 353
 354        /// <summary>
 355        /// An optional partial-method to perform custom initialization.
 356        /// </summary>
 357        partial void CustomInitialize();
 358        /// <summary>
 359        /// Initializes client properties.
 360        /// </summary>
 361        private void Initialize()
 362        {
 46363            SignedInUser = new SignedInUserOperations(this);
 46364            Applications = new ApplicationsOperations(this);
 46365            DeletedApplications = new DeletedApplicationsOperations(this);
 46366            Groups = new GroupsOperations(this);
 46367            ServicePrincipals = new ServicePrincipalsOperations(this);
 46368            Users = new UsersOperations(this);
 46369            Objects = new ObjectsOperations(this);
 46370            Domains = new DomainsOperations(this);
 46371            OAuth2PermissionGrant = new OAuth2PermissionGrantOperations(this);
 46372            BaseUri = new System.Uri("https://graph.windows.net");
 46373            ApiVersion = "1.6";
 46374            AcceptLanguage = "en-US";
 46375            LongRunningOperationRetryTimeout = 30;
 46376            GenerateClientRequestId = true;
 46377            SerializationSettings = new JsonSerializerSettings
 46378            {
 46379                Formatting = Newtonsoft.Json.Formatting.Indented,
 46380                DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
 46381                DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
 46382                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
 46383                ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
 46384                ContractResolver = new ReadOnlyJsonContractResolver(),
 46385                Converters = new List<JsonConverter>
 46386                    {
 46387                        new Iso8601TimeSpanConverter()
 46388                    }
 46389            };
 46390            SerializationSettings.Converters.Add(new TransformationJsonConverter());
 46391            DeserializationSettings = new JsonSerializerSettings
 46392            {
 46393                DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
 46394                DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
 46395                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
 46396                ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
 46397                ContractResolver = new ReadOnlyJsonContractResolver(),
 46398                Converters = new List<JsonConverter>
 46399                    {
 46400                        new Iso8601TimeSpanConverter()
 46401                    }
 46402            };
 46403            SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter<DirectoryObject>("objectType"));
 46404            DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter<DirectoryObject>("objectType"
 405            CustomInitialize();
 46406            DeserializationSettings.Converters.Add(new TransformationJsonConverter());
 46407            DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 46408        }
 409    }
 410}