| | | 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.Management.Search |
| | | 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 | | /// Client that can be used to manage Azure Cognitive Search services and |
| | | 26 | | /// API keys. |
| | | 27 | | /// </summary> |
| | | 28 | | public partial class SearchManagementClient : ServiceClient<SearchManagementClient>, ISearchManagementClient, IAzure |
| | | 29 | | { |
| | | 30 | | /// <summary> |
| | | 31 | | /// The base URI of the service. |
| | | 32 | | /// </summary> |
| | 4816 | 33 | | public System.Uri BaseUri { get; set; } |
| | | 34 | | |
| | | 35 | | /// <summary> |
| | | 36 | | /// Gets or sets json serialization settings. |
| | | 37 | | /// </summary> |
| | 3010 | 38 | | public JsonSerializerSettings SerializationSettings { get; private set; } |
| | | 39 | | |
| | | 40 | | /// <summary> |
| | | 41 | | /// Gets or sets json deserialization settings. |
| | | 42 | | /// </summary> |
| | 5418 | 43 | | public JsonSerializerSettings DeserializationSettings { get; private set; } |
| | | 44 | | |
| | | 45 | | /// <summary> |
| | | 46 | | /// Credentials needed for the client to connect to Azure. |
| | | 47 | | /// </summary> |
| | 8428 | 48 | | public ServiceClientCredentials Credentials { get; private set; } |
| | | 49 | | |
| | | 50 | | /// <summary> |
| | | 51 | | /// The unique identifier for a Microsoft Azure subscription. You can obtain |
| | | 52 | | /// this value from the Azure Resource Manager API or the portal. |
| | | 53 | | /// </summary> |
| | 6020 | 54 | | public string SubscriptionId { get; set; } |
| | | 55 | | |
| | | 56 | | /// <summary> |
| | | 57 | | /// The API version to use for each request. The current version is |
| | | 58 | | /// 2019-10-01-Preview. |
| | | 59 | | /// </summary> |
| | 8428 | 60 | | public string ApiVersion { get; private set; } |
| | | 61 | | |
| | | 62 | | /// <summary> |
| | | 63 | | /// The preferred language for the response. |
| | | 64 | | /// </summary> |
| | 6020 | 65 | | public string AcceptLanguage { get; set; } |
| | | 66 | | |
| | | 67 | | /// <summary> |
| | | 68 | | /// The retry timeout in seconds for Long Running Operations. Default value is |
| | | 69 | | /// 30. |
| | | 70 | | /// </summary> |
| | 3010 | 71 | | public int? LongRunningOperationRetryTimeout { get; set; } |
| | | 72 | | |
| | | 73 | | /// <summary> |
| | | 74 | | /// Whether a unique x-ms-client-request-id should be generated. When set to |
| | | 75 | | /// true a unique x-ms-client-request-id value is generated and included in |
| | | 76 | | /// each request. Default is true. |
| | | 77 | | /// </summary> |
| | 6020 | 78 | | public bool? GenerateClientRequestId { get; set; } |
| | | 79 | | |
| | | 80 | | /// <summary> |
| | | 81 | | /// Gets the IOperations. |
| | | 82 | | /// </summary> |
| | 0 | 83 | | public virtual IOperations Operations { get; private set; } |
| | | 84 | | |
| | | 85 | | /// <summary> |
| | | 86 | | /// Gets the IAdminKeysOperations. |
| | | 87 | | /// </summary> |
| | 1806 | 88 | | public virtual IAdminKeysOperations AdminKeys { get; private set; } |
| | | 89 | | |
| | | 90 | | /// <summary> |
| | | 91 | | /// Gets the IQueryKeysOperations. |
| | | 92 | | /// </summary> |
| | 1806 | 93 | | public virtual IQueryKeysOperations QueryKeys { get; private set; } |
| | | 94 | | |
| | | 95 | | /// <summary> |
| | | 96 | | /// Gets the IServicesOperations. |
| | | 97 | | /// </summary> |
| | 2408 | 98 | | public virtual IServicesOperations Services { get; private set; } |
| | | 99 | | |
| | | 100 | | /// <summary> |
| | | 101 | | /// Gets the IPrivateLinkResourcesOperations. |
| | | 102 | | /// </summary> |
| | 0 | 103 | | public virtual IPrivateLinkResourcesOperations PrivateLinkResources { get; private set; } |
| | | 104 | | |
| | | 105 | | /// <summary> |
| | | 106 | | /// Gets the IPrivateEndpointConnectionsOperations. |
| | | 107 | | /// </summary> |
| | 0 | 108 | | public virtual IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; private set; } |
| | | 109 | | |
| | | 110 | | /// <summary> |
| | | 111 | | /// Gets the ISharedPrivateLinkResourcesOperations. |
| | | 112 | | /// </summary> |
| | 0 | 113 | | public virtual ISharedPrivateLinkResourcesOperations SharedPrivateLinkResources { get; private set; } |
| | | 114 | | |
| | | 115 | | /// <summary> |
| | | 116 | | /// Initializes a new instance of the SearchManagementClient class. |
| | | 117 | | /// </summary> |
| | | 118 | | /// <param name='httpClient'> |
| | | 119 | | /// HttpClient to be used |
| | | 120 | | /// </param> |
| | | 121 | | /// <param name='disposeHttpClient'> |
| | | 122 | | /// True: will dispose the provided httpClient on calling SearchManagementClient.Dispose(). False: will not disp |
| | 0 | 123 | | protected SearchManagementClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpCl |
| | | 124 | | { |
| | 0 | 125 | | Initialize(); |
| | 0 | 126 | | } |
| | | 127 | | |
| | | 128 | | /// <summary> |
| | | 129 | | /// Initializes a new instance of the SearchManagementClient class. |
| | | 130 | | /// </summary> |
| | | 131 | | /// <param name='handlers'> |
| | | 132 | | /// Optional. The delegating handlers to add to the http client pipeline. |
| | | 133 | | /// </param> |
| | 1204 | 134 | | protected SearchManagementClient(params DelegatingHandler[] handlers) : base(handlers) |
| | | 135 | | { |
| | 1204 | 136 | | Initialize(); |
| | 1204 | 137 | | } |
| | | 138 | | |
| | | 139 | | /// <summary> |
| | | 140 | | /// Initializes a new instance of the SearchManagementClient class. |
| | | 141 | | /// </summary> |
| | | 142 | | /// <param name='rootHandler'> |
| | | 143 | | /// Optional. The http client handler used to handle http transport. |
| | | 144 | | /// </param> |
| | | 145 | | /// <param name='handlers'> |
| | | 146 | | /// Optional. The delegating handlers to add to the http client pipeline. |
| | | 147 | | /// </param> |
| | 0 | 148 | | protected SearchManagementClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(root |
| | | 149 | | { |
| | 0 | 150 | | Initialize(); |
| | 0 | 151 | | } |
| | | 152 | | |
| | | 153 | | /// <summary> |
| | | 154 | | /// Initializes a new instance of the SearchManagementClient class. |
| | | 155 | | /// </summary> |
| | | 156 | | /// <param name='baseUri'> |
| | | 157 | | /// Optional. The base URI of the service. |
| | | 158 | | /// </param> |
| | | 159 | | /// <param name='handlers'> |
| | | 160 | | /// Optional. The delegating handlers to add to the http client pipeline. |
| | | 161 | | /// </param> |
| | | 162 | | /// <exception cref="System.ArgumentNullException"> |
| | | 163 | | /// Thrown when a required parameter is null |
| | | 164 | | /// </exception> |
| | 0 | 165 | | protected SearchManagementClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) |
| | | 166 | | { |
| | 0 | 167 | | if (baseUri == null) |
| | | 168 | | { |
| | 0 | 169 | | throw new System.ArgumentNullException("baseUri"); |
| | | 170 | | } |
| | 0 | 171 | | BaseUri = baseUri; |
| | 0 | 172 | | } |
| | | 173 | | |
| | | 174 | | /// <summary> |
| | | 175 | | /// Initializes a new instance of the SearchManagementClient class. |
| | | 176 | | /// </summary> |
| | | 177 | | /// <param name='baseUri'> |
| | | 178 | | /// Optional. The base URI of the service. |
| | | 179 | | /// </param> |
| | | 180 | | /// <param name='rootHandler'> |
| | | 181 | | /// Optional. The http client handler used to handle http transport. |
| | | 182 | | /// </param> |
| | | 183 | | /// <param name='handlers'> |
| | | 184 | | /// Optional. The delegating handlers to add to the http client pipeline. |
| | | 185 | | /// </param> |
| | | 186 | | /// <exception cref="System.ArgumentNullException"> |
| | | 187 | | /// Thrown when a required parameter is null |
| | | 188 | | /// </exception> |
| | 0 | 189 | | protected SearchManagementClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] h |
| | | 190 | | { |
| | 0 | 191 | | if (baseUri == null) |
| | | 192 | | { |
| | 0 | 193 | | throw new System.ArgumentNullException("baseUri"); |
| | | 194 | | } |
| | 0 | 195 | | BaseUri = baseUri; |
| | 0 | 196 | | } |
| | | 197 | | |
| | | 198 | | /// <summary> |
| | | 199 | | /// Initializes a new instance of the SearchManagementClient class. |
| | | 200 | | /// </summary> |
| | | 201 | | /// <param name='credentials'> |
| | | 202 | | /// Required. Credentials needed for the client to connect to Azure. |
| | | 203 | | /// </param> |
| | | 204 | | /// <param name='handlers'> |
| | | 205 | | /// Optional. The delegating handlers to add to the http client pipeline. |
| | | 206 | | /// </param> |
| | | 207 | | /// <exception cref="System.ArgumentNullException"> |
| | | 208 | | /// Thrown when a required parameter is null |
| | | 209 | | /// </exception> |
| | 0 | 210 | | public SearchManagementClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this( |
| | | 211 | | { |
| | 0 | 212 | | if (credentials == null) |
| | | 213 | | { |
| | 0 | 214 | | throw new System.ArgumentNullException("credentials"); |
| | | 215 | | } |
| | 0 | 216 | | Credentials = credentials; |
| | 0 | 217 | | if (Credentials != null) |
| | | 218 | | { |
| | 0 | 219 | | Credentials.InitializeServiceClient(this); |
| | | 220 | | } |
| | 0 | 221 | | } |
| | | 222 | | |
| | | 223 | | /// <summary> |
| | | 224 | | /// Initializes a new instance of the SearchManagementClient class. |
| | | 225 | | /// </summary> |
| | | 226 | | /// <param name='credentials'> |
| | | 227 | | /// Required. Credentials needed for the client to connect to Azure. |
| | | 228 | | /// </param> |
| | | 229 | | /// <param name='httpClient'> |
| | | 230 | | /// HttpClient to be used |
| | | 231 | | /// </param> |
| | | 232 | | /// <param name='disposeHttpClient'> |
| | | 233 | | /// True: will dispose the provided httpClient on calling SearchManagementClient.Dispose(). False: will not disp |
| | | 234 | | /// <exception cref="System.ArgumentNullException"> |
| | | 235 | | /// Thrown when a required parameter is null |
| | | 236 | | /// </exception> |
| | 0 | 237 | | public SearchManagementClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClien |
| | | 238 | | { |
| | 0 | 239 | | if (credentials == null) |
| | | 240 | | { |
| | 0 | 241 | | throw new System.ArgumentNullException("credentials"); |
| | | 242 | | } |
| | 0 | 243 | | Credentials = credentials; |
| | 0 | 244 | | if (Credentials != null) |
| | | 245 | | { |
| | 0 | 246 | | Credentials.InitializeServiceClient(this); |
| | | 247 | | } |
| | 0 | 248 | | } |
| | | 249 | | |
| | | 250 | | /// <summary> |
| | | 251 | | /// Initializes a new instance of the SearchManagementClient class. |
| | | 252 | | /// </summary> |
| | | 253 | | /// <param name='credentials'> |
| | | 254 | | /// Required. Credentials needed for the client to connect to Azure. |
| | | 255 | | /// </param> |
| | | 256 | | /// <param name='rootHandler'> |
| | | 257 | | /// Optional. The http client handler used to handle http transport. |
| | | 258 | | /// </param> |
| | | 259 | | /// <param name='handlers'> |
| | | 260 | | /// Optional. The delegating handlers to add to the http client pipeline. |
| | | 261 | | /// </param> |
| | | 262 | | /// <exception cref="System.ArgumentNullException"> |
| | | 263 | | /// Thrown when a required parameter is null |
| | | 264 | | /// </exception> |
| | 0 | 265 | | public SearchManagementClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params Delega |
| | | 266 | | { |
| | 0 | 267 | | if (credentials == null) |
| | | 268 | | { |
| | 0 | 269 | | throw new System.ArgumentNullException("credentials"); |
| | | 270 | | } |
| | 0 | 271 | | Credentials = credentials; |
| | 0 | 272 | | if (Credentials != null) |
| | | 273 | | { |
| | 0 | 274 | | Credentials.InitializeServiceClient(this); |
| | | 275 | | } |
| | 0 | 276 | | } |
| | | 277 | | |
| | | 278 | | /// <summary> |
| | | 279 | | /// Initializes a new instance of the SearchManagementClient class. |
| | | 280 | | /// </summary> |
| | | 281 | | /// <param name='baseUri'> |
| | | 282 | | /// Optional. The base URI of the service. |
| | | 283 | | /// </param> |
| | | 284 | | /// <param name='credentials'> |
| | | 285 | | /// Required. Credentials needed for the client to connect to Azure. |
| | | 286 | | /// </param> |
| | | 287 | | /// <param name='handlers'> |
| | | 288 | | /// Optional. The delegating handlers to add to the http client pipeline. |
| | | 289 | | /// </param> |
| | | 290 | | /// <exception cref="System.ArgumentNullException"> |
| | | 291 | | /// Thrown when a required parameter is null |
| | | 292 | | /// </exception> |
| | 1204 | 293 | | public SearchManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler |
| | | 294 | | { |
| | 1204 | 295 | | if (baseUri == null) |
| | | 296 | | { |
| | 0 | 297 | | throw new System.ArgumentNullException("baseUri"); |
| | | 298 | | } |
| | 1204 | 299 | | if (credentials == null) |
| | | 300 | | { |
| | 0 | 301 | | throw new System.ArgumentNullException("credentials"); |
| | | 302 | | } |
| | 1204 | 303 | | BaseUri = baseUri; |
| | 1204 | 304 | | Credentials = credentials; |
| | 1204 | 305 | | if (Credentials != null) |
| | | 306 | | { |
| | 1204 | 307 | | Credentials.InitializeServiceClient(this); |
| | | 308 | | } |
| | 1204 | 309 | | } |
| | | 310 | | |
| | | 311 | | /// <summary> |
| | | 312 | | /// Initializes a new instance of the SearchManagementClient class. |
| | | 313 | | /// </summary> |
| | | 314 | | /// <param name='baseUri'> |
| | | 315 | | /// Optional. The base URI of the service. |
| | | 316 | | /// </param> |
| | | 317 | | /// <param name='credentials'> |
| | | 318 | | /// Required. Credentials needed for the client to connect to Azure. |
| | | 319 | | /// </param> |
| | | 320 | | /// <param name='rootHandler'> |
| | | 321 | | /// Optional. The http client handler used to handle http transport. |
| | | 322 | | /// </param> |
| | | 323 | | /// <param name='handlers'> |
| | | 324 | | /// Optional. The delegating handlers to add to the http client pipeline. |
| | | 325 | | /// </param> |
| | | 326 | | /// <exception cref="System.ArgumentNullException"> |
| | | 327 | | /// Thrown when a required parameter is null |
| | | 328 | | /// </exception> |
| | 0 | 329 | | public SearchManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHa |
| | | 330 | | { |
| | 0 | 331 | | if (baseUri == null) |
| | | 332 | | { |
| | 0 | 333 | | throw new System.ArgumentNullException("baseUri"); |
| | | 334 | | } |
| | 0 | 335 | | if (credentials == null) |
| | | 336 | | { |
| | 0 | 337 | | throw new System.ArgumentNullException("credentials"); |
| | | 338 | | } |
| | 0 | 339 | | BaseUri = baseUri; |
| | 0 | 340 | | Credentials = credentials; |
| | 0 | 341 | | if (Credentials != null) |
| | | 342 | | { |
| | 0 | 343 | | Credentials.InitializeServiceClient(this); |
| | | 344 | | } |
| | 0 | 345 | | } |
| | | 346 | | |
| | | 347 | | /// <summary> |
| | | 348 | | /// An optional partial-method to perform custom initialization. |
| | | 349 | | /// </summary> |
| | | 350 | | partial void CustomInitialize(); |
| | | 351 | | /// <summary> |
| | | 352 | | /// Initializes client properties. |
| | | 353 | | /// </summary> |
| | | 354 | | private void Initialize() |
| | | 355 | | { |
| | 1204 | 356 | | Operations = new Operations(this); |
| | 1204 | 357 | | AdminKeys = new AdminKeysOperations(this); |
| | 1204 | 358 | | QueryKeys = new QueryKeysOperations(this); |
| | 1204 | 359 | | Services = new ServicesOperations(this); |
| | 1204 | 360 | | PrivateLinkResources = new PrivateLinkResourcesOperations(this); |
| | 1204 | 361 | | PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this); |
| | 1204 | 362 | | SharedPrivateLinkResources = new SharedPrivateLinkResourcesOperations(this); |
| | 1204 | 363 | | BaseUri = new System.Uri("https://management.azure.com"); |
| | 1204 | 364 | | ApiVersion = "2020-03-13"; |
| | 1204 | 365 | | AcceptLanguage = "en-US"; |
| | 1204 | 366 | | LongRunningOperationRetryTimeout = 30; |
| | 1204 | 367 | | GenerateClientRequestId = true; |
| | 1204 | 368 | | SerializationSettings = new JsonSerializerSettings |
| | 1204 | 369 | | { |
| | 1204 | 370 | | Formatting = Newtonsoft.Json.Formatting.Indented, |
| | 1204 | 371 | | DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, |
| | 1204 | 372 | | DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, |
| | 1204 | 373 | | NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, |
| | 1204 | 374 | | ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, |
| | 1204 | 375 | | ContractResolver = new ReadOnlyJsonContractResolver(), |
| | 1204 | 376 | | Converters = new List<JsonConverter> |
| | 1204 | 377 | | { |
| | 1204 | 378 | | new Iso8601TimeSpanConverter() |
| | 1204 | 379 | | } |
| | 1204 | 380 | | }; |
| | 1204 | 381 | | SerializationSettings.Converters.Add(new TransformationJsonConverter()); |
| | 1204 | 382 | | DeserializationSettings = new JsonSerializerSettings |
| | 1204 | 383 | | { |
| | 1204 | 384 | | DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, |
| | 1204 | 385 | | DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, |
| | 1204 | 386 | | NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, |
| | 1204 | 387 | | ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, |
| | 1204 | 388 | | ContractResolver = new ReadOnlyJsonContractResolver(), |
| | 1204 | 389 | | Converters = new List<JsonConverter> |
| | 1204 | 390 | | { |
| | 1204 | 391 | | new Iso8601TimeSpanConverter() |
| | 1204 | 392 | | } |
| | 1204 | 393 | | }; |
| | | 394 | | CustomInitialize(); |
| | 1204 | 395 | | DeserializationSettings.Converters.Add(new TransformationJsonConverter()); |
| | 1204 | 396 | | DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); |
| | 1204 | 397 | | } |
| | | 398 | | } |
| | | 399 | | } |