| | 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 | |
|
| | 11 | | namespace 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> |
| 160 | 32 | | public System.Uri BaseUri { get; set; } |
| | 33 | |
|
| | 34 | | /// <summary> |
| | 35 | | /// Gets or sets json serialization settings. |
| | 36 | | /// </summary> |
| 160 | 37 | | public JsonSerializerSettings SerializationSettings { get; private set; } |
| | 38 | |
|
| | 39 | | /// <summary> |
| | 40 | | /// Gets or sets json deserialization settings. |
| | 41 | | /// </summary> |
| 238 | 42 | | public JsonSerializerSettings DeserializationSettings { get; private set; } |
| | 43 | |
|
| | 44 | | /// <summary> |
| | 45 | | /// Credentials needed for the client to connect to Azure. |
| | 46 | | /// </summary> |
| 270 | 47 | | public ServiceClientCredentials Credentials { get; private set; } |
| | 48 | |
|
| | 49 | | /// <summary> |
| | 50 | | /// Client API version. |
| | 51 | | /// </summary> |
| 244 | 52 | | public string ApiVersion { get; private set; } |
| | 53 | |
|
| | 54 | | /// <summary> |
| | 55 | | /// The tenant ID. |
| | 56 | | /// </summary> |
| 180 | 57 | | public string TenantID { get; set; } |
| | 58 | |
|
| | 59 | | /// <summary> |
| | 60 | | /// The preferred language for the response. |
| | 61 | | /// </summary> |
| 178 | 62 | | 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> |
| 0 | 68 | | 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> |
| 178 | 75 | | public bool? GenerateClientRequestId { get; set; } |
| | 76 | |
|
| | 77 | | /// <summary> |
| | 78 | | /// Gets the ISignedInUserOperations. |
| | 79 | | /// </summary> |
| 0 | 80 | | public virtual ISignedInUserOperations SignedInUser { get; private set; } |
| | 81 | |
|
| | 82 | | /// <summary> |
| | 83 | | /// Gets the IApplicationsOperations. |
| | 84 | | /// </summary> |
| 0 | 85 | | public virtual IApplicationsOperations Applications { get; private set; } |
| | 86 | |
|
| | 87 | | /// <summary> |
| | 88 | | /// Gets the IDeletedApplicationsOperations. |
| | 89 | | /// </summary> |
| 0 | 90 | | public virtual IDeletedApplicationsOperations DeletedApplications { get; private set; } |
| | 91 | |
|
| | 92 | | /// <summary> |
| | 93 | | /// Gets the IGroupsOperations. |
| | 94 | | /// </summary> |
| 68 | 95 | | public virtual IGroupsOperations Groups { get; private set; } |
| | 96 | |
|
| | 97 | | /// <summary> |
| | 98 | | /// Gets the IServicePrincipalsOperations. |
| | 99 | | /// </summary> |
| 56 | 100 | | public virtual IServicePrincipalsOperations ServicePrincipals { get; private set; } |
| | 101 | |
|
| | 102 | | /// <summary> |
| | 103 | | /// Gets the IUsersOperations. |
| | 104 | | /// </summary> |
| 74 | 105 | | public virtual IUsersOperations Users { get; private set; } |
| | 106 | |
|
| | 107 | | /// <summary> |
| | 108 | | /// Gets the IObjectsOperations. |
| | 109 | | /// </summary> |
| 52 | 110 | | public virtual IObjectsOperations Objects { get; private set; } |
| | 111 | |
|
| | 112 | | /// <summary> |
| | 113 | | /// Gets the IDomainsOperations. |
| | 114 | | /// </summary> |
| 0 | 115 | | public virtual IDomainsOperations Domains { get; private set; } |
| | 116 | |
|
| | 117 | | /// <summary> |
| | 118 | | /// Gets the IOAuth2PermissionGrantOperations. |
| | 119 | | /// </summary> |
| 0 | 120 | | 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 |
| 0 | 130 | | protected GraphRbacManagementClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHtt |
| | 131 | | { |
| 0 | 132 | | Initialize(); |
| 0 | 133 | | } |
| | 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> |
| 46 | 141 | | protected GraphRbacManagementClient(params DelegatingHandler[] handlers) : base(handlers) |
| | 142 | | { |
| 46 | 143 | | Initialize(); |
| 46 | 144 | | } |
| | 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> |
| 0 | 155 | | protected GraphRbacManagementClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(r |
| | 156 | | { |
| 0 | 157 | | Initialize(); |
| 0 | 158 | | } |
| | 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> |
| 0 | 172 | | protected GraphRbacManagementClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) |
| | 173 | | { |
| 0 | 174 | | if (baseUri == null) |
| | 175 | | { |
| 0 | 176 | | throw new System.ArgumentNullException("baseUri"); |
| | 177 | | } |
| 0 | 178 | | BaseUri = baseUri; |
| 0 | 179 | | } |
| | 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> |
| 0 | 196 | | protected GraphRbacManagementClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[ |
| | 197 | | { |
| 0 | 198 | | if (baseUri == null) |
| | 199 | | { |
| 0 | 200 | | throw new System.ArgumentNullException("baseUri"); |
| | 201 | | } |
| 0 | 202 | | BaseUri = baseUri; |
| 0 | 203 | | } |
| | 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> |
| 0 | 217 | | public GraphRbacManagementClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : th |
| | 218 | | { |
| 0 | 219 | | if (credentials == null) |
| | 220 | | { |
| 0 | 221 | | throw new System.ArgumentNullException("credentials"); |
| | 222 | | } |
| 0 | 223 | | Credentials = credentials; |
| 0 | 224 | | if (Credentials != null) |
| | 225 | | { |
| 0 | 226 | | Credentials.InitializeServiceClient(this); |
| | 227 | | } |
| 0 | 228 | | } |
| | 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> |
| 0 | 244 | | public GraphRbacManagementClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpCl |
| | 245 | | { |
| 0 | 246 | | if (credentials == null) |
| | 247 | | { |
| 0 | 248 | | throw new System.ArgumentNullException("credentials"); |
| | 249 | | } |
| 0 | 250 | | Credentials = credentials; |
| 0 | 251 | | if (Credentials != null) |
| | 252 | | { |
| 0 | 253 | | Credentials.InitializeServiceClient(this); |
| | 254 | | } |
| 0 | 255 | | } |
| | 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> |
| 0 | 272 | | public GraphRbacManagementClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params Del |
| | 273 | | { |
| 0 | 274 | | if (credentials == null) |
| | 275 | | { |
| 0 | 276 | | throw new System.ArgumentNullException("credentials"); |
| | 277 | | } |
| 0 | 278 | | Credentials = credentials; |
| 0 | 279 | | if (Credentials != null) |
| | 280 | | { |
| 0 | 281 | | Credentials.InitializeServiceClient(this); |
| | 282 | | } |
| 0 | 283 | | } |
| | 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> |
| 46 | 300 | | public GraphRbacManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHand |
| | 301 | | { |
| 46 | 302 | | if (baseUri == null) |
| | 303 | | { |
| 0 | 304 | | throw new System.ArgumentNullException("baseUri"); |
| | 305 | | } |
| 46 | 306 | | if (credentials == null) |
| | 307 | | { |
| 0 | 308 | | throw new System.ArgumentNullException("credentials"); |
| | 309 | | } |
| 46 | 310 | | BaseUri = baseUri; |
| 46 | 311 | | Credentials = credentials; |
| 46 | 312 | | if (Credentials != null) |
| | 313 | | { |
| 46 | 314 | | Credentials.InitializeServiceClient(this); |
| | 315 | | } |
| 46 | 316 | | } |
| | 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> |
| 0 | 336 | | public GraphRbacManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler roo |
| | 337 | | { |
| 0 | 338 | | if (baseUri == null) |
| | 339 | | { |
| 0 | 340 | | throw new System.ArgumentNullException("baseUri"); |
| | 341 | | } |
| 0 | 342 | | if (credentials == null) |
| | 343 | | { |
| 0 | 344 | | throw new System.ArgumentNullException("credentials"); |
| | 345 | | } |
| 0 | 346 | | BaseUri = baseUri; |
| 0 | 347 | | Credentials = credentials; |
| 0 | 348 | | if (Credentials != null) |
| | 349 | | { |
| 0 | 350 | | Credentials.InitializeServiceClient(this); |
| | 351 | | } |
| 0 | 352 | | } |
| | 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 | | { |
| 46 | 363 | | SignedInUser = new SignedInUserOperations(this); |
| 46 | 364 | | Applications = new ApplicationsOperations(this); |
| 46 | 365 | | DeletedApplications = new DeletedApplicationsOperations(this); |
| 46 | 366 | | Groups = new GroupsOperations(this); |
| 46 | 367 | | ServicePrincipals = new ServicePrincipalsOperations(this); |
| 46 | 368 | | Users = new UsersOperations(this); |
| 46 | 369 | | Objects = new ObjectsOperations(this); |
| 46 | 370 | | Domains = new DomainsOperations(this); |
| 46 | 371 | | OAuth2PermissionGrant = new OAuth2PermissionGrantOperations(this); |
| 46 | 372 | | BaseUri = new System.Uri("https://graph.windows.net"); |
| 46 | 373 | | ApiVersion = "1.6"; |
| 46 | 374 | | AcceptLanguage = "en-US"; |
| 46 | 375 | | LongRunningOperationRetryTimeout = 30; |
| 46 | 376 | | GenerateClientRequestId = true; |
| 46 | 377 | | SerializationSettings = new JsonSerializerSettings |
| 46 | 378 | | { |
| 46 | 379 | | Formatting = Newtonsoft.Json.Formatting.Indented, |
| 46 | 380 | | DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, |
| 46 | 381 | | DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, |
| 46 | 382 | | NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, |
| 46 | 383 | | ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, |
| 46 | 384 | | ContractResolver = new ReadOnlyJsonContractResolver(), |
| 46 | 385 | | Converters = new List<JsonConverter> |
| 46 | 386 | | { |
| 46 | 387 | | new Iso8601TimeSpanConverter() |
| 46 | 388 | | } |
| 46 | 389 | | }; |
| 46 | 390 | | SerializationSettings.Converters.Add(new TransformationJsonConverter()); |
| 46 | 391 | | DeserializationSettings = new JsonSerializerSettings |
| 46 | 392 | | { |
| 46 | 393 | | DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, |
| 46 | 394 | | DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, |
| 46 | 395 | | NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, |
| 46 | 396 | | ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, |
| 46 | 397 | | ContractResolver = new ReadOnlyJsonContractResolver(), |
| 46 | 398 | | Converters = new List<JsonConverter> |
| 46 | 399 | | { |
| 46 | 400 | | new Iso8601TimeSpanConverter() |
| 46 | 401 | | } |
| 46 | 402 | | }; |
| 46 | 403 | | SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter<DirectoryObject>("objectType")); |
| 46 | 404 | | DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter<DirectoryObject>("objectType" |
| | 405 | | CustomInitialize(); |
| 46 | 406 | | DeserializationSettings.Converters.Add(new TransformationJsonConverter()); |
| 46 | 407 | | DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); |
| 46 | 408 | | } |
| | 409 | | } |
| | 410 | | } |