| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | // <auto-generated/> |
| | 5 | |
|
| | 6 | | #nullable disable |
| | 7 | |
|
| | 8 | | using System; |
| | 9 | | using Azure.Core; |
| | 10 | | using Azure.Core.Pipeline; |
| | 11 | | using Azure.ResourceManager.DigitalTwins; |
| | 12 | |
|
| | 13 | | namespace Azure.ResourceManager.DigitalTwins |
| | 14 | | { |
| | 15 | | /// <summary> DigitalTwins service management client. </summary> |
| | 16 | | public class DigitalTwinsManagementClient |
| | 17 | | { |
| | 18 | | private readonly ClientDiagnostics _clientDiagnostics; |
| | 19 | | private readonly HttpPipeline _pipeline; |
| | 20 | | private readonly string _subscriptionId; |
| | 21 | | private readonly Uri _endpoint; |
| | 22 | |
|
| | 23 | | /// <summary> Initializes a new instance of DigitalTwinsManagementClient for mocking. </summary> |
| 4 | 24 | | protected DigitalTwinsManagementClient() |
| | 25 | | { |
| 4 | 26 | | } |
| | 27 | |
|
| | 28 | | /// <summary> Initializes a new instance of DigitalTwinsManagementClient. </summary> |
| | 29 | | /// <param name="subscriptionId"> The subscription identifier. </param> |
| | 30 | | /// <param name="tokenCredential"> The OAuth token for making client requests. </param> |
| | 31 | | /// <param name="options"> The options for configuring the client. </param> |
| 4 | 32 | | public DigitalTwinsManagementClient(string subscriptionId, TokenCredential tokenCredential, DigitalTwinsManageme |
| | 33 | | { |
| 4 | 34 | | } |
| | 35 | | /// <summary> Initializes a new instance of DigitalTwinsManagementClient. </summary> |
| | 36 | | /// <param name="subscriptionId"> The subscription identifier. </param> |
| | 37 | | /// <param name="endpoint"> server parameter. </param> |
| | 38 | | /// <param name="tokenCredential"> The OAuth token for making client requests. </param> |
| | 39 | | /// <param name="options"> The options for configuring the client. </param> |
| | 40 | | /// <exception cref="ArgumentNullException"> <paramref name="subscriptionId"/> is null. </exception> |
| 4 | 41 | | public DigitalTwinsManagementClient(string subscriptionId, Uri endpoint, TokenCredential tokenCredential, Digita |
| | 42 | | { |
| 4 | 43 | | if (subscriptionId == null) |
| | 44 | | { |
| 0 | 45 | | throw new ArgumentNullException(nameof(subscriptionId)); |
| | 46 | | } |
| 4 | 47 | | endpoint ??= new Uri("https://management.azure.com"); |
| | 48 | |
|
| 4 | 49 | | options ??= new DigitalTwinsManagementClientOptions(); |
| 4 | 50 | | _clientDiagnostics = new ClientDiagnostics(options); |
| 4 | 51 | | _pipeline = ManagementPipelineBuilder.Build(tokenCredential, endpoint, options); |
| 4 | 52 | | _subscriptionId = subscriptionId; |
| 4 | 53 | | _endpoint = endpoint; |
| 4 | 54 | | } |
| | 55 | |
|
| | 56 | | /// <summary> Returns an instance of DigitalTwinsOperations. </summary> |
| 20 | 57 | | public virtual DigitalTwinsOperations DigitalTwins => new DigitalTwinsOperations(_clientDiagnostics, _pipeline, |
| | 58 | |
|
| | 59 | | /// <summary> Returns an instance of DigitalTwinsEndpointOperations. </summary> |
| 0 | 60 | | public virtual DigitalTwinsEndpointOperations DigitalTwinsEndpoint => new DigitalTwinsEndpointOperations(_client |
| | 61 | |
|
| | 62 | | /// <summary> Returns an instance of Operations. </summary> |
| 0 | 63 | | public virtual Operations Operations => new Operations(_clientDiagnostics, _pipeline, _endpoint); |
| | 64 | | } |
| | 65 | | } |