1
+ // Copyright (c) Microsoft Corporation. All rights reserved.
2
+ // Licensed under the MIT License. See License.txt in the project root for license information.
3
+ // Code generated by Microsoft (R) AutoRest Code Generator.
4
+ // Changes may cause incorrect behavior and will be lost if the code is regenerated.
5
+
6
+ namespace Microsoft . Azure . Management . Dns
7
+ {
8
+ using System . Linq ;
9
+ using Microsoft . Rest ;
10
+ using Microsoft . Rest . Azure ;
11
+ using Models ;
12
+
13
+ /// <summary>
14
+ /// The DNS Management Client.
15
+ /// </summary>
16
+ public partial class DnsManagementClient : Microsoft . Rest . ServiceClient < DnsManagementClient > , IDnsManagementClient , IAzureClient
17
+ {
18
+ /// <summary>
19
+ /// The base URI of the service.
20
+ /// </summary>
21
+ public System . Uri BaseUri { get ; set ; }
22
+ /// <summary>
23
+ /// Gets or sets json serialization settings.
24
+ /// </summary>
25
+ public Newtonsoft . Json . JsonSerializerSettings SerializationSettings { get ; private set ; }
26
+ /// <summary>
27
+ /// Gets or sets json deserialization settings.
28
+ /// </summary>
29
+ public Newtonsoft . Json . JsonSerializerSettings DeserializationSettings { get ; private set ; }
30
+ /// <summary>
31
+ /// Credentials needed for the client to connect to Azure.
32
+ /// </summary>
33
+ public Microsoft . Rest . ServiceClientCredentials Credentials { get ; private set ; }
34
+
35
+ /// <summary>
36
+ /// The API version to use for this operation.
37
+ /// </summary>
38
+ public string ApiVersion { get ; private set ; }
39
+
40
+ /// <summary>
41
+ /// The ID of the target subscription.
42
+ /// </summary>
43
+ public string SubscriptionId { get ; set ; }
44
+
45
+ /// <summary>
46
+ /// The preferred language for the response.
47
+ /// </summary>
48
+ public string AcceptLanguage { get ; set ; }
49
+
50
+ /// <summary>
51
+ /// The retry timeout in seconds for Long Running Operations. Default
52
+ /// value is 30.
53
+ /// </summary>
54
+ public int ? LongRunningOperationRetryTimeout { get ; set ; }
55
+
56
+ /// <summary>
57
+ /// Whether a unique x-ms-client-request-id should be generated. When
58
+ /// set to true a unique x-ms-client-request-id value is generated and
59
+ /// included in each request. Default is true.
60
+ /// </summary>
61
+ public bool ? GenerateClientRequestId { get ; set ; }
62
+
63
+ /// <summary>
64
+ /// Gets the IDnssecConfigsOperations
65
+ /// </summary>
66
+ public virtual IDnssecConfigsOperations DnssecConfigs { get ; private set ; }
67
+ /// <summary>
68
+ /// Gets the IRecordSetsOperations
69
+ /// </summary>
70
+ public virtual IRecordSetsOperations RecordSets { get ; private set ; }
71
+ /// <summary>
72
+ /// Gets the IZonesOperations
73
+ /// </summary>
74
+ public virtual IZonesOperations Zones { get ; private set ; }
75
+ /// <summary>
76
+ /// Gets the IDnsResourceReferenceOperations
77
+ /// </summary>
78
+ public virtual IDnsResourceReferenceOperations DnsResourceReference { get ; private set ; }
79
+ /// <summary>
80
+ /// Initializes a new instance of the DnsManagementClient class.
81
+ /// </summary>
82
+ /// <param name='httpClient'>
83
+ /// HttpClient to be used
84
+ /// </param>
85
+ /// <param name='disposeHttpClient'>
86
+ /// True: will dispose the provided httpClient on calling DnsManagementClient.Dispose(). False: will not dispose provided httpClient</param>
87
+ protected DnsManagementClient ( System . Net . Http . HttpClient httpClient , bool disposeHttpClient ) : base ( httpClient , disposeHttpClient )
88
+ {
89
+ this . Initialize ( ) ;
90
+ }
91
+ /// <summary>
92
+ /// Initializes a new instance of the DnsManagementClient class.
93
+ /// </summary>
94
+ /// <param name='handlers'>
95
+ /// Optional. The delegating handlers to add to the http client pipeline.
96
+ /// </param>
97
+ protected DnsManagementClient ( params System . Net . Http . DelegatingHandler [ ] handlers ) : base ( handlers )
98
+ {
99
+ this . Initialize ( ) ;
100
+ }
101
+ /// <summary>
102
+ /// Initializes a new instance of the DnsManagementClient class.
103
+ /// </summary>
104
+ /// <param name='rootHandler'>
105
+ /// Optional. The http client handler used to handle http transport.
106
+ /// </param>
107
+ /// <param name='handlers'>
108
+ /// Optional. The delegating handlers to add to the http client pipeline.
109
+ /// </param>
110
+ protected DnsManagementClient ( System . Net . Http . HttpClientHandler rootHandler , params System . Net . Http . DelegatingHandler [ ] handlers ) : base ( rootHandler , handlers )
111
+ {
112
+ this . Initialize ( ) ;
113
+ }
114
+ /// <summary>
115
+ /// Initializes a new instance of the DnsManagementClient class.
116
+ /// </summary>
117
+ /// <param name='baseUri'>
118
+ /// Optional. The base URI of the service.
119
+ /// </param>
120
+ /// <param name='handlers'>
121
+ /// Optional. The delegating handlers to add to the http client pipeline.
122
+ /// </param>
123
+ /// <exception cref="System.ArgumentNullException">
124
+ /// Thrown when a required parameter is null
125
+ /// </exception>
126
+ protected DnsManagementClient ( System . Uri baseUri , params System . Net . Http . DelegatingHandler [ ] handlers ) : this ( handlers )
127
+ {
128
+ if ( baseUri == null )
129
+ {
130
+ throw new System . ArgumentNullException ( "baseUri" ) ;
131
+ }
132
+ this . BaseUri = baseUri ;
133
+ }
134
+ /// <summary>
135
+ /// Initializes a new instance of the DnsManagementClient class.
136
+ /// </summary>
137
+ /// <param name='baseUri'>
138
+ /// Optional. The base URI of the service.
139
+ /// </param>
140
+ /// <param name='rootHandler'>
141
+ /// Optional. The http client handler used to handle http transport.
142
+ /// </param>
143
+ /// <param name='handlers'>
144
+ /// Optional. The delegating handlers to add to the http client pipeline.
145
+ /// </param>
146
+ /// <exception cref="System.ArgumentNullException">
147
+ /// Thrown when a required parameter is null
148
+ /// </exception>
149
+ protected DnsManagementClient ( System . Uri baseUri , System . Net . Http . HttpClientHandler rootHandler , params System . Net . Http . DelegatingHandler [ ] handlers ) : this ( rootHandler , handlers )
150
+ {
151
+ if ( baseUri == null )
152
+ {
153
+ throw new System . ArgumentNullException ( "baseUri" ) ;
154
+ }
155
+
156
+ this . BaseUri = baseUri ;
157
+ }
158
+ /// <summary>
159
+ /// Initializes a new instance of the DnsManagementClient class.
160
+ /// </summary>
161
+ /// <param name='credentials'>
162
+ /// Required. Credentials needed for the client to connect to Azure.
163
+ /// </param>
164
+ /// <param name='handlers'>
165
+ /// Optional. The delegating handlers to add to the http client pipeline.
166
+ /// </param>
167
+ /// <exception cref="System.ArgumentNullException">
168
+ /// Thrown when a required parameter is null
169
+ /// </exception>
170
+ public DnsManagementClient ( Microsoft . Rest . ServiceClientCredentials credentials , params System . Net . Http . DelegatingHandler [ ] handlers ) : this ( handlers )
171
+ {
172
+ if ( credentials == null )
173
+ {
174
+ throw new System . ArgumentNullException ( "credentials" ) ;
175
+ }
176
+ this . Credentials = credentials ;
177
+ if ( this . Credentials != null )
178
+ {
179
+ this . Credentials . InitializeServiceClient ( this ) ;
180
+ }
181
+
182
+ }
183
+ /// <summary>
184
+ /// Initializes a new instance of the DnsManagementClient class.
185
+ /// </summary>
186
+ /// <param name="credentials">
187
+ /// Required. Credentials needed for the client to connect to Azure.
188
+ /// </param>
189
+ /// <param name='httpClient'>
190
+ /// HttpClient to be used
191
+ /// </param>
192
+ /// <param name='disposeHttpClient'>
193
+ /// True: will dispose the provided httpClient on calling DnsManagementClient.Dispose(). False: will not dispose provided httpClient</param>
194
+ /// <exception cref="System.ArgumentNullException">
195
+ /// Thrown when a required parameter is null
196
+ /// </exception>
197
+ public DnsManagementClient ( Microsoft . Rest . ServiceClientCredentials credentials , System . Net . Http . HttpClient httpClient , bool disposeHttpClient ) : this ( httpClient , disposeHttpClient )
198
+ {
199
+ if ( credentials == null )
200
+ {
201
+ throw new System . ArgumentNullException ( "credentials" ) ;
202
+ }
203
+ this . Credentials = credentials ;
204
+ if ( this . Credentials != null )
205
+ {
206
+ this . Credentials . InitializeServiceClient ( this ) ;
207
+ }
208
+
209
+ }
210
+ /// <summary>
211
+ /// Initializes a new instance of the DnsManagementClient class.
212
+ /// </summary>
213
+ /// <param name="credentials">
214
+ /// Required. Credentials needed for the client to connect to Azure.
215
+ /// </param>
216
+ /// <param name='rootHandler'>
217
+ /// Optional. The http client handler used to handle http transport.
218
+ /// </param>
219
+ /// <param name='handlers'>
220
+ /// Optional. The delegating handlers to add to the http client pipeline.
221
+ /// </param>
222
+ /// <exception cref="System.ArgumentNullException">
223
+ /// Thrown when a required parameter is null
224
+ /// </exception>
225
+ public DnsManagementClient ( Microsoft . Rest . ServiceClientCredentials credentials , System . Net . Http . HttpClientHandler rootHandler , params System . Net . Http . DelegatingHandler [ ] handlers ) : this ( rootHandler , handlers )
226
+ {
227
+ if ( credentials == null )
228
+ {
229
+ throw new System . ArgumentNullException ( "credentials" ) ;
230
+ }
231
+ this . Credentials = credentials ;
232
+ if ( this . Credentials != null )
233
+ {
234
+ this . Credentials . InitializeServiceClient ( this ) ;
235
+ }
236
+
237
+ }
238
+ /// <summary>
239
+ /// Initializes a new instance of the DnsManagementClient class.
240
+ /// </summary>
241
+ /// <param name='baseUri'>
242
+ /// Optional. The base URI of the service.
243
+ /// </param>
244
+ /// <param name="credentials">
245
+ /// Required. Credentials needed for the client to connect to Azure.
246
+ /// </param>
247
+ /// <param name='handlers'>
248
+ /// Optional. The delegating handlers to add to the http client pipeline.
249
+ /// </param>
250
+ /// <exception cref="System.ArgumentNullException">
251
+ /// Thrown when a required parameter is null
252
+ /// </exception>
253
+ public DnsManagementClient ( System . Uri baseUri , Microsoft . Rest . ServiceClientCredentials credentials , params System . Net . Http . DelegatingHandler [ ] handlers ) : this ( handlers )
254
+ {
255
+ if ( baseUri == null )
256
+ {
257
+ throw new System . ArgumentNullException ( "baseUri" ) ;
258
+ }
259
+ if ( credentials == null )
260
+ {
261
+ throw new System . ArgumentNullException ( "credentials" ) ;
262
+ }
263
+ this . BaseUri = baseUri ;
264
+ this . Credentials = credentials ;
265
+ if ( this . Credentials != null )
266
+ {
267
+ this . Credentials . InitializeServiceClient ( this ) ;
268
+ }
269
+
270
+ }
271
+ /// <summary>
272
+ /// Initializes a new instance of the DnsManagementClient class.
273
+ /// </summary>
274
+ /// <param name='baseUri'>
275
+ /// Optional. The base URI of the service.
276
+ /// </param>
277
+ /// <param name="credentials">
278
+ /// Required. Credentials needed for the client to connect to Azure.
279
+ /// </param>
280
+ /// <param name='rootHandler'>
281
+ /// Optional. The http client handler used to handle http transport.
282
+ /// </param>
283
+ /// <exception cref="System.ArgumentNullException">
284
+ /// Thrown when a required parameter is null
285
+ /// </exception>
286
+ public DnsManagementClient ( System . Uri baseUri , Microsoft . Rest . ServiceClientCredentials credentials , System . Net . Http . HttpClientHandler rootHandler , params System . Net . Http . DelegatingHandler [ ] handlers ) : this ( rootHandler , handlers )
287
+ {
288
+ if ( baseUri == null )
289
+ {
290
+ throw new System . ArgumentNullException ( "baseUri" ) ;
291
+ }
292
+ if ( credentials == null )
293
+ {
294
+ throw new System . ArgumentNullException ( "credentials" ) ;
295
+ }
296
+ this . BaseUri = baseUri ;
297
+ this . Credentials = credentials ;
298
+ if ( this . Credentials != null )
299
+ {
300
+ this . Credentials . InitializeServiceClient ( this ) ;
301
+ }
302
+
303
+ }
304
+ /// <summary>
305
+ /// An optional partial-method to perform custom initialization.
306
+ /// </summary>
307
+ partial void CustomInitialize ( ) ;
308
+
309
+ /// <summary>
310
+ /// Initializes client properties.
311
+ /// </summary>
312
+ private void Initialize ( )
313
+ {
314
+ this . DnssecConfigs = new DnssecConfigsOperations ( this ) ;
315
+ this . RecordSets = new RecordSetsOperations ( this ) ;
316
+ this . Zones = new ZonesOperations ( this ) ;
317
+ this . DnsResourceReference = new DnsResourceReferenceOperations ( this ) ;
318
+ this . BaseUri = new System . Uri ( "https://management.azure.com" ) ;
319
+ this . ApiVersion = "2023-07-01-preview" ;
320
+ this . AcceptLanguage = "en-US" ;
321
+ this . LongRunningOperationRetryTimeout = 30 ;
322
+ this . GenerateClientRequestId = true ;
323
+ SerializationSettings = new Newtonsoft . Json . JsonSerializerSettings
324
+ {
325
+ Formatting = Newtonsoft . Json . Formatting . Indented ,
326
+ DateFormatHandling = Newtonsoft . Json . DateFormatHandling . IsoDateFormat ,
327
+ DateTimeZoneHandling = Newtonsoft . Json . DateTimeZoneHandling . Utc ,
328
+ NullValueHandling = Newtonsoft . Json . NullValueHandling . Ignore ,
329
+ ReferenceLoopHandling = Newtonsoft . Json . ReferenceLoopHandling . Serialize ,
330
+ ContractResolver = new Microsoft . Rest . Serialization . ReadOnlyJsonContractResolver ( ) ,
331
+ Converters = new System . Collections . Generic . List < Newtonsoft . Json . JsonConverter >
332
+ {
333
+ new Microsoft . Rest . Serialization . Iso8601TimeSpanConverter ( )
334
+ }
335
+ } ;
336
+ SerializationSettings . Converters . Add ( new Microsoft . Rest . Serialization . TransformationJsonConverter ( ) ) ;
337
+ DeserializationSettings = new Newtonsoft . Json . JsonSerializerSettings
338
+ {
339
+ DateFormatHandling = Newtonsoft . Json . DateFormatHandling . IsoDateFormat ,
340
+ DateTimeZoneHandling = Newtonsoft . Json . DateTimeZoneHandling . Utc ,
341
+ NullValueHandling = Newtonsoft . Json . NullValueHandling . Ignore ,
342
+ ReferenceLoopHandling = Newtonsoft . Json . ReferenceLoopHandling . Serialize ,
343
+ ContractResolver = new Microsoft . Rest . Serialization . ReadOnlyJsonContractResolver ( ) ,
344
+ Converters = new System . Collections . Generic . List < Newtonsoft . Json . JsonConverter >
345
+ {
346
+ new Microsoft . Rest . Serialization . Iso8601TimeSpanConverter ( )
347
+ }
348
+ } ;
349
+ CustomInitialize ( ) ;
350
+ DeserializationSettings . Converters . Add ( new Microsoft . Rest . Serialization . TransformationJsonConverter ( ) ) ;
351
+ DeserializationSettings . Converters . Add ( new Microsoft . Rest . Azure . CloudErrorJsonConverter ( ) ) ;
352
+ }
353
+ }
354
+ }
0 commit comments