diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ActivityRunsOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ActivityRunsOperations.cs new file mode 100644 index 000000000000..e3d9674d6f28 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ActivityRunsOperations.cs @@ -0,0 +1,307 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ActivityRunsOperations operations. + /// + internal partial class ActivityRunsOperations : IServiceOperations, IActivityRunsOperations + { + /// + /// Initializes a new instance of the ActivityRunsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ActivityRunsOperations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// Query activity runs based on input filter conditions. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline run identifier. + /// + /// + /// Parameters to filter the activity runs. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> QueryByPipelineRunWithHttpMessagesAsync(string resourceGroupName, string factoryName, string runId, RunFilterParameters filterParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (runId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "runId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (filterParameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "filterParameters"); + } + if (filterParameters != null) + { + filterParameters.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("runId", runId); + tracingParameters.Add("filterParameters", filterParameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "QueryByPipelineRun", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId}/queryActivityruns").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{runId}", System.Uri.EscapeDataString(runId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(filterParameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(filterParameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ActivityRunsOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ActivityRunsOperationsExtensions.cs new file mode 100644 index 000000000000..17f1fb26c6c9 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ActivityRunsOperationsExtensions.cs @@ -0,0 +1,77 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ActivityRunsOperations. + /// + public static partial class ActivityRunsOperationsExtensions + { + /// + /// Query activity runs based on input filter conditions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline run identifier. + /// + /// + /// Parameters to filter the activity runs. + /// + public static ActivityRunsQueryResponse QueryByPipelineRun(this IActivityRunsOperations operations, string resourceGroupName, string factoryName, string runId, RunFilterParameters filterParameters) + { + return operations.QueryByPipelineRunAsync(resourceGroupName, factoryName, runId, filterParameters).GetAwaiter().GetResult(); + } + + /// + /// Query activity runs based on input filter conditions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline run identifier. + /// + /// + /// Parameters to filter the activity runs. + /// + /// + /// The cancellation token. + /// + public static async Task QueryByPipelineRunAsync(this IActivityRunsOperations operations, string resourceGroupName, string factoryName, string runId, RunFilterParameters filterParameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.QueryByPipelineRunWithHttpMessagesAsync(resourceGroupName, factoryName, runId, filterParameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ChangeDataCaptureOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ChangeDataCaptureOperations.cs new file mode 100644 index 000000000000..2dd86a70f587 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ChangeDataCaptureOperations.cs @@ -0,0 +1,1936 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ChangeDataCaptureOperations operations. + /// + internal partial class ChangeDataCaptureOperations : IServiceOperations, IChangeDataCaptureOperations + { + /// + /// Initializes a new instance of the ChangeDataCaptureOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ChangeDataCaptureOperations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// Lists all resources of type change data capture. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactory", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates a change data capture resource. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The change data capture name. + /// + /// + /// Change data capture resource definition. + /// + /// + /// ETag of the change data capture entity. Should only be specified for + /// update, for which it should match existing entity or can be * for + /// unconditional update. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string changeDataCaptureName, ChangeDataCaptureResource changeDataCapture, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (changeDataCaptureName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "changeDataCaptureName"); + } + if (changeDataCaptureName != null) + { + if (changeDataCaptureName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "changeDataCaptureName", 260); + } + if (changeDataCaptureName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "changeDataCaptureName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(changeDataCaptureName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "changeDataCaptureName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (changeDataCapture == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "changeDataCapture"); + } + if (changeDataCapture != null) + { + changeDataCapture.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("changeDataCaptureName", changeDataCaptureName); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("changeDataCapture", changeDataCapture); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{changeDataCaptureName}", System.Uri.EscapeDataString(changeDataCaptureName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifMatch != null) + { + if (_httpRequest.Headers.Contains("If-Match")) + { + _httpRequest.Headers.Remove("If-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(changeDataCapture != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(changeDataCapture, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a change data capture. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The change data capture name. + /// + /// + /// ETag of the change data capture entity. Should only be specified for get. + /// If the ETag matches the existing entity tag, or if * was provided, then no + /// content will be returned. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string changeDataCaptureName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (changeDataCaptureName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "changeDataCaptureName"); + } + if (changeDataCaptureName != null) + { + if (changeDataCaptureName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "changeDataCaptureName", 260); + } + if (changeDataCaptureName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "changeDataCaptureName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(changeDataCaptureName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "changeDataCaptureName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("changeDataCaptureName", changeDataCaptureName); + tracingParameters.Add("ifNoneMatch", ifNoneMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{changeDataCaptureName}", System.Uri.EscapeDataString(changeDataCaptureName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifNoneMatch != null) + { + if (_httpRequest.Headers.Contains("If-None-Match")) + { + _httpRequest.Headers.Remove("If-None-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-None-Match", ifNoneMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes a change data capture. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The change data capture name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string changeDataCaptureName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (changeDataCaptureName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "changeDataCaptureName"); + } + if (changeDataCaptureName != null) + { + if (changeDataCaptureName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "changeDataCaptureName", 260); + } + if (changeDataCaptureName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "changeDataCaptureName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(changeDataCaptureName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "changeDataCaptureName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("changeDataCaptureName", changeDataCaptureName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{changeDataCaptureName}", System.Uri.EscapeDataString(changeDataCaptureName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Starts a change data capture. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The change data capture name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task StartWithHttpMessagesAsync(string resourceGroupName, string factoryName, string changeDataCaptureName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (changeDataCaptureName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "changeDataCaptureName"); + } + if (changeDataCaptureName != null) + { + if (changeDataCaptureName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "changeDataCaptureName", 260); + } + if (changeDataCaptureName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "changeDataCaptureName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(changeDataCaptureName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "changeDataCaptureName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("changeDataCaptureName", changeDataCaptureName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Start", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName}/start").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{changeDataCaptureName}", System.Uri.EscapeDataString(changeDataCaptureName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Stops a change data capture. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The change data capture name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task StopWithHttpMessagesAsync(string resourceGroupName, string factoryName, string changeDataCaptureName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (changeDataCaptureName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "changeDataCaptureName"); + } + if (changeDataCaptureName != null) + { + if (changeDataCaptureName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "changeDataCaptureName", 260); + } + if (changeDataCaptureName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "changeDataCaptureName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(changeDataCaptureName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "changeDataCaptureName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("changeDataCaptureName", changeDataCaptureName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Stop", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName}/stop").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{changeDataCaptureName}", System.Uri.EscapeDataString(changeDataCaptureName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the current status for the change data capture resource. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The change data capture name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> StatusWithHttpMessagesAsync(string resourceGroupName, string factoryName, string changeDataCaptureName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (changeDataCaptureName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "changeDataCaptureName"); + } + if (changeDataCaptureName != null) + { + if (changeDataCaptureName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "changeDataCaptureName", 260); + } + if (changeDataCaptureName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "changeDataCaptureName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(changeDataCaptureName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "changeDataCaptureName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("changeDataCaptureName", changeDataCaptureName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Status", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/adfcdcs/{changeDataCaptureName}/status").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{changeDataCaptureName}", System.Uri.EscapeDataString(changeDataCaptureName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists all resources of type change data capture. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactoryNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ChangeDataCaptureOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ChangeDataCaptureOperationsExtensions.cs new file mode 100644 index 000000000000..764d26ac47f8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ChangeDataCaptureOperationsExtensions.cs @@ -0,0 +1,392 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ChangeDataCaptureOperations. + /// + public static partial class ChangeDataCaptureOperationsExtensions + { + /// + /// Lists all resources of type change data capture. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + public static IPage ListByFactory(this IChangeDataCaptureOperations operations, string resourceGroupName, string factoryName) + { + return operations.ListByFactoryAsync(resourceGroupName, factoryName).GetAwaiter().GetResult(); + } + + /// + /// Lists all resources of type change data capture. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryAsync(this IChangeDataCaptureOperations operations, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a change data capture resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The change data capture name. + /// + /// + /// Change data capture resource definition. + /// + /// + /// ETag of the change data capture entity. Should only be specified for + /// update, for which it should match existing entity or can be * for + /// unconditional update. + /// + public static ChangeDataCaptureResource CreateOrUpdate(this IChangeDataCaptureOperations operations, string resourceGroupName, string factoryName, string changeDataCaptureName, ChangeDataCaptureResource changeDataCapture, string ifMatch = default(string)) + { + return operations.CreateOrUpdateAsync(resourceGroupName, factoryName, changeDataCaptureName, changeDataCapture, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a change data capture resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The change data capture name. + /// + /// + /// Change data capture resource definition. + /// + /// + /// ETag of the change data capture entity. Should only be specified for + /// update, for which it should match existing entity or can be * for + /// unconditional update. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IChangeDataCaptureOperations operations, string resourceGroupName, string factoryName, string changeDataCaptureName, ChangeDataCaptureResource changeDataCapture, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, factoryName, changeDataCaptureName, changeDataCapture, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a change data capture. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The change data capture name. + /// + /// + /// ETag of the change data capture entity. Should only be specified for get. + /// If the ETag matches the existing entity tag, or if * was provided, then no + /// content will be returned. + /// + public static ChangeDataCaptureResource Get(this IChangeDataCaptureOperations operations, string resourceGroupName, string factoryName, string changeDataCaptureName, string ifNoneMatch = default(string)) + { + return operations.GetAsync(resourceGroupName, factoryName, changeDataCaptureName, ifNoneMatch).GetAwaiter().GetResult(); + } + + /// + /// Gets a change data capture. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The change data capture name. + /// + /// + /// ETag of the change data capture entity. Should only be specified for get. + /// If the ETag matches the existing entity tag, or if * was provided, then no + /// content will be returned. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IChangeDataCaptureOperations operations, string resourceGroupName, string factoryName, string changeDataCaptureName, string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, factoryName, changeDataCaptureName, ifNoneMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a change data capture. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The change data capture name. + /// + public static void Delete(this IChangeDataCaptureOperations operations, string resourceGroupName, string factoryName, string changeDataCaptureName) + { + operations.DeleteAsync(resourceGroupName, factoryName, changeDataCaptureName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a change data capture. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The change data capture name. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IChangeDataCaptureOperations operations, string resourceGroupName, string factoryName, string changeDataCaptureName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, factoryName, changeDataCaptureName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Starts a change data capture. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The change data capture name. + /// + public static void Start(this IChangeDataCaptureOperations operations, string resourceGroupName, string factoryName, string changeDataCaptureName) + { + operations.StartAsync(resourceGroupName, factoryName, changeDataCaptureName).GetAwaiter().GetResult(); + } + + /// + /// Starts a change data capture. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The change data capture name. + /// + /// + /// The cancellation token. + /// + public static async Task StartAsync(this IChangeDataCaptureOperations operations, string resourceGroupName, string factoryName, string changeDataCaptureName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.StartWithHttpMessagesAsync(resourceGroupName, factoryName, changeDataCaptureName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Stops a change data capture. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The change data capture name. + /// + public static void Stop(this IChangeDataCaptureOperations operations, string resourceGroupName, string factoryName, string changeDataCaptureName) + { + operations.StopAsync(resourceGroupName, factoryName, changeDataCaptureName).GetAwaiter().GetResult(); + } + + /// + /// Stops a change data capture. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The change data capture name. + /// + /// + /// The cancellation token. + /// + public static async Task StopAsync(this IChangeDataCaptureOperations operations, string resourceGroupName, string factoryName, string changeDataCaptureName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.StopWithHttpMessagesAsync(resourceGroupName, factoryName, changeDataCaptureName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets the current status for the change data capture resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The change data capture name. + /// + public static string Status(this IChangeDataCaptureOperations operations, string resourceGroupName, string factoryName, string changeDataCaptureName) + { + return operations.StatusAsync(resourceGroupName, factoryName, changeDataCaptureName).GetAwaiter().GetResult(); + } + + /// + /// Gets the current status for the change data capture resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The change data capture name. + /// + /// + /// The cancellation token. + /// + public static async Task StatusAsync(this IChangeDataCaptureOperations operations, string resourceGroupName, string factoryName, string changeDataCaptureName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.StatusWithHttpMessagesAsync(resourceGroupName, factoryName, changeDataCaptureName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists all resources of type change data capture. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByFactoryNext(this IChangeDataCaptureOperations operations, string nextPageLink) + { + return operations.ListByFactoryNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists all resources of type change data capture. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryNextAsync(this IChangeDataCaptureOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/CredentialOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/CredentialOperations.cs new file mode 100644 index 000000000000..c467730a3a5e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/CredentialOperations.cs @@ -0,0 +1,1227 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// CredentialOperations operations. + /// + internal partial class CredentialOperations : IServiceOperations, ICredentialOperations + { + /// + /// Initializes a new instance of the CredentialOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal CredentialOperations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// List credentials. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactory", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates a credential. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Credential name + /// + /// + /// Credential resource definition. + /// + /// + /// ETag of the credential entity. Should only be specified for update, for + /// which it should match existing entity or can be * for unconditional update. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string credentialName, CredentialResource credential, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (credentialName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "credentialName"); + } + if (credentialName != null) + { + if (credentialName.Length > 127) + { + throw new ValidationException(ValidationRules.MaxLength, "credentialName", 127); + } + if (credentialName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "credentialName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(credentialName, "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$")) + { + throw new ValidationException(ValidationRules.Pattern, "credentialName", "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (credential == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "credential"); + } + if (credential != null) + { + credential.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("credentialName", credentialName); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("credential", credential); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{credentialName}", System.Uri.EscapeDataString(credentialName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifMatch != null) + { + if (_httpRequest.Headers.Contains("If-Match")) + { + _httpRequest.Headers.Remove("If-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(credential != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(credential, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a credential. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Credential name + /// + /// + /// ETag of the credential entity. Should only be specified for get. If the + /// ETag matches the existing entity tag, or if * was provided, then no content + /// will be returned. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string credentialName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (credentialName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "credentialName"); + } + if (credentialName != null) + { + if (credentialName.Length > 127) + { + throw new ValidationException(ValidationRules.MaxLength, "credentialName", 127); + } + if (credentialName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "credentialName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(credentialName, "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$")) + { + throw new ValidationException(ValidationRules.Pattern, "credentialName", "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("credentialName", credentialName); + tracingParameters.Add("ifNoneMatch", ifNoneMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{credentialName}", System.Uri.EscapeDataString(credentialName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifNoneMatch != null) + { + if (_httpRequest.Headers.Contains("If-None-Match")) + { + _httpRequest.Headers.Remove("If-None-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-None-Match", ifNoneMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 304) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes a credential. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Credential name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string credentialName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (credentialName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "credentialName"); + } + if (credentialName != null) + { + if (credentialName.Length > 127) + { + throw new ValidationException(ValidationRules.MaxLength, "credentialName", 127); + } + if (credentialName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "credentialName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(credentialName, "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$")) + { + throw new ValidationException(ValidationRules.Pattern, "credentialName", "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("credentialName", credentialName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/credentials/{credentialName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{credentialName}", System.Uri.EscapeDataString(credentialName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// List credentials. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactoryNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/CredentialOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/CredentialOperationsExtensions.cs new file mode 100644 index 000000000000..c1d0babb46c2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/CredentialOperationsExtensions.cs @@ -0,0 +1,258 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for CredentialOperations. + /// + public static partial class CredentialOperationsExtensions + { + /// + /// List credentials. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + public static IPage ListByFactory(this ICredentialOperations operations, string resourceGroupName, string factoryName) + { + return operations.ListByFactoryAsync(resourceGroupName, factoryName).GetAwaiter().GetResult(); + } + + /// + /// List credentials. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryAsync(this ICredentialOperations operations, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a credential. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Credential name + /// + /// + /// Credential resource definition. + /// + /// + /// ETag of the credential entity. Should only be specified for update, for + /// which it should match existing entity or can be * for unconditional update. + /// + public static CredentialResource CreateOrUpdate(this ICredentialOperations operations, string resourceGroupName, string factoryName, string credentialName, CredentialResource credential, string ifMatch = default(string)) + { + return operations.CreateOrUpdateAsync(resourceGroupName, factoryName, credentialName, credential, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a credential. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Credential name + /// + /// + /// Credential resource definition. + /// + /// + /// ETag of the credential entity. Should only be specified for update, for + /// which it should match existing entity or can be * for unconditional update. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this ICredentialOperations operations, string resourceGroupName, string factoryName, string credentialName, CredentialResource credential, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, factoryName, credentialName, credential, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a credential. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Credential name + /// + /// + /// ETag of the credential entity. Should only be specified for get. If the + /// ETag matches the existing entity tag, or if * was provided, then no content + /// will be returned. + /// + public static CredentialResource Get(this ICredentialOperations operations, string resourceGroupName, string factoryName, string credentialName, string ifNoneMatch = default(string)) + { + return operations.GetAsync(resourceGroupName, factoryName, credentialName, ifNoneMatch).GetAwaiter().GetResult(); + } + + /// + /// Gets a credential. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Credential name + /// + /// + /// ETag of the credential entity. Should only be specified for get. If the + /// ETag matches the existing entity tag, or if * was provided, then no content + /// will be returned. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this ICredentialOperations operations, string resourceGroupName, string factoryName, string credentialName, string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, factoryName, credentialName, ifNoneMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a credential. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Credential name + /// + public static void Delete(this ICredentialOperations operations, string resourceGroupName, string factoryName, string credentialName) + { + operations.DeleteAsync(resourceGroupName, factoryName, credentialName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a credential. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Credential name + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this ICredentialOperations operations, string resourceGroupName, string factoryName, string credentialName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, factoryName, credentialName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// List credentials. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByFactoryNext(this ICredentialOperations operations, string nextPageLink) + { + return operations.ListByFactoryNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// List credentials. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryNextAsync(this ICredentialOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFactoryManagementClient.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFactoryManagementClient.cs new file mode 100644 index 000000000000..acbd1aa57bdb --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFactoryManagementClient.cs @@ -0,0 +1,547 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Serialization; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + + /// + /// The Azure Data Factory V2 management API provides a RESTful set of web + /// services that interact with Azure Data Factory V2 services. + /// + public partial class DataFactoryManagementClient : ServiceClient, IDataFactoryManagementClient, IAzureClient + { + /// + /// The base URI of the service. + /// + public System.Uri BaseUri { get; set; } + + /// + /// Gets or sets json serialization settings. + /// + public JsonSerializerSettings SerializationSettings { get; private set; } + + /// + /// Gets or sets json deserialization settings. + /// + public JsonSerializerSettings DeserializationSettings { get; private set; } + + /// + /// Credentials needed for the client to connect to Azure. + /// + public ServiceClientCredentials Credentials { get; private set; } + + /// + /// The subscription identifier. + /// + public string SubscriptionId { get; set; } + + /// + /// The API version. + /// + public string ApiVersion { get; private set; } + + /// + /// The preferred language for the response. + /// + public string AcceptLanguage { get; set; } + + /// + /// The retry timeout in seconds for Long Running Operations. Default value is + /// 30. + /// + public int? LongRunningOperationRetryTimeout { get; set; } + + /// + /// Whether a unique x-ms-client-request-id should be generated. When set to + /// true a unique x-ms-client-request-id value is generated and included in + /// each request. Default is true. + /// + public bool? GenerateClientRequestId { get; set; } + + /// + /// Gets the IOperations. + /// + public virtual IOperations Operations { get; private set; } + + /// + /// Gets the IExposureControlOperations. + /// + public virtual IExposureControlOperations ExposureControl { get; private set; } + + /// + /// Gets the IFactoriesOperations. + /// + public virtual IFactoriesOperations Factories { get; private set; } + + /// + /// Gets the IIntegrationRuntimesOperations. + /// + public virtual IIntegrationRuntimesOperations IntegrationRuntimes { get; private set; } + + /// + /// Gets the IIntegrationRuntimeObjectMetadataOperations. + /// + public virtual IIntegrationRuntimeObjectMetadataOperations IntegrationRuntimeObjectMetadata { get; private set; } + + /// + /// Gets the IIntegrationRuntimeNodesOperations. + /// + public virtual IIntegrationRuntimeNodesOperations IntegrationRuntimeNodes { get; private set; } + + /// + /// Gets the ILinkedServicesOperations. + /// + public virtual ILinkedServicesOperations LinkedServices { get; private set; } + + /// + /// Gets the IDatasetsOperations. + /// + public virtual IDatasetsOperations Datasets { get; private set; } + + /// + /// Gets the IPipelinesOperations. + /// + public virtual IPipelinesOperations Pipelines { get; private set; } + + /// + /// Gets the IPipelineRunsOperations. + /// + public virtual IPipelineRunsOperations PipelineRuns { get; private set; } + + /// + /// Gets the IActivityRunsOperations. + /// + public virtual IActivityRunsOperations ActivityRuns { get; private set; } + + /// + /// Gets the ITriggersOperations. + /// + public virtual ITriggersOperations Triggers { get; private set; } + + /// + /// Gets the ITriggerRunsOperations. + /// + public virtual ITriggerRunsOperations TriggerRuns { get; private set; } + + /// + /// Gets the IDataFlowsOperations. + /// + public virtual IDataFlowsOperations DataFlows { get; private set; } + + /// + /// Gets the IDataFlowDebugSessionOperations. + /// + public virtual IDataFlowDebugSessionOperations DataFlowDebugSession { get; private set; } + + /// + /// Gets the IManagedVirtualNetworksOperations. + /// + public virtual IManagedVirtualNetworksOperations ManagedVirtualNetworks { get; private set; } + + /// + /// Gets the IManagedPrivateEndpointsOperations. + /// + public virtual IManagedPrivateEndpointsOperations ManagedPrivateEndpoints { get; private set; } + + /// + /// Gets the ICredentialOperations. + /// + public virtual ICredentialOperations CredentialOperations { get; private set; } + + /// + /// Gets the IPrivateEndPointConnectionsOperations. + /// + public virtual IPrivateEndPointConnectionsOperations PrivateEndPointConnections { get; private set; } + + /// + /// Gets the IPrivateEndpointConnectionOperations. + /// + public virtual IPrivateEndpointConnectionOperations PrivateEndpointConnection { get; private set; } + + /// + /// Gets the IPrivateLinkResourcesOperations. + /// + public virtual IPrivateLinkResourcesOperations PrivateLinkResources { get; private set; } + + /// + /// Gets the IGlobalParametersOperations. + /// + public virtual IGlobalParametersOperations GlobalParameters { get; private set; } + + /// + /// Gets the IChangeDataCaptureOperations. + /// + public virtual IChangeDataCaptureOperations ChangeDataCapture { get; private set; } + + /// + /// Initializes a new instance of the DataFactoryManagementClient class. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling DataFactoryManagementClient.Dispose(). False: will not dispose provided httpClient + protected DataFactoryManagementClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + { + Initialize(); + } + + /// + /// Initializes a new instance of the DataFactoryManagementClient class. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + protected DataFactoryManagementClient(params DelegatingHandler[] handlers) : base(handlers) + { + Initialize(); + } + + /// + /// Initializes a new instance of the DataFactoryManagementClient class. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + protected DataFactoryManagementClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) + { + Initialize(); + } + + /// + /// Initializes a new instance of the DataFactoryManagementClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + protected DataFactoryManagementClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + BaseUri = baseUri; + } + + /// + /// Initializes a new instance of the DataFactoryManagementClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + protected DataFactoryManagementClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + BaseUri = baseUri; + } + + /// + /// Initializes a new instance of the DataFactoryManagementClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public DataFactoryManagementClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the DataFactoryManagementClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling DataFactoryManagementClient.Dispose(). False: will not dispose provided httpClient + /// + /// Thrown when a required parameter is null + /// + public DataFactoryManagementClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the DataFactoryManagementClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public DataFactoryManagementClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the DataFactoryManagementClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public DataFactoryManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + BaseUri = baseUri; + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the DataFactoryManagementClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public DataFactoryManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + BaseUri = baseUri; + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// An optional partial-method to perform custom initialization. + /// + partial void CustomInitialize(); + /// + /// Initializes client properties. + /// + private void Initialize() + { + Operations = new Operations(this); + ExposureControl = new ExposureControlOperations(this); + Factories = new FactoriesOperations(this); + IntegrationRuntimes = new IntegrationRuntimesOperations(this); + IntegrationRuntimeObjectMetadata = new IntegrationRuntimeObjectMetadataOperations(this); + IntegrationRuntimeNodes = new IntegrationRuntimeNodesOperations(this); + LinkedServices = new LinkedServicesOperations(this); + Datasets = new DatasetsOperations(this); + Pipelines = new PipelinesOperations(this); + PipelineRuns = new PipelineRunsOperations(this); + ActivityRuns = new ActivityRunsOperations(this); + Triggers = new TriggersOperations(this); + TriggerRuns = new TriggerRunsOperations(this); + DataFlows = new DataFlowsOperations(this); + DataFlowDebugSession = new DataFlowDebugSessionOperations(this); + ManagedVirtualNetworks = new ManagedVirtualNetworksOperations(this); + ManagedPrivateEndpoints = new ManagedPrivateEndpointsOperations(this); + CredentialOperations = new CredentialOperations(this); + PrivateEndPointConnections = new PrivateEndPointConnectionsOperations(this); + PrivateEndpointConnection = new PrivateEndpointConnectionOperations(this); + PrivateLinkResources = new PrivateLinkResourcesOperations(this); + GlobalParameters = new GlobalParametersOperations(this); + ChangeDataCapture = new ChangeDataCaptureOperations(this); + BaseUri = new System.Uri("https://management.azure.com"); + ApiVersion = "2018-06-01"; + AcceptLanguage = "en-US"; + LongRunningOperationRetryTimeout = 30; + GenerateClientRequestId = true; + SerializationSettings = new JsonSerializerSettings + { + Formatting = Newtonsoft.Json.Formatting.Indented, + DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, + DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, + NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, + ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, + ContractResolver = new ReadOnlyJsonContractResolver(), + Converters = new List + { + new Iso8601TimeSpanConverter() + } + }; + SerializationSettings.Converters.Add(new TransformationJsonConverter()); + DeserializationSettings = new JsonSerializerSettings + { + DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, + DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, + NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, + ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, + ContractResolver = new ReadOnlyJsonContractResolver(), + Converters = new List + { + new Iso8601TimeSpanConverter() + } + }; + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("authenticationType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("authenticationType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("authorizationType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("authorizationType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + CustomInitialize(); + DeserializationSettings.Converters.Add(new TransformationJsonConverter()); + DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowDebugSessionOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowDebugSessionOperations.cs new file mode 100644 index 000000000000..b19a93009132 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowDebugSessionOperations.cs @@ -0,0 +1,1480 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// DataFlowDebugSessionOperations operations. + /// + internal partial class DataFlowDebugSessionOperations : IServiceOperations, IDataFlowDebugSessionOperations + { + /// + /// Initializes a new instance of the DataFlowDebugSessionOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal DataFlowDebugSessionOperations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// Creates a data flow debug session. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string factoryName, CreateDataFlowDebugSessionRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(resourceGroupName, factoryName, request, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Query all active data flow debug sessions. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> QueryByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "QueryByFactory", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryDataFlowDebugSessions").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Add a data flow into debug session. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition with debug content. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> AddDataFlowWithHttpMessagesAsync(string resourceGroupName, string factoryName, DataFlowDebugPackage request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (request == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "request"); + } + if (request != null) + { + request.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("request", request); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "AddDataFlow", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/addDataFlowToDebugSession").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(request != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes a data flow debug session. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition for deletion + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, DeleteDataFlowDebugSessionRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (request == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "request"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("request", request); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/deleteDataFlowDebugSession").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(request != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Execute a data flow debug command. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug command definition. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> ExecuteCommandWithHttpMessagesAsync(string resourceGroupName, string factoryName, DataFlowDebugCommandRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginExecuteCommandWithHttpMessagesAsync(resourceGroupName, factoryName, request, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Creates a data flow debug session. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string factoryName, CreateDataFlowDebugSessionRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (request == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "request"); + } + if (request != null) + { + request.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("request", request); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/createDataFlowDebugSession").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(request != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Execute a data flow debug command. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug command definition. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginExecuteCommandWithHttpMessagesAsync(string resourceGroupName, string factoryName, DataFlowDebugCommandRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (request == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "request"); + } + if (request != null) + { + request.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("request", request); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginExecuteCommand", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/executeDataFlowDebugCommand").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(request != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Query all active data flow debug sessions. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> QueryByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "QueryByFactoryNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowDebugSessionOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowDebugSessionOperationsExtensions.cs new file mode 100644 index 000000000000..82916fb8fa44 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowDebugSessionOperationsExtensions.cs @@ -0,0 +1,372 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for DataFlowDebugSessionOperations. + /// + public static partial class DataFlowDebugSessionOperationsExtensions + { + /// + /// Creates a data flow debug session. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition + /// + public static CreateDataFlowDebugSessionResponse Create(this IDataFlowDebugSessionOperations operations, string resourceGroupName, string factoryName, CreateDataFlowDebugSessionRequest request) + { + return operations.CreateAsync(resourceGroupName, factoryName, request).GetAwaiter().GetResult(); + } + + /// + /// Creates a data flow debug session. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition + /// + /// + /// The cancellation token. + /// + public static async Task CreateAsync(this IDataFlowDebugSessionOperations operations, string resourceGroupName, string factoryName, CreateDataFlowDebugSessionRequest request, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, factoryName, request, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Query all active data flow debug sessions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + public static IPage QueryByFactory(this IDataFlowDebugSessionOperations operations, string resourceGroupName, string factoryName) + { + return operations.QueryByFactoryAsync(resourceGroupName, factoryName).GetAwaiter().GetResult(); + } + + /// + /// Query all active data flow debug sessions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The cancellation token. + /// + public static async Task> QueryByFactoryAsync(this IDataFlowDebugSessionOperations operations, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.QueryByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Add a data flow into debug session. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition with debug content. + /// + public static AddDataFlowToDebugSessionResponse AddDataFlow(this IDataFlowDebugSessionOperations operations, string resourceGroupName, string factoryName, DataFlowDebugPackage request) + { + return operations.AddDataFlowAsync(resourceGroupName, factoryName, request).GetAwaiter().GetResult(); + } + + /// + /// Add a data flow into debug session. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition with debug content. + /// + /// + /// The cancellation token. + /// + public static async Task AddDataFlowAsync(this IDataFlowDebugSessionOperations operations, string resourceGroupName, string factoryName, DataFlowDebugPackage request, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.AddDataFlowWithHttpMessagesAsync(resourceGroupName, factoryName, request, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a data flow debug session. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition for deletion + /// + public static void Delete(this IDataFlowDebugSessionOperations operations, string resourceGroupName, string factoryName, DeleteDataFlowDebugSessionRequest request) + { + operations.DeleteAsync(resourceGroupName, factoryName, request).GetAwaiter().GetResult(); + } + + /// + /// Deletes a data flow debug session. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition for deletion + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IDataFlowDebugSessionOperations operations, string resourceGroupName, string factoryName, DeleteDataFlowDebugSessionRequest request, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, factoryName, request, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Execute a data flow debug command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug command definition. + /// + public static DataFlowDebugCommandResponse ExecuteCommand(this IDataFlowDebugSessionOperations operations, string resourceGroupName, string factoryName, DataFlowDebugCommandRequest request) + { + return operations.ExecuteCommandAsync(resourceGroupName, factoryName, request).GetAwaiter().GetResult(); + } + + /// + /// Execute a data flow debug command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug command definition. + /// + /// + /// The cancellation token. + /// + public static async Task ExecuteCommandAsync(this IDataFlowDebugSessionOperations operations, string resourceGroupName, string factoryName, DataFlowDebugCommandRequest request, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ExecuteCommandWithHttpMessagesAsync(resourceGroupName, factoryName, request, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates a data flow debug session. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition + /// + public static CreateDataFlowDebugSessionResponse BeginCreate(this IDataFlowDebugSessionOperations operations, string resourceGroupName, string factoryName, CreateDataFlowDebugSessionRequest request) + { + return operations.BeginCreateAsync(resourceGroupName, factoryName, request).GetAwaiter().GetResult(); + } + + /// + /// Creates a data flow debug session. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition + /// + /// + /// The cancellation token. + /// + public static async Task BeginCreateAsync(this IDataFlowDebugSessionOperations operations, string resourceGroupName, string factoryName, CreateDataFlowDebugSessionRequest request, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginCreateWithHttpMessagesAsync(resourceGroupName, factoryName, request, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Execute a data flow debug command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug command definition. + /// + public static DataFlowDebugCommandResponse BeginExecuteCommand(this IDataFlowDebugSessionOperations operations, string resourceGroupName, string factoryName, DataFlowDebugCommandRequest request) + { + return operations.BeginExecuteCommandAsync(resourceGroupName, factoryName, request).GetAwaiter().GetResult(); + } + + /// + /// Execute a data flow debug command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug command definition. + /// + /// + /// The cancellation token. + /// + public static async Task BeginExecuteCommandAsync(this IDataFlowDebugSessionOperations operations, string resourceGroupName, string factoryName, DataFlowDebugCommandRequest request, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginExecuteCommandWithHttpMessagesAsync(resourceGroupName, factoryName, request, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Query all active data flow debug sessions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage QueryByFactoryNext(this IDataFlowDebugSessionOperations operations, string nextPageLink) + { + return operations.QueryByFactoryNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Query all active data flow debug sessions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> QueryByFactoryNextAsync(this IDataFlowDebugSessionOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.QueryByFactoryNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowsOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowsOperations.cs new file mode 100644 index 000000000000..6fa599d78b4b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowsOperations.cs @@ -0,0 +1,1227 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// DataFlowsOperations operations. + /// + internal partial class DataFlowsOperations : IServiceOperations, IDataFlowsOperations + { + /// + /// Initializes a new instance of the DataFlowsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal DataFlowsOperations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// Creates or updates a data flow. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The data flow name. + /// + /// + /// Data flow resource definition. + /// + /// + /// ETag of the data flow entity. Should only be specified for update, for + /// which it should match existing entity or can be * for unconditional update. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string dataFlowName, DataFlowResource dataFlow, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (dataFlowName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "dataFlowName"); + } + if (dataFlowName != null) + { + if (dataFlowName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "dataFlowName", 260); + } + if (dataFlowName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "dataFlowName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(dataFlowName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "dataFlowName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (dataFlow == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "dataFlow"); + } + if (dataFlow != null) + { + dataFlow.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("dataFlowName", dataFlowName); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("dataFlow", dataFlow); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows/{dataFlowName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{dataFlowName}", System.Uri.EscapeDataString(dataFlowName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifMatch != null) + { + if (_httpRequest.Headers.Contains("If-Match")) + { + _httpRequest.Headers.Remove("If-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(dataFlow != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(dataFlow, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a data flow. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The data flow name. + /// + /// + /// ETag of the data flow entity. Should only be specified for get. If the ETag + /// matches the existing entity tag, or if * was provided, then no content will + /// be returned. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string dataFlowName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (dataFlowName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "dataFlowName"); + } + if (dataFlowName != null) + { + if (dataFlowName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "dataFlowName", 260); + } + if (dataFlowName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "dataFlowName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(dataFlowName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "dataFlowName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("dataFlowName", dataFlowName); + tracingParameters.Add("ifNoneMatch", ifNoneMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows/{dataFlowName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{dataFlowName}", System.Uri.EscapeDataString(dataFlowName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifNoneMatch != null) + { + if (_httpRequest.Headers.Contains("If-None-Match")) + { + _httpRequest.Headers.Remove("If-None-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-None-Match", ifNoneMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes a data flow. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The data flow name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string dataFlowName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (dataFlowName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "dataFlowName"); + } + if (dataFlowName != null) + { + if (dataFlowName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "dataFlowName", 260); + } + if (dataFlowName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "dataFlowName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(dataFlowName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "dataFlowName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("dataFlowName", dataFlowName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows/{dataFlowName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{dataFlowName}", System.Uri.EscapeDataString(dataFlowName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists data flows. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactory", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists data flows. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactoryNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowsOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowsOperationsExtensions.cs new file mode 100644 index 000000000000..b9128218a2f8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowsOperationsExtensions.cs @@ -0,0 +1,258 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for DataFlowsOperations. + /// + public static partial class DataFlowsOperationsExtensions + { + /// + /// Creates or updates a data flow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The data flow name. + /// + /// + /// Data flow resource definition. + /// + /// + /// ETag of the data flow entity. Should only be specified for update, for + /// which it should match existing entity or can be * for unconditional update. + /// + public static DataFlowResource CreateOrUpdate(this IDataFlowsOperations operations, string resourceGroupName, string factoryName, string dataFlowName, DataFlowResource dataFlow, string ifMatch = default(string)) + { + return operations.CreateOrUpdateAsync(resourceGroupName, factoryName, dataFlowName, dataFlow, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a data flow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The data flow name. + /// + /// + /// Data flow resource definition. + /// + /// + /// ETag of the data flow entity. Should only be specified for update, for + /// which it should match existing entity or can be * for unconditional update. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IDataFlowsOperations operations, string resourceGroupName, string factoryName, string dataFlowName, DataFlowResource dataFlow, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, factoryName, dataFlowName, dataFlow, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a data flow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The data flow name. + /// + /// + /// ETag of the data flow entity. Should only be specified for get. If the ETag + /// matches the existing entity tag, or if * was provided, then no content will + /// be returned. + /// + public static DataFlowResource Get(this IDataFlowsOperations operations, string resourceGroupName, string factoryName, string dataFlowName, string ifNoneMatch = default(string)) + { + return operations.GetAsync(resourceGroupName, factoryName, dataFlowName, ifNoneMatch).GetAwaiter().GetResult(); + } + + /// + /// Gets a data flow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The data flow name. + /// + /// + /// ETag of the data flow entity. Should only be specified for get. If the ETag + /// matches the existing entity tag, or if * was provided, then no content will + /// be returned. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IDataFlowsOperations operations, string resourceGroupName, string factoryName, string dataFlowName, string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, factoryName, dataFlowName, ifNoneMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a data flow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The data flow name. + /// + public static void Delete(this IDataFlowsOperations operations, string resourceGroupName, string factoryName, string dataFlowName) + { + operations.DeleteAsync(resourceGroupName, factoryName, dataFlowName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a data flow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The data flow name. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IDataFlowsOperations operations, string resourceGroupName, string factoryName, string dataFlowName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, factoryName, dataFlowName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists data flows. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + public static IPage ListByFactory(this IDataFlowsOperations operations, string resourceGroupName, string factoryName) + { + return operations.ListByFactoryAsync(resourceGroupName, factoryName).GetAwaiter().GetResult(); + } + + /// + /// Lists data flows. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryAsync(this IDataFlowsOperations operations, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists data flows. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByFactoryNext(this IDataFlowsOperations operations, string nextPageLink) + { + return operations.ListByFactoryNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists data flows. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryNextAsync(this IDataFlowsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DatasetsOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DatasetsOperations.cs new file mode 100644 index 000000000000..5ed00054a770 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DatasetsOperations.cs @@ -0,0 +1,1227 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// DatasetsOperations operations. + /// + internal partial class DatasetsOperations : IServiceOperations, IDatasetsOperations + { + /// + /// Initializes a new instance of the DatasetsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal DatasetsOperations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// Lists datasets. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactory", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates a dataset. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The dataset name. + /// + /// + /// Dataset resource definition. + /// + /// + /// ETag of the dataset entity. Should only be specified for update, for which + /// it should match existing entity or can be * for unconditional update. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string datasetName, DatasetResource dataset, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (datasetName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "datasetName"); + } + if (datasetName != null) + { + if (datasetName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "datasetName", 260); + } + if (datasetName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "datasetName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(datasetName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "datasetName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (dataset == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "dataset"); + } + if (dataset != null) + { + dataset.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("datasetName", datasetName); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("dataset", dataset); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{datasetName}", System.Uri.EscapeDataString(datasetName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifMatch != null) + { + if (_httpRequest.Headers.Contains("If-Match")) + { + _httpRequest.Headers.Remove("If-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(dataset != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(dataset, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a dataset. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The dataset name. + /// + /// + /// ETag of the dataset entity. Should only be specified for get. If the ETag + /// matches the existing entity tag, or if * was provided, then no content will + /// be returned. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string datasetName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (datasetName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "datasetName"); + } + if (datasetName != null) + { + if (datasetName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "datasetName", 260); + } + if (datasetName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "datasetName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(datasetName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "datasetName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("datasetName", datasetName); + tracingParameters.Add("ifNoneMatch", ifNoneMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{datasetName}", System.Uri.EscapeDataString(datasetName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifNoneMatch != null) + { + if (_httpRequest.Headers.Contains("If-None-Match")) + { + _httpRequest.Headers.Remove("If-None-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-None-Match", ifNoneMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 304) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes a dataset. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The dataset name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string datasetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (datasetName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "datasetName"); + } + if (datasetName != null) + { + if (datasetName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "datasetName", 260); + } + if (datasetName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "datasetName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(datasetName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "datasetName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("datasetName", datasetName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/datasets/{datasetName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{datasetName}", System.Uri.EscapeDataString(datasetName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists datasets. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactoryNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DatasetsOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DatasetsOperationsExtensions.cs new file mode 100644 index 000000000000..02506730bcbe --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DatasetsOperationsExtensions.cs @@ -0,0 +1,258 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for DatasetsOperations. + /// + public static partial class DatasetsOperationsExtensions + { + /// + /// Lists datasets. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + public static IPage ListByFactory(this IDatasetsOperations operations, string resourceGroupName, string factoryName) + { + return operations.ListByFactoryAsync(resourceGroupName, factoryName).GetAwaiter().GetResult(); + } + + /// + /// Lists datasets. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryAsync(this IDatasetsOperations operations, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a dataset. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The dataset name. + /// + /// + /// Dataset resource definition. + /// + /// + /// ETag of the dataset entity. Should only be specified for update, for which + /// it should match existing entity or can be * for unconditional update. + /// + public static DatasetResource CreateOrUpdate(this IDatasetsOperations operations, string resourceGroupName, string factoryName, string datasetName, DatasetResource dataset, string ifMatch = default(string)) + { + return operations.CreateOrUpdateAsync(resourceGroupName, factoryName, datasetName, dataset, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a dataset. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The dataset name. + /// + /// + /// Dataset resource definition. + /// + /// + /// ETag of the dataset entity. Should only be specified for update, for which + /// it should match existing entity or can be * for unconditional update. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IDatasetsOperations operations, string resourceGroupName, string factoryName, string datasetName, DatasetResource dataset, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, factoryName, datasetName, dataset, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a dataset. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The dataset name. + /// + /// + /// ETag of the dataset entity. Should only be specified for get. If the ETag + /// matches the existing entity tag, or if * was provided, then no content will + /// be returned. + /// + public static DatasetResource Get(this IDatasetsOperations operations, string resourceGroupName, string factoryName, string datasetName, string ifNoneMatch = default(string)) + { + return operations.GetAsync(resourceGroupName, factoryName, datasetName, ifNoneMatch).GetAwaiter().GetResult(); + } + + /// + /// Gets a dataset. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The dataset name. + /// + /// + /// ETag of the dataset entity. Should only be specified for get. If the ETag + /// matches the existing entity tag, or if * was provided, then no content will + /// be returned. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IDatasetsOperations operations, string resourceGroupName, string factoryName, string datasetName, string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, factoryName, datasetName, ifNoneMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a dataset. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The dataset name. + /// + public static void Delete(this IDatasetsOperations operations, string resourceGroupName, string factoryName, string datasetName) + { + operations.DeleteAsync(resourceGroupName, factoryName, datasetName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a dataset. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The dataset name. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IDatasetsOperations operations, string resourceGroupName, string factoryName, string datasetName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, factoryName, datasetName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists datasets. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByFactoryNext(this IDatasetsOperations operations, string nextPageLink) + { + return operations.ListByFactoryNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists datasets. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryNextAsync(this IDatasetsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ExposureControlOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ExposureControlOperations.cs new file mode 100644 index 000000000000..6dc9012af83c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ExposureControlOperations.cs @@ -0,0 +1,739 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ExposureControlOperations operations. + /// + internal partial class ExposureControlOperations : IServiceOperations, IExposureControlOperations + { + /// + /// Initializes a new instance of the ExposureControlOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ExposureControlOperations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// Get exposure control feature for specific location. + /// + /// + /// The location identifier. + /// + /// + /// The exposure control request. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetFeatureValueWithHttpMessagesAsync(string locationId, ExposureControlRequest exposureControlRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (locationId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "locationId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (exposureControlRequest == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "exposureControlRequest"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("locationId", locationId); + tracingParameters.Add("exposureControlRequest", exposureControlRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetFeatureValue", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.DataFactory/locations/{locationId}/getFeatureValue").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{locationId}", System.Uri.EscapeDataString(locationId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(exposureControlRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(exposureControlRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get exposure control feature for specific factory. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The exposure control request. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetFeatureValueByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, ExposureControlRequest exposureControlRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (exposureControlRequest == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "exposureControlRequest"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("exposureControlRequest", exposureControlRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetFeatureValueByFactory", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/getFeatureValue").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(exposureControlRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(exposureControlRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get list of exposure control features for specific factory. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The exposure control request for list of features. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> QueryFeatureValuesByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, ExposureControlBatchRequest exposureControlBatchRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (exposureControlBatchRequest == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "exposureControlBatchRequest"); + } + if (exposureControlBatchRequest != null) + { + exposureControlBatchRequest.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("exposureControlBatchRequest", exposureControlBatchRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "QueryFeatureValuesByFactory", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryFeaturesValue").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(exposureControlBatchRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(exposureControlBatchRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ExposureControlOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ExposureControlOperationsExtensions.cs new file mode 100644 index 000000000000..f3e665981016 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ExposureControlOperationsExtensions.cs @@ -0,0 +1,157 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ExposureControlOperations. + /// + public static partial class ExposureControlOperationsExtensions + { + /// + /// Get exposure control feature for specific location. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location identifier. + /// + /// + /// The exposure control request. + /// + public static ExposureControlResponse GetFeatureValue(this IExposureControlOperations operations, string locationId, ExposureControlRequest exposureControlRequest) + { + return operations.GetFeatureValueAsync(locationId, exposureControlRequest).GetAwaiter().GetResult(); + } + + /// + /// Get exposure control feature for specific location. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The location identifier. + /// + /// + /// The exposure control request. + /// + /// + /// The cancellation token. + /// + public static async Task GetFeatureValueAsync(this IExposureControlOperations operations, string locationId, ExposureControlRequest exposureControlRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetFeatureValueWithHttpMessagesAsync(locationId, exposureControlRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get exposure control feature for specific factory. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The exposure control request. + /// + public static ExposureControlResponse GetFeatureValueByFactory(this IExposureControlOperations operations, string resourceGroupName, string factoryName, ExposureControlRequest exposureControlRequest) + { + return operations.GetFeatureValueByFactoryAsync(resourceGroupName, factoryName, exposureControlRequest).GetAwaiter().GetResult(); + } + + /// + /// Get exposure control feature for specific factory. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The exposure control request. + /// + /// + /// The cancellation token. + /// + public static async Task GetFeatureValueByFactoryAsync(this IExposureControlOperations operations, string resourceGroupName, string factoryName, ExposureControlRequest exposureControlRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetFeatureValueByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, exposureControlRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get list of exposure control features for specific factory. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The exposure control request for list of features. + /// + public static ExposureControlBatchResponse QueryFeatureValuesByFactory(this IExposureControlOperations operations, string resourceGroupName, string factoryName, ExposureControlBatchRequest exposureControlBatchRequest) + { + return operations.QueryFeatureValuesByFactoryAsync(resourceGroupName, factoryName, exposureControlBatchRequest).GetAwaiter().GetResult(); + } + + /// + /// Get list of exposure control features for specific factory. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The exposure control request for list of features. + /// + /// + /// The cancellation token. + /// + public static async Task QueryFeatureValuesByFactoryAsync(this IExposureControlOperations operations, string resourceGroupName, string factoryName, ExposureControlBatchRequest exposureControlBatchRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.QueryFeatureValuesByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, exposureControlBatchRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/FactoriesOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/FactoriesOperations.cs new file mode 100644 index 000000000000..84b1ac1a57b5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/FactoriesOperations.cs @@ -0,0 +1,1855 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// FactoriesOperations operations. + /// + internal partial class FactoriesOperations : IServiceOperations, IFactoriesOperations + { + /// + /// Initializes a new instance of the FactoriesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal FactoriesOperations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// Lists factories. + /// + /// + /// The resource group name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates a factory. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Factory resource definition. + /// + /// + /// ETag of the factory entity. Should only be specified for update, for which + /// it should match existing entity or can be * for unconditional update. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, Factory factory, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (factory == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factory"); + } + if (factory != null) + { + factory.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("factory", factory); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifMatch != null) + { + if (_httpRequest.Headers.Contains("If-Match")) + { + _httpRequest.Headers.Remove("If-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(factory != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(factory, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Updates a factory. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The parameters for updating a factory. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, FactoryUpdateParameters factoryUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (factoryUpdateParameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryUpdateParameters"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("factoryUpdateParameters", factoryUpdateParameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(factoryUpdateParameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(factoryUpdateParameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a factory. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// ETag of the factory entity. Should only be specified for get. If the ETag + /// matches the existing entity tag, or if * was provided, then no content will + /// be returned. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("ifNoneMatch", ifNoneMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifNoneMatch != null) + { + if (_httpRequest.Headers.Contains("If-None-Match")) + { + _httpRequest.Headers.Remove("If-None-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-None-Match", ifNoneMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 304) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes a factory. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get GitHub Access Token. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Get GitHub access token request definition. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetGitHubAccessTokenWithHttpMessagesAsync(string resourceGroupName, string factoryName, GitHubAccessTokenRequest gitHubAccessTokenRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (gitHubAccessTokenRequest == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "gitHubAccessTokenRequest"); + } + if (gitHubAccessTokenRequest != null) + { + gitHubAccessTokenRequest.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("gitHubAccessTokenRequest", gitHubAccessTokenRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetGitHubAccessToken", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/getGitHubAccessToken").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(gitHubAccessTokenRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(gitHubAccessTokenRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get Data Plane access. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data Plane user access policy definition. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetDataPlaneAccessWithHttpMessagesAsync(string resourceGroupName, string factoryName, UserAccessPolicy policy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (policy == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "policy"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("policy", policy); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetDataPlaneAccess", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/getDataPlaneAccess").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(policy != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(policy, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists factories. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/FactoriesOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/FactoriesOperationsExtensions.cs new file mode 100644 index 000000000000..591b0551eb29 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/FactoriesOperationsExtensions.cs @@ -0,0 +1,372 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for FactoriesOperations. + /// + public static partial class FactoriesOperationsExtensions + { + /// + /// Lists factories. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + public static IPage ListByResourceGroup(this IFactoriesOperations operations, string resourceGroupName) + { + return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Lists factories. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByResourceGroupAsync(this IFactoriesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a factory. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Factory resource definition. + /// + /// + /// ETag of the factory entity. Should only be specified for update, for which + /// it should match existing entity or can be * for unconditional update. + /// + public static Factory CreateOrUpdate(this IFactoriesOperations operations, string resourceGroupName, string factoryName, Factory factory, string ifMatch = default(string)) + { + return operations.CreateOrUpdateAsync(resourceGroupName, factoryName, factory, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a factory. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Factory resource definition. + /// + /// + /// ETag of the factory entity. Should only be specified for update, for which + /// it should match existing entity or can be * for unconditional update. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IFactoriesOperations operations, string resourceGroupName, string factoryName, Factory factory, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, factoryName, factory, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates a factory. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The parameters for updating a factory. + /// + public static Factory Update(this IFactoriesOperations operations, string resourceGroupName, string factoryName, FactoryUpdateParameters factoryUpdateParameters) + { + return operations.UpdateAsync(resourceGroupName, factoryName, factoryUpdateParameters).GetAwaiter().GetResult(); + } + + /// + /// Updates a factory. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The parameters for updating a factory. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IFactoriesOperations operations, string resourceGroupName, string factoryName, FactoryUpdateParameters factoryUpdateParameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, factoryName, factoryUpdateParameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a factory. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// ETag of the factory entity. Should only be specified for get. If the ETag + /// matches the existing entity tag, or if * was provided, then no content will + /// be returned. + /// + public static Factory Get(this IFactoriesOperations operations, string resourceGroupName, string factoryName, string ifNoneMatch = default(string)) + { + return operations.GetAsync(resourceGroupName, factoryName, ifNoneMatch).GetAwaiter().GetResult(); + } + + /// + /// Gets a factory. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// ETag of the factory entity. Should only be specified for get. If the ETag + /// matches the existing entity tag, or if * was provided, then no content will + /// be returned. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IFactoriesOperations operations, string resourceGroupName, string factoryName, string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, factoryName, ifNoneMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a factory. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + public static void Delete(this IFactoriesOperations operations, string resourceGroupName, string factoryName) + { + operations.DeleteAsync(resourceGroupName, factoryName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a factory. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IFactoriesOperations operations, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, factoryName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Get GitHub Access Token. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Get GitHub access token request definition. + /// + public static GitHubAccessTokenResponse GetGitHubAccessToken(this IFactoriesOperations operations, string resourceGroupName, string factoryName, GitHubAccessTokenRequest gitHubAccessTokenRequest) + { + return operations.GetGitHubAccessTokenAsync(resourceGroupName, factoryName, gitHubAccessTokenRequest).GetAwaiter().GetResult(); + } + + /// + /// Get GitHub Access Token. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Get GitHub access token request definition. + /// + /// + /// The cancellation token. + /// + public static async Task GetGitHubAccessTokenAsync(this IFactoriesOperations operations, string resourceGroupName, string factoryName, GitHubAccessTokenRequest gitHubAccessTokenRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetGitHubAccessTokenWithHttpMessagesAsync(resourceGroupName, factoryName, gitHubAccessTokenRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get Data Plane access. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data Plane user access policy definition. + /// + public static AccessPolicyResponse GetDataPlaneAccess(this IFactoriesOperations operations, string resourceGroupName, string factoryName, UserAccessPolicy policy) + { + return operations.GetDataPlaneAccessAsync(resourceGroupName, factoryName, policy).GetAwaiter().GetResult(); + } + + /// + /// Get Data Plane access. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data Plane user access policy definition. + /// + /// + /// The cancellation token. + /// + public static async Task GetDataPlaneAccessAsync(this IFactoriesOperations operations, string resourceGroupName, string factoryName, UserAccessPolicy policy, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetDataPlaneAccessWithHttpMessagesAsync(resourceGroupName, factoryName, policy, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists factories. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByResourceGroupNext(this IFactoriesOperations operations, string nextPageLink) + { + return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists factories. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByResourceGroupNextAsync(this IFactoriesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/GlobalParametersOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/GlobalParametersOperations.cs new file mode 100644 index 000000000000..2571dc4aeadb --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/GlobalParametersOperations.cs @@ -0,0 +1,1200 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// GlobalParametersOperations operations. + /// + internal partial class GlobalParametersOperations : IServiceOperations, IGlobalParametersOperations + { + /// + /// Initializes a new instance of the GlobalParametersOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal GlobalParametersOperations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// Lists Global parameters + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactory", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/globalParameters").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a Global parameter + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The global parameter name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string globalParameterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (globalParameterName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "globalParameterName"); + } + if (globalParameterName != null) + { + if (globalParameterName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "globalParameterName", 260); + } + if (globalParameterName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "globalParameterName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(globalParameterName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "globalParameterName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("globalParameterName", globalParameterName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/globalParameters/{globalParameterName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{globalParameterName}", System.Uri.EscapeDataString(globalParameterName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates a Global parameter + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The global parameter name. + /// + /// + /// Global parameter resource definition. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string globalParameterName, GlobalParameterResource defaultParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (globalParameterName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "globalParameterName"); + } + if (globalParameterName != null) + { + if (globalParameterName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "globalParameterName", 260); + } + if (globalParameterName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "globalParameterName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(globalParameterName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "globalParameterName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (defaultParameter == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "defaultParameter"); + } + if (defaultParameter != null) + { + defaultParameter.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("globalParameterName", globalParameterName); + tracingParameters.Add("defaultParameter", defaultParameter); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/globalParameters/{globalParameterName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{globalParameterName}", System.Uri.EscapeDataString(globalParameterName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(defaultParameter != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(defaultParameter, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes a Global parameter + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The global parameter name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string globalParameterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (globalParameterName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "globalParameterName"); + } + if (globalParameterName != null) + { + if (globalParameterName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "globalParameterName", 260); + } + if (globalParameterName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "globalParameterName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(globalParameterName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "globalParameterName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("globalParameterName", globalParameterName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/globalParameters/{globalParameterName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{globalParameterName}", System.Uri.EscapeDataString(globalParameterName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists Global parameters + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactoryNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/GlobalParametersOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/GlobalParametersOperationsExtensions.cs new file mode 100644 index 000000000000..003865ed33f5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/GlobalParametersOperationsExtensions.cs @@ -0,0 +1,240 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for GlobalParametersOperations. + /// + public static partial class GlobalParametersOperationsExtensions + { + /// + /// Lists Global parameters + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + public static IPage ListByFactory(this IGlobalParametersOperations operations, string resourceGroupName, string factoryName) + { + return operations.ListByFactoryAsync(resourceGroupName, factoryName).GetAwaiter().GetResult(); + } + + /// + /// Lists Global parameters + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryAsync(this IGlobalParametersOperations operations, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a Global parameter + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The global parameter name. + /// + public static GlobalParameterResource Get(this IGlobalParametersOperations operations, string resourceGroupName, string factoryName, string globalParameterName) + { + return operations.GetAsync(resourceGroupName, factoryName, globalParameterName).GetAwaiter().GetResult(); + } + + /// + /// Gets a Global parameter + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The global parameter name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IGlobalParametersOperations operations, string resourceGroupName, string factoryName, string globalParameterName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, factoryName, globalParameterName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a Global parameter + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The global parameter name. + /// + /// + /// Global parameter resource definition. + /// + public static GlobalParameterResource CreateOrUpdate(this IGlobalParametersOperations operations, string resourceGroupName, string factoryName, string globalParameterName, GlobalParameterResource defaultParameter) + { + return operations.CreateOrUpdateAsync(resourceGroupName, factoryName, globalParameterName, defaultParameter).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a Global parameter + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The global parameter name. + /// + /// + /// Global parameter resource definition. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IGlobalParametersOperations operations, string resourceGroupName, string factoryName, string globalParameterName, GlobalParameterResource defaultParameter, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, factoryName, globalParameterName, defaultParameter, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a Global parameter + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The global parameter name. + /// + public static void Delete(this IGlobalParametersOperations operations, string resourceGroupName, string factoryName, string globalParameterName) + { + operations.DeleteAsync(resourceGroupName, factoryName, globalParameterName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a Global parameter + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The global parameter name. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IGlobalParametersOperations operations, string resourceGroupName, string factoryName, string globalParameterName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, factoryName, globalParameterName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists Global parameters + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByFactoryNext(this IGlobalParametersOperations operations, string nextPageLink) + { + return operations.ListByFactoryNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists Global parameters + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryNextAsync(this IGlobalParametersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IActivityRunsOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IActivityRunsOperations.cs new file mode 100644 index 000000000000..6ab4e4404ad8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IActivityRunsOperations.cs @@ -0,0 +1,58 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ActivityRunsOperations operations. + /// + public partial interface IActivityRunsOperations + { + /// + /// Query activity runs based on input filter conditions. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline run identifier. + /// + /// + /// Parameters to filter the activity runs. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> QueryByPipelineRunWithHttpMessagesAsync(string resourceGroupName, string factoryName, string runId, RunFilterParameters filterParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IChangeDataCaptureOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IChangeDataCaptureOperations.cs new file mode 100644 index 000000000000..b911b589c7f8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IChangeDataCaptureOperations.cs @@ -0,0 +1,246 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ChangeDataCaptureOperations operations. + /// + public partial interface IChangeDataCaptureOperations + { + /// + /// Lists all resources of type change data capture. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a change data capture resource. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The change data capture name. + /// + /// + /// Change data capture resource definition. + /// + /// + /// ETag of the change data capture entity. Should only be specified + /// for update, for which it should match existing entity or can be * + /// for unconditional update. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string changeDataCaptureName, ChangeDataCaptureResource changeDataCapture, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a change data capture. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The change data capture name. + /// + /// + /// ETag of the change data capture entity. Should only be specified + /// for get. If the ETag matches the existing entity tag, or if * was + /// provided, then no content will be returned. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string changeDataCaptureName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a change data capture. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The change data capture name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string changeDataCaptureName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Starts a change data capture. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The change data capture name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task StartWithHttpMessagesAsync(string resourceGroupName, string factoryName, string changeDataCaptureName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Stops a change data capture. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The change data capture name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task StopWithHttpMessagesAsync(string resourceGroupName, string factoryName, string changeDataCaptureName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the current status for the change data capture resource. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The change data capture name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> StatusWithHttpMessagesAsync(string resourceGroupName, string factoryName, string changeDataCaptureName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists all resources of type change data capture. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ICredentialOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ICredentialOperations.cs new file mode 100644 index 000000000000..c0c3c7fc47cd --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ICredentialOperations.cs @@ -0,0 +1,168 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// CredentialOperations operations. + /// + public partial interface ICredentialOperations + { + /// + /// List credentials. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a credential. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Credential name + /// + /// + /// Credential resource definition. + /// + /// + /// ETag of the credential entity. Should only be specified for update, + /// for which it should match existing entity or can be * for + /// unconditional update. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string credentialName, CredentialResource credential, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a credential. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Credential name + /// + /// + /// ETag of the credential entity. Should only be specified for get. If + /// the ETag matches the existing entity tag, or if * was provided, + /// then no content will be returned. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string credentialName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a credential. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Credential name + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string credentialName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List credentials. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDataFactoryManagementClient.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDataFactoryManagementClient.cs new file mode 100644 index 000000000000..d3b044d00229 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDataFactoryManagementClient.cs @@ -0,0 +1,189 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + + /// + /// The Azure Data Factory V2 management API provides a RESTful set of web + /// services that interact with Azure Data Factory V2 services. + /// + public partial interface IDataFactoryManagementClient : System.IDisposable + { + /// + /// The base URI of the service. + /// + System.Uri BaseUri { get; set; } + + /// + /// Gets or sets json serialization settings. + /// + JsonSerializerSettings SerializationSettings { get; } + + /// + /// Gets or sets json deserialization settings. + /// + JsonSerializerSettings DeserializationSettings { get; } + + /// + /// Credentials needed for the client to connect to Azure. + /// + ServiceClientCredentials Credentials { get; } + + /// + /// The subscription identifier. + /// + string SubscriptionId { get; set; } + + /// + /// The API version. + /// + string ApiVersion { get; } + + /// + /// The preferred language for the response. + /// + string AcceptLanguage { get; set; } + + /// + /// The retry timeout in seconds for Long Running Operations. Default + /// value is 30. + /// + int? LongRunningOperationRetryTimeout { get; set; } + + /// + /// Whether a unique x-ms-client-request-id should be generated. When + /// set to true a unique x-ms-client-request-id value is generated and + /// included in each request. Default is true. + /// + bool? GenerateClientRequestId { get; set; } + + + /// + /// Gets the IOperations. + /// + IOperations Operations { get; } + + /// + /// Gets the IExposureControlOperations. + /// + IExposureControlOperations ExposureControl { get; } + + /// + /// Gets the IFactoriesOperations. + /// + IFactoriesOperations Factories { get; } + + /// + /// Gets the IIntegrationRuntimesOperations. + /// + IIntegrationRuntimesOperations IntegrationRuntimes { get; } + + /// + /// Gets the IIntegrationRuntimeObjectMetadataOperations. + /// + IIntegrationRuntimeObjectMetadataOperations IntegrationRuntimeObjectMetadata { get; } + + /// + /// Gets the IIntegrationRuntimeNodesOperations. + /// + IIntegrationRuntimeNodesOperations IntegrationRuntimeNodes { get; } + + /// + /// Gets the ILinkedServicesOperations. + /// + ILinkedServicesOperations LinkedServices { get; } + + /// + /// Gets the IDatasetsOperations. + /// + IDatasetsOperations Datasets { get; } + + /// + /// Gets the IPipelinesOperations. + /// + IPipelinesOperations Pipelines { get; } + + /// + /// Gets the IPipelineRunsOperations. + /// + IPipelineRunsOperations PipelineRuns { get; } + + /// + /// Gets the IActivityRunsOperations. + /// + IActivityRunsOperations ActivityRuns { get; } + + /// + /// Gets the ITriggersOperations. + /// + ITriggersOperations Triggers { get; } + + /// + /// Gets the ITriggerRunsOperations. + /// + ITriggerRunsOperations TriggerRuns { get; } + + /// + /// Gets the IDataFlowsOperations. + /// + IDataFlowsOperations DataFlows { get; } + + /// + /// Gets the IDataFlowDebugSessionOperations. + /// + IDataFlowDebugSessionOperations DataFlowDebugSession { get; } + + /// + /// Gets the IManagedVirtualNetworksOperations. + /// + IManagedVirtualNetworksOperations ManagedVirtualNetworks { get; } + + /// + /// Gets the IManagedPrivateEndpointsOperations. + /// + IManagedPrivateEndpointsOperations ManagedPrivateEndpoints { get; } + + /// + /// Gets the ICredentialOperations. + /// + ICredentialOperations CredentialOperations { get; } + + /// + /// Gets the IPrivateEndPointConnectionsOperations. + /// + IPrivateEndPointConnectionsOperations PrivateEndPointConnections { get; } + + /// + /// Gets the IPrivateEndpointConnectionOperations. + /// + IPrivateEndpointConnectionOperations PrivateEndpointConnection { get; } + + /// + /// Gets the IPrivateLinkResourcesOperations. + /// + IPrivateLinkResourcesOperations PrivateLinkResources { get; } + + /// + /// Gets the IGlobalParametersOperations. + /// + IGlobalParametersOperations GlobalParameters { get; } + + /// + /// Gets the IChangeDataCaptureOperations. + /// + IChangeDataCaptureOperations ChangeDataCapture { get; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDataFlowDebugSessionOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDataFlowDebugSessionOperations.cs new file mode 100644 index 000000000000..b62b52cf78f6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDataFlowDebugSessionOperations.cs @@ -0,0 +1,239 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// DataFlowDebugSessionOperations operations. + /// + public partial interface IDataFlowDebugSessionOperations + { + /// + /// Creates a data flow debug session. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateWithHttpMessagesAsync(string resourceGroupName, string factoryName, CreateDataFlowDebugSessionRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Query all active data flow debug sessions. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> QueryByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Add a data flow into debug session. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition with debug content. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> AddDataFlowWithHttpMessagesAsync(string resourceGroupName, string factoryName, DataFlowDebugPackage request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a data flow debug session. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition for deletion + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, DeleteDataFlowDebugSessionRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute a data flow debug command. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug command definition. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> ExecuteCommandWithHttpMessagesAsync(string resourceGroupName, string factoryName, DataFlowDebugCommandRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates a data flow debug session. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string factoryName, CreateDataFlowDebugSessionRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute a data flow debug command. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug command definition. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginExecuteCommandWithHttpMessagesAsync(string resourceGroupName, string factoryName, DataFlowDebugCommandRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Query all active data flow debug sessions. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> QueryByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDataFlowsOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDataFlowsOperations.cs new file mode 100644 index 000000000000..9d1e9bf3f49c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDataFlowsOperations.cs @@ -0,0 +1,168 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// DataFlowsOperations operations. + /// + public partial interface IDataFlowsOperations + { + /// + /// Creates or updates a data flow. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The data flow name. + /// + /// + /// Data flow resource definition. + /// + /// + /// ETag of the data flow entity. Should only be specified for update, + /// for which it should match existing entity or can be * for + /// unconditional update. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string dataFlowName, DataFlowResource dataFlow, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a data flow. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The data flow name. + /// + /// + /// ETag of the data flow entity. Should only be specified for get. If + /// the ETag matches the existing entity tag, or if * was provided, + /// then no content will be returned. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string dataFlowName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a data flow. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The data flow name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string dataFlowName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists data flows. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists data flows. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDatasetsOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDatasetsOperations.cs new file mode 100644 index 000000000000..76516cf6e45c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDatasetsOperations.cs @@ -0,0 +1,168 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// DatasetsOperations operations. + /// + public partial interface IDatasetsOperations + { + /// + /// Lists datasets. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a dataset. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The dataset name. + /// + /// + /// Dataset resource definition. + /// + /// + /// ETag of the dataset entity. Should only be specified for update, + /// for which it should match existing entity or can be * for + /// unconditional update. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string datasetName, DatasetResource dataset, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a dataset. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The dataset name. + /// + /// + /// ETag of the dataset entity. Should only be specified for get. If + /// the ETag matches the existing entity tag, or if * was provided, + /// then no content will be returned. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string datasetName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a dataset. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The dataset name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string datasetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists datasets. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IExposureControlOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IExposureControlOperations.cs new file mode 100644 index 000000000000..0239ca2e3ef5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IExposureControlOperations.cs @@ -0,0 +1,108 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ExposureControlOperations operations. + /// + public partial interface IExposureControlOperations + { + /// + /// Get exposure control feature for specific location. + /// + /// + /// The location identifier. + /// + /// + /// The exposure control request. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetFeatureValueWithHttpMessagesAsync(string locationId, ExposureControlRequest exposureControlRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get exposure control feature for specific factory. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The exposure control request. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetFeatureValueByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, ExposureControlRequest exposureControlRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get list of exposure control features for specific factory. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The exposure control request for list of features. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> QueryFeatureValuesByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, ExposureControlBatchRequest exposureControlBatchRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IFactoriesOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IFactoriesOperations.cs new file mode 100644 index 000000000000..5adfde870283 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IFactoriesOperations.cs @@ -0,0 +1,240 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// FactoriesOperations operations. + /// + public partial interface IFactoriesOperations + { + /// + /// Lists factories. + /// + /// + /// The resource group name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a factory. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Factory resource definition. + /// + /// + /// ETag of the factory entity. Should only be specified for update, + /// for which it should match existing entity or can be * for + /// unconditional update. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, Factory factory, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates a factory. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The parameters for updating a factory. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, FactoryUpdateParameters factoryUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a factory. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// ETag of the factory entity. Should only be specified for get. If + /// the ETag matches the existing entity tag, or if * was provided, + /// then no content will be returned. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a factory. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get GitHub Access Token. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Get GitHub access token request definition. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetGitHubAccessTokenWithHttpMessagesAsync(string resourceGroupName, string factoryName, GitHubAccessTokenRequest gitHubAccessTokenRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get Data Plane access. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data Plane user access policy definition. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetDataPlaneAccessWithHttpMessagesAsync(string resourceGroupName, string factoryName, UserAccessPolicy policy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists factories. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IGlobalParametersOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IGlobalParametersOperations.cs new file mode 100644 index 000000000000..002e3b8562bc --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IGlobalParametersOperations.cs @@ -0,0 +1,158 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// GlobalParametersOperations operations. + /// + public partial interface IGlobalParametersOperations + { + /// + /// Lists Global parameters + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a Global parameter + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The global parameter name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string globalParameterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a Global parameter + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The global parameter name. + /// + /// + /// Global parameter resource definition. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string globalParameterName, GlobalParameterResource defaultParameter, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a Global parameter + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The global parameter name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string globalParameterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists Global parameters + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IIntegrationRuntimeNodesOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IIntegrationRuntimeNodesOperations.cs new file mode 100644 index 000000000000..fe9cf09699ba --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IIntegrationRuntimeNodesOperations.cs @@ -0,0 +1,151 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// IntegrationRuntimeNodesOperations operations. + /// + public partial interface IIntegrationRuntimeNodesOperations + { + /// + /// Gets a self-hosted integration runtime node. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The integration runtime node name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a self-hosted integration runtime node. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The integration runtime node name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates a self-hosted integration runtime node. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The integration runtime node name. + /// + /// + /// The parameters for updating an integration runtime node. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName, UpdateIntegrationRuntimeNodeRequest updateIntegrationRuntimeNodeRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get the IP address of self-hosted integration runtime node. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The integration runtime node name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetIpAddressWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IIntegrationRuntimeObjectMetadataOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IIntegrationRuntimeObjectMetadataOperations.cs new file mode 100644 index 000000000000..689a23f1b29e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IIntegrationRuntimeObjectMetadataOperations.cs @@ -0,0 +1,115 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// IntegrationRuntimeObjectMetadataOperations operations. + /// + public partial interface IIntegrationRuntimeObjectMetadataOperations + { + /// + /// Refresh a SSIS integration runtime object metadata. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> RefreshWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a SSIS integration runtime object metadata by specified path. + /// The return is pageable metadata list. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The parameters for getting a SSIS object metadata. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, GetSsisObjectMetadataRequest getMetadataRequest = default(GetSsisObjectMetadataRequest), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Refresh a SSIS integration runtime object metadata. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginRefreshWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IIntegrationRuntimesOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IIntegrationRuntimesOperations.cs new file mode 100644 index 000000000000..3ae4712bc24e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IIntegrationRuntimesOperations.cs @@ -0,0 +1,597 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// IntegrationRuntimesOperations operations. + /// + public partial interface IIntegrationRuntimesOperations + { + /// + /// Lists integration runtimes. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates an integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// Integration runtime resource definition. + /// + /// + /// ETag of the integration runtime entity. Should only be specified + /// for update, for which it should match existing entity or can be * + /// for unconditional update. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, IntegrationRuntimeResource integrationRuntime, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets an integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// ETag of the integration runtime entity. Should only be specified + /// for get. If the ETag matches the existing entity tag, or if * was + /// provided, then no content will be returned. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates an integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The parameters for updating an integration runtime. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, UpdateIntegrationRuntimeRequest updateIntegrationRuntimeRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes an integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets detailed status information for an integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetStatusWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the list of outbound network dependencies for a given + /// Azure-SSIS integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> ListOutboundNetworkDependenciesEndpointsWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the on-premises integration runtime connection information for + /// encrypting the on-premises data source credentials. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetConnectionInfoWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Regenerates the authentication key for an integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The parameters for regenerating integration runtime authentication + /// key. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> RegenerateAuthKeyWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, IntegrationRuntimeRegenerateKeyParameters regenerateKeyParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Retrieves the authentication keys for an integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> ListAuthKeysWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Starts a ManagedReserved type integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> StartWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Stops a ManagedReserved type integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task StopWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Force the integration runtime to synchronize credentials across + /// integration runtime nodes, and this will override the credentials + /// across all worker nodes with those available on the dispatcher + /// node. If you already have the latest credential backup file, you + /// should manually import it (preferred) on any self-hosted + /// integration runtime node than using this API directly. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task SyncCredentialsWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get the integration runtime monitoring data, which includes the + /// monitor data for all the nodes under this integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetMonitoringDataWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Upgrade self-hosted integration runtime to latest version if + /// availability. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task UpgradeWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Remove all linked integration runtimes under specific data factory + /// in a self-hosted integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The data factory name for the linked integration runtime. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task RemoveLinksWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, LinkedIntegrationRuntimeRequest linkedIntegrationRuntimeRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Create a linked integration runtime entry in a shared integration + /// runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The linked integration runtime properties. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateLinkedIntegrationRuntimeWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, CreateLinkedIntegrationRuntimeRequest createLinkedIntegrationRuntimeRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Starts a ManagedReserved type integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginStartWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Stops a ManagedReserved type integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task BeginStopWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists integration runtimes. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ILinkedServicesOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ILinkedServicesOperations.cs new file mode 100644 index 000000000000..d04b40b40954 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ILinkedServicesOperations.cs @@ -0,0 +1,168 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// LinkedServicesOperations operations. + /// + public partial interface ILinkedServicesOperations + { + /// + /// Lists linked services. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a linked service. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The linked service name. + /// + /// + /// Linked service resource definition. + /// + /// + /// ETag of the linkedService entity. Should only be specified for + /// update, for which it should match existing entity or can be * for + /// unconditional update. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string linkedServiceName, LinkedServiceResource linkedService, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a linked service. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The linked service name. + /// + /// + /// ETag of the linked service entity. Should only be specified for + /// get. If the ETag matches the existing entity tag, or if * was + /// provided, then no content will be returned. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string linkedServiceName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a linked service. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The linked service name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string linkedServiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists linked services. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IManagedPrivateEndpointsOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IManagedPrivateEndpointsOperations.cs new file mode 100644 index 000000000000..1d84087cec77 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IManagedPrivateEndpointsOperations.cs @@ -0,0 +1,180 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ManagedPrivateEndpointsOperations operations. + /// + public partial interface IManagedPrivateEndpointsOperations + { + /// + /// Lists managed private endpoints. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Managed virtual network name + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, string managedVirtualNetworkName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a managed private endpoint. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Managed virtual network name + /// + /// + /// Managed private endpoint name + /// + /// + /// Managed private endpoint resource definition. + /// + /// + /// ETag of the managed private endpoint entity. Should only be + /// specified for update, for which it should match existing entity or + /// can be * for unconditional update. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string managedVirtualNetworkName, string managedPrivateEndpointName, ManagedPrivateEndpointResource managedPrivateEndpoint, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a managed private endpoint. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Managed virtual network name + /// + /// + /// Managed private endpoint name + /// + /// + /// ETag of the managed private endpoint entity. Should only be + /// specified for get. If the ETag matches the existing entity tag, or + /// if * was provided, then no content will be returned. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string managedVirtualNetworkName, string managedPrivateEndpointName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a managed private endpoint. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Managed virtual network name + /// + /// + /// Managed private endpoint name + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string managedVirtualNetworkName, string managedPrivateEndpointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists managed private endpoints. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IManagedVirtualNetworksOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IManagedVirtualNetworksOperations.cs new file mode 100644 index 000000000000..ef05ffa5d2d4 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IManagedVirtualNetworksOperations.cs @@ -0,0 +1,143 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ManagedVirtualNetworksOperations operations. + /// + public partial interface IManagedVirtualNetworksOperations + { + /// + /// Lists managed Virtual Networks. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a managed Virtual Network. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Managed virtual network name + /// + /// + /// Managed Virtual Network resource definition. + /// + /// + /// ETag of the managed Virtual Network entity. Should only be + /// specified for update, for which it should match existing entity or + /// can be * for unconditional update. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string managedVirtualNetworkName, ManagedVirtualNetworkResource managedVirtualNetwork, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a managed Virtual Network. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Managed virtual network name + /// + /// + /// ETag of the managed Virtual Network entity. Should only be + /// specified for get. If the ETag matches the existing entity tag, or + /// if * was provided, then no content will be returned. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string managedVirtualNetworkName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists managed Virtual Networks. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IOperations.cs new file mode 100644 index 000000000000..13a41f065270 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IOperations.cs @@ -0,0 +1,68 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Operations operations. + /// + public partial interface IOperations + { + /// + /// Lists the available Azure Data Factory API operations. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists the available Azure Data Factory API operations. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IPipelineRunsOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IPipelineRunsOperations.cs new file mode 100644 index 000000000000..563d74ff5a8c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IPipelineRunsOperations.cs @@ -0,0 +1,113 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// PipelineRunsOperations operations. + /// + public partial interface IPipelineRunsOperations + { + /// + /// Query pipeline runs in the factory based on input filter + /// conditions. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Parameters to filter the pipeline run. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> QueryByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, RunFilterParameters filterParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a pipeline run by its run ID. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline run identifier. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string runId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Cancel a pipeline run by its run ID. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline run identifier. + /// + /// + /// If true, cancel all the Child pipelines that are triggered by the + /// current pipeline. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task CancelWithHttpMessagesAsync(string resourceGroupName, string factoryName, string runId, bool? isRecursive = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IPipelinesOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IPipelinesOperations.cs new file mode 100644 index 000000000000..89211bd513d6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IPipelinesOperations.cs @@ -0,0 +1,218 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// PipelinesOperations operations. + /// + public partial interface IPipelinesOperations + { + /// + /// Lists pipelines. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a pipeline. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline name. + /// + /// + /// Pipeline resource definition. + /// + /// + /// ETag of the pipeline entity. Should only be specified for update, + /// for which it should match existing entity or can be * for + /// unconditional update. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string pipelineName, PipelineResource pipeline, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a pipeline. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline name. + /// + /// + /// ETag of the pipeline entity. Should only be specified for get. If + /// the ETag matches the existing entity tag, or if * was provided, + /// then no content will be returned. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string pipelineName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a pipeline. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string pipelineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates a run of a pipeline. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline name. + /// + /// + /// The pipeline run identifier. If run ID is specified the parameters + /// of the specified run will be used to create a new run. + /// + /// + /// Recovery mode flag. If recovery mode is set to true, the specified + /// referenced pipeline run and the new run will be grouped under the + /// same groupId. + /// + /// + /// In recovery mode, the rerun will start from this activity. If not + /// specified, all activities will run. + /// + /// + /// In recovery mode, if set to true, the rerun will start from failed + /// activities. The property will be used only if startActivityName is + /// not specified. + /// + /// + /// Parameters of the pipeline run. These parameters will be used only + /// if the runId is not specified. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateRunWithHttpMessagesAsync(string resourceGroupName, string factoryName, string pipelineName, string referencePipelineRunId = default(string), bool? isRecovery = default(bool?), string startActivityName = default(string), bool? startFromFailure = default(bool?), IDictionary parameters = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists pipelines. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IPrivateEndPointConnectionsOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IPrivateEndPointConnectionsOperations.cs new file mode 100644 index 000000000000..519ea4335b9c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IPrivateEndPointConnectionsOperations.cs @@ -0,0 +1,74 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// PrivateEndPointConnectionsOperations operations. + /// + public partial interface IPrivateEndPointConnectionsOperations + { + /// + /// Lists Private endpoint connections + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists Private endpoint connections + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IPrivateEndpointConnectionOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IPrivateEndpointConnectionOperations.cs new file mode 100644 index 000000000000..7d86311a78b8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IPrivateEndpointConnectionOperations.cs @@ -0,0 +1,120 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// PrivateEndpointConnectionOperations operations. + /// + public partial interface IPrivateEndpointConnectionOperations + { + /// + /// Approves or rejects a private endpoint connection + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The private endpoint connection name. + /// + /// + /// + /// + /// ETag of the private endpoint connection entity. Should only be + /// specified for update, for which it should match existing entity or + /// can be * for unconditional update. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a private endpoint connection + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The private endpoint connection name. + /// + /// + /// ETag of the private endpoint connection entity. Should only be + /// specified for get. If the ETag matches the existing entity tag, or + /// if * was provided, then no content will be returned. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string privateEndpointConnectionName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a private endpoint connection + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The private endpoint connection name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IPrivateLinkResourcesOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IPrivateLinkResourcesOperations.cs new file mode 100644 index 000000000000..c9b2ee046d21 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IPrivateLinkResourcesOperations.cs @@ -0,0 +1,52 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// PrivateLinkResourcesOperations operations. + /// + public partial interface IPrivateLinkResourcesOperations + { + /// + /// Gets the private link resources + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ITriggerRunsOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ITriggerRunsOperations.cs new file mode 100644 index 000000000000..1e081eef7a0e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ITriggerRunsOperations.cs @@ -0,0 +1,111 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// TriggerRunsOperations operations. + /// + public partial interface ITriggerRunsOperations + { + /// + /// Rerun single trigger instance by runId. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The pipeline run identifier. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task RerunWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, string runId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Cancel a single trigger instance by runId. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The pipeline run identifier. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task CancelWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, string runId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Query trigger runs. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Parameters to filter the pipeline run. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> QueryByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, RunFilterParameters filterParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ITriggersOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ITriggersOperations.cs new file mode 100644 index 000000000000..547a650d4356 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ITriggersOperations.cs @@ -0,0 +1,436 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// TriggersOperations operations. + /// + public partial interface ITriggersOperations + { + /// + /// Lists triggers. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Query triggers. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Parameters to filter the triggers. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> QueryByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, TriggerFilterParameters filterParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a trigger. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// Trigger resource definition. + /// + /// + /// ETag of the trigger entity. Should only be specified for update, + /// for which it should match existing entity or can be * for + /// unconditional update. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, TriggerResource trigger, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a trigger. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// ETag of the trigger entity. Should only be specified for get. If + /// the ETag matches the existing entity tag, or if * was provided, + /// then no content will be returned. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a trigger. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Subscribe event trigger to events. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> SubscribeToEventsWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a trigger's event subscription status. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetEventSubscriptionStatusWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Unsubscribe event trigger from events. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UnsubscribeFromEventsWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Starts a trigger. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task StartWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Stops a trigger. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task StopWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Subscribe event trigger to events. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginSubscribeToEventsWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Unsubscribe event trigger from events. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginUnsubscribeFromEventsWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Starts a trigger. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task BeginStartWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Stops a trigger. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task BeginStopWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists triggers. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IntegrationRuntimeNodesOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IntegrationRuntimeNodesOperations.cs new file mode 100644 index 000000000000..161abc83aedd --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IntegrationRuntimeNodesOperations.cs @@ -0,0 +1,1143 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// IntegrationRuntimeNodesOperations operations. + /// + internal partial class IntegrationRuntimeNodesOperations : IServiceOperations, IIntegrationRuntimeNodesOperations + { + /// + /// Initializes a new instance of the IntegrationRuntimeNodesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal IntegrationRuntimeNodesOperations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// Gets a self-hosted integration runtime node. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The integration runtime node name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (integrationRuntimeName != null) + { + if (integrationRuntimeName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "integrationRuntimeName", 63); + } + if (integrationRuntimeName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "integrationRuntimeName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(integrationRuntimeName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "integrationRuntimeName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (nodeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nodeName"); + } + if (nodeName != null) + { + if (nodeName.Length > 150) + { + throw new ValidationException(ValidationRules.MaxLength, "nodeName", 150); + } + if (nodeName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "nodeName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(nodeName, "^[a-z0-9A-Z][a-z0-9A-Z_-]{0,149}$")) + { + throw new ValidationException(ValidationRules.Pattern, "nodeName", "^[a-z0-9A-Z][a-z0-9A-Z_-]{0,149}$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("nodeName", nodeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + _url = _url.Replace("{nodeName}", System.Uri.EscapeDataString(nodeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes a self-hosted integration runtime node. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The integration runtime node name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (integrationRuntimeName != null) + { + if (integrationRuntimeName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "integrationRuntimeName", 63); + } + if (integrationRuntimeName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "integrationRuntimeName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(integrationRuntimeName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "integrationRuntimeName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (nodeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nodeName"); + } + if (nodeName != null) + { + if (nodeName.Length > 150) + { + throw new ValidationException(ValidationRules.MaxLength, "nodeName", 150); + } + if (nodeName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "nodeName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(nodeName, "^[a-z0-9A-Z][a-z0-9A-Z_-]{0,149}$")) + { + throw new ValidationException(ValidationRules.Pattern, "nodeName", "^[a-z0-9A-Z][a-z0-9A-Z_-]{0,149}$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("nodeName", nodeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + _url = _url.Replace("{nodeName}", System.Uri.EscapeDataString(nodeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Updates a self-hosted integration runtime node. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The integration runtime node name. + /// + /// + /// The parameters for updating an integration runtime node. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName, UpdateIntegrationRuntimeNodeRequest updateIntegrationRuntimeNodeRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (integrationRuntimeName != null) + { + if (integrationRuntimeName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "integrationRuntimeName", 63); + } + if (integrationRuntimeName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "integrationRuntimeName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(integrationRuntimeName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "integrationRuntimeName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (nodeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nodeName"); + } + if (nodeName != null) + { + if (nodeName.Length > 150) + { + throw new ValidationException(ValidationRules.MaxLength, "nodeName", 150); + } + if (nodeName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "nodeName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(nodeName, "^[a-z0-9A-Z][a-z0-9A-Z_-]{0,149}$")) + { + throw new ValidationException(ValidationRules.Pattern, "nodeName", "^[a-z0-9A-Z][a-z0-9A-Z_-]{0,149}$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (updateIntegrationRuntimeNodeRequest == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "updateIntegrationRuntimeNodeRequest"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("nodeName", nodeName); + tracingParameters.Add("updateIntegrationRuntimeNodeRequest", updateIntegrationRuntimeNodeRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + _url = _url.Replace("{nodeName}", System.Uri.EscapeDataString(nodeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(updateIntegrationRuntimeNodeRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(updateIntegrationRuntimeNodeRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get the IP address of self-hosted integration runtime node. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The integration runtime node name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetIpAddressWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (integrationRuntimeName != null) + { + if (integrationRuntimeName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "integrationRuntimeName", 63); + } + if (integrationRuntimeName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "integrationRuntimeName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(integrationRuntimeName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "integrationRuntimeName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (nodeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nodeName"); + } + if (nodeName != null) + { + if (nodeName.Length > 150) + { + throw new ValidationException(ValidationRules.MaxLength, "nodeName", 150); + } + if (nodeName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "nodeName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(nodeName, "^[a-z0-9A-Z][a-z0-9A-Z_-]{0,149}$")) + { + throw new ValidationException(ValidationRules.Pattern, "nodeName", "^[a-z0-9A-Z][a-z0-9A-Z_-]{0,149}$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("nodeName", nodeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetIpAddress", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}/ipAddress").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + _url = _url.Replace("{nodeName}", System.Uri.EscapeDataString(nodeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IntegrationRuntimeNodesOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IntegrationRuntimeNodesOperationsExtensions.cs new file mode 100644 index 000000000000..c24614fe7810 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IntegrationRuntimeNodesOperationsExtensions.cs @@ -0,0 +1,236 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for IntegrationRuntimeNodesOperations. + /// + public static partial class IntegrationRuntimeNodesOperationsExtensions + { + /// + /// Gets a self-hosted integration runtime node. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The integration runtime node name. + /// + public static SelfHostedIntegrationRuntimeNode Get(this IIntegrationRuntimeNodesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName) + { + return operations.GetAsync(resourceGroupName, factoryName, integrationRuntimeName, nodeName).GetAwaiter().GetResult(); + } + + /// + /// Gets a self-hosted integration runtime node. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The integration runtime node name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IIntegrationRuntimeNodesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, nodeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a self-hosted integration runtime node. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The integration runtime node name. + /// + public static void Delete(this IIntegrationRuntimeNodesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName) + { + operations.DeleteAsync(resourceGroupName, factoryName, integrationRuntimeName, nodeName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a self-hosted integration runtime node. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The integration runtime node name. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IIntegrationRuntimeNodesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, nodeName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Updates a self-hosted integration runtime node. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The integration runtime node name. + /// + /// + /// The parameters for updating an integration runtime node. + /// + public static SelfHostedIntegrationRuntimeNode Update(this IIntegrationRuntimeNodesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName, UpdateIntegrationRuntimeNodeRequest updateIntegrationRuntimeNodeRequest) + { + return operations.UpdateAsync(resourceGroupName, factoryName, integrationRuntimeName, nodeName, updateIntegrationRuntimeNodeRequest).GetAwaiter().GetResult(); + } + + /// + /// Updates a self-hosted integration runtime node. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The integration runtime node name. + /// + /// + /// The parameters for updating an integration runtime node. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IIntegrationRuntimeNodesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName, UpdateIntegrationRuntimeNodeRequest updateIntegrationRuntimeNodeRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, nodeName, updateIntegrationRuntimeNodeRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get the IP address of self-hosted integration runtime node. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The integration runtime node name. + /// + public static IntegrationRuntimeNodeIpAddress GetIpAddress(this IIntegrationRuntimeNodesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName) + { + return operations.GetIpAddressAsync(resourceGroupName, factoryName, integrationRuntimeName, nodeName).GetAwaiter().GetResult(); + } + + /// + /// Get the IP address of self-hosted integration runtime node. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The integration runtime node name. + /// + /// + /// The cancellation token. + /// + public static async Task GetIpAddressAsync(this IIntegrationRuntimeNodesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, string nodeName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetIpAddressWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, nodeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IntegrationRuntimeObjectMetadataOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IntegrationRuntimeObjectMetadataOperations.cs new file mode 100644 index 000000000000..64e30d55568d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IntegrationRuntimeObjectMetadataOperations.cs @@ -0,0 +1,590 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// IntegrationRuntimeObjectMetadataOperations operations. + /// + internal partial class IntegrationRuntimeObjectMetadataOperations : IServiceOperations, IIntegrationRuntimeObjectMetadataOperations + { + /// + /// Initializes a new instance of the IntegrationRuntimeObjectMetadataOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal IntegrationRuntimeObjectMetadataOperations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// Refresh a SSIS integration runtime object metadata. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> RefreshWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginRefreshWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a SSIS integration runtime object metadata by specified path. The + /// return is pageable metadata list. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The parameters for getting a SSIS object metadata. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, GetSsisObjectMetadataRequest getMetadataRequest = default(GetSsisObjectMetadataRequest), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (integrationRuntimeName != null) + { + if (integrationRuntimeName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "integrationRuntimeName", 63); + } + if (integrationRuntimeName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "integrationRuntimeName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(integrationRuntimeName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "integrationRuntimeName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("getMetadataRequest", getMetadataRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/getObjectMetadata").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(getMetadataRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(getMetadataRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Refresh a SSIS integration runtime object metadata. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginRefreshWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (integrationRuntimeName != null) + { + if (integrationRuntimeName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "integrationRuntimeName", 63); + } + if (integrationRuntimeName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "integrationRuntimeName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(integrationRuntimeName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "integrationRuntimeName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginRefresh", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/refreshObjectMetadata").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IntegrationRuntimeObjectMetadataOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IntegrationRuntimeObjectMetadataOperationsExtensions.cs new file mode 100644 index 000000000000..6f06be573469 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IntegrationRuntimeObjectMetadataOperationsExtensions.cs @@ -0,0 +1,171 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for IntegrationRuntimeObjectMetadataOperations. + /// + public static partial class IntegrationRuntimeObjectMetadataOperationsExtensions + { + /// + /// Refresh a SSIS integration runtime object metadata. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + public static SsisObjectMetadataStatusResponse Refresh(this IIntegrationRuntimeObjectMetadataOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName) + { + return operations.RefreshAsync(resourceGroupName, factoryName, integrationRuntimeName).GetAwaiter().GetResult(); + } + + /// + /// Refresh a SSIS integration runtime object metadata. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The cancellation token. + /// + public static async Task RefreshAsync(this IIntegrationRuntimeObjectMetadataOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.RefreshWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get a SSIS integration runtime object metadata by specified path. The + /// return is pageable metadata list. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The parameters for getting a SSIS object metadata. + /// + public static SsisObjectMetadataListResponse Get(this IIntegrationRuntimeObjectMetadataOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, GetSsisObjectMetadataRequest getMetadataRequest = default(GetSsisObjectMetadataRequest)) + { + return operations.GetAsync(resourceGroupName, factoryName, integrationRuntimeName, getMetadataRequest).GetAwaiter().GetResult(); + } + + /// + /// Get a SSIS integration runtime object metadata by specified path. The + /// return is pageable metadata list. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The parameters for getting a SSIS object metadata. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IIntegrationRuntimeObjectMetadataOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, GetSsisObjectMetadataRequest getMetadataRequest = default(GetSsisObjectMetadataRequest), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, getMetadataRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Refresh a SSIS integration runtime object metadata. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + public static SsisObjectMetadataStatusResponse BeginRefresh(this IIntegrationRuntimeObjectMetadataOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName) + { + return operations.BeginRefreshAsync(resourceGroupName, factoryName, integrationRuntimeName).GetAwaiter().GetResult(); + } + + /// + /// Refresh a SSIS integration runtime object metadata. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The cancellation token. + /// + public static async Task BeginRefreshAsync(this IIntegrationRuntimeObjectMetadataOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginRefreshWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IntegrationRuntimesOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IntegrationRuntimesOperations.cs new file mode 100644 index 000000000000..6fb0bcadaf1a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IntegrationRuntimesOperations.cs @@ -0,0 +1,4512 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// IntegrationRuntimesOperations operations. + /// + internal partial class IntegrationRuntimesOperations : IServiceOperations, IIntegrationRuntimesOperations + { + /// + /// Initializes a new instance of the IntegrationRuntimesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal IntegrationRuntimesOperations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// Lists integration runtimes. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactory", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates an integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// Integration runtime resource definition. + /// + /// + /// ETag of the integration runtime entity. Should only be specified for + /// update, for which it should match existing entity or can be * for + /// unconditional update. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, IntegrationRuntimeResource integrationRuntime, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (integrationRuntimeName != null) + { + if (integrationRuntimeName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "integrationRuntimeName", 63); + } + if (integrationRuntimeName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "integrationRuntimeName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(integrationRuntimeName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "integrationRuntimeName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (integrationRuntime == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntime"); + } + if (integrationRuntime != null) + { + integrationRuntime.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("integrationRuntime", integrationRuntime); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifMatch != null) + { + if (_httpRequest.Headers.Contains("If-Match")) + { + _httpRequest.Headers.Remove("If-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(integrationRuntime != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(integrationRuntime, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets an integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// ETag of the integration runtime entity. Should only be specified for get. + /// If the ETag matches the existing entity tag, or if * was provided, then no + /// content will be returned. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (integrationRuntimeName != null) + { + if (integrationRuntimeName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "integrationRuntimeName", 63); + } + if (integrationRuntimeName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "integrationRuntimeName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(integrationRuntimeName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "integrationRuntimeName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("ifNoneMatch", ifNoneMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifNoneMatch != null) + { + if (_httpRequest.Headers.Contains("If-None-Match")) + { + _httpRequest.Headers.Remove("If-None-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-None-Match", ifNoneMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 304) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Updates an integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The parameters for updating an integration runtime. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, UpdateIntegrationRuntimeRequest updateIntegrationRuntimeRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (integrationRuntimeName != null) + { + if (integrationRuntimeName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "integrationRuntimeName", 63); + } + if (integrationRuntimeName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "integrationRuntimeName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(integrationRuntimeName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "integrationRuntimeName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (updateIntegrationRuntimeRequest == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "updateIntegrationRuntimeRequest"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("updateIntegrationRuntimeRequest", updateIntegrationRuntimeRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(updateIntegrationRuntimeRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(updateIntegrationRuntimeRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes an integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (integrationRuntimeName != null) + { + if (integrationRuntimeName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "integrationRuntimeName", 63); + } + if (integrationRuntimeName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "integrationRuntimeName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(integrationRuntimeName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "integrationRuntimeName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets detailed status information for an integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetStatusWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (integrationRuntimeName != null) + { + if (integrationRuntimeName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "integrationRuntimeName", 63); + } + if (integrationRuntimeName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "integrationRuntimeName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(integrationRuntimeName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "integrationRuntimeName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetStatus", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/getStatus").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the list of outbound network dependencies for a given Azure-SSIS + /// integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListOutboundNetworkDependenciesEndpointsWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (integrationRuntimeName != null) + { + if (integrationRuntimeName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "integrationRuntimeName", 63); + } + if (integrationRuntimeName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "integrationRuntimeName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(integrationRuntimeName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "integrationRuntimeName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListOutboundNetworkDependenciesEndpoints", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/outboundNetworkDependenciesEndpoints").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets the on-premises integration runtime connection information for + /// encrypting the on-premises data source credentials. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetConnectionInfoWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (integrationRuntimeName != null) + { + if (integrationRuntimeName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "integrationRuntimeName", 63); + } + if (integrationRuntimeName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "integrationRuntimeName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(integrationRuntimeName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "integrationRuntimeName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetConnectionInfo", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/getConnectionInfo").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Regenerates the authentication key for an integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The parameters for regenerating integration runtime authentication key. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> RegenerateAuthKeyWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, IntegrationRuntimeRegenerateKeyParameters regenerateKeyParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (integrationRuntimeName != null) + { + if (integrationRuntimeName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "integrationRuntimeName", 63); + } + if (integrationRuntimeName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "integrationRuntimeName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(integrationRuntimeName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "integrationRuntimeName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (regenerateKeyParameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "regenerateKeyParameters"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("regenerateKeyParameters", regenerateKeyParameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "RegenerateAuthKey", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/regenerateAuthKey").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(regenerateKeyParameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(regenerateKeyParameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Retrieves the authentication keys for an integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ListAuthKeysWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (integrationRuntimeName != null) + { + if (integrationRuntimeName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "integrationRuntimeName", 63); + } + if (integrationRuntimeName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "integrationRuntimeName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(integrationRuntimeName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "integrationRuntimeName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListAuthKeys", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/listAuthKeys").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Starts a ManagedReserved type integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> StartWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginStartWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Stops a ManagedReserved type integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task StopWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginStopWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Force the integration runtime to synchronize credentials across integration + /// runtime nodes, and this will override the credentials across all worker + /// nodes with those available on the dispatcher node. If you already have the + /// latest credential backup file, you should manually import it (preferred) on + /// any self-hosted integration runtime node than using this API directly. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task SyncCredentialsWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (integrationRuntimeName != null) + { + if (integrationRuntimeName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "integrationRuntimeName", 63); + } + if (integrationRuntimeName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "integrationRuntimeName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(integrationRuntimeName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "integrationRuntimeName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "SyncCredentials", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/syncCredentials").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get the integration runtime monitoring data, which includes the monitor + /// data for all the nodes under this integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetMonitoringDataWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (integrationRuntimeName != null) + { + if (integrationRuntimeName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "integrationRuntimeName", 63); + } + if (integrationRuntimeName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "integrationRuntimeName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(integrationRuntimeName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "integrationRuntimeName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetMonitoringData", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/monitoringData").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Upgrade self-hosted integration runtime to latest version if availability. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task UpgradeWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (integrationRuntimeName != null) + { + if (integrationRuntimeName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "integrationRuntimeName", 63); + } + if (integrationRuntimeName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "integrationRuntimeName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(integrationRuntimeName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "integrationRuntimeName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Upgrade", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/upgrade").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Remove all linked integration runtimes under specific data factory in a + /// self-hosted integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The data factory name for the linked integration runtime. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task RemoveLinksWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, LinkedIntegrationRuntimeRequest linkedIntegrationRuntimeRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (integrationRuntimeName != null) + { + if (integrationRuntimeName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "integrationRuntimeName", 63); + } + if (integrationRuntimeName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "integrationRuntimeName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(integrationRuntimeName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "integrationRuntimeName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (linkedIntegrationRuntimeRequest == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "linkedIntegrationRuntimeRequest"); + } + if (linkedIntegrationRuntimeRequest != null) + { + linkedIntegrationRuntimeRequest.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("linkedIntegrationRuntimeRequest", linkedIntegrationRuntimeRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "RemoveLinks", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/removeLinks").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(linkedIntegrationRuntimeRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(linkedIntegrationRuntimeRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Create a linked integration runtime entry in a shared integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The linked integration runtime properties. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateLinkedIntegrationRuntimeWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, CreateLinkedIntegrationRuntimeRequest createLinkedIntegrationRuntimeRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (integrationRuntimeName != null) + { + if (integrationRuntimeName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "integrationRuntimeName", 63); + } + if (integrationRuntimeName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "integrationRuntimeName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(integrationRuntimeName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "integrationRuntimeName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (createLinkedIntegrationRuntimeRequest == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "createLinkedIntegrationRuntimeRequest"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("createLinkedIntegrationRuntimeRequest", createLinkedIntegrationRuntimeRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateLinkedIntegrationRuntime", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/linkedIntegrationRuntime").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(createLinkedIntegrationRuntimeRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(createLinkedIntegrationRuntimeRequest, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Starts a ManagedReserved type integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginStartWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (integrationRuntimeName != null) + { + if (integrationRuntimeName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "integrationRuntimeName", 63); + } + if (integrationRuntimeName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "integrationRuntimeName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(integrationRuntimeName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "integrationRuntimeName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginStart", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/start").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Stops a ManagedReserved type integration runtime. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task BeginStopWithHttpMessagesAsync(string resourceGroupName, string factoryName, string integrationRuntimeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (integrationRuntimeName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "integrationRuntimeName"); + } + if (integrationRuntimeName != null) + { + if (integrationRuntimeName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "integrationRuntimeName", 63); + } + if (integrationRuntimeName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "integrationRuntimeName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(integrationRuntimeName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "integrationRuntimeName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("integrationRuntimeName", integrationRuntimeName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginStop", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/integrationRuntimes/{integrationRuntimeName}/stop").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{integrationRuntimeName}", System.Uri.EscapeDataString(integrationRuntimeName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists integration runtimes. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactoryNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IntegrationRuntimesOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IntegrationRuntimesOperationsExtensions.cs new file mode 100644 index 000000000000..1eb078ad8bbe --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IntegrationRuntimesOperationsExtensions.cs @@ -0,0 +1,975 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for IntegrationRuntimesOperations. + /// + public static partial class IntegrationRuntimesOperationsExtensions + { + /// + /// Lists integration runtimes. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + public static IPage ListByFactory(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName) + { + return operations.ListByFactoryAsync(resourceGroupName, factoryName).GetAwaiter().GetResult(); + } + + /// + /// Lists integration runtimes. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates an integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// Integration runtime resource definition. + /// + /// + /// ETag of the integration runtime entity. Should only be specified for + /// update, for which it should match existing entity or can be * for + /// unconditional update. + /// + public static IntegrationRuntimeResource CreateOrUpdate(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, IntegrationRuntimeResource integrationRuntime, string ifMatch = default(string)) + { + return operations.CreateOrUpdateAsync(resourceGroupName, factoryName, integrationRuntimeName, integrationRuntime, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates an integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// Integration runtime resource definition. + /// + /// + /// ETag of the integration runtime entity. Should only be specified for + /// update, for which it should match existing entity or can be * for + /// unconditional update. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, IntegrationRuntimeResource integrationRuntime, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, integrationRuntime, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets an integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// ETag of the integration runtime entity. Should only be specified for get. + /// If the ETag matches the existing entity tag, or if * was provided, then no + /// content will be returned. + /// + public static IntegrationRuntimeResource Get(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, string ifNoneMatch = default(string)) + { + return operations.GetAsync(resourceGroupName, factoryName, integrationRuntimeName, ifNoneMatch).GetAwaiter().GetResult(); + } + + /// + /// Gets an integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// ETag of the integration runtime entity. Should only be specified for get. + /// If the ETag matches the existing entity tag, or if * was provided, then no + /// content will be returned. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, ifNoneMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates an integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The parameters for updating an integration runtime. + /// + public static IntegrationRuntimeResource Update(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, UpdateIntegrationRuntimeRequest updateIntegrationRuntimeRequest) + { + return operations.UpdateAsync(resourceGroupName, factoryName, integrationRuntimeName, updateIntegrationRuntimeRequest).GetAwaiter().GetResult(); + } + + /// + /// Updates an integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The parameters for updating an integration runtime. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, UpdateIntegrationRuntimeRequest updateIntegrationRuntimeRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, updateIntegrationRuntimeRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes an integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + public static void Delete(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName) + { + operations.DeleteAsync(resourceGroupName, factoryName, integrationRuntimeName).GetAwaiter().GetResult(); + } + + /// + /// Deletes an integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets detailed status information for an integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + public static IntegrationRuntimeStatusResponse GetStatus(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName) + { + return operations.GetStatusAsync(resourceGroupName, factoryName, integrationRuntimeName).GetAwaiter().GetResult(); + } + + /// + /// Gets detailed status information for an integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The cancellation token. + /// + public static async Task GetStatusAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetStatusWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the list of outbound network dependencies for a given Azure-SSIS + /// integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + public static IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse ListOutboundNetworkDependenciesEndpoints(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName) + { + return operations.ListOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, factoryName, integrationRuntimeName).GetAwaiter().GetResult(); + } + + /// + /// Gets the list of outbound network dependencies for a given Azure-SSIS + /// integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The cancellation token. + /// + public static async Task ListOutboundNetworkDependenciesEndpointsAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListOutboundNetworkDependenciesEndpointsWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the on-premises integration runtime connection information for + /// encrypting the on-premises data source credentials. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + public static IntegrationRuntimeConnectionInfo GetConnectionInfo(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName) + { + return operations.GetConnectionInfoAsync(resourceGroupName, factoryName, integrationRuntimeName).GetAwaiter().GetResult(); + } + + /// + /// Gets the on-premises integration runtime connection information for + /// encrypting the on-premises data source credentials. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The cancellation token. + /// + public static async Task GetConnectionInfoAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetConnectionInfoWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Regenerates the authentication key for an integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The parameters for regenerating integration runtime authentication key. + /// + public static IntegrationRuntimeAuthKeys RegenerateAuthKey(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, IntegrationRuntimeRegenerateKeyParameters regenerateKeyParameters) + { + return operations.RegenerateAuthKeyAsync(resourceGroupName, factoryName, integrationRuntimeName, regenerateKeyParameters).GetAwaiter().GetResult(); + } + + /// + /// Regenerates the authentication key for an integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The parameters for regenerating integration runtime authentication key. + /// + /// + /// The cancellation token. + /// + public static async Task RegenerateAuthKeyAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, IntegrationRuntimeRegenerateKeyParameters regenerateKeyParameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.RegenerateAuthKeyWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, regenerateKeyParameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Retrieves the authentication keys for an integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + public static IntegrationRuntimeAuthKeys ListAuthKeys(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName) + { + return operations.ListAuthKeysAsync(resourceGroupName, factoryName, integrationRuntimeName).GetAwaiter().GetResult(); + } + + /// + /// Retrieves the authentication keys for an integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The cancellation token. + /// + public static async Task ListAuthKeysAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListAuthKeysWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Starts a ManagedReserved type integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + public static IntegrationRuntimeStatusResponse Start(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName) + { + return operations.StartAsync(resourceGroupName, factoryName, integrationRuntimeName).GetAwaiter().GetResult(); + } + + /// + /// Starts a ManagedReserved type integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The cancellation token. + /// + public static async Task StartAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.StartWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Stops a ManagedReserved type integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + public static void Stop(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName) + { + operations.StopAsync(resourceGroupName, factoryName, integrationRuntimeName).GetAwaiter().GetResult(); + } + + /// + /// Stops a ManagedReserved type integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The cancellation token. + /// + public static async Task StopAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.StopWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Force the integration runtime to synchronize credentials across integration + /// runtime nodes, and this will override the credentials across all worker + /// nodes with those available on the dispatcher node. If you already have the + /// latest credential backup file, you should manually import it (preferred) on + /// any self-hosted integration runtime node than using this API directly. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + public static void SyncCredentials(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName) + { + operations.SyncCredentialsAsync(resourceGroupName, factoryName, integrationRuntimeName).GetAwaiter().GetResult(); + } + + /// + /// Force the integration runtime to synchronize credentials across integration + /// runtime nodes, and this will override the credentials across all worker + /// nodes with those available on the dispatcher node. If you already have the + /// latest credential backup file, you should manually import it (preferred) on + /// any self-hosted integration runtime node than using this API directly. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The cancellation token. + /// + public static async Task SyncCredentialsAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.SyncCredentialsWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Get the integration runtime monitoring data, which includes the monitor + /// data for all the nodes under this integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + public static IntegrationRuntimeMonitoringData GetMonitoringData(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName) + { + return operations.GetMonitoringDataAsync(resourceGroupName, factoryName, integrationRuntimeName).GetAwaiter().GetResult(); + } + + /// + /// Get the integration runtime monitoring data, which includes the monitor + /// data for all the nodes under this integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The cancellation token. + /// + public static async Task GetMonitoringDataAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetMonitoringDataWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Upgrade self-hosted integration runtime to latest version if availability. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + public static void Upgrade(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName) + { + operations.UpgradeAsync(resourceGroupName, factoryName, integrationRuntimeName).GetAwaiter().GetResult(); + } + + /// + /// Upgrade self-hosted integration runtime to latest version if availability. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The cancellation token. + /// + public static async Task UpgradeAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpgradeWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Remove all linked integration runtimes under specific data factory in a + /// self-hosted integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The data factory name for the linked integration runtime. + /// + public static void RemoveLinks(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, LinkedIntegrationRuntimeRequest linkedIntegrationRuntimeRequest) + { + operations.RemoveLinksAsync(resourceGroupName, factoryName, integrationRuntimeName, linkedIntegrationRuntimeRequest).GetAwaiter().GetResult(); + } + + /// + /// Remove all linked integration runtimes under specific data factory in a + /// self-hosted integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The data factory name for the linked integration runtime. + /// + /// + /// The cancellation token. + /// + public static async Task RemoveLinksAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, LinkedIntegrationRuntimeRequest linkedIntegrationRuntimeRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.RemoveLinksWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, linkedIntegrationRuntimeRequest, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Create a linked integration runtime entry in a shared integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The linked integration runtime properties. + /// + public static IntegrationRuntimeStatusResponse CreateLinkedIntegrationRuntime(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, CreateLinkedIntegrationRuntimeRequest createLinkedIntegrationRuntimeRequest) + { + return operations.CreateLinkedIntegrationRuntimeAsync(resourceGroupName, factoryName, integrationRuntimeName, createLinkedIntegrationRuntimeRequest).GetAwaiter().GetResult(); + } + + /// + /// Create a linked integration runtime entry in a shared integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The linked integration runtime properties. + /// + /// + /// The cancellation token. + /// + public static async Task CreateLinkedIntegrationRuntimeAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, CreateLinkedIntegrationRuntimeRequest createLinkedIntegrationRuntimeRequest, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateLinkedIntegrationRuntimeWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, createLinkedIntegrationRuntimeRequest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Starts a ManagedReserved type integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + public static IntegrationRuntimeStatusResponse BeginStart(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName) + { + return operations.BeginStartAsync(resourceGroupName, factoryName, integrationRuntimeName).GetAwaiter().GetResult(); + } + + /// + /// Starts a ManagedReserved type integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The cancellation token. + /// + public static async Task BeginStartAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginStartWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Stops a ManagedReserved type integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + public static void BeginStop(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName) + { + operations.BeginStopAsync(resourceGroupName, factoryName, integrationRuntimeName).GetAwaiter().GetResult(); + } + + /// + /// Stops a ManagedReserved type integration runtime. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The integration runtime name. + /// + /// + /// The cancellation token. + /// + public static async Task BeginStopAsync(this IIntegrationRuntimesOperations operations, string resourceGroupName, string factoryName, string integrationRuntimeName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginStopWithHttpMessagesAsync(resourceGroupName, factoryName, integrationRuntimeName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists integration runtimes. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByFactoryNext(this IIntegrationRuntimesOperations operations, string nextPageLink) + { + return operations.ListByFactoryNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists integration runtimes. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryNextAsync(this IIntegrationRuntimesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/LinkedServicesOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/LinkedServicesOperations.cs new file mode 100644 index 000000000000..392c620b7f0f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/LinkedServicesOperations.cs @@ -0,0 +1,1227 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// LinkedServicesOperations operations. + /// + internal partial class LinkedServicesOperations : IServiceOperations, ILinkedServicesOperations + { + /// + /// Initializes a new instance of the LinkedServicesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal LinkedServicesOperations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// Lists linked services. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactory", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates a linked service. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The linked service name. + /// + /// + /// Linked service resource definition. + /// + /// + /// ETag of the linkedService entity. Should only be specified for update, for + /// which it should match existing entity or can be * for unconditional update. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string linkedServiceName, LinkedServiceResource linkedService, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (linkedServiceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "linkedServiceName"); + } + if (linkedServiceName != null) + { + if (linkedServiceName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "linkedServiceName", 260); + } + if (linkedServiceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "linkedServiceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(linkedServiceName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "linkedServiceName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (linkedService == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "linkedService"); + } + if (linkedService != null) + { + linkedService.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("linkedServiceName", linkedServiceName); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("linkedService", linkedService); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices/{linkedServiceName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{linkedServiceName}", System.Uri.EscapeDataString(linkedServiceName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifMatch != null) + { + if (_httpRequest.Headers.Contains("If-Match")) + { + _httpRequest.Headers.Remove("If-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(linkedService != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(linkedService, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a linked service. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The linked service name. + /// + /// + /// ETag of the linked service entity. Should only be specified for get. If the + /// ETag matches the existing entity tag, or if * was provided, then no content + /// will be returned. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string linkedServiceName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (linkedServiceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "linkedServiceName"); + } + if (linkedServiceName != null) + { + if (linkedServiceName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "linkedServiceName", 260); + } + if (linkedServiceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "linkedServiceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(linkedServiceName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "linkedServiceName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("linkedServiceName", linkedServiceName); + tracingParameters.Add("ifNoneMatch", ifNoneMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices/{linkedServiceName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{linkedServiceName}", System.Uri.EscapeDataString(linkedServiceName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifNoneMatch != null) + { + if (_httpRequest.Headers.Contains("If-None-Match")) + { + _httpRequest.Headers.Remove("If-None-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-None-Match", ifNoneMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 304) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes a linked service. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The linked service name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string linkedServiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (linkedServiceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "linkedServiceName"); + } + if (linkedServiceName != null) + { + if (linkedServiceName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "linkedServiceName", 260); + } + if (linkedServiceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "linkedServiceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(linkedServiceName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "linkedServiceName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("linkedServiceName", linkedServiceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/linkedservices/{linkedServiceName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{linkedServiceName}", System.Uri.EscapeDataString(linkedServiceName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists linked services. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactoryNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/LinkedServicesOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/LinkedServicesOperationsExtensions.cs new file mode 100644 index 000000000000..7124d9710223 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/LinkedServicesOperationsExtensions.cs @@ -0,0 +1,258 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for LinkedServicesOperations. + /// + public static partial class LinkedServicesOperationsExtensions + { + /// + /// Lists linked services. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + public static IPage ListByFactory(this ILinkedServicesOperations operations, string resourceGroupName, string factoryName) + { + return operations.ListByFactoryAsync(resourceGroupName, factoryName).GetAwaiter().GetResult(); + } + + /// + /// Lists linked services. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryAsync(this ILinkedServicesOperations operations, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a linked service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The linked service name. + /// + /// + /// Linked service resource definition. + /// + /// + /// ETag of the linkedService entity. Should only be specified for update, for + /// which it should match existing entity or can be * for unconditional update. + /// + public static LinkedServiceResource CreateOrUpdate(this ILinkedServicesOperations operations, string resourceGroupName, string factoryName, string linkedServiceName, LinkedServiceResource linkedService, string ifMatch = default(string)) + { + return operations.CreateOrUpdateAsync(resourceGroupName, factoryName, linkedServiceName, linkedService, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a linked service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The linked service name. + /// + /// + /// Linked service resource definition. + /// + /// + /// ETag of the linkedService entity. Should only be specified for update, for + /// which it should match existing entity or can be * for unconditional update. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this ILinkedServicesOperations operations, string resourceGroupName, string factoryName, string linkedServiceName, LinkedServiceResource linkedService, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, factoryName, linkedServiceName, linkedService, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a linked service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The linked service name. + /// + /// + /// ETag of the linked service entity. Should only be specified for get. If the + /// ETag matches the existing entity tag, or if * was provided, then no content + /// will be returned. + /// + public static LinkedServiceResource Get(this ILinkedServicesOperations operations, string resourceGroupName, string factoryName, string linkedServiceName, string ifNoneMatch = default(string)) + { + return operations.GetAsync(resourceGroupName, factoryName, linkedServiceName, ifNoneMatch).GetAwaiter().GetResult(); + } + + /// + /// Gets a linked service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The linked service name. + /// + /// + /// ETag of the linked service entity. Should only be specified for get. If the + /// ETag matches the existing entity tag, or if * was provided, then no content + /// will be returned. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this ILinkedServicesOperations operations, string resourceGroupName, string factoryName, string linkedServiceName, string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, factoryName, linkedServiceName, ifNoneMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a linked service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The linked service name. + /// + public static void Delete(this ILinkedServicesOperations operations, string resourceGroupName, string factoryName, string linkedServiceName) + { + operations.DeleteAsync(resourceGroupName, factoryName, linkedServiceName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a linked service. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The linked service name. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this ILinkedServicesOperations operations, string resourceGroupName, string factoryName, string linkedServiceName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, factoryName, linkedServiceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists linked services. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByFactoryNext(this ILinkedServicesOperations operations, string nextPageLink) + { + return operations.ListByFactoryNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists linked services. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryNextAsync(this ILinkedServicesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ManagedPrivateEndpointsOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ManagedPrivateEndpointsOperations.cs new file mode 100644 index 000000000000..8aa00ebbd03e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ManagedPrivateEndpointsOperations.cs @@ -0,0 +1,1324 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ManagedPrivateEndpointsOperations operations. + /// + internal partial class ManagedPrivateEndpointsOperations : IServiceOperations, IManagedPrivateEndpointsOperations + { + /// + /// Initializes a new instance of the ManagedPrivateEndpointsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ManagedPrivateEndpointsOperations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// Lists managed private endpoints. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Managed virtual network name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, string managedVirtualNetworkName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (managedVirtualNetworkName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "managedVirtualNetworkName"); + } + if (managedVirtualNetworkName != null) + { + if (managedVirtualNetworkName.Length > 127) + { + throw new ValidationException(ValidationRules.MaxLength, "managedVirtualNetworkName", 127); + } + if (managedVirtualNetworkName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "managedVirtualNetworkName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(managedVirtualNetworkName, "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$")) + { + throw new ValidationException(ValidationRules.Pattern, "managedVirtualNetworkName", "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("managedVirtualNetworkName", managedVirtualNetworkName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactory", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{managedVirtualNetworkName}", System.Uri.EscapeDataString(managedVirtualNetworkName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates a managed private endpoint. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Managed virtual network name + /// + /// + /// Managed private endpoint name + /// + /// + /// Managed private endpoint resource definition. + /// + /// + /// ETag of the managed private endpoint entity. Should only be specified for + /// update, for which it should match existing entity or can be * for + /// unconditional update. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string managedVirtualNetworkName, string managedPrivateEndpointName, ManagedPrivateEndpointResource managedPrivateEndpoint, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (managedVirtualNetworkName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "managedVirtualNetworkName"); + } + if (managedVirtualNetworkName != null) + { + if (managedVirtualNetworkName.Length > 127) + { + throw new ValidationException(ValidationRules.MaxLength, "managedVirtualNetworkName", 127); + } + if (managedVirtualNetworkName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "managedVirtualNetworkName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(managedVirtualNetworkName, "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$")) + { + throw new ValidationException(ValidationRules.Pattern, "managedVirtualNetworkName", "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$"); + } + } + if (managedPrivateEndpointName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "managedPrivateEndpointName"); + } + if (managedPrivateEndpointName != null) + { + if (managedPrivateEndpointName.Length > 127) + { + throw new ValidationException(ValidationRules.MaxLength, "managedPrivateEndpointName", 127); + } + if (managedPrivateEndpointName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "managedPrivateEndpointName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(managedPrivateEndpointName, "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$")) + { + throw new ValidationException(ValidationRules.Pattern, "managedPrivateEndpointName", "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (managedPrivateEndpoint == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "managedPrivateEndpoint"); + } + if (managedPrivateEndpoint != null) + { + managedPrivateEndpoint.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("managedVirtualNetworkName", managedVirtualNetworkName); + tracingParameters.Add("managedPrivateEndpointName", managedPrivateEndpointName); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("managedPrivateEndpoint", managedPrivateEndpoint); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{managedVirtualNetworkName}", System.Uri.EscapeDataString(managedVirtualNetworkName)); + _url = _url.Replace("{managedPrivateEndpointName}", System.Uri.EscapeDataString(managedPrivateEndpointName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifMatch != null) + { + if (_httpRequest.Headers.Contains("If-Match")) + { + _httpRequest.Headers.Remove("If-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(managedPrivateEndpoint != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(managedPrivateEndpoint, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a managed private endpoint. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Managed virtual network name + /// + /// + /// Managed private endpoint name + /// + /// + /// ETag of the managed private endpoint entity. Should only be specified for + /// get. If the ETag matches the existing entity tag, or if * was provided, + /// then no content will be returned. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string managedVirtualNetworkName, string managedPrivateEndpointName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (managedVirtualNetworkName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "managedVirtualNetworkName"); + } + if (managedVirtualNetworkName != null) + { + if (managedVirtualNetworkName.Length > 127) + { + throw new ValidationException(ValidationRules.MaxLength, "managedVirtualNetworkName", 127); + } + if (managedVirtualNetworkName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "managedVirtualNetworkName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(managedVirtualNetworkName, "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$")) + { + throw new ValidationException(ValidationRules.Pattern, "managedVirtualNetworkName", "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$"); + } + } + if (managedPrivateEndpointName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "managedPrivateEndpointName"); + } + if (managedPrivateEndpointName != null) + { + if (managedPrivateEndpointName.Length > 127) + { + throw new ValidationException(ValidationRules.MaxLength, "managedPrivateEndpointName", 127); + } + if (managedPrivateEndpointName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "managedPrivateEndpointName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(managedPrivateEndpointName, "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$")) + { + throw new ValidationException(ValidationRules.Pattern, "managedPrivateEndpointName", "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("managedVirtualNetworkName", managedVirtualNetworkName); + tracingParameters.Add("managedPrivateEndpointName", managedPrivateEndpointName); + tracingParameters.Add("ifNoneMatch", ifNoneMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{managedVirtualNetworkName}", System.Uri.EscapeDataString(managedVirtualNetworkName)); + _url = _url.Replace("{managedPrivateEndpointName}", System.Uri.EscapeDataString(managedPrivateEndpointName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifNoneMatch != null) + { + if (_httpRequest.Headers.Contains("If-None-Match")) + { + _httpRequest.Headers.Remove("If-None-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-None-Match", ifNoneMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes a managed private endpoint. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Managed virtual network name + /// + /// + /// Managed private endpoint name + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string managedVirtualNetworkName, string managedPrivateEndpointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (managedVirtualNetworkName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "managedVirtualNetworkName"); + } + if (managedVirtualNetworkName != null) + { + if (managedVirtualNetworkName.Length > 127) + { + throw new ValidationException(ValidationRules.MaxLength, "managedVirtualNetworkName", 127); + } + if (managedVirtualNetworkName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "managedVirtualNetworkName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(managedVirtualNetworkName, "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$")) + { + throw new ValidationException(ValidationRules.Pattern, "managedVirtualNetworkName", "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$"); + } + } + if (managedPrivateEndpointName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "managedPrivateEndpointName"); + } + if (managedPrivateEndpointName != null) + { + if (managedPrivateEndpointName.Length > 127) + { + throw new ValidationException(ValidationRules.MaxLength, "managedPrivateEndpointName", 127); + } + if (managedPrivateEndpointName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "managedPrivateEndpointName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(managedPrivateEndpointName, "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$")) + { + throw new ValidationException(ValidationRules.Pattern, "managedPrivateEndpointName", "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("managedVirtualNetworkName", managedVirtualNetworkName); + tracingParameters.Add("managedPrivateEndpointName", managedPrivateEndpointName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}/managedPrivateEndpoints/{managedPrivateEndpointName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{managedVirtualNetworkName}", System.Uri.EscapeDataString(managedVirtualNetworkName)); + _url = _url.Replace("{managedPrivateEndpointName}", System.Uri.EscapeDataString(managedPrivateEndpointName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists managed private endpoints. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactoryNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ManagedPrivateEndpointsOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ManagedPrivateEndpointsOperationsExtensions.cs new file mode 100644 index 000000000000..4edfa1de0352 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ManagedPrivateEndpointsOperationsExtensions.cs @@ -0,0 +1,284 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ManagedPrivateEndpointsOperations. + /// + public static partial class ManagedPrivateEndpointsOperationsExtensions + { + /// + /// Lists managed private endpoints. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Managed virtual network name + /// + public static IPage ListByFactory(this IManagedPrivateEndpointsOperations operations, string resourceGroupName, string factoryName, string managedVirtualNetworkName) + { + return operations.ListByFactoryAsync(resourceGroupName, factoryName, managedVirtualNetworkName).GetAwaiter().GetResult(); + } + + /// + /// Lists managed private endpoints. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Managed virtual network name + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryAsync(this IManagedPrivateEndpointsOperations operations, string resourceGroupName, string factoryName, string managedVirtualNetworkName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, managedVirtualNetworkName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a managed private endpoint. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Managed virtual network name + /// + /// + /// Managed private endpoint name + /// + /// + /// Managed private endpoint resource definition. + /// + /// + /// ETag of the managed private endpoint entity. Should only be specified for + /// update, for which it should match existing entity or can be * for + /// unconditional update. + /// + public static ManagedPrivateEndpointResource CreateOrUpdate(this IManagedPrivateEndpointsOperations operations, string resourceGroupName, string factoryName, string managedVirtualNetworkName, string managedPrivateEndpointName, ManagedPrivateEndpointResource managedPrivateEndpoint, string ifMatch = default(string)) + { + return operations.CreateOrUpdateAsync(resourceGroupName, factoryName, managedVirtualNetworkName, managedPrivateEndpointName, managedPrivateEndpoint, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a managed private endpoint. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Managed virtual network name + /// + /// + /// Managed private endpoint name + /// + /// + /// Managed private endpoint resource definition. + /// + /// + /// ETag of the managed private endpoint entity. Should only be specified for + /// update, for which it should match existing entity or can be * for + /// unconditional update. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IManagedPrivateEndpointsOperations operations, string resourceGroupName, string factoryName, string managedVirtualNetworkName, string managedPrivateEndpointName, ManagedPrivateEndpointResource managedPrivateEndpoint, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, factoryName, managedVirtualNetworkName, managedPrivateEndpointName, managedPrivateEndpoint, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a managed private endpoint. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Managed virtual network name + /// + /// + /// Managed private endpoint name + /// + /// + /// ETag of the managed private endpoint entity. Should only be specified for + /// get. If the ETag matches the existing entity tag, or if * was provided, + /// then no content will be returned. + /// + public static ManagedPrivateEndpointResource Get(this IManagedPrivateEndpointsOperations operations, string resourceGroupName, string factoryName, string managedVirtualNetworkName, string managedPrivateEndpointName, string ifNoneMatch = default(string)) + { + return operations.GetAsync(resourceGroupName, factoryName, managedVirtualNetworkName, managedPrivateEndpointName, ifNoneMatch).GetAwaiter().GetResult(); + } + + /// + /// Gets a managed private endpoint. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Managed virtual network name + /// + /// + /// Managed private endpoint name + /// + /// + /// ETag of the managed private endpoint entity. Should only be specified for + /// get. If the ETag matches the existing entity tag, or if * was provided, + /// then no content will be returned. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IManagedPrivateEndpointsOperations operations, string resourceGroupName, string factoryName, string managedVirtualNetworkName, string managedPrivateEndpointName, string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, factoryName, managedVirtualNetworkName, managedPrivateEndpointName, ifNoneMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a managed private endpoint. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Managed virtual network name + /// + /// + /// Managed private endpoint name + /// + public static void Delete(this IManagedPrivateEndpointsOperations operations, string resourceGroupName, string factoryName, string managedVirtualNetworkName, string managedPrivateEndpointName) + { + operations.DeleteAsync(resourceGroupName, factoryName, managedVirtualNetworkName, managedPrivateEndpointName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a managed private endpoint. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Managed virtual network name + /// + /// + /// Managed private endpoint name + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IManagedPrivateEndpointsOperations operations, string resourceGroupName, string factoryName, string managedVirtualNetworkName, string managedPrivateEndpointName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, factoryName, managedVirtualNetworkName, managedPrivateEndpointName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists managed private endpoints. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByFactoryNext(this IManagedPrivateEndpointsOperations operations, string nextPageLink) + { + return operations.ListByFactoryNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists managed private endpoints. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryNextAsync(this IManagedPrivateEndpointsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ManagedVirtualNetworksOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ManagedVirtualNetworksOperations.cs new file mode 100644 index 000000000000..fcfd56febbdd --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ManagedVirtualNetworksOperations.cs @@ -0,0 +1,999 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ManagedVirtualNetworksOperations operations. + /// + internal partial class ManagedVirtualNetworksOperations : IServiceOperations, IManagedVirtualNetworksOperations + { + /// + /// Initializes a new instance of the ManagedVirtualNetworksOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ManagedVirtualNetworksOperations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// Lists managed Virtual Networks. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactory", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates a managed Virtual Network. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Managed virtual network name + /// + /// + /// Managed Virtual Network resource definition. + /// + /// + /// ETag of the managed Virtual Network entity. Should only be specified for + /// update, for which it should match existing entity or can be * for + /// unconditional update. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string managedVirtualNetworkName, ManagedVirtualNetworkResource managedVirtualNetwork, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (managedVirtualNetworkName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "managedVirtualNetworkName"); + } + if (managedVirtualNetworkName != null) + { + if (managedVirtualNetworkName.Length > 127) + { + throw new ValidationException(ValidationRules.MaxLength, "managedVirtualNetworkName", 127); + } + if (managedVirtualNetworkName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "managedVirtualNetworkName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(managedVirtualNetworkName, "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$")) + { + throw new ValidationException(ValidationRules.Pattern, "managedVirtualNetworkName", "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (managedVirtualNetwork == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "managedVirtualNetwork"); + } + if (managedVirtualNetwork != null) + { + managedVirtualNetwork.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("managedVirtualNetworkName", managedVirtualNetworkName); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("managedVirtualNetwork", managedVirtualNetwork); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{managedVirtualNetworkName}", System.Uri.EscapeDataString(managedVirtualNetworkName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifMatch != null) + { + if (_httpRequest.Headers.Contains("If-Match")) + { + _httpRequest.Headers.Remove("If-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(managedVirtualNetwork != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(managedVirtualNetwork, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a managed Virtual Network. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Managed virtual network name + /// + /// + /// ETag of the managed Virtual Network entity. Should only be specified for + /// get. If the ETag matches the existing entity tag, or if * was provided, + /// then no content will be returned. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string managedVirtualNetworkName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (managedVirtualNetworkName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "managedVirtualNetworkName"); + } + if (managedVirtualNetworkName != null) + { + if (managedVirtualNetworkName.Length > 127) + { + throw new ValidationException(ValidationRules.MaxLength, "managedVirtualNetworkName", 127); + } + if (managedVirtualNetworkName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "managedVirtualNetworkName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(managedVirtualNetworkName, "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$")) + { + throw new ValidationException(ValidationRules.Pattern, "managedVirtualNetworkName", "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("managedVirtualNetworkName", managedVirtualNetworkName); + tracingParameters.Add("ifNoneMatch", ifNoneMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/managedVirtualNetworks/{managedVirtualNetworkName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{managedVirtualNetworkName}", System.Uri.EscapeDataString(managedVirtualNetworkName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifNoneMatch != null) + { + if (_httpRequest.Headers.Contains("If-None-Match")) + { + _httpRequest.Headers.Remove("If-None-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-None-Match", ifNoneMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists managed Virtual Networks. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactoryNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ManagedVirtualNetworksOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ManagedVirtualNetworksOperationsExtensions.cs new file mode 100644 index 000000000000..577dc8accda6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ManagedVirtualNetworksOperationsExtensions.cs @@ -0,0 +1,217 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ManagedVirtualNetworksOperations. + /// + public static partial class ManagedVirtualNetworksOperationsExtensions + { + /// + /// Lists managed Virtual Networks. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + public static IPage ListByFactory(this IManagedVirtualNetworksOperations operations, string resourceGroupName, string factoryName) + { + return operations.ListByFactoryAsync(resourceGroupName, factoryName).GetAwaiter().GetResult(); + } + + /// + /// Lists managed Virtual Networks. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryAsync(this IManagedVirtualNetworksOperations operations, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a managed Virtual Network. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Managed virtual network name + /// + /// + /// Managed Virtual Network resource definition. + /// + /// + /// ETag of the managed Virtual Network entity. Should only be specified for + /// update, for which it should match existing entity or can be * for + /// unconditional update. + /// + public static ManagedVirtualNetworkResource CreateOrUpdate(this IManagedVirtualNetworksOperations operations, string resourceGroupName, string factoryName, string managedVirtualNetworkName, ManagedVirtualNetworkResource managedVirtualNetwork, string ifMatch = default(string)) + { + return operations.CreateOrUpdateAsync(resourceGroupName, factoryName, managedVirtualNetworkName, managedVirtualNetwork, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a managed Virtual Network. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Managed virtual network name + /// + /// + /// Managed Virtual Network resource definition. + /// + /// + /// ETag of the managed Virtual Network entity. Should only be specified for + /// update, for which it should match existing entity or can be * for + /// unconditional update. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IManagedVirtualNetworksOperations operations, string resourceGroupName, string factoryName, string managedVirtualNetworkName, ManagedVirtualNetworkResource managedVirtualNetwork, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, factoryName, managedVirtualNetworkName, managedVirtualNetwork, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a managed Virtual Network. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Managed virtual network name + /// + /// + /// ETag of the managed Virtual Network entity. Should only be specified for + /// get. If the ETag matches the existing entity tag, or if * was provided, + /// then no content will be returned. + /// + public static ManagedVirtualNetworkResource Get(this IManagedVirtualNetworksOperations operations, string resourceGroupName, string factoryName, string managedVirtualNetworkName, string ifNoneMatch = default(string)) + { + return operations.GetAsync(resourceGroupName, factoryName, managedVirtualNetworkName, ifNoneMatch).GetAwaiter().GetResult(); + } + + /// + /// Gets a managed Virtual Network. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Managed virtual network name + /// + /// + /// ETag of the managed Virtual Network entity. Should only be specified for + /// get. If the ETag matches the existing entity tag, or if * was provided, + /// then no content will be returned. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IManagedVirtualNetworksOperations operations, string resourceGroupName, string factoryName, string managedVirtualNetworkName, string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, factoryName, managedVirtualNetworkName, ifNoneMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists managed Virtual Networks. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByFactoryNext(this IManagedVirtualNetworksOperations operations, string nextPageLink) + { + return operations.ListByFactoryNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists managed Virtual Networks. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryNextAsync(this IManagedVirtualNetworksOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AccessPolicyResponse.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AccessPolicyResponse.cs new file mode 100644 index 000000000000..dd903d1dea83 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AccessPolicyResponse.cs @@ -0,0 +1,68 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Get Data Plane read only token response definition. + /// + public partial class AccessPolicyResponse + { + /// + /// Initializes a new instance of the AccessPolicyResponse class. + /// + public AccessPolicyResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AccessPolicyResponse class. + /// + /// The user access policy. + /// Data Plane read only access + /// token. + /// Data Plane service base URL. + public AccessPolicyResponse(UserAccessPolicy policy = default(UserAccessPolicy), string accessToken = default(string), string dataPlaneUrl = default(string)) + { + Policy = policy; + AccessToken = accessToken; + DataPlaneUrl = dataPlaneUrl; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the user access policy. + /// + [JsonProperty(PropertyName = "policy")] + public UserAccessPolicy Policy { get; set; } + + /// + /// Gets or sets data Plane read only access token. + /// + [JsonProperty(PropertyName = "accessToken")] + public string AccessToken { get; set; } + + /// + /// Gets or sets data Plane service base URL. + /// + [JsonProperty(PropertyName = "dataPlaneUrl")] + public string DataPlaneUrl { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Activity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Activity.cs new file mode 100644 index 000000000000..c755bde592ea --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Activity.cs @@ -0,0 +1,148 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A pipeline activity. + /// + public partial class Activity + { + /// + /// Initializes a new instance of the Activity class. + /// + public Activity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Activity class. + /// + /// Activity name. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + public Activity(string name, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList)) + { + AdditionalProperties = additionalProperties; + Name = name; + Description = description; + State = state; + OnInactiveMarkAs = onInactiveMarkAs; + DependsOn = dependsOn; + UserProperties = userProperties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets activity name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets activity description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets activity state. This is an optional property and if + /// not provided, the state will be Active by default. Possible values + /// include: 'Active', 'Inactive' + /// + [JsonProperty(PropertyName = "state")] + public string State { get; set; } + + /// + /// Gets or sets status result of the activity when the state is set to + /// Inactive. This is an optional property and if not provided when the + /// activity is inactive, the status will be Succeeded by default. + /// Possible values include: 'Succeeded', 'Failed', 'Skipped' + /// + [JsonProperty(PropertyName = "onInactiveMarkAs")] + public string OnInactiveMarkAs { get; set; } + + /// + /// Gets or sets activity depends on condition. + /// + [JsonProperty(PropertyName = "dependsOn")] + public IList DependsOn { get; set; } + + /// + /// Gets or sets activity user properties. + /// + [JsonProperty(PropertyName = "userProperties")] + public IList UserProperties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (DependsOn != null) + { + foreach (var element in DependsOn) + { + if (element != null) + { + element.Validate(); + } + } + } + if (UserProperties != null) + { + foreach (var element1 in UserProperties) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ActivityDependency.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ActivityDependency.cs new file mode 100644 index 000000000000..c2d28c0a175b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ActivityDependency.cs @@ -0,0 +1,90 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Activity dependency information. + /// + public partial class ActivityDependency + { + /// + /// Initializes a new instance of the ActivityDependency class. + /// + public ActivityDependency() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ActivityDependency class. + /// + /// Activity name. + /// Match-Condition for the + /// dependency. + /// Unmatched properties from the + /// message are deserialized this collection + public ActivityDependency(string activity, IList dependencyConditions, IDictionary additionalProperties = default(IDictionary)) + { + AdditionalProperties = additionalProperties; + Activity = activity; + DependencyConditions = dependencyConditions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets activity name. + /// + [JsonProperty(PropertyName = "activity")] + public string Activity { get; set; } + + /// + /// Gets or sets match-Condition for the dependency. + /// + [JsonProperty(PropertyName = "dependencyConditions")] + public IList DependencyConditions { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Activity == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Activity"); + } + if (DependencyConditions == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DependencyConditions"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ActivityOnInactiveMarkAs.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ActivityOnInactiveMarkAs.cs new file mode 100644 index 000000000000..3c45193549e0 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ActivityOnInactiveMarkAs.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for ActivityOnInactiveMarkAs. + /// + public static class ActivityOnInactiveMarkAs + { + public const string Succeeded = "Succeeded"; + public const string Failed = "Failed"; + public const string Skipped = "Skipped"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ActivityPolicy.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ActivityPolicy.cs new file mode 100644 index 000000000000..03fd06fbaf28 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ActivityPolicy.cs @@ -0,0 +1,129 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Execution policy for an activity. + /// + public partial class ActivityPolicy + { + /// + /// Initializes a new instance of the ActivityPolicy class. + /// + public ActivityPolicy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ActivityPolicy class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Specifies the timeout for the activity to + /// run. The default timeout is 7 days. Type: string (or Expression + /// with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Maximum ordinary retry attempts. Default is 0. + /// Type: integer (or Expression with resultType integer), minimum: + /// 0. + /// Interval between each retry + /// attempt (in seconds). The default is 30 sec. + /// When set to true, Input from activity is + /// considered as secure and will not be logged to monitoring. + /// When set to true, Output from activity + /// is considered as secure and will not be logged to + /// monitoring. + public ActivityPolicy(IDictionary additionalProperties = default(IDictionary), object timeout = default(object), object retry = default(object), int? retryIntervalInSeconds = default(int?), bool? secureInput = default(bool?), bool? secureOutput = default(bool?)) + { + AdditionalProperties = additionalProperties; + Timeout = timeout; + Retry = retry; + RetryIntervalInSeconds = retryIntervalInSeconds; + SecureInput = secureInput; + SecureOutput = secureOutput; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets specifies the timeout for the activity to run. The + /// default timeout is 7 days. Type: string (or Expression with + /// resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "timeout")] + public object Timeout { get; set; } + + /// + /// Gets or sets maximum ordinary retry attempts. Default is 0. Type: + /// integer (or Expression with resultType integer), minimum: 0. + /// + [JsonProperty(PropertyName = "retry")] + public object Retry { get; set; } + + /// + /// Gets or sets interval between each retry attempt (in seconds). The + /// default is 30 sec. + /// + [JsonProperty(PropertyName = "retryIntervalInSeconds")] + public int? RetryIntervalInSeconds { get; set; } + + /// + /// Gets or sets when set to true, Input from activity is considered as + /// secure and will not be logged to monitoring. + /// + [JsonProperty(PropertyName = "secureInput")] + public bool? SecureInput { get; set; } + + /// + /// Gets or sets when set to true, Output from activity is considered + /// as secure and will not be logged to monitoring. + /// + [JsonProperty(PropertyName = "secureOutput")] + public bool? SecureOutput { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (RetryIntervalInSeconds > 86400) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "RetryIntervalInSeconds", 86400); + } + if (RetryIntervalInSeconds < 30) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "RetryIntervalInSeconds", 30); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ActivityRun.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ActivityRun.cs new file mode 100644 index 000000000000..c5360bf73a9c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ActivityRun.cs @@ -0,0 +1,163 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Information about an activity run in a pipeline. + /// + public partial class ActivityRun + { + /// + /// Initializes a new instance of the ActivityRun class. + /// + public ActivityRun() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ActivityRun class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The name of the pipeline. + /// The id of the pipeline run. + /// The name of the activity. + /// The type of the activity. + /// The id of the activity run. + /// The name of the compute linked + /// service. + /// The status of the activity run. + /// The start time of the activity run + /// in 'ISO 8601' format. + /// The end time of the activity run in + /// 'ISO 8601' format. + /// The duration of the activity + /// run. + /// The input for the activity. + /// The output for the activity. + /// The error if any from the activity run. + public ActivityRun(IDictionary additionalProperties = default(IDictionary), string pipelineName = default(string), string pipelineRunId = default(string), string activityName = default(string), string activityType = default(string), string activityRunId = default(string), string linkedServiceName = default(string), string status = default(string), System.DateTime? activityRunStart = default(System.DateTime?), System.DateTime? activityRunEnd = default(System.DateTime?), int? durationInMs = default(int?), object input = default(object), object output = default(object), object error = default(object)) + { + AdditionalProperties = additionalProperties; + PipelineName = pipelineName; + PipelineRunId = pipelineRunId; + ActivityName = activityName; + ActivityType = activityType; + ActivityRunId = activityRunId; + LinkedServiceName = linkedServiceName; + Status = status; + ActivityRunStart = activityRunStart; + ActivityRunEnd = activityRunEnd; + DurationInMs = durationInMs; + Input = input; + Output = output; + Error = error; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets the name of the pipeline. + /// + [JsonProperty(PropertyName = "pipelineName")] + public string PipelineName { get; private set; } + + /// + /// Gets the id of the pipeline run. + /// + [JsonProperty(PropertyName = "pipelineRunId")] + public string PipelineRunId { get; private set; } + + /// + /// Gets the name of the activity. + /// + [JsonProperty(PropertyName = "activityName")] + public string ActivityName { get; private set; } + + /// + /// Gets the type of the activity. + /// + [JsonProperty(PropertyName = "activityType")] + public string ActivityType { get; private set; } + + /// + /// Gets the id of the activity run. + /// + [JsonProperty(PropertyName = "activityRunId")] + public string ActivityRunId { get; private set; } + + /// + /// Gets the name of the compute linked service. + /// + [JsonProperty(PropertyName = "linkedServiceName")] + public string LinkedServiceName { get; private set; } + + /// + /// Gets the status of the activity run. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; private set; } + + /// + /// Gets the start time of the activity run in 'ISO 8601' format. + /// + [JsonProperty(PropertyName = "activityRunStart")] + public System.DateTime? ActivityRunStart { get; private set; } + + /// + /// Gets the end time of the activity run in 'ISO 8601' format. + /// + [JsonProperty(PropertyName = "activityRunEnd")] + public System.DateTime? ActivityRunEnd { get; private set; } + + /// + /// Gets the duration of the activity run. + /// + [JsonProperty(PropertyName = "durationInMs")] + public int? DurationInMs { get; private set; } + + /// + /// Gets the input for the activity. + /// + [JsonProperty(PropertyName = "input")] + public object Input { get; private set; } + + /// + /// Gets the output for the activity. + /// + [JsonProperty(PropertyName = "output")] + public object Output { get; private set; } + + /// + /// Gets the error if any from the activity run. + /// + [JsonProperty(PropertyName = "error")] + public object Error { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ActivityRunsQueryResponse.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ActivityRunsQueryResponse.cs new file mode 100644 index 000000000000..85d2ff983033 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ActivityRunsQueryResponse.cs @@ -0,0 +1,78 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A list activity runs. + /// + public partial class ActivityRunsQueryResponse + { + /// + /// Initializes a new instance of the ActivityRunsQueryResponse class. + /// + public ActivityRunsQueryResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ActivityRunsQueryResponse class. + /// + /// List of activity runs. + /// The continuation token for getting + /// the next page of results, if any remaining results exist, null + /// otherwise. + public ActivityRunsQueryResponse(IList value, string continuationToken = default(string)) + { + Value = value; + ContinuationToken = continuationToken; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of activity runs. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + /// + /// Gets or sets the continuation token for getting the next page of + /// results, if any remaining results exist, null otherwise. + /// + [JsonProperty(PropertyName = "continuationToken")] + public string ContinuationToken { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Value == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Value"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ActivityState.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ActivityState.cs new file mode 100644 index 000000000000..4e00e32aa8f9 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ActivityState.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for ActivityState. + /// + public static class ActivityState + { + public const string Active = "Active"; + public const string Inactive = "Inactive"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AddDataFlowToDebugSessionResponse.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AddDataFlowToDebugSessionResponse.cs new file mode 100644 index 000000000000..efbe4ecfdf4d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AddDataFlowToDebugSessionResponse.cs @@ -0,0 +1,54 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Response body structure for starting data flow debug session. + /// + public partial class AddDataFlowToDebugSessionResponse + { + /// + /// Initializes a new instance of the AddDataFlowToDebugSessionResponse + /// class. + /// + public AddDataFlowToDebugSessionResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AddDataFlowToDebugSessionResponse + /// class. + /// + /// The ID of data flow debug job + /// version. + public AddDataFlowToDebugSessionResponse(string jobVersion = default(string)) + { + JobVersion = jobVersion; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the ID of data flow debug job version. + /// + [JsonProperty(PropertyName = "jobVersion")] + public string JobVersion { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AdditionalColumns.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AdditionalColumns.cs new file mode 100644 index 000000000000..d4079785c195 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AdditionalColumns.cs @@ -0,0 +1,63 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Specify the column name and value of additional columns. + /// + public partial class AdditionalColumns + { + /// + /// Initializes a new instance of the AdditionalColumns class. + /// + public AdditionalColumns() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AdditionalColumns class. + /// + /// Additional column name. Type: string (or + /// Expression with resultType string). + /// Additional column value. Type: string (or + /// Expression with resultType string). + public AdditionalColumns(object name = default(object), object value = default(object)) + { + Name = name; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets additional column name. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "name")] + public object Name { get; set; } + + /// + /// Gets or sets additional column value. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "value")] + public object Value { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonMWSLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonMWSLinkedService.cs new file mode 100644 index 000000000000..9fccb46356b0 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonMWSLinkedService.cs @@ -0,0 +1,186 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Amazon Marketplace Web Service linked service. + /// + [Newtonsoft.Json.JsonObject("AmazonMWS")] + [Rest.Serialization.JsonTransformation] + public partial class AmazonMWSLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AmazonMWSLinkedService class. + /// + public AmazonMWSLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AmazonMWSLinkedService class. + /// + /// The endpoint of the Amazon MWS server, (i.e. + /// mws.amazonservices.com) + /// The Amazon Marketplace ID you want to + /// retrieve data from. To retrieve data from multiple Marketplace IDs, + /// separate them with a comma (,). (i.e. A2EUQ1WTGCTBG2) + /// The Amazon seller ID. + /// The access key id used to access + /// data. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The Amazon MWS authentication + /// token. + /// The secret key used to access data. + /// Specifies whether the data + /// source endpoints are encrypted using HTTPS. The default value is + /// true. + /// Specifies whether to require the + /// host name in the server's certificate to match the host name of the + /// server when connecting over SSL. The default value is true. + /// Specifies whether to verify the + /// identity of the server when connecting over SSL. The default value + /// is true. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public AmazonMWSLinkedService(object endpoint, object marketplaceID, object sellerID, object accessKeyId, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), SecretBase mwsAuthToken = default(SecretBase), SecretBase secretKey = default(SecretBase), object useEncryptedEndpoints = default(object), object useHostVerification = default(object), object usePeerVerification = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Endpoint = endpoint; + MarketplaceID = marketplaceID; + SellerID = sellerID; + MwsAuthToken = mwsAuthToken; + AccessKeyId = accessKeyId; + SecretKey = secretKey; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the endpoint of the Amazon MWS server, (i.e. + /// mws.amazonservices.com) + /// + [JsonProperty(PropertyName = "typeProperties.endpoint")] + public object Endpoint { get; set; } + + /// + /// Gets or sets the Amazon Marketplace ID you want to retrieve data + /// from. To retrieve data from multiple Marketplace IDs, separate them + /// with a comma (,). (i.e. A2EUQ1WTGCTBG2) + /// + [JsonProperty(PropertyName = "typeProperties.marketplaceID")] + public object MarketplaceID { get; set; } + + /// + /// Gets or sets the Amazon seller ID. + /// + [JsonProperty(PropertyName = "typeProperties.sellerID")] + public object SellerID { get; set; } + + /// + /// Gets or sets the Amazon MWS authentication token. + /// + [JsonProperty(PropertyName = "typeProperties.mwsAuthToken")] + public SecretBase MwsAuthToken { get; set; } + + /// + /// Gets or sets the access key id used to access data. + /// + [JsonProperty(PropertyName = "typeProperties.accessKeyId")] + public object AccessKeyId { get; set; } + + /// + /// Gets or sets the secret key used to access data. + /// + [JsonProperty(PropertyName = "typeProperties.secretKey")] + public SecretBase SecretKey { get; set; } + + /// + /// Gets or sets specifies whether the data source endpoints are + /// encrypted using HTTPS. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useEncryptedEndpoints")] + public object UseEncryptedEndpoints { get; set; } + + /// + /// Gets or sets specifies whether to require the host name in the + /// server's certificate to match the host name of the server when + /// connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useHostVerification")] + public object UseHostVerification { get; set; } + + /// + /// Gets or sets specifies whether to verify the identity of the server + /// when connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.usePeerVerification")] + public object UsePeerVerification { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Endpoint == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Endpoint"); + } + if (MarketplaceID == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MarketplaceID"); + } + if (SellerID == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SellerID"); + } + if (AccessKeyId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AccessKeyId"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonMWSObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonMWSObjectDataset.cs new file mode 100644 index 000000000000..7477eee4bdd1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonMWSObjectDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Amazon Marketplace Web Service dataset. + /// + [Newtonsoft.Json.JsonObject("AmazonMWSObject")] + [Rest.Serialization.JsonTransformation] + public partial class AmazonMWSObjectDataset : Dataset + { + /// + /// Initializes a new instance of the AmazonMWSObjectDataset class. + /// + public AmazonMWSObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the AmazonMWSObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name. Type: string (or Expression + /// with resultType string). + public AmazonMWSObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonMWSSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonMWSSource.cs new file mode 100644 index 000000000000..fc973b29c021 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonMWSSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Amazon Marketplace Web Service source. + /// + public partial class AmazonMWSSource : TabularSource + { + /// + /// Initializes a new instance of the AmazonMWSSource class. + /// + public AmazonMWSSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AmazonMWSSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public AmazonMWSSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForOracleLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForOracleLinkedService.cs new file mode 100644 index 000000000000..10bddb43dccc --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForOracleLinkedService.cs @@ -0,0 +1,106 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// AmazonRdsForOracle database. + /// + [Newtonsoft.Json.JsonObject("AmazonRdsForOracle")] + [Rest.Serialization.JsonTransformation] + public partial class AmazonRdsForOracleLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AmazonRdsForOracleLinkedService + /// class. + /// + public AmazonRdsForOracleLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AmazonRdsForOracleLinkedService + /// class. + /// + /// The connection string. Type: string, + /// SecureString or AzureKeyVaultSecretReference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The Azure key vault secret reference of + /// password in connection string. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public AmazonRdsForOracleLinkedService(object connectionString, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), SecretBase password = default(SecretBase), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionString = connectionString; + Password = password; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the connection string. Type: string, SecureString or + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of password in + /// connection string. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ConnectionString == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ConnectionString"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForOraclePartitionOption.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForOraclePartitionOption.cs new file mode 100644 index 000000000000..f9d5a783acdc --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForOraclePartitionOption.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for AmazonRdsForOraclePartitionOption. + /// + public static class AmazonRdsForOraclePartitionOption + { + public const string None = "None"; + public const string PhysicalPartitionsOfTable = "PhysicalPartitionsOfTable"; + public const string DynamicRange = "DynamicRange"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForOraclePartitionSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForOraclePartitionSettings.cs new file mode 100644 index 000000000000..c91248b9937c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForOraclePartitionSettings.cs @@ -0,0 +1,94 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The settings that will be leveraged for AmazonRdsForOracle source + /// partitioning. + /// + public partial class AmazonRdsForOraclePartitionSettings + { + /// + /// Initializes a new instance of the + /// AmazonRdsForOraclePartitionSettings class. + /// + public AmazonRdsForOraclePartitionSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// AmazonRdsForOraclePartitionSettings class. + /// + /// Names of the physical partitions of + /// AmazonRdsForOracle table. + /// The name of the column in integer + /// type that will be used for proceeding range partitioning. Type: + /// string (or Expression with resultType string). + /// The maximum value of column + /// specified in partitionColumnName that will be used for proceeding + /// range partitioning. Type: string (or Expression with resultType + /// string). + /// The minimum value of column + /// specified in partitionColumnName that will be used for proceeding + /// range partitioning. Type: string (or Expression with resultType + /// string). + public AmazonRdsForOraclePartitionSettings(object partitionNames = default(object), object partitionColumnName = default(object), object partitionUpperBound = default(object), object partitionLowerBound = default(object)) + { + PartitionNames = partitionNames; + PartitionColumnName = partitionColumnName; + PartitionUpperBound = partitionUpperBound; + PartitionLowerBound = partitionLowerBound; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets names of the physical partitions of AmazonRdsForOracle + /// table. + /// + [JsonProperty(PropertyName = "partitionNames")] + public object PartitionNames { get; set; } + + /// + /// Gets or sets the name of the column in integer type that will be + /// used for proceeding range partitioning. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "partitionColumnName")] + public object PartitionColumnName { get; set; } + + /// + /// Gets or sets the maximum value of column specified in + /// partitionColumnName that will be used for proceeding range + /// partitioning. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionUpperBound")] + public object PartitionUpperBound { get; set; } + + /// + /// Gets or sets the minimum value of column specified in + /// partitionColumnName that will be used for proceeding range + /// partitioning. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionLowerBound")] + public object PartitionLowerBound { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForOracleSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForOracleSource.cs new file mode 100644 index 000000000000..8c98134a0c58 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForOracleSource.cs @@ -0,0 +1,115 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity AmazonRdsForOracle source. + /// + public partial class AmazonRdsForOracleSource : CopySource + { + /// + /// Initializes a new instance of the AmazonRdsForOracleSource class. + /// + public AmazonRdsForOracleSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AmazonRdsForOracleSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// AmazonRdsForOracle reader query. + /// Type: string (or Expression with resultType string). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The partition mechanism that will be + /// used for AmazonRdsForOracle read in parallel. Type: string (or + /// Expression with resultType string). + /// The settings that will be leveraged + /// for AmazonRdsForOracle source partitioning. + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public AmazonRdsForOracleSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object oracleReaderQuery = default(object), object queryTimeout = default(object), object partitionOption = default(object), AmazonRdsForOraclePartitionSettings partitionSettings = default(AmazonRdsForOraclePartitionSettings), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + OracleReaderQuery = oracleReaderQuery; + QueryTimeout = queryTimeout; + PartitionOption = partitionOption; + PartitionSettings = partitionSettings; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets amazonRdsForOracle reader query. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "oracleReaderQuery")] + public object OracleReaderQuery { get; set; } + + /// + /// Gets or sets query timeout. Type: string (or Expression with + /// resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "queryTimeout")] + public object QueryTimeout { get; set; } + + /// + /// Gets or sets the partition mechanism that will be used for + /// AmazonRdsForOracle read in parallel. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "partitionOption")] + public object PartitionOption { get; set; } + + /// + /// Gets or sets the settings that will be leveraged for + /// AmazonRdsForOracle source partitioning. + /// + [JsonProperty(PropertyName = "partitionSettings")] + public AmazonRdsForOraclePartitionSettings PartitionSettings { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForOracleTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForOracleTableDataset.cs new file mode 100644 index 000000000000..c7a7ba7e95d4 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForOracleTableDataset.cs @@ -0,0 +1,100 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The AmazonRdsForOracle database dataset. + /// + [Newtonsoft.Json.JsonObject("AmazonRdsForOracleTable")] + [Rest.Serialization.JsonTransformation] + public partial class AmazonRdsForOracleTableDataset : Dataset + { + /// + /// Initializes a new instance of the AmazonRdsForOracleTableDataset + /// class. + /// + public AmazonRdsForOracleTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the AmazonRdsForOracleTableDataset + /// class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The schema name + /// of the AmazonRdsForOracle database. Type: string (or Expression + /// with resultType string). + /// The table name of the AmazonRdsForOracle + /// database. Type: string (or Expression with resultType + /// string). + public AmazonRdsForOracleTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object amazonRdsForOracleTableDatasetSchema = default(object), object table = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + AmazonRdsForOracleTableDatasetSchema = amazonRdsForOracleTableDatasetSchema; + Table = table; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the schema name of the AmazonRdsForOracle database. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object AmazonRdsForOracleTableDatasetSchema { get; set; } + + /// + /// Gets or sets the table name of the AmazonRdsForOracle database. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForSqlAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForSqlAuthenticationType.cs new file mode 100644 index 000000000000..84b27b673333 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForSqlAuthenticationType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for AmazonRdsForSqlAuthenticationType. + /// + public static class AmazonRdsForSqlAuthenticationType + { + public const string SQL = "SQL"; + public const string Windows = "Windows"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForSqlServerLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForSqlServerLinkedService.cs new file mode 100644 index 000000000000..33efe03ab19b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForSqlServerLinkedService.cs @@ -0,0 +1,406 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Amazon RDS for SQL Server linked service. + /// + [Newtonsoft.Json.JsonObject("AmazonRdsForSqlServer")] + [Rest.Serialization.JsonTransformation] + public partial class AmazonRdsForSqlServerLinkedService : LinkedService + { + /// + /// Initializes a new instance of the + /// AmazonRdsForSqlServerLinkedService class. + /// + public AmazonRdsForSqlServerLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// AmazonRdsForSqlServerLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The name or network address of the instance of + /// SQL Server to which to connect, used by recommended version. Type: + /// string (or Expression with resultType string). + /// The name of the database, used by + /// recommended version. Type: string (or Expression with resultType + /// string). + /// Indicate whether TLS encryption is required + /// for all data sent between the client and server, used by + /// recommended version. Possible values are true/yes/mandatory, + /// false/no/optional and strict. Type: string (or Expression with + /// resultType string). + /// Indicate whether the channel + /// will be encrypted while bypassing walking the certificate chain to + /// validate trust, used by recommended version. Type: Boolean (or + /// Expression with resultType boolean). + /// The host name to use when + /// validating the server certificate for the connection. When not + /// specified, the server name from the Data Source is used for + /// certificate validation, used by recommended version. Type: string + /// (or Expression with resultType string). + /// The application workload type when + /// connecting to a server, used by recommended version. Possible + /// values are ReadOnly and ReadWrite. Type: string (or Expression with + /// resultType string). + /// The length of time (in seconds) to + /// wait for a connection to the server before terminating the attempt + /// and generating an error, used by recommended version. Type: integer + /// (or Expression with resultType integer). + /// The number of re-connections + /// attempted after identifying that there was an idle connection + /// failure, used by recommended version. This must be an integer + /// between 0 and 255. Type: integer (or Expression with resultType + /// integer). + /// The amount of time (in seconds) + /// between each re-connection attempt after identifying that there was + /// an idle connection failure, used by recommended version. This must + /// be an integer between 1 and 60. Type: integer (or Expression with + /// resultType integer). + /// The minimum time, in seconds, for + /// the connection to live in the connection pool before being + /// destroyed, used by recommended version. Type: integer (or + /// Expression with resultType integer). + /// The default wait time (in seconds) + /// before terminating the attempt to execute a command and generating + /// an error, used by recommended version. Type: integer (or Expression + /// with resultType integer). + /// Indicate whether User ID and + /// Password are specified in the connection (when false) or whether + /// the current Windows account credentials are used for authentication + /// (when true), used by recommended version. Type: Boolean (or + /// Expression with resultType boolean). + /// The name or address of the partner + /// server to connect to if the primary server is down, used by + /// recommended version. Type: string (or Expression with resultType + /// string). + /// The maximum number of connections allowed + /// in the connection pool for this specific connection string, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// The minimum number of connections allowed + /// in the connection pool for this specific connection string, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// When true, an application + /// can maintain multiple active result sets (MARS). When false, an + /// application must process or cancel all result sets from one batch + /// before it can execute any other batch on that connection, used by + /// recommended version. Type: Boolean (or Expression with resultType + /// boolean). + /// If your application is connecting + /// to an AlwaysOn availability group (AG) on different subnets, + /// setting MultiSubnetFailover=true provides faster detection of and + /// connection to the (currently) active server, used by recommended + /// version. Type: Boolean (or Expression with resultType + /// boolean). + /// The size in bytes of the network packets + /// used to communicate with an instance of server, used by recommended + /// version. Type: integer (or Expression with resultType + /// integer). + /// Indicate whether the connection will be + /// pooled or explicitly opened every time that the connection is + /// requested, used by recommended version. Type: Boolean (or + /// Expression with resultType boolean). + /// The connection string. Type: string, + /// SecureString or AzureKeyVaultSecretReference. + /// The type used for authentication. + /// Type: string. Possible values include: 'SQL', 'Windows' + /// The on-premises Windows authentication user + /// name. Type: string (or Expression with resultType string). + /// The on-premises Windows authentication + /// password. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// Sql always encrypted + /// properties. + public AmazonRdsForSqlServerLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object server = default(object), object database = default(object), object encrypt = default(object), object trustServerCertificate = default(object), object hostNameInCertificate = default(object), object applicationIntent = default(object), object connectTimeout = default(object), object connectRetryCount = default(object), object connectRetryInterval = default(object), object loadBalanceTimeout = default(object), object commandTimeout = default(object), object integratedSecurity = default(object), object failoverPartner = default(object), object maxPoolSize = default(object), object minPoolSize = default(object), object multipleActiveResultSets = default(object), object multiSubnetFailover = default(object), object packetSize = default(object), object pooling = default(object), object connectionString = default(object), string authenticationType = default(string), object userName = default(object), SecretBase password = default(SecretBase), string encryptedCredential = default(string), SqlAlwaysEncryptedProperties alwaysEncryptedSettings = default(SqlAlwaysEncryptedProperties)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Server = server; + Database = database; + Encrypt = encrypt; + TrustServerCertificate = trustServerCertificate; + HostNameInCertificate = hostNameInCertificate; + ApplicationIntent = applicationIntent; + ConnectTimeout = connectTimeout; + ConnectRetryCount = connectRetryCount; + ConnectRetryInterval = connectRetryInterval; + LoadBalanceTimeout = loadBalanceTimeout; + CommandTimeout = commandTimeout; + IntegratedSecurity = integratedSecurity; + FailoverPartner = failoverPartner; + MaxPoolSize = maxPoolSize; + MinPoolSize = minPoolSize; + MultipleActiveResultSets = multipleActiveResultSets; + MultiSubnetFailover = multiSubnetFailover; + PacketSize = packetSize; + Pooling = pooling; + ConnectionString = connectionString; + AuthenticationType = authenticationType; + UserName = userName; + Password = password; + EncryptedCredential = encryptedCredential; + AlwaysEncryptedSettings = alwaysEncryptedSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name or network address of the instance of SQL + /// Server to which to connect, used by recommended version. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.server")] + public object Server { get; set; } + + /// + /// Gets or sets the name of the database, used by recommended version. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.database")] + public object Database { get; set; } + + /// + /// Gets or sets indicate whether TLS encryption is required for all + /// data sent between the client and server, used by recommended + /// version. Possible values are true/yes/mandatory, false/no/optional + /// and strict. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.encrypt")] + public object Encrypt { get; set; } + + /// + /// Gets or sets indicate whether the channel will be encrypted while + /// bypassing walking the certificate chain to validate trust, used by + /// recommended version. Type: Boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "typeProperties.trustServerCertificate")] + public object TrustServerCertificate { get; set; } + + /// + /// Gets or sets the host name to use when validating the server + /// certificate for the connection. When not specified, the server name + /// from the Data Source is used for certificate validation, used by + /// recommended version. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.hostNameInCertificate")] + public object HostNameInCertificate { get; set; } + + /// + /// Gets or sets the application workload type when connecting to a + /// server, used by recommended version. Possible values are ReadOnly + /// and ReadWrite. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.applicationIntent")] + public object ApplicationIntent { get; set; } + + /// + /// Gets or sets the length of time (in seconds) to wait for a + /// connection to the server before terminating the attempt and + /// generating an error, used by recommended version. Type: integer (or + /// Expression with resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.connectTimeout")] + public object ConnectTimeout { get; set; } + + /// + /// Gets or sets the number of re-connections attempted after + /// identifying that there was an idle connection failure, used by + /// recommended version. This must be an integer between 0 and 255. + /// Type: integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.connectRetryCount")] + public object ConnectRetryCount { get; set; } + + /// + /// Gets or sets the amount of time (in seconds) between each + /// re-connection attempt after identifying that there was an idle + /// connection failure, used by recommended version. This must be an + /// integer between 1 and 60. Type: integer (or Expression with + /// resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.connectRetryInterval")] + public object ConnectRetryInterval { get; set; } + + /// + /// Gets or sets the minimum time, in seconds, for the connection to + /// live in the connection pool before being destroyed, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// + [JsonProperty(PropertyName = "typeProperties.loadBalanceTimeout")] + public object LoadBalanceTimeout { get; set; } + + /// + /// Gets or sets the default wait time (in seconds) before terminating + /// the attempt to execute a command and generating an error, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// + [JsonProperty(PropertyName = "typeProperties.commandTimeout")] + public object CommandTimeout { get; set; } + + /// + /// Gets or sets indicate whether User ID and Password are specified in + /// the connection (when false) or whether the current Windows account + /// credentials are used for authentication (when true), used by + /// recommended version. Type: Boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "typeProperties.integratedSecurity")] + public object IntegratedSecurity { get; set; } + + /// + /// Gets or sets the name or address of the partner server to connect + /// to if the primary server is down, used by recommended version. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.failoverPartner")] + public object FailoverPartner { get; set; } + + /// + /// Gets or sets the maximum number of connections allowed in the + /// connection pool for this specific connection string, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// + [JsonProperty(PropertyName = "typeProperties.maxPoolSize")] + public object MaxPoolSize { get; set; } + + /// + /// Gets or sets the minimum number of connections allowed in the + /// connection pool for this specific connection string, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// + [JsonProperty(PropertyName = "typeProperties.minPoolSize")] + public object MinPoolSize { get; set; } + + /// + /// Gets or sets when true, an application can maintain multiple active + /// result sets (MARS). When false, an application must process or + /// cancel all result sets from one batch before it can execute any + /// other batch on that connection, used by recommended version. Type: + /// Boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.multipleActiveResultSets")] + public object MultipleActiveResultSets { get; set; } + + /// + /// Gets or sets if your application is connecting to an AlwaysOn + /// availability group (AG) on different subnets, setting + /// MultiSubnetFailover=true provides faster detection of and + /// connection to the (currently) active server, used by recommended + /// version. Type: Boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.multiSubnetFailover")] + public object MultiSubnetFailover { get; set; } + + /// + /// Gets or sets the size in bytes of the network packets used to + /// communicate with an instance of server, used by recommended + /// version. Type: integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.packetSize")] + public object PacketSize { get; set; } + + /// + /// Gets or sets indicate whether the connection will be pooled or + /// explicitly opened every time that the connection is requested, used + /// by recommended version. Type: Boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.pooling")] + public object Pooling { get; set; } + + /// + /// Gets or sets the connection string. Type: string, SecureString or + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets the type used for authentication. Type: string. + /// Possible values include: 'SQL', 'Windows' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets the on-premises Windows authentication user name. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets the on-premises Windows authentication password. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets sql always encrypted properties. + /// + [JsonProperty(PropertyName = "typeProperties.alwaysEncryptedSettings")] + public SqlAlwaysEncryptedProperties AlwaysEncryptedSettings { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (AlwaysEncryptedSettings != null) + { + AlwaysEncryptedSettings.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForSqlServerSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForSqlServerSource.cs new file mode 100644 index 000000000000..371dcf77c64e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForSqlServerSource.cs @@ -0,0 +1,148 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Amazon RDS for SQL Server source. + /// + public partial class AmazonRdsForSqlServerSource : TabularSource + { + /// + /// Initializes a new instance of the AmazonRdsForSqlServerSource + /// class. + /// + public AmazonRdsForSqlServerSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AmazonRdsForSqlServerSource + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// SQL reader query. Type: string (or + /// Expression with resultType string). + /// Name of the stored + /// procedure for a SQL Database source. This cannot be used at the + /// same time as SqlReaderQuery. Type: string (or Expression with + /// resultType string). + /// Value and type setting for + /// stored procedure parameters. Example: "{Parameter1: {value: "1", + /// type: "int"}}". + /// Specifies the transaction locking + /// behavior for the SQL source. Allowed values: + /// ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. + /// The default value is ReadCommitted. Type: string (or Expression + /// with resultType string). + /// Which additional types to + /// produce. + /// The partition mechanism that will be + /// used for Sql read in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". + /// The settings that will be leveraged + /// for Sql source partitioning. + public AmazonRdsForSqlServerSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object sqlReaderQuery = default(object), object sqlReaderStoredProcedureName = default(object), object storedProcedureParameters = default(object), object isolationLevel = default(object), object produceAdditionalTypes = default(object), object partitionOption = default(object), SqlPartitionSettings partitionSettings = default(SqlPartitionSettings)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + SqlReaderQuery = sqlReaderQuery; + SqlReaderStoredProcedureName = sqlReaderStoredProcedureName; + StoredProcedureParameters = storedProcedureParameters; + IsolationLevel = isolationLevel; + ProduceAdditionalTypes = produceAdditionalTypes; + PartitionOption = partitionOption; + PartitionSettings = partitionSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SQL reader query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "sqlReaderQuery")] + public object SqlReaderQuery { get; set; } + + /// + /// Gets or sets name of the stored procedure for a SQL Database + /// source. This cannot be used at the same time as SqlReaderQuery. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "sqlReaderStoredProcedureName")] + public object SqlReaderStoredProcedureName { get; set; } + + /// + /// Gets or sets value and type setting for stored procedure + /// parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + /// + [JsonProperty(PropertyName = "storedProcedureParameters")] + public object StoredProcedureParameters { get; set; } + + /// + /// Gets or sets specifies the transaction locking behavior for the SQL + /// source. Allowed values: + /// ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. + /// The default value is ReadCommitted. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "isolationLevel")] + public object IsolationLevel { get; set; } + + /// + /// Gets or sets which additional types to produce. + /// + [JsonProperty(PropertyName = "produceAdditionalTypes")] + public object ProduceAdditionalTypes { get; set; } + + /// + /// Gets or sets the partition mechanism that will be used for Sql read + /// in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". + /// + [JsonProperty(PropertyName = "partitionOption")] + public object PartitionOption { get; set; } + + /// + /// Gets or sets the settings that will be leveraged for Sql source + /// partitioning. + /// + [JsonProperty(PropertyName = "partitionSettings")] + public SqlPartitionSettings PartitionSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForSqlServerTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForSqlServerTableDataset.cs new file mode 100644 index 000000000000..a42d7a43c68b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRdsForSqlServerTableDataset.cs @@ -0,0 +1,99 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Amazon RDS for SQL Server dataset. + /// + [Newtonsoft.Json.JsonObject("AmazonRdsForSqlServerTable")] + [Rest.Serialization.JsonTransformation] + public partial class AmazonRdsForSqlServerTableDataset : Dataset + { + /// + /// Initializes a new instance of the AmazonRdsForSqlServerTableDataset + /// class. + /// + public AmazonRdsForSqlServerTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the AmazonRdsForSqlServerTableDataset + /// class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The schema + /// name of the SQL Server dataset. Type: string (or Expression with + /// resultType string). + /// The table name of the SQL Server dataset. Type: + /// string (or Expression with resultType string). + public AmazonRdsForSqlServerTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object amazonRdsForSqlServerTableDatasetSchema = default(object), object table = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + AmazonRdsForSqlServerTableDatasetSchema = amazonRdsForSqlServerTableDatasetSchema; + Table = table; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the schema name of the SQL Server dataset. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object AmazonRdsForSqlServerTableDatasetSchema { get; set; } + + /// + /// Gets or sets the table name of the SQL Server dataset. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRedshiftLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRedshiftLinkedService.cs new file mode 100644 index 000000000000..8237ea9a95e3 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRedshiftLinkedService.cs @@ -0,0 +1,143 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for Amazon Redshift. + /// + [Newtonsoft.Json.JsonObject("AmazonRedshift")] + [Rest.Serialization.JsonTransformation] + public partial class AmazonRedshiftLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AmazonRedshiftLinkedService + /// class. + /// + public AmazonRedshiftLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AmazonRedshiftLinkedService + /// class. + /// + /// The name of the Amazon Redshift server. Type: + /// string (or Expression with resultType string). + /// The database name of the Amazon Redshift + /// source. Type: string (or Expression with resultType + /// string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The username of the Amazon Redshift source. + /// Type: string (or Expression with resultType string). + /// The password of the Amazon Redshift + /// source. + /// The TCP port number that the Amazon Redshift + /// server uses to listen for client connections. The default value is + /// 5439. Type: integer (or Expression with resultType + /// integer). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public AmazonRedshiftLinkedService(object server, object database, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object username = default(object), SecretBase password = default(SecretBase), object port = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Server = server; + Username = username; + Password = password; + Database = database; + Port = port; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the Amazon Redshift server. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.server")] + public object Server { get; set; } + + /// + /// Gets or sets the username of the Amazon Redshift source. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets the password of the Amazon Redshift source. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the database name of the Amazon Redshift source. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.database")] + public object Database { get; set; } + + /// + /// Gets or sets the TCP port number that the Amazon Redshift server + /// uses to listen for client connections. The default value is 5439. + /// Type: integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.port")] + public object Port { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Server == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Server"); + } + if (Database == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Database"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRedshiftSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRedshiftSource.cs new file mode 100644 index 000000000000..461d14d892a8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRedshiftSource.cs @@ -0,0 +1,103 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for Amazon Redshift Source. + /// + public partial class AmazonRedshiftSource : TabularSource + { + /// + /// Initializes a new instance of the AmazonRedshiftSource class. + /// + public AmazonRedshiftSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AmazonRedshiftSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// Database query. Type: string (or Expression + /// with resultType string). + /// The Amazon S3 settings needed + /// for the interim Amazon S3 when copying from Amazon Redshift with + /// unload. With this, data from Amazon Redshift source will be + /// unloaded into S3 first and then copied into the targeted sink from + /// the interim S3. + public AmazonRedshiftSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object), RedshiftUnloadSettings redshiftUnloadSettings = default(RedshiftUnloadSettings)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + RedshiftUnloadSettings = redshiftUnloadSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets database query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets the Amazon S3 settings needed for the interim Amazon + /// S3 when copying from Amazon Redshift with unload. With this, data + /// from Amazon Redshift source will be unloaded into S3 first and then + /// copied into the targeted sink from the interim S3. + /// + [JsonProperty(PropertyName = "redshiftUnloadSettings")] + public RedshiftUnloadSettings RedshiftUnloadSettings { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (RedshiftUnloadSettings != null) + { + RedshiftUnloadSettings.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRedshiftTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRedshiftTableDataset.cs new file mode 100644 index 000000000000..0352f4be6a71 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonRedshiftTableDataset.cs @@ -0,0 +1,107 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Amazon Redshift table dataset. + /// + [Newtonsoft.Json.JsonObject("AmazonRedshiftTable")] + [Rest.Serialization.JsonTransformation] + public partial class AmazonRedshiftTableDataset : Dataset + { + /// + /// Initializes a new instance of the AmazonRedshiftTableDataset class. + /// + public AmazonRedshiftTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the AmazonRedshiftTableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// This property will be retired. Please + /// consider using schema + table properties instead. + /// The Amazon Redshift table name. Type: string + /// (or Expression with resultType string). + /// The Amazon Redshift + /// schema name. Type: string (or Expression with resultType + /// string). + public AmazonRedshiftTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object), object table = default(object), object amazonRedshiftTableDatasetSchema = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + Table = table; + AmazonRedshiftTableDatasetSchema = amazonRedshiftTableDatasetSchema; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property will be retired. Please consider using + /// schema + table properties instead. + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Gets or sets the Amazon Redshift table name. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Gets or sets the Amazon Redshift schema name. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object AmazonRedshiftTableDatasetSchema { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonS3CompatibleLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonS3CompatibleLinkedService.cs new file mode 100644 index 000000000000..37e7c018bf74 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonS3CompatibleLinkedService.cs @@ -0,0 +1,132 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for Amazon S3 Compatible. + /// + [Newtonsoft.Json.JsonObject("AmazonS3Compatible")] + [Rest.Serialization.JsonTransformation] + public partial class AmazonS3CompatibleLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AmazonS3CompatibleLinkedService + /// class. + /// + public AmazonS3CompatibleLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AmazonS3CompatibleLinkedService + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The access key identifier of the Amazon + /// S3 Compatible Identity and Access Management (IAM) user. Type: + /// string (or Expression with resultType string). + /// The secret access key of the Amazon + /// S3 Compatible Identity and Access Management (IAM) user. + /// This value specifies the endpoint to + /// access with the Amazon S3 Compatible Connector. This is an optional + /// property; change it only if you want to try a different service + /// endpoint or want to switch between https and http. Type: string (or + /// Expression with resultType string). + /// If true, use S3 path-style access + /// instead of virtual hosted-style access. Default value is false. + /// Type: boolean (or Expression with resultType boolean). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public AmazonS3CompatibleLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object accessKeyId = default(object), SecretBase secretAccessKey = default(SecretBase), object serviceUrl = default(object), object forcePathStyle = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + AccessKeyId = accessKeyId; + SecretAccessKey = secretAccessKey; + ServiceUrl = serviceUrl; + ForcePathStyle = forcePathStyle; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the access key identifier of the Amazon S3 Compatible + /// Identity and Access Management (IAM) user. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.accessKeyId")] + public object AccessKeyId { get; set; } + + /// + /// Gets or sets the secret access key of the Amazon S3 Compatible + /// Identity and Access Management (IAM) user. + /// + [JsonProperty(PropertyName = "typeProperties.secretAccessKey")] + public SecretBase SecretAccessKey { get; set; } + + /// + /// Gets or sets this value specifies the endpoint to access with the + /// Amazon S3 Compatible Connector. This is an optional property; + /// change it only if you want to try a different service endpoint or + /// want to switch between https and http. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.serviceUrl")] + public object ServiceUrl { get; set; } + + /// + /// Gets or sets if true, use S3 path-style access instead of virtual + /// hosted-style access. Default value is false. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.forcePathStyle")] + public object ForcePathStyle { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonS3CompatibleLocation.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonS3CompatibleLocation.cs new file mode 100644 index 000000000000..ed27609cebe3 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonS3CompatibleLocation.cs @@ -0,0 +1,73 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The location of Amazon S3 Compatible dataset. + /// + public partial class AmazonS3CompatibleLocation : DatasetLocation + { + /// + /// Initializes a new instance of the AmazonS3CompatibleLocation class. + /// + public AmazonS3CompatibleLocation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AmazonS3CompatibleLocation class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Specify the folder path of dataset. Type: + /// string (or Expression with resultType string) + /// Specify the file name of dataset. Type: + /// string (or Expression with resultType string). + /// Specify the bucketName of Amazon S3 + /// Compatible. Type: string (or Expression with resultType + /// string) + /// Specify the version of Amazon S3 Compatible. + /// Type: string (or Expression with resultType string). + public AmazonS3CompatibleLocation(IDictionary additionalProperties = default(IDictionary), object folderPath = default(object), object fileName = default(object), object bucketName = default(object), object version = default(object)) + : base(additionalProperties, folderPath, fileName) + { + BucketName = bucketName; + Version = version; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specify the bucketName of Amazon S3 Compatible. Type: + /// string (or Expression with resultType string) + /// + [JsonProperty(PropertyName = "bucketName")] + public object BucketName { get; set; } + + /// + /// Gets or sets specify the version of Amazon S3 Compatible. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "version")] + public object Version { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonS3CompatibleReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonS3CompatibleReadSettings.cs new file mode 100644 index 000000000000..2cd8219ec67a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonS3CompatibleReadSettings.cs @@ -0,0 +1,170 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Amazon S3 Compatible read settings. + /// + public partial class AmazonS3CompatibleReadSettings : StoreReadSettings + { + /// + /// Initializes a new instance of the AmazonS3CompatibleReadSettings + /// class. + /// + public AmazonS3CompatibleReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AmazonS3CompatibleReadSettings + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// If true, files under the folder path will + /// be read recursively. Default is true. Type: boolean (or Expression + /// with resultType boolean). + /// Amazon S3 Compatible + /// wildcardFolderPath. Type: string (or Expression with resultType + /// string). + /// Amazon S3 Compatible + /// wildcardFileName. Type: string (or Expression with resultType + /// string). + /// The prefix filter for the S3 Compatible object + /// name. Type: string (or Expression with resultType string). + /// Point to a text file that lists each + /// file (relative path to the path configured in the dataset) that you + /// want to copy. Type: string (or Expression with resultType + /// string). + /// Indicates whether to enable + /// partition discovery. Type: boolean (or Expression with resultType + /// boolean). + /// Specify the root path where + /// partition discovery starts from. Type: string (or Expression with + /// resultType string). + /// Indicates whether the + /// source files need to be deleted after copy completion. Default is + /// false. Type: boolean (or Expression with resultType + /// boolean). + /// The start of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + /// The end of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + public AmazonS3CompatibleReadSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object recursive = default(object), object wildcardFolderPath = default(object), object wildcardFileName = default(object), object prefix = default(object), object fileListPath = default(object), object enablePartitionDiscovery = default(object), object partitionRootPath = default(object), object deleteFilesAfterCompletion = default(object), object modifiedDatetimeStart = default(object), object modifiedDatetimeEnd = default(object)) + : base(additionalProperties, maxConcurrentConnections, disableMetricsCollection) + { + Recursive = recursive; + WildcardFolderPath = wildcardFolderPath; + WildcardFileName = wildcardFileName; + Prefix = prefix; + FileListPath = fileListPath; + EnablePartitionDiscovery = enablePartitionDiscovery; + PartitionRootPath = partitionRootPath; + DeleteFilesAfterCompletion = deleteFilesAfterCompletion; + ModifiedDatetimeStart = modifiedDatetimeStart; + ModifiedDatetimeEnd = modifiedDatetimeEnd; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets if true, files under the folder path will be read + /// recursively. Default is true. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "recursive")] + public object Recursive { get; set; } + + /// + /// Gets or sets amazon S3 Compatible wildcardFolderPath. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFolderPath")] + public object WildcardFolderPath { get; set; } + + /// + /// Gets or sets amazon S3 Compatible wildcardFileName. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFileName")] + public object WildcardFileName { get; set; } + + /// + /// Gets or sets the prefix filter for the S3 Compatible object name. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "prefix")] + public object Prefix { get; set; } + + /// + /// Gets or sets point to a text file that lists each file (relative + /// path to the path configured in the dataset) that you want to copy. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "fileListPath")] + public object FileListPath { get; set; } + + /// + /// Gets or sets indicates whether to enable partition discovery. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "enablePartitionDiscovery")] + public object EnablePartitionDiscovery { get; set; } + + /// + /// Gets or sets specify the root path where partition discovery starts + /// from. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionRootPath")] + public object PartitionRootPath { get; set; } + + /// + /// Gets or sets indicates whether the source files need to be deleted + /// after copy completion. Default is false. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "deleteFilesAfterCompletion")] + public object DeleteFilesAfterCompletion { get; set; } + + /// + /// Gets or sets the start of file's modified datetime. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "modifiedDatetimeStart")] + public object ModifiedDatetimeStart { get; set; } + + /// + /// Gets or sets the end of file's modified datetime. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "modifiedDatetimeEnd")] + public object ModifiedDatetimeEnd { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonS3Dataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonS3Dataset.cs new file mode 100644 index 000000000000..5d74680462cd --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonS3Dataset.cs @@ -0,0 +1,165 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A single Amazon Simple Storage Service (S3) object or a set of S3 + /// objects. + /// + [Newtonsoft.Json.JsonObject("AmazonS3Object")] + [Rest.Serialization.JsonTransformation] + public partial class AmazonS3Dataset : Dataset + { + /// + /// Initializes a new instance of the AmazonS3Dataset class. + /// + public AmazonS3Dataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the AmazonS3Dataset class. + /// + /// Linked service reference. + /// The name of the Amazon S3 bucket. Type: + /// string (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The key of the Amazon S3 object. Type: string (or + /// Expression with resultType string). + /// The prefix filter for the S3 object name. + /// Type: string (or Expression with resultType string). + /// The version for the S3 object. Type: string + /// (or Expression with resultType string). + /// The start of S3 object's + /// modified datetime. Type: string (or Expression with resultType + /// string). + /// The end of S3 object's modified + /// datetime. Type: string (or Expression with resultType + /// string). + /// The format of files. + /// The data compression method used for the + /// Amazon S3 object. + public AmazonS3Dataset(LinkedServiceReference linkedServiceName, object bucketName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object key = default(object), object prefix = default(object), object version = default(object), object modifiedDatetimeStart = default(object), object modifiedDatetimeEnd = default(object), DatasetStorageFormat format = default(DatasetStorageFormat), DatasetCompression compression = default(DatasetCompression)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + BucketName = bucketName; + Key = key; + Prefix = prefix; + Version = version; + ModifiedDatetimeStart = modifiedDatetimeStart; + ModifiedDatetimeEnd = modifiedDatetimeEnd; + Format = format; + Compression = compression; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the Amazon S3 bucket. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.bucketName")] + public object BucketName { get; set; } + + /// + /// Gets or sets the key of the Amazon S3 object. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.key")] + public object Key { get; set; } + + /// + /// Gets or sets the prefix filter for the S3 object name. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.prefix")] + public object Prefix { get; set; } + + /// + /// Gets or sets the version for the S3 object. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.version")] + public object Version { get; set; } + + /// + /// Gets or sets the start of S3 object's modified datetime. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.modifiedDatetimeStart")] + public object ModifiedDatetimeStart { get; set; } + + /// + /// Gets or sets the end of S3 object's modified datetime. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.modifiedDatetimeEnd")] + public object ModifiedDatetimeEnd { get; set; } + + /// + /// Gets or sets the format of files. + /// + [JsonProperty(PropertyName = "typeProperties.format")] + public DatasetStorageFormat Format { get; set; } + + /// + /// Gets or sets the data compression method used for the Amazon S3 + /// object. + /// + [JsonProperty(PropertyName = "typeProperties.compression")] + public DatasetCompression Compression { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (BucketName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "BucketName"); + } + if (Compression != null) + { + Compression.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonS3LinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonS3LinkedService.cs new file mode 100644 index 000000000000..337c27983811 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonS3LinkedService.cs @@ -0,0 +1,140 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for Amazon S3. + /// + [Newtonsoft.Json.JsonObject("AmazonS3")] + [Rest.Serialization.JsonTransformation] + public partial class AmazonS3LinkedService : LinkedService + { + /// + /// Initializes a new instance of the AmazonS3LinkedService class. + /// + public AmazonS3LinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AmazonS3LinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The authentication type of S3. + /// Allowed value: AccessKey (default) or TemporarySecurityCredentials. + /// Type: string (or Expression with resultType string). + /// The access key identifier of the Amazon + /// S3 Identity and Access Management (IAM) user. Type: string (or + /// Expression with resultType string). + /// The secret access key of the Amazon + /// S3 Identity and Access Management (IAM) user. + /// This value specifies the endpoint to + /// access with the S3 Connector. This is an optional property; change + /// it only if you want to try a different service endpoint or want to + /// switch between https and http. Type: string (or Expression with + /// resultType string). + /// The session token for the S3 temporary + /// security credential. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public AmazonS3LinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object authenticationType = default(object), object accessKeyId = default(object), SecretBase secretAccessKey = default(SecretBase), object serviceUrl = default(object), SecretBase sessionToken = default(SecretBase), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + AuthenticationType = authenticationType; + AccessKeyId = accessKeyId; + SecretAccessKey = secretAccessKey; + ServiceUrl = serviceUrl; + SessionToken = sessionToken; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the authentication type of S3. Allowed value: + /// AccessKey (default) or TemporarySecurityCredentials. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public object AuthenticationType { get; set; } + + /// + /// Gets or sets the access key identifier of the Amazon S3 Identity + /// and Access Management (IAM) user. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.accessKeyId")] + public object AccessKeyId { get; set; } + + /// + /// Gets or sets the secret access key of the Amazon S3 Identity and + /// Access Management (IAM) user. + /// + [JsonProperty(PropertyName = "typeProperties.secretAccessKey")] + public SecretBase SecretAccessKey { get; set; } + + /// + /// Gets or sets this value specifies the endpoint to access with the + /// S3 Connector. This is an optional property; change it only if you + /// want to try a different service endpoint or want to switch between + /// https and http. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.serviceUrl")] + public object ServiceUrl { get; set; } + + /// + /// Gets or sets the session token for the S3 temporary security + /// credential. + /// + [JsonProperty(PropertyName = "typeProperties.sessionToken")] + public SecretBase SessionToken { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonS3Location.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonS3Location.cs new file mode 100644 index 000000000000..f3d1cf1d33d1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonS3Location.cs @@ -0,0 +1,72 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The location of amazon S3 dataset. + /// + public partial class AmazonS3Location : DatasetLocation + { + /// + /// Initializes a new instance of the AmazonS3Location class. + /// + public AmazonS3Location() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AmazonS3Location class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Specify the folder path of dataset. Type: + /// string (or Expression with resultType string) + /// Specify the file name of dataset. Type: + /// string (or Expression with resultType string). + /// Specify the bucketName of amazon S3. Type: + /// string (or Expression with resultType string) + /// Specify the version of amazon S3. Type: + /// string (or Expression with resultType string). + public AmazonS3Location(IDictionary additionalProperties = default(IDictionary), object folderPath = default(object), object fileName = default(object), object bucketName = default(object), object version = default(object)) + : base(additionalProperties, folderPath, fileName) + { + BucketName = bucketName; + Version = version; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specify the bucketName of amazon S3. Type: string (or + /// Expression with resultType string) + /// + [JsonProperty(PropertyName = "bucketName")] + public object BucketName { get; set; } + + /// + /// Gets or sets specify the version of amazon S3. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "version")] + public object Version { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonS3ReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonS3ReadSettings.cs new file mode 100644 index 000000000000..d3094597cbdd --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AmazonS3ReadSettings.cs @@ -0,0 +1,166 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Amazon S3 read settings. + /// + public partial class AmazonS3ReadSettings : StoreReadSettings + { + /// + /// Initializes a new instance of the AmazonS3ReadSettings class. + /// + public AmazonS3ReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AmazonS3ReadSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// If true, files under the folder path will + /// be read recursively. Default is true. Type: boolean (or Expression + /// with resultType boolean). + /// AmazonS3 wildcardFolderPath. Type: + /// string (or Expression with resultType string). + /// AmazonS3 wildcardFileName. Type: + /// string (or Expression with resultType string). + /// The prefix filter for the S3 object name. + /// Type: string (or Expression with resultType string). + /// Point to a text file that lists each + /// file (relative path to the path configured in the dataset) that you + /// want to copy. Type: string (or Expression with resultType + /// string). + /// Indicates whether to enable + /// partition discovery. Type: boolean (or Expression with resultType + /// boolean). + /// Specify the root path where + /// partition discovery starts from. Type: string (or Expression with + /// resultType string). + /// Indicates whether the + /// source files need to be deleted after copy completion. Default is + /// false. Type: boolean (or Expression with resultType + /// boolean). + /// The start of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + /// The end of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + public AmazonS3ReadSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object recursive = default(object), object wildcardFolderPath = default(object), object wildcardFileName = default(object), object prefix = default(object), object fileListPath = default(object), object enablePartitionDiscovery = default(object), object partitionRootPath = default(object), object deleteFilesAfterCompletion = default(object), object modifiedDatetimeStart = default(object), object modifiedDatetimeEnd = default(object)) + : base(additionalProperties, maxConcurrentConnections, disableMetricsCollection) + { + Recursive = recursive; + WildcardFolderPath = wildcardFolderPath; + WildcardFileName = wildcardFileName; + Prefix = prefix; + FileListPath = fileListPath; + EnablePartitionDiscovery = enablePartitionDiscovery; + PartitionRootPath = partitionRootPath; + DeleteFilesAfterCompletion = deleteFilesAfterCompletion; + ModifiedDatetimeStart = modifiedDatetimeStart; + ModifiedDatetimeEnd = modifiedDatetimeEnd; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets if true, files under the folder path will be read + /// recursively. Default is true. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "recursive")] + public object Recursive { get; set; } + + /// + /// Gets or sets amazonS3 wildcardFolderPath. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFolderPath")] + public object WildcardFolderPath { get; set; } + + /// + /// Gets or sets amazonS3 wildcardFileName. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFileName")] + public object WildcardFileName { get; set; } + + /// + /// Gets or sets the prefix filter for the S3 object name. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "prefix")] + public object Prefix { get; set; } + + /// + /// Gets or sets point to a text file that lists each file (relative + /// path to the path configured in the dataset) that you want to copy. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "fileListPath")] + public object FileListPath { get; set; } + + /// + /// Gets or sets indicates whether to enable partition discovery. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "enablePartitionDiscovery")] + public object EnablePartitionDiscovery { get; set; } + + /// + /// Gets or sets specify the root path where partition discovery starts + /// from. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionRootPath")] + public object PartitionRootPath { get; set; } + + /// + /// Gets or sets indicates whether the source files need to be deleted + /// after copy completion. Default is false. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "deleteFilesAfterCompletion")] + public object DeleteFilesAfterCompletion { get; set; } + + /// + /// Gets or sets the start of file's modified datetime. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "modifiedDatetimeStart")] + public object ModifiedDatetimeStart { get; set; } + + /// + /// Gets or sets the end of file's modified datetime. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "modifiedDatetimeEnd")] + public object ModifiedDatetimeEnd { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AppFiguresLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AppFiguresLinkedService.cs new file mode 100644 index 000000000000..a6dfd94d702f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AppFiguresLinkedService.cs @@ -0,0 +1,108 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for AppFigures. + /// + [Newtonsoft.Json.JsonObject("AppFigures")] + [Rest.Serialization.JsonTransformation] + public partial class AppFiguresLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AppFiguresLinkedService class. + /// + public AppFiguresLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AppFiguresLinkedService class. + /// + /// The username of the Appfigures source. Type: + /// string (or Expression with resultType string). + /// The password of the AppFigures + /// source. + /// The client key for the AppFigures + /// source. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + public AppFiguresLinkedService(object userName, SecretBase password, SecretBase clientKey, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + UserName = userName; + Password = password; + ClientKey = clientKey; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the username of the Appfigures source. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets the password of the AppFigures source. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the client key for the AppFigures source. + /// + [JsonProperty(PropertyName = "typeProperties.clientKey")] + public SecretBase ClientKey { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (UserName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "UserName"); + } + if (Password == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Password"); + } + if (ClientKey == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ClientKey"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AppendVariableActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AppendVariableActivity.cs new file mode 100644 index 000000000000..7a63bf2d4276 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AppendVariableActivity.cs @@ -0,0 +1,96 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Append value for a Variable of type Array. + /// + [Newtonsoft.Json.JsonObject("AppendVariable")] + [Rest.Serialization.JsonTransformation] + public partial class AppendVariableActivity : ControlActivity + { + /// + /// Initializes a new instance of the AppendVariableActivity class. + /// + public AppendVariableActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AppendVariableActivity class. + /// + /// Activity name. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Name of the variable whose value needs + /// to be appended to. + /// Value to be appended. Type: could be a static + /// value matching type of the variable item or Expression with + /// resultType matching type of the variable item + public AppendVariableActivity(string name, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), string variableName = default(string), object value = default(object)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties) + { + VariableName = variableName; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the variable whose value needs to be appended + /// to. + /// + [JsonProperty(PropertyName = "typeProperties.variableName")] + public string VariableName { get; set; } + + /// + /// Gets or sets value to be appended. Type: could be a static value + /// matching type of the variable item or Expression with resultType + /// matching type of the variable item + /// + [JsonProperty(PropertyName = "typeProperties.value")] + public object Value { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ArmIdWrapper.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ArmIdWrapper.cs new file mode 100644 index 000000000000..39ee4e8ed8ed --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ArmIdWrapper.cs @@ -0,0 +1,49 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// A wrapper for an ARM resource id + /// + public partial class ArmIdWrapper + { + /// + /// Initializes a new instance of the ArmIdWrapper class. + /// + public ArmIdWrapper() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ArmIdWrapper class. + /// + public ArmIdWrapper(string id = default(string)) + { + Id = id; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AsanaLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AsanaLinkedService.cs new file mode 100644 index 000000000000..52d384b2b34a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AsanaLinkedService.cs @@ -0,0 +1,92 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for Asana. + /// + [Newtonsoft.Json.JsonObject("Asana")] + [Rest.Serialization.JsonTransformation] + public partial class AsanaLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AsanaLinkedService class. + /// + public AsanaLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AsanaLinkedService class. + /// + /// The api token for the Asana source. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public AsanaLinkedService(SecretBase apiToken, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ApiToken = apiToken; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the api token for the Asana source. + /// + [JsonProperty(PropertyName = "typeProperties.apiToken")] + public SecretBase ApiToken { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ApiToken == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ApiToken"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroCompressionCodec.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroCompressionCodec.cs new file mode 100644 index 000000000000..d54f7d50ea4f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroCompressionCodec.cs @@ -0,0 +1,25 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for AvroCompressionCodec. + /// + public static class AvroCompressionCodec + { + public const string None = "none"; + public const string Deflate = "deflate"; + public const string Snappy = "snappy"; + public const string Xz = "xz"; + public const string Bzip2 = "bzip2"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroDataset.cs new file mode 100644 index 000000000000..a1f7615cf8cf --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroDataset.cs @@ -0,0 +1,112 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Avro dataset. + /// + [Newtonsoft.Json.JsonObject("Avro")] + [Rest.Serialization.JsonTransformation] + public partial class AvroDataset : Dataset + { + /// + /// Initializes a new instance of the AvroDataset class. + /// + public AvroDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the AvroDataset class. + /// + /// Linked service reference. + /// The location of the avro storage. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The data avroCompressionCodec. + /// Type: string (or Expression with resultType string). + public AvroDataset(LinkedServiceReference linkedServiceName, DatasetLocation location, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object avroCompressionCodec = default(object), int? avroCompressionLevel = default(int?)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Location = location; + AvroCompressionCodec = avroCompressionCodec; + AvroCompressionLevel = avroCompressionLevel; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the location of the avro storage. + /// + [JsonProperty(PropertyName = "typeProperties.location")] + public DatasetLocation Location { get; set; } + + /// + /// Gets or sets the data avroCompressionCodec. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.avroCompressionCodec")] + public object AvroCompressionCodec { get; set; } + + /// + /// + [JsonProperty(PropertyName = "typeProperties.avroCompressionLevel")] + public int? AvroCompressionLevel { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Location"); + } + if (AvroCompressionLevel > 9) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "AvroCompressionLevel", 9); + } + if (AvroCompressionLevel < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "AvroCompressionLevel", 1); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroFormat.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroFormat.cs new file mode 100644 index 000000000000..1dc691a10489 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroFormat.cs @@ -0,0 +1,51 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The data stored in Avro format. + /// + public partial class AvroFormat : DatasetStorageFormat + { + /// + /// Initializes a new instance of the AvroFormat class. + /// + public AvroFormat() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AvroFormat class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Serializer. Type: string (or Expression + /// with resultType string). + /// Deserializer. Type: string (or + /// Expression with resultType string). + public AvroFormat(IDictionary additionalProperties = default(IDictionary), object serializer = default(object), object deserializer = default(object)) + : base(additionalProperties, serializer, deserializer) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroSink.cs new file mode 100644 index 000000000000..9121a0c98ed3 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroSink.cs @@ -0,0 +1,80 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Avro sink. + /// + public partial class AvroSink : CopySink + { + /// + /// Initializes a new instance of the AvroSink class. + /// + public AvroSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AvroSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Avro store settings. + /// Avro format settings. + public AvroSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), StoreWriteSettings storeSettings = default(StoreWriteSettings), AvroWriteSettings formatSettings = default(AvroWriteSettings)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + StoreSettings = storeSettings; + FormatSettings = formatSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets avro store settings. + /// + [JsonProperty(PropertyName = "storeSettings")] + public StoreWriteSettings StoreSettings { get; set; } + + /// + /// Gets or sets avro format settings. + /// + [JsonProperty(PropertyName = "formatSettings")] + public AvroWriteSettings FormatSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroSource.cs new file mode 100644 index 000000000000..b56299662746 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroSource.cs @@ -0,0 +1,79 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Avro source. + /// + public partial class AvroSource : CopySource + { + /// + /// Initializes a new instance of the AvroSource class. + /// + public AvroSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AvroSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Avro store settings. + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public AvroSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), StoreReadSettings storeSettings = default(StoreReadSettings), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + StoreSettings = storeSettings; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets avro store settings. + /// + [JsonProperty(PropertyName = "storeSettings")] + public StoreReadSettings StoreSettings { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroWriteSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroWriteSettings.cs new file mode 100644 index 000000000000..dfa465d8007b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AvroWriteSettings.cs @@ -0,0 +1,93 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Avro write settings. + /// + public partial class AvroWriteSettings : FormatWriteSettings + { + /// + /// Initializes a new instance of the AvroWriteSettings class. + /// + public AvroWriteSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AvroWriteSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Top level record name in write result, + /// which is required in AVRO spec. + /// Record namespace in the write + /// result. + /// Limit the written file's row count to + /// be smaller than or equal to the specified count. Type: integer (or + /// Expression with resultType integer). + /// Specifies the file name pattern + /// <fileNamePrefix>_<fileIndex>.<fileExtension> when + /// copy from non-file based store without partitionOptions. Type: + /// string (or Expression with resultType string). + public AvroWriteSettings(IDictionary additionalProperties = default(IDictionary), string recordName = default(string), string recordNamespace = default(string), object maxRowsPerFile = default(object), object fileNamePrefix = default(object)) + : base(additionalProperties) + { + RecordName = recordName; + RecordNamespace = recordNamespace; + MaxRowsPerFile = maxRowsPerFile; + FileNamePrefix = fileNamePrefix; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets top level record name in write result, which is + /// required in AVRO spec. + /// + [JsonProperty(PropertyName = "recordName")] + public string RecordName { get; set; } + + /// + /// Gets or sets record namespace in the write result. + /// + [JsonProperty(PropertyName = "recordNamespace")] + public string RecordNamespace { get; set; } + + /// + /// Gets or sets limit the written file's row count to be smaller than + /// or equal to the specified count. Type: integer (or Expression with + /// resultType integer). + /// + [JsonProperty(PropertyName = "maxRowsPerFile")] + public object MaxRowsPerFile { get; set; } + + /// + /// Gets or sets specifies the file name pattern + /// &lt;fileNamePrefix&gt;_&lt;fileIndex&gt;.&lt;fileExtension&gt; + /// when copy from non-file based store without partitionOptions. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "fileNamePrefix")] + public object FileNamePrefix { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzPowerShellSetup.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzPowerShellSetup.cs new file mode 100644 index 000000000000..026165f6ba8b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzPowerShellSetup.cs @@ -0,0 +1,68 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The express custom setup of installing Azure PowerShell. + /// + [Rest.Serialization.JsonTransformation] + public partial class AzPowerShellSetup : CustomSetupBase + { + /// + /// Initializes a new instance of the AzPowerShellSetup class. + /// + public AzPowerShellSetup() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzPowerShellSetup class. + /// + /// The required version of Azure PowerShell to + /// install. + public AzPowerShellSetup(string version) + { + Version = version; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the required version of Azure PowerShell to install. + /// + [JsonProperty(PropertyName = "typeProperties.version")] + public string Version { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Version == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Version"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBatchLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBatchLinkedService.cs new file mode 100644 index 000000000000..e08b4efc91db --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBatchLinkedService.cs @@ -0,0 +1,162 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure Batch linked service. + /// + [Newtonsoft.Json.JsonObject("AzureBatch")] + [Rest.Serialization.JsonTransformation] + public partial class AzureBatchLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AzureBatchLinkedService class. + /// + public AzureBatchLinkedService() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureBatchLinkedService class. + /// + /// The Azure Batch account name. Type: + /// string (or Expression with resultType string). + /// The Azure Batch URI. Type: string (or + /// Expression with resultType string). + /// The Azure Batch pool name. Type: string (or + /// Expression with resultType string). + /// The Azure Storage linked service + /// reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The Azure Batch account access key. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// The credential reference containing + /// authentication information. + public AzureBatchLinkedService(object accountName, object batchUri, object poolName, LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), SecretBase accessKey = default(SecretBase), string encryptedCredential = default(string), CredentialReference credential = default(CredentialReference)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + AccountName = accountName; + AccessKey = accessKey; + BatchUri = batchUri; + PoolName = poolName; + LinkedServiceName = linkedServiceName; + EncryptedCredential = encryptedCredential; + Credential = credential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Azure Batch account name. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.accountName")] + public object AccountName { get; set; } + + /// + /// Gets or sets the Azure Batch account access key. + /// + [JsonProperty(PropertyName = "typeProperties.accessKey")] + public SecretBase AccessKey { get; set; } + + /// + /// Gets or sets the Azure Batch URI. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.batchUri")] + public object BatchUri { get; set; } + + /// + /// Gets or sets the Azure Batch pool name. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.poolName")] + public object PoolName { get; set; } + + /// + /// Gets or sets the Azure Storage linked service reference. + /// + [JsonProperty(PropertyName = "typeProperties.linkedServiceName")] + public LinkedServiceReference LinkedServiceName { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets the credential reference containing authentication + /// information. + /// + [JsonProperty(PropertyName = "typeProperties.credential")] + public CredentialReference Credential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (AccountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AccountName"); + } + if (BatchUri == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "BatchUri"); + } + if (PoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PoolName"); + } + if (LinkedServiceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "LinkedServiceName"); + } + if (LinkedServiceName != null) + { + LinkedServiceName.Validate(); + } + if (Credential != null) + { + Credential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobDataset.cs new file mode 100644 index 000000000000..57cce1c0f889 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobDataset.cs @@ -0,0 +1,149 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Azure Blob storage. + /// + [Newtonsoft.Json.JsonObject("AzureBlob")] + [Rest.Serialization.JsonTransformation] + public partial class AzureBlobDataset : Dataset + { + /// + /// Initializes a new instance of the AzureBlobDataset class. + /// + public AzureBlobDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureBlobDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The path of the Azure Blob storage. Type: + /// string (or Expression with resultType string). + /// The root of blob path. Type: string + /// (or Expression with resultType string). + /// The name of the Azure Blob. Type: string (or + /// Expression with resultType string). + /// The start of Azure Blob's + /// modified datetime. Type: string (or Expression with resultType + /// string). + /// The end of Azure Blob's modified + /// datetime. Type: string (or Expression with resultType + /// string). + /// The format of the Azure Blob storage. + /// The data compression method used for the + /// blob storage. + public AzureBlobDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object folderPath = default(object), object tableRootLocation = default(object), object fileName = default(object), object modifiedDatetimeStart = default(object), object modifiedDatetimeEnd = default(object), DatasetStorageFormat format = default(DatasetStorageFormat), DatasetCompression compression = default(DatasetCompression)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + FolderPath = folderPath; + TableRootLocation = tableRootLocation; + FileName = fileName; + ModifiedDatetimeStart = modifiedDatetimeStart; + ModifiedDatetimeEnd = modifiedDatetimeEnd; + Format = format; + Compression = compression; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the path of the Azure Blob storage. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.folderPath")] + public object FolderPath { get; set; } + + /// + /// Gets or sets the root of blob path. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableRootLocation")] + public object TableRootLocation { get; set; } + + /// + /// Gets or sets the name of the Azure Blob. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.fileName")] + public object FileName { get; set; } + + /// + /// Gets or sets the start of Azure Blob's modified datetime. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.modifiedDatetimeStart")] + public object ModifiedDatetimeStart { get; set; } + + /// + /// Gets or sets the end of Azure Blob's modified datetime. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.modifiedDatetimeEnd")] + public object ModifiedDatetimeEnd { get; set; } + + /// + /// Gets or sets the format of the Azure Blob storage. + /// + [JsonProperty(PropertyName = "typeProperties.format")] + public DatasetStorageFormat Format { get; set; } + + /// + /// Gets or sets the data compression method used for the blob storage. + /// + [JsonProperty(PropertyName = "typeProperties.compression")] + public DatasetCompression Compression { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Compression != null) + { + Compression.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSDataset.cs new file mode 100644 index 000000000000..13b9026beb35 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSDataset.cs @@ -0,0 +1,120 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Azure Data Lake Storage Gen2 storage. + /// + [Newtonsoft.Json.JsonObject("AzureBlobFSFile")] + [Rest.Serialization.JsonTransformation] + public partial class AzureBlobFSDataset : Dataset + { + /// + /// Initializes a new instance of the AzureBlobFSDataset class. + /// + public AzureBlobFSDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureBlobFSDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The path of the Azure Data Lake Storage + /// Gen2 storage. Type: string (or Expression with resultType + /// string). + /// The name of the Azure Data Lake Storage + /// Gen2. Type: string (or Expression with resultType string). + /// The format of the Azure Data Lake Storage Gen2 + /// storage. + /// The data compression method used for the + /// blob storage. + public AzureBlobFSDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object folderPath = default(object), object fileName = default(object), DatasetStorageFormat format = default(DatasetStorageFormat), DatasetCompression compression = default(DatasetCompression)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + FolderPath = folderPath; + FileName = fileName; + Format = format; + Compression = compression; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the path of the Azure Data Lake Storage Gen2 storage. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.folderPath")] + public object FolderPath { get; set; } + + /// + /// Gets or sets the name of the Azure Data Lake Storage Gen2. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.fileName")] + public object FileName { get; set; } + + /// + /// Gets or sets the format of the Azure Data Lake Storage Gen2 + /// storage. + /// + [JsonProperty(PropertyName = "typeProperties.format")] + public DatasetStorageFormat Format { get; set; } + + /// + /// Gets or sets the data compression method used for the blob storage. + /// + [JsonProperty(PropertyName = "typeProperties.compression")] + public DatasetCompression Compression { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Compression != null) + { + Compression.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSLinkedService.cs new file mode 100644 index 000000000000..da83487ae73d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSLinkedService.cs @@ -0,0 +1,223 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure Data Lake Storage Gen2 linked service. + /// + [Newtonsoft.Json.JsonObject("AzureBlobFS")] + [Rest.Serialization.JsonTransformation] + public partial class AzureBlobFSLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AzureBlobFSLinkedService class. + /// + public AzureBlobFSLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureBlobFSLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Endpoint for the Azure Data Lake Storage Gen2 + /// service. Type: string (or Expression with resultType + /// string). + /// Account key for the Azure Data Lake + /// Storage Gen2 service. Type: string (or Expression with resultType + /// string). + /// The ID of the application used to + /// authenticate against the Azure Data Lake Storage Gen2 account. + /// Type: string (or Expression with resultType string). + /// The Key of the application used + /// to authenticate against the Azure Data Lake Storage Gen2 + /// account. + /// The name or ID of the tenant to which the + /// service principal belongs. Type: string (or Expression with + /// resultType string). + /// Indicates the azure cloud type of the + /// service principle auth. Allowed values are AzurePublic, AzureChina, + /// AzureUsGovernment, AzureGermany. Default value is the data factory + /// regions’ cloud type. Type: string (or Expression with resultType + /// string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// The credential reference containing + /// authentication information. + /// The service principal + /// credential type to use in Server-To-Server authentication. + /// 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for + /// certificate. Type: string (or Expression with resultType + /// string). + /// The credential of the + /// service principal object in Azure Active Directory. If + /// servicePrincipalCredentialType is 'ServicePrincipalKey', + /// servicePrincipalCredential can be SecureString or + /// AzureKeyVaultSecretReference. If servicePrincipalCredentialType is + /// 'ServicePrincipalCert', servicePrincipalCredential can only be + /// AzureKeyVaultSecretReference. + /// SAS URI of the Azure Data Lake Storage Gen2 + /// service. Type: string, SecureString or + /// AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of + /// sasToken in sas uri. + public AzureBlobFSLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object url = default(object), object accountKey = default(object), object servicePrincipalId = default(object), SecretBase servicePrincipalKey = default(SecretBase), object tenant = default(object), object azureCloudType = default(object), string encryptedCredential = default(string), CredentialReference credential = default(CredentialReference), object servicePrincipalCredentialType = default(object), SecretBase servicePrincipalCredential = default(SecretBase), object sasUri = default(object), SecretBase sasToken = default(SecretBase)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Url = url; + AccountKey = accountKey; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + AzureCloudType = azureCloudType; + EncryptedCredential = encryptedCredential; + Credential = credential; + ServicePrincipalCredentialType = servicePrincipalCredentialType; + ServicePrincipalCredential = servicePrincipalCredential; + SasUri = sasUri; + SasToken = sasToken; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets endpoint for the Azure Data Lake Storage Gen2 service. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.url")] + public object Url { get; set; } + + /// + /// Gets or sets account key for the Azure Data Lake Storage Gen2 + /// service. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.accountKey")] + public object AccountKey { get; set; } + + /// + /// Gets or sets the ID of the application used to authenticate against + /// the Azure Data Lake Storage Gen2 account. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalId")] + public object ServicePrincipalId { get; set; } + + /// + /// Gets or sets the Key of the application used to authenticate + /// against the Azure Data Lake Storage Gen2 account. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalKey")] + public SecretBase ServicePrincipalKey { get; set; } + + /// + /// Gets or sets the name or ID of the tenant to which the service + /// principal belongs. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.tenant")] + public object Tenant { get; set; } + + /// + /// Gets or sets indicates the azure cloud type of the service + /// principle auth. Allowed values are AzurePublic, AzureChina, + /// AzureUsGovernment, AzureGermany. Default value is the data factory + /// regions’ cloud type. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.azureCloudType")] + public object AzureCloudType { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets the credential reference containing authentication + /// information. + /// + [JsonProperty(PropertyName = "typeProperties.credential")] + public CredentialReference Credential { get; set; } + + /// + /// Gets or sets the service principal credential type to use in + /// Server-To-Server authentication. 'ServicePrincipalKey' for + /// key/secret, 'ServicePrincipalCert' for certificate. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalCredentialType")] + public object ServicePrincipalCredentialType { get; set; } + + /// + /// Gets or sets the credential of the service principal object in + /// Azure Active Directory. If servicePrincipalCredentialType is + /// 'ServicePrincipalKey', servicePrincipalCredential can be + /// SecureString or AzureKeyVaultSecretReference. If + /// servicePrincipalCredentialType is 'ServicePrincipalCert', + /// servicePrincipalCredential can only be + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalCredential")] + public SecretBase ServicePrincipalCredential { get; set; } + + /// + /// Gets or sets SAS URI of the Azure Data Lake Storage Gen2 service. + /// Type: string, SecureString or AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.sasUri")] + public object SasUri { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of sasToken in + /// sas uri. + /// + [JsonProperty(PropertyName = "typeProperties.sasToken")] + public SecretBase SasToken { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Credential != null) + { + Credential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSLocation.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSLocation.cs new file mode 100644 index 000000000000..94c9e4464642 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSLocation.cs @@ -0,0 +1,62 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The location of azure blobFS dataset. + /// + public partial class AzureBlobFSLocation : DatasetLocation + { + /// + /// Initializes a new instance of the AzureBlobFSLocation class. + /// + public AzureBlobFSLocation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureBlobFSLocation class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Specify the folder path of dataset. Type: + /// string (or Expression with resultType string) + /// Specify the file name of dataset. Type: + /// string (or Expression with resultType string). + /// Specify the fileSystem of azure blobFS. + /// Type: string (or Expression with resultType string). + public AzureBlobFSLocation(IDictionary additionalProperties = default(IDictionary), object folderPath = default(object), object fileName = default(object), object fileSystem = default(object)) + : base(additionalProperties, folderPath, fileName) + { + FileSystem = fileSystem; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specify the fileSystem of azure blobFS. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "fileSystem")] + public object FileSystem { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSReadSettings.cs new file mode 100644 index 000000000000..a4388493308f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSReadSettings.cs @@ -0,0 +1,156 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure blobFS read settings. + /// + public partial class AzureBlobFSReadSettings : StoreReadSettings + { + /// + /// Initializes a new instance of the AzureBlobFSReadSettings class. + /// + public AzureBlobFSReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureBlobFSReadSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// If true, files under the folder path will + /// be read recursively. Default is true. Type: boolean (or Expression + /// with resultType boolean). + /// Azure blobFS wildcardFolderPath. + /// Type: string (or Expression with resultType string). + /// Azure blobFS wildcardFileName. Type: + /// string (or Expression with resultType string). + /// Point to a text file that lists each + /// file (relative path to the path configured in the dataset) that you + /// want to copy. Type: string (or Expression with resultType + /// string). + /// Indicates whether to enable + /// partition discovery. Type: boolean (or Expression with resultType + /// boolean). + /// Specify the root path where + /// partition discovery starts from. Type: string (or Expression with + /// resultType string). + /// Indicates whether the + /// source files need to be deleted after copy completion. Default is + /// false. Type: boolean (or Expression with resultType + /// boolean). + /// The start of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + /// The end of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + public AzureBlobFSReadSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object recursive = default(object), object wildcardFolderPath = default(object), object wildcardFileName = default(object), object fileListPath = default(object), object enablePartitionDiscovery = default(object), object partitionRootPath = default(object), object deleteFilesAfterCompletion = default(object), object modifiedDatetimeStart = default(object), object modifiedDatetimeEnd = default(object)) + : base(additionalProperties, maxConcurrentConnections, disableMetricsCollection) + { + Recursive = recursive; + WildcardFolderPath = wildcardFolderPath; + WildcardFileName = wildcardFileName; + FileListPath = fileListPath; + EnablePartitionDiscovery = enablePartitionDiscovery; + PartitionRootPath = partitionRootPath; + DeleteFilesAfterCompletion = deleteFilesAfterCompletion; + ModifiedDatetimeStart = modifiedDatetimeStart; + ModifiedDatetimeEnd = modifiedDatetimeEnd; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets if true, files under the folder path will be read + /// recursively. Default is true. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "recursive")] + public object Recursive { get; set; } + + /// + /// Gets or sets azure blobFS wildcardFolderPath. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFolderPath")] + public object WildcardFolderPath { get; set; } + + /// + /// Gets or sets azure blobFS wildcardFileName. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFileName")] + public object WildcardFileName { get; set; } + + /// + /// Gets or sets point to a text file that lists each file (relative + /// path to the path configured in the dataset) that you want to copy. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "fileListPath")] + public object FileListPath { get; set; } + + /// + /// Gets or sets indicates whether to enable partition discovery. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "enablePartitionDiscovery")] + public object EnablePartitionDiscovery { get; set; } + + /// + /// Gets or sets specify the root path where partition discovery starts + /// from. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionRootPath")] + public object PartitionRootPath { get; set; } + + /// + /// Gets or sets indicates whether the source files need to be deleted + /// after copy completion. Default is false. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "deleteFilesAfterCompletion")] + public object DeleteFilesAfterCompletion { get; set; } + + /// + /// Gets or sets the start of file's modified datetime. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "modifiedDatetimeStart")] + public object ModifiedDatetimeStart { get; set; } + + /// + /// Gets or sets the end of file's modified datetime. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "modifiedDatetimeEnd")] + public object ModifiedDatetimeEnd { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSSink.cs new file mode 100644 index 000000000000..b792564aafc1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSSink.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure Data Lake Storage Gen2 sink. + /// + public partial class AzureBlobFSSink : CopySink + { + /// + /// Initializes a new instance of the AzureBlobFSSink class. + /// + public AzureBlobFSSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureBlobFSSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The type of copy behavior for copy sink. + /// Type: string (or Expression with resultType string). + /// Specify the custom metadata to be added to + /// sink data. Type: array of objects (or Expression with resultType + /// array of objects). + public AzureBlobFSSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object copyBehavior = default(object), IList metadata = default(IList)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + CopyBehavior = copyBehavior; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the type of copy behavior for copy sink. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "copyBehavior")] + public object CopyBehavior { get; set; } + + /// + /// Gets or sets specify the custom metadata to be added to sink data. + /// Type: array of objects (or Expression with resultType array of + /// objects). + /// + [JsonProperty(PropertyName = "metadata")] + public IList Metadata { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSSource.cs new file mode 100644 index 000000000000..e8b20d378e78 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSSource.cs @@ -0,0 +1,92 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure BlobFS source. + /// + public partial class AzureBlobFSSource : CopySource + { + /// + /// Initializes a new instance of the AzureBlobFSSource class. + /// + public AzureBlobFSSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureBlobFSSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Treat empty as null. Type: boolean + /// (or Expression with resultType boolean). + /// Number of header lines to skip + /// from each blob. Type: integer (or Expression with resultType + /// integer). + /// If true, files under the folder path will + /// be read recursively. Default is true. Type: boolean (or Expression + /// with resultType boolean). + public AzureBlobFSSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object treatEmptyAsNull = default(object), object skipHeaderLineCount = default(object), object recursive = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + TreatEmptyAsNull = treatEmptyAsNull; + SkipHeaderLineCount = skipHeaderLineCount; + Recursive = recursive; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets treat empty as null. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "treatEmptyAsNull")] + public object TreatEmptyAsNull { get; set; } + + /// + /// Gets or sets number of header lines to skip from each blob. Type: + /// integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "skipHeaderLineCount")] + public object SkipHeaderLineCount { get; set; } + + /// + /// Gets or sets if true, files under the folder path will be read + /// recursively. Default is true. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "recursive")] + public object Recursive { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSWriteSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSWriteSettings.cs new file mode 100644 index 000000000000..bc857a0b3bf5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobFSWriteSettings.cs @@ -0,0 +1,70 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure blobFS write settings. + /// + public partial class AzureBlobFSWriteSettings : StoreWriteSettings + { + /// + /// Initializes a new instance of the AzureBlobFSWriteSettings class. + /// + public AzureBlobFSWriteSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureBlobFSWriteSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The type of copy behavior for copy + /// sink. + /// Specify the custom metadata to be added to + /// sink data. Type: array of objects (or Expression with resultType + /// array of objects). + /// Indicates the block size(MB) when + /// writing data to blob. Type: integer (or Expression with resultType + /// integer). + public AzureBlobFSWriteSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object copyBehavior = default(object), IList metadata = default(IList), object blockSizeInMB = default(object)) + : base(additionalProperties, maxConcurrentConnections, disableMetricsCollection, copyBehavior, metadata) + { + BlockSizeInMB = blockSizeInMB; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets indicates the block size(MB) when writing data to + /// blob. Type: integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "blockSizeInMB")] + public object BlockSizeInMB { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobStorageLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobStorageLinkedService.cs new file mode 100644 index 000000000000..9f0936c88263 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobStorageLinkedService.cs @@ -0,0 +1,249 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The azure blob storage linked service. + /// + [Newtonsoft.Json.JsonObject("AzureBlobStorage")] + [Rest.Serialization.JsonTransformation] + public partial class AzureBlobStorageLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AzureBlobStorageLinkedService + /// class. + /// + public AzureBlobStorageLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureBlobStorageLinkedService + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The connection string. It is + /// mutually exclusive with sasUri, serviceEndpoint property. Type: + /// string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of + /// accountKey in connection string. + /// SAS URI of the Azure Blob Storage resource. It + /// is mutually exclusive with connectionString, serviceEndpoint + /// property. Type: string, SecureString or + /// AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of + /// sasToken in sas uri. + /// Blob service endpoint of the Azure + /// Blob Storage resource. It is mutually exclusive with + /// connectionString, sasUri property. + /// The ID of the service principal + /// used to authenticate against Azure SQL Data Warehouse. Type: string + /// (or Expression with resultType string). + /// The key of the service principal + /// used to authenticate against Azure SQL Data Warehouse. + /// The name or ID of the tenant to which the + /// service principal belongs. Type: string (or Expression with + /// resultType string). + /// Indicates the azure cloud type of the + /// service principle auth. Allowed values are AzurePublic, AzureChina, + /// AzureUsGovernment, AzureGermany. Default value is the data factory + /// regions’ cloud type. Type: string (or Expression with resultType + /// string). + /// Specify the kind of your storage account. + /// Allowed values are: Storage (general purpose v1), StorageV2 + /// (general purpose v2), BlobStorage, or BlockBlobStorage. Type: + /// string (or Expression with resultType string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// The credential reference containing + /// authentication information. + /// The type used for authentication. + /// Type: string. Possible values include: 'Anonymous', 'AccountKey', + /// 'SasUri', 'ServicePrincipal', 'Msi' + /// Container uri of the Azure Blob Storage + /// resource only support for anonymous access. Type: string (or + /// Expression with resultType string). + public AzureBlobStorageLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object connectionString = default(object), AzureKeyVaultSecretReference accountKey = default(AzureKeyVaultSecretReference), object sasUri = default(object), AzureKeyVaultSecretReference sasToken = default(AzureKeyVaultSecretReference), object serviceEndpoint = default(object), object servicePrincipalId = default(object), SecretBase servicePrincipalKey = default(SecretBase), object tenant = default(object), object azureCloudType = default(object), object accountKind = default(object), string encryptedCredential = default(string), CredentialReference credential = default(CredentialReference), string authenticationType = default(string), object containerUri = default(object)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionString = connectionString; + AccountKey = accountKey; + SasUri = sasUri; + SasToken = sasToken; + ServiceEndpoint = serviceEndpoint; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + AzureCloudType = azureCloudType; + AccountKind = accountKind; + EncryptedCredential = encryptedCredential; + Credential = credential; + AuthenticationType = authenticationType; + ContainerUri = containerUri; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the connection string. It is mutually exclusive with + /// sasUri, serviceEndpoint property. Type: string, SecureString or + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of accountKey in + /// connection string. + /// + [JsonProperty(PropertyName = "typeProperties.accountKey")] + public AzureKeyVaultSecretReference AccountKey { get; set; } + + /// + /// Gets or sets SAS URI of the Azure Blob Storage resource. It is + /// mutually exclusive with connectionString, serviceEndpoint property. + /// Type: string, SecureString or AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.sasUri")] + public object SasUri { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of sasToken in + /// sas uri. + /// + [JsonProperty(PropertyName = "typeProperties.sasToken")] + public AzureKeyVaultSecretReference SasToken { get; set; } + + /// + /// Gets or sets blob service endpoint of the Azure Blob Storage + /// resource. It is mutually exclusive with connectionString, sasUri + /// property. + /// + [JsonProperty(PropertyName = "typeProperties.serviceEndpoint")] + public object ServiceEndpoint { get; set; } + + /// + /// Gets or sets the ID of the service principal used to authenticate + /// against Azure SQL Data Warehouse. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalId")] + public object ServicePrincipalId { get; set; } + + /// + /// Gets or sets the key of the service principal used to authenticate + /// against Azure SQL Data Warehouse. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalKey")] + public SecretBase ServicePrincipalKey { get; set; } + + /// + /// Gets or sets the name or ID of the tenant to which the service + /// principal belongs. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.tenant")] + public object Tenant { get; set; } + + /// + /// Gets or sets indicates the azure cloud type of the service + /// principle auth. Allowed values are AzurePublic, AzureChina, + /// AzureUsGovernment, AzureGermany. Default value is the data factory + /// regions’ cloud type. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.azureCloudType")] + public object AzureCloudType { get; set; } + + /// + /// Gets or sets specify the kind of your storage account. Allowed + /// values are: Storage (general purpose v1), StorageV2 (general + /// purpose v2), BlobStorage, or BlockBlobStorage. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.accountKind")] + public object AccountKind { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets the credential reference containing authentication + /// information. + /// + [JsonProperty(PropertyName = "typeProperties.credential")] + public CredentialReference Credential { get; set; } + + /// + /// Gets or sets the type used for authentication. Type: string. + /// Possible values include: 'Anonymous', 'AccountKey', 'SasUri', + /// 'ServicePrincipal', 'Msi' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets container uri of the Azure Blob Storage resource only + /// support for anonymous access. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.containerUri")] + public object ContainerUri { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (AccountKey != null) + { + AccountKey.Validate(); + } + if (SasToken != null) + { + SasToken.Validate(); + } + if (Credential != null) + { + Credential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobStorageLocation.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobStorageLocation.cs new file mode 100644 index 000000000000..8bf2f735bcae --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobStorageLocation.cs @@ -0,0 +1,62 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The location of azure blob dataset. + /// + public partial class AzureBlobStorageLocation : DatasetLocation + { + /// + /// Initializes a new instance of the AzureBlobStorageLocation class. + /// + public AzureBlobStorageLocation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureBlobStorageLocation class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Specify the folder path of dataset. Type: + /// string (or Expression with resultType string) + /// Specify the file name of dataset. Type: + /// string (or Expression with resultType string). + /// Specify the container of azure blob. Type: + /// string (or Expression with resultType string). + public AzureBlobStorageLocation(IDictionary additionalProperties = default(IDictionary), object folderPath = default(object), object fileName = default(object), object container = default(object)) + : base(additionalProperties, folderPath, fileName) + { + Container = container; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specify the container of azure blob. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "container")] + public object Container { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobStorageReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobStorageReadSettings.cs new file mode 100644 index 000000000000..40c252194cc3 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobStorageReadSettings.cs @@ -0,0 +1,168 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure blob read settings. + /// + public partial class AzureBlobStorageReadSettings : StoreReadSettings + { + /// + /// Initializes a new instance of the AzureBlobStorageReadSettings + /// class. + /// + public AzureBlobStorageReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureBlobStorageReadSettings + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// If true, files under the folder path will + /// be read recursively. Default is true. Type: boolean (or Expression + /// with resultType boolean). + /// Azure blob wildcardFolderPath. + /// Type: string (or Expression with resultType string). + /// Azure blob wildcardFileName. Type: + /// string (or Expression with resultType string). + /// The prefix filter for the Azure Blob name. + /// Type: string (or Expression with resultType string). + /// Point to a text file that lists each + /// file (relative path to the path configured in the dataset) that you + /// want to copy. Type: string (or Expression with resultType + /// string). + /// Indicates whether to enable + /// partition discovery. Type: boolean (or Expression with resultType + /// boolean). + /// Specify the root path where + /// partition discovery starts from. Type: string (or Expression with + /// resultType string). + /// Indicates whether the + /// source files need to be deleted after copy completion. Default is + /// false. Type: boolean (or Expression with resultType + /// boolean). + /// The start of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + /// The end of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + public AzureBlobStorageReadSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object recursive = default(object), object wildcardFolderPath = default(object), object wildcardFileName = default(object), object prefix = default(object), object fileListPath = default(object), object enablePartitionDiscovery = default(object), object partitionRootPath = default(object), object deleteFilesAfterCompletion = default(object), object modifiedDatetimeStart = default(object), object modifiedDatetimeEnd = default(object)) + : base(additionalProperties, maxConcurrentConnections, disableMetricsCollection) + { + Recursive = recursive; + WildcardFolderPath = wildcardFolderPath; + WildcardFileName = wildcardFileName; + Prefix = prefix; + FileListPath = fileListPath; + EnablePartitionDiscovery = enablePartitionDiscovery; + PartitionRootPath = partitionRootPath; + DeleteFilesAfterCompletion = deleteFilesAfterCompletion; + ModifiedDatetimeStart = modifiedDatetimeStart; + ModifiedDatetimeEnd = modifiedDatetimeEnd; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets if true, files under the folder path will be read + /// recursively. Default is true. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "recursive")] + public object Recursive { get; set; } + + /// + /// Gets or sets azure blob wildcardFolderPath. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFolderPath")] + public object WildcardFolderPath { get; set; } + + /// + /// Gets or sets azure blob wildcardFileName. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFileName")] + public object WildcardFileName { get; set; } + + /// + /// Gets or sets the prefix filter for the Azure Blob name. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "prefix")] + public object Prefix { get; set; } + + /// + /// Gets or sets point to a text file that lists each file (relative + /// path to the path configured in the dataset) that you want to copy. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "fileListPath")] + public object FileListPath { get; set; } + + /// + /// Gets or sets indicates whether to enable partition discovery. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "enablePartitionDiscovery")] + public object EnablePartitionDiscovery { get; set; } + + /// + /// Gets or sets specify the root path where partition discovery starts + /// from. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionRootPath")] + public object PartitionRootPath { get; set; } + + /// + /// Gets or sets indicates whether the source files need to be deleted + /// after copy completion. Default is false. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "deleteFilesAfterCompletion")] + public object DeleteFilesAfterCompletion { get; set; } + + /// + /// Gets or sets the start of file's modified datetime. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "modifiedDatetimeStart")] + public object ModifiedDatetimeStart { get; set; } + + /// + /// Gets or sets the end of file's modified datetime. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "modifiedDatetimeEnd")] + public object ModifiedDatetimeEnd { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobStorageWriteSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobStorageWriteSettings.cs new file mode 100644 index 000000000000..2fff5bf6af5b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureBlobStorageWriteSettings.cs @@ -0,0 +1,72 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure blob write settings. + /// + public partial class AzureBlobStorageWriteSettings : StoreWriteSettings + { + /// + /// Initializes a new instance of the AzureBlobStorageWriteSettings + /// class. + /// + public AzureBlobStorageWriteSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureBlobStorageWriteSettings + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The type of copy behavior for copy + /// sink. + /// Specify the custom metadata to be added to + /// sink data. Type: array of objects (or Expression with resultType + /// array of objects). + /// Indicates the block size(MB) when + /// writing data to blob. Type: integer (or Expression with resultType + /// integer). + public AzureBlobStorageWriteSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object copyBehavior = default(object), IList metadata = default(IList), object blockSizeInMB = default(object)) + : base(additionalProperties, maxConcurrentConnections, disableMetricsCollection, copyBehavior, metadata) + { + BlockSizeInMB = blockSizeInMB; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets indicates the block size(MB) when writing data to + /// blob. Type: integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "blockSizeInMB")] + public object BlockSizeInMB { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataExplorerCommandActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataExplorerCommandActivity.cs new file mode 100644 index 000000000000..fb42d131400d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataExplorerCommandActivity.cs @@ -0,0 +1,106 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure Data Explorer command activity. + /// + [Newtonsoft.Json.JsonObject("AzureDataExplorerCommand")] + [Rest.Serialization.JsonTransformation] + public partial class AzureDataExplorerCommandActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the AzureDataExplorerCommandActivity + /// class. + /// + public AzureDataExplorerCommandActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureDataExplorerCommandActivity + /// class. + /// + /// Activity name. + /// A control command, according to the Azure + /// Data Explorer command syntax. Type: string (or Expression with + /// resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// Control command timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9]))..) + public AzureDataExplorerCommandActivity(string name, object command, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), object commandTimeout = default(object)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + Command = command; + CommandTimeout = commandTimeout; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a control command, according to the Azure Data + /// Explorer command syntax. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.command")] + public object Command { get; set; } + + /// + /// Gets or sets control command timeout. Type: string (or Expression + /// with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9]))..) + /// + [JsonProperty(PropertyName = "typeProperties.commandTimeout")] + public object CommandTimeout { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Command == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Command"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataExplorerLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataExplorerLinkedService.cs new file mode 100644 index 000000000000..6cc22db02251 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataExplorerLinkedService.cs @@ -0,0 +1,150 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure Data Explorer (Kusto) linked service. + /// + [Newtonsoft.Json.JsonObject("AzureDataExplorer")] + [Rest.Serialization.JsonTransformation] + public partial class AzureDataExplorerLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AzureDataExplorerLinkedService + /// class. + /// + public AzureDataExplorerLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureDataExplorerLinkedService + /// class. + /// + /// The endpoint of Azure Data Explorer (the + /// engine's endpoint). URL will be in the format + /// https://<clusterName>.<regionName>.kusto.windows.net. + /// Type: string (or Expression with resultType string) + /// Database name for connection. Type: string + /// (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The ID of the service principal + /// used to authenticate against Azure Data Explorer. Type: string (or + /// Expression with resultType string). + /// The key of the service principal + /// used to authenticate against Kusto. + /// The name or ID of the tenant to which the + /// service principal belongs. Type: string (or Expression with + /// resultType string). + /// The credential reference containing + /// authentication information. + public AzureDataExplorerLinkedService(object endpoint, object database, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object servicePrincipalId = default(object), SecretBase servicePrincipalKey = default(SecretBase), object tenant = default(object), CredentialReference credential = default(CredentialReference)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Endpoint = endpoint; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Database = database; + Tenant = tenant; + Credential = credential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the endpoint of Azure Data Explorer (the engine's + /// endpoint). URL will be in the format + /// https://&lt;clusterName&gt;.&lt;regionName&gt;.kusto.windows.net. + /// Type: string (or Expression with resultType string) + /// + [JsonProperty(PropertyName = "typeProperties.endpoint")] + public object Endpoint { get; set; } + + /// + /// Gets or sets the ID of the service principal used to authenticate + /// against Azure Data Explorer. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalId")] + public object ServicePrincipalId { get; set; } + + /// + /// Gets or sets the key of the service principal used to authenticate + /// against Kusto. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalKey")] + public SecretBase ServicePrincipalKey { get; set; } + + /// + /// Gets or sets database name for connection. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.database")] + public object Database { get; set; } + + /// + /// Gets or sets the name or ID of the tenant to which the service + /// principal belongs. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.tenant")] + public object Tenant { get; set; } + + /// + /// Gets or sets the credential reference containing authentication + /// information. + /// + [JsonProperty(PropertyName = "typeProperties.credential")] + public CredentialReference Credential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Endpoint == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Endpoint"); + } + if (Database == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Database"); + } + if (Credential != null) + { + Credential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataExplorerSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataExplorerSink.cs new file mode 100644 index 000000000000..34f9ef97360b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataExplorerSink.cs @@ -0,0 +1,95 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure Data Explorer sink. + /// + public partial class AzureDataExplorerSink : CopySink + { + /// + /// Initializes a new instance of the AzureDataExplorerSink class. + /// + public AzureDataExplorerSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureDataExplorerSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// A name of a pre-created csv + /// mapping that was defined on the target Kusto table. Type: + /// string. + /// An explicit column mapping + /// description provided in a json format. Type: string. + /// If set to true, any aggregation will + /// be skipped. Default is false. Type: boolean. + public AzureDataExplorerSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object ingestionMappingName = default(object), object ingestionMappingAsJson = default(object), object flushImmediately = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + IngestionMappingName = ingestionMappingName; + IngestionMappingAsJson = ingestionMappingAsJson; + FlushImmediately = flushImmediately; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a name of a pre-created csv mapping that was defined + /// on the target Kusto table. Type: string. + /// + [JsonProperty(PropertyName = "ingestionMappingName")] + public object IngestionMappingName { get; set; } + + /// + /// Gets or sets an explicit column mapping description provided in a + /// json format. Type: string. + /// + [JsonProperty(PropertyName = "ingestionMappingAsJson")] + public object IngestionMappingAsJson { get; set; } + + /// + /// Gets or sets if set to true, any aggregation will be skipped. + /// Default is false. Type: boolean. + /// + [JsonProperty(PropertyName = "flushImmediately")] + public object FlushImmediately { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataExplorerSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataExplorerSource.cs new file mode 100644 index 000000000000..61153bb1446d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataExplorerSource.cs @@ -0,0 +1,120 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure Data Explorer (Kusto) source. + /// + public partial class AzureDataExplorerSource : CopySource + { + /// + /// Initializes a new instance of the AzureDataExplorerSource class. + /// + public AzureDataExplorerSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureDataExplorerSource class. + /// + /// Database query. Should be a Kusto Query + /// Language (KQL) query. Type: string (or Expression with resultType + /// string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The name of the Boolean option that + /// controls whether truncation is applied to result-sets that go + /// beyond a certain row-count limit. + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).. + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public AzureDataExplorerSource(object query, IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object noTruncation = default(object), object queryTimeout = default(object), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + Query = query; + NoTruncation = noTruncation; + QueryTimeout = queryTimeout; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets database query. Should be a Kusto Query Language (KQL) + /// query. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets the name of the Boolean option that controls whether + /// truncation is applied to result-sets that go beyond a certain + /// row-count limit. + /// + [JsonProperty(PropertyName = "noTruncation")] + public object NoTruncation { get; set; } + + /// + /// Gets or sets query timeout. Type: string (or Expression with + /// resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).. + /// + [JsonProperty(PropertyName = "queryTimeout")] + public object QueryTimeout { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Query == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Query"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataExplorerTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataExplorerTableDataset.cs new file mode 100644 index 000000000000..e3705bd7b8a6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataExplorerTableDataset.cs @@ -0,0 +1,89 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Azure Data Explorer (Kusto) dataset. + /// + [Newtonsoft.Json.JsonObject("AzureDataExplorerTable")] + [Rest.Serialization.JsonTransformation] + public partial class AzureDataExplorerTableDataset : Dataset + { + /// + /// Initializes a new instance of the AzureDataExplorerTableDataset + /// class. + /// + public AzureDataExplorerTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureDataExplorerTableDataset + /// class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name of the Azure Data Explorer + /// database. Type: string (or Expression with resultType + /// string). + public AzureDataExplorerTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object table = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Table = table; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name of the Azure Data Explorer database. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeAnalyticsLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeAnalyticsLinkedService.cs new file mode 100644 index 000000000000..308a6fcdaf1c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeAnalyticsLinkedService.cs @@ -0,0 +1,169 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure Data Lake Analytics linked service. + /// + [Newtonsoft.Json.JsonObject("AzureDataLakeAnalytics")] + [Rest.Serialization.JsonTransformation] + public partial class AzureDataLakeAnalyticsLinkedService : LinkedService + { + /// + /// Initializes a new instance of the + /// AzureDataLakeAnalyticsLinkedService class. + /// + public AzureDataLakeAnalyticsLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// AzureDataLakeAnalyticsLinkedService class. + /// + /// The Azure Data Lake Analytics account + /// name. Type: string (or Expression with resultType string). + /// The name or ID of the tenant to which the + /// service principal belongs. Type: string (or Expression with + /// resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The ID of the application used to + /// authenticate against the Azure Data Lake Analytics account. Type: + /// string (or Expression with resultType string). + /// The Key of the application used + /// to authenticate against the Azure Data Lake Analytics + /// account. + /// Data Lake Analytics account + /// subscription ID (if different from Data Factory account). Type: + /// string (or Expression with resultType string). + /// Data Lake Analytics account + /// resource group name (if different from Data Factory account). Type: + /// string (or Expression with resultType string). + /// Azure Data Lake Analytics URI + /// Type: string (or Expression with resultType string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public AzureDataLakeAnalyticsLinkedService(object accountName, object tenant, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object servicePrincipalId = default(object), SecretBase servicePrincipalKey = default(SecretBase), object subscriptionId = default(object), object resourceGroupName = default(object), object dataLakeAnalyticsUri = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + AccountName = accountName; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + SubscriptionId = subscriptionId; + ResourceGroupName = resourceGroupName; + DataLakeAnalyticsUri = dataLakeAnalyticsUri; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Azure Data Lake Analytics account name. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.accountName")] + public object AccountName { get; set; } + + /// + /// Gets or sets the ID of the application used to authenticate against + /// the Azure Data Lake Analytics account. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalId")] + public object ServicePrincipalId { get; set; } + + /// + /// Gets or sets the Key of the application used to authenticate + /// against the Azure Data Lake Analytics account. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalKey")] + public SecretBase ServicePrincipalKey { get; set; } + + /// + /// Gets or sets the name or ID of the tenant to which the service + /// principal belongs. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.tenant")] + public object Tenant { get; set; } + + /// + /// Gets or sets data Lake Analytics account subscription ID (if + /// different from Data Factory account). Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.subscriptionId")] + public object SubscriptionId { get; set; } + + /// + /// Gets or sets data Lake Analytics account resource group name (if + /// different from Data Factory account). Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.resourceGroupName")] + public object ResourceGroupName { get; set; } + + /// + /// Gets or sets azure Data Lake Analytics URI Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.dataLakeAnalyticsUri")] + public object DataLakeAnalyticsUri { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (AccountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AccountName"); + } + if (Tenant == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Tenant"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreDataset.cs new file mode 100644 index 000000000000..5e092b9a56ff --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreDataset.cs @@ -0,0 +1,118 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure Data Lake Store dataset. + /// + [Newtonsoft.Json.JsonObject("AzureDataLakeStoreFile")] + [Rest.Serialization.JsonTransformation] + public partial class AzureDataLakeStoreDataset : Dataset + { + /// + /// Initializes a new instance of the AzureDataLakeStoreDataset class. + /// + public AzureDataLakeStoreDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureDataLakeStoreDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// Path to the folder in the Azure Data Lake + /// Store. Type: string (or Expression with resultType string). + /// The name of the file in the Azure Data Lake + /// Store. Type: string (or Expression with resultType string). + /// The format of the Data Lake Store. + /// The data compression method used for the + /// item(s) in the Azure Data Lake Store. + public AzureDataLakeStoreDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object folderPath = default(object), object fileName = default(object), DatasetStorageFormat format = default(DatasetStorageFormat), DatasetCompression compression = default(DatasetCompression)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + FolderPath = folderPath; + FileName = fileName; + Format = format; + Compression = compression; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets path to the folder in the Azure Data Lake Store. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.folderPath")] + public object FolderPath { get; set; } + + /// + /// Gets or sets the name of the file in the Azure Data Lake Store. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.fileName")] + public object FileName { get; set; } + + /// + /// Gets or sets the format of the Data Lake Store. + /// + [JsonProperty(PropertyName = "typeProperties.format")] + public DatasetStorageFormat Format { get; set; } + + /// + /// Gets or sets the data compression method used for the item(s) in + /// the Azure Data Lake Store. + /// + [JsonProperty(PropertyName = "typeProperties.compression")] + public DatasetCompression Compression { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Compression != null) + { + Compression.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreLinkedService.cs new file mode 100644 index 000000000000..743194ff5cfe --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreLinkedService.cs @@ -0,0 +1,194 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure Data Lake Store linked service. + /// + [Newtonsoft.Json.JsonObject("AzureDataLakeStore")] + [Rest.Serialization.JsonTransformation] + public partial class AzureDataLakeStoreLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AzureDataLakeStoreLinkedService + /// class. + /// + public AzureDataLakeStoreLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureDataLakeStoreLinkedService + /// class. + /// + /// Data Lake Store service URI. Type: + /// string (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The ID of the application used to + /// authenticate against the Azure Data Lake Store account. Type: + /// string (or Expression with resultType string). + /// The Key of the application used + /// to authenticate against the Azure Data Lake Store account. + /// The name or ID of the tenant to which the + /// service principal belongs. Type: string (or Expression with + /// resultType string). + /// Indicates the azure cloud type of the + /// service principle auth. Allowed values are AzurePublic, AzureChina, + /// AzureUsGovernment, AzureGermany. Default value is the data factory + /// regions’ cloud type. Type: string (or Expression with resultType + /// string). + /// Data Lake Store account name. Type: + /// string (or Expression with resultType string). + /// Data Lake Store account subscription + /// ID (if different from Data Factory account). Type: string (or + /// Expression with resultType string). + /// Data Lake Store account resource + /// group name (if different from Data Factory account). Type: string + /// (or Expression with resultType string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// The credential reference containing + /// authentication information. + public AzureDataLakeStoreLinkedService(object dataLakeStoreUri, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object servicePrincipalId = default(object), SecretBase servicePrincipalKey = default(SecretBase), object tenant = default(object), object azureCloudType = default(object), object accountName = default(object), object subscriptionId = default(object), object resourceGroupName = default(object), string encryptedCredential = default(string), CredentialReference credential = default(CredentialReference)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + DataLakeStoreUri = dataLakeStoreUri; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + AzureCloudType = azureCloudType; + AccountName = accountName; + SubscriptionId = subscriptionId; + ResourceGroupName = resourceGroupName; + EncryptedCredential = encryptedCredential; + Credential = credential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets data Lake Store service URI. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.dataLakeStoreUri")] + public object DataLakeStoreUri { get; set; } + + /// + /// Gets or sets the ID of the application used to authenticate against + /// the Azure Data Lake Store account. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalId")] + public object ServicePrincipalId { get; set; } + + /// + /// Gets or sets the Key of the application used to authenticate + /// against the Azure Data Lake Store account. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalKey")] + public SecretBase ServicePrincipalKey { get; set; } + + /// + /// Gets or sets the name or ID of the tenant to which the service + /// principal belongs. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.tenant")] + public object Tenant { get; set; } + + /// + /// Gets or sets indicates the azure cloud type of the service + /// principle auth. Allowed values are AzurePublic, AzureChina, + /// AzureUsGovernment, AzureGermany. Default value is the data factory + /// regions’ cloud type. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.azureCloudType")] + public object AzureCloudType { get; set; } + + /// + /// Gets or sets data Lake Store account name. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.accountName")] + public object AccountName { get; set; } + + /// + /// Gets or sets data Lake Store account subscription ID (if different + /// from Data Factory account). Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.subscriptionId")] + public object SubscriptionId { get; set; } + + /// + /// Gets or sets data Lake Store account resource group name (if + /// different from Data Factory account). Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.resourceGroupName")] + public object ResourceGroupName { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets the credential reference containing authentication + /// information. + /// + [JsonProperty(PropertyName = "typeProperties.credential")] + public CredentialReference Credential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (DataLakeStoreUri == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DataLakeStoreUri"); + } + if (Credential != null) + { + Credential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreLocation.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreLocation.cs new file mode 100644 index 000000000000..b0143c284a4a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreLocation.cs @@ -0,0 +1,51 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The location of azure data lake store dataset. + /// + public partial class AzureDataLakeStoreLocation : DatasetLocation + { + /// + /// Initializes a new instance of the AzureDataLakeStoreLocation class. + /// + public AzureDataLakeStoreLocation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureDataLakeStoreLocation class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Specify the folder path of dataset. Type: + /// string (or Expression with resultType string) + /// Specify the file name of dataset. Type: + /// string (or Expression with resultType string). + public AzureDataLakeStoreLocation(IDictionary additionalProperties = default(IDictionary), object folderPath = default(object), object fileName = default(object)) + : base(additionalProperties, folderPath, fileName) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreReadSettings.cs new file mode 100644 index 000000000000..2524ae4b1181 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreReadSettings.cs @@ -0,0 +1,188 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure data lake store read settings. + /// + public partial class AzureDataLakeStoreReadSettings : StoreReadSettings + { + /// + /// Initializes a new instance of the AzureDataLakeStoreReadSettings + /// class. + /// + public AzureDataLakeStoreReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureDataLakeStoreReadSettings + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// If true, files under the folder path will + /// be read recursively. Default is true. Type: boolean (or Expression + /// with resultType boolean). + /// ADLS wildcardFolderPath. Type: + /// string (or Expression with resultType string). + /// ADLS wildcardFileName. Type: string + /// (or Expression with resultType string). + /// Point to a text file that lists each + /// file (relative path to the path configured in the dataset) that you + /// want to copy. Type: string (or Expression with resultType + /// string). + /// Lists files after the value (exclusive) + /// based on file/folder names’ lexicographical order. Applies under + /// the folderPath in data set, and filter files/sub-folders under the + /// folderPath. Type: string (or Expression with resultType + /// string). + /// Lists files before the value (inclusive) + /// based on file/folder names’ lexicographical order. Applies under + /// the folderPath in data set, and filter files/sub-folders under the + /// folderPath. Type: string (or Expression with resultType + /// string). + /// Indicates whether to enable + /// partition discovery. Type: boolean (or Expression with resultType + /// boolean). + /// Specify the root path where + /// partition discovery starts from. Type: string (or Expression with + /// resultType string). + /// Indicates whether the + /// source files need to be deleted after copy completion. Default is + /// false. Type: boolean (or Expression with resultType + /// boolean). + /// The start of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + /// The end of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + public AzureDataLakeStoreReadSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object recursive = default(object), object wildcardFolderPath = default(object), object wildcardFileName = default(object), object fileListPath = default(object), object listAfter = default(object), object listBefore = default(object), object enablePartitionDiscovery = default(object), object partitionRootPath = default(object), object deleteFilesAfterCompletion = default(object), object modifiedDatetimeStart = default(object), object modifiedDatetimeEnd = default(object)) + : base(additionalProperties, maxConcurrentConnections, disableMetricsCollection) + { + Recursive = recursive; + WildcardFolderPath = wildcardFolderPath; + WildcardFileName = wildcardFileName; + FileListPath = fileListPath; + ListAfter = listAfter; + ListBefore = listBefore; + EnablePartitionDiscovery = enablePartitionDiscovery; + PartitionRootPath = partitionRootPath; + DeleteFilesAfterCompletion = deleteFilesAfterCompletion; + ModifiedDatetimeStart = modifiedDatetimeStart; + ModifiedDatetimeEnd = modifiedDatetimeEnd; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets if true, files under the folder path will be read + /// recursively. Default is true. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "recursive")] + public object Recursive { get; set; } + + /// + /// Gets or sets ADLS wildcardFolderPath. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFolderPath")] + public object WildcardFolderPath { get; set; } + + /// + /// Gets or sets ADLS wildcardFileName. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFileName")] + public object WildcardFileName { get; set; } + + /// + /// Gets or sets point to a text file that lists each file (relative + /// path to the path configured in the dataset) that you want to copy. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "fileListPath")] + public object FileListPath { get; set; } + + /// + /// Gets or sets lists files after the value (exclusive) based on + /// file/folder names’ lexicographical order. Applies under the + /// folderPath in data set, and filter files/sub-folders under the + /// folderPath. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "listAfter")] + public object ListAfter { get; set; } + + /// + /// Gets or sets lists files before the value (inclusive) based on + /// file/folder names’ lexicographical order. Applies under the + /// folderPath in data set, and filter files/sub-folders under the + /// folderPath. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "listBefore")] + public object ListBefore { get; set; } + + /// + /// Gets or sets indicates whether to enable partition discovery. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "enablePartitionDiscovery")] + public object EnablePartitionDiscovery { get; set; } + + /// + /// Gets or sets specify the root path where partition discovery starts + /// from. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionRootPath")] + public object PartitionRootPath { get; set; } + + /// + /// Gets or sets indicates whether the source files need to be deleted + /// after copy completion. Default is false. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "deleteFilesAfterCompletion")] + public object DeleteFilesAfterCompletion { get; set; } + + /// + /// Gets or sets the start of file's modified datetime. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "modifiedDatetimeStart")] + public object ModifiedDatetimeStart { get; set; } + + /// + /// Gets or sets the end of file's modified datetime. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "modifiedDatetimeEnd")] + public object ModifiedDatetimeEnd { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreSink.cs new file mode 100644 index 000000000000..3dbb17be83a2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreSink.cs @@ -0,0 +1,83 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure Data Lake Store sink. + /// + public partial class AzureDataLakeStoreSink : CopySink + { + /// + /// Initializes a new instance of the AzureDataLakeStoreSink class. + /// + public AzureDataLakeStoreSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureDataLakeStoreSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The type of copy behavior for copy sink. + /// Type: string (or Expression with resultType string). + /// Single File + /// Parallel. + public AzureDataLakeStoreSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object copyBehavior = default(object), object enableAdlsSingleFileParallel = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + CopyBehavior = copyBehavior; + EnableAdlsSingleFileParallel = enableAdlsSingleFileParallel; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the type of copy behavior for copy sink. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "copyBehavior")] + public object CopyBehavior { get; set; } + + /// + /// Gets or sets single File Parallel. + /// + [JsonProperty(PropertyName = "enableAdlsSingleFileParallel")] + public object EnableAdlsSingleFileParallel { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreSource.cs new file mode 100644 index 000000000000..eaaf03365c24 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreSource.cs @@ -0,0 +1,71 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure Data Lake source. + /// + public partial class AzureDataLakeStoreSource : CopySource + { + /// + /// Initializes a new instance of the AzureDataLakeStoreSource class. + /// + public AzureDataLakeStoreSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureDataLakeStoreSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// If true, files under the folder path will + /// be read recursively. Default is true. Type: boolean (or Expression + /// with resultType boolean). + public AzureDataLakeStoreSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object recursive = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + Recursive = recursive; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets if true, files under the folder path will be read + /// recursively. Default is true. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "recursive")] + public object Recursive { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreWriteSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreWriteSettings.cs new file mode 100644 index 000000000000..0a126318847e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDataLakeStoreWriteSettings.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure data lake store write settings. + /// + public partial class AzureDataLakeStoreWriteSettings : StoreWriteSettings + { + /// + /// Initializes a new instance of the AzureDataLakeStoreWriteSettings + /// class. + /// + public AzureDataLakeStoreWriteSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureDataLakeStoreWriteSettings + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The type of copy behavior for copy + /// sink. + /// Specify the custom metadata to be added to + /// sink data. Type: array of objects (or Expression with resultType + /// array of objects). + /// Specifies the expiry time of the + /// written files. The time is applied to the UTC time zone in the + /// format of "2018-12-01T05:00:00Z". Default value is NULL. Type: + /// string (or Expression with resultType string). + public AzureDataLakeStoreWriteSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object copyBehavior = default(object), IList metadata = default(IList), object expiryDateTime = default(object)) + : base(additionalProperties, maxConcurrentConnections, disableMetricsCollection, copyBehavior, metadata) + { + ExpiryDateTime = expiryDateTime; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies the expiry time of the written files. The + /// time is applied to the UTC time zone in the format of + /// "2018-12-01T05:00:00Z". Default value is NULL. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "expiryDateTime")] + public object ExpiryDateTime { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDatabricksDeltaLakeDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDatabricksDeltaLakeDataset.cs new file mode 100644 index 000000000000..88ce47ca4f48 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDatabricksDeltaLakeDataset.cs @@ -0,0 +1,97 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure Databricks Delta Lake dataset. + /// + [Rest.Serialization.JsonTransformation] + public partial class AzureDatabricksDeltaLakeDataset : Dataset + { + /// + /// Initializes a new instance of the AzureDatabricksDeltaLakeDataset + /// class. + /// + public AzureDatabricksDeltaLakeDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureDatabricksDeltaLakeDataset + /// class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The name of delta table. Type: string (or + /// Expression with resultType string). + /// The database name of delta table. Type: + /// string (or Expression with resultType string). + public AzureDatabricksDeltaLakeDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object table = default(object), object database = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Table = table; + Database = database; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of delta table. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Gets or sets the database name of delta table. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.database")] + public object Database { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDatabricksDeltaLakeExportCommand.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDatabricksDeltaLakeExportCommand.cs new file mode 100644 index 000000000000..2a95efec6934 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDatabricksDeltaLakeExportCommand.cs @@ -0,0 +1,74 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure Databricks Delta Lake export command settings. + /// + public partial class AzureDatabricksDeltaLakeExportCommand : ExportSettings + { + /// + /// Initializes a new instance of the + /// AzureDatabricksDeltaLakeExportCommand class. + /// + public AzureDatabricksDeltaLakeExportCommand() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// AzureDatabricksDeltaLakeExportCommand class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Specify the date format for the csv in + /// Azure Databricks Delta Lake Copy. Type: string (or Expression with + /// resultType string). + /// Specify the timestamp format for the + /// csv in Azure Databricks Delta Lake Copy. Type: string (or + /// Expression with resultType string). + public AzureDatabricksDeltaLakeExportCommand(IDictionary additionalProperties = default(IDictionary), object dateFormat = default(object), object timestampFormat = default(object)) + : base(additionalProperties) + { + DateFormat = dateFormat; + TimestampFormat = timestampFormat; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specify the date format for the csv in Azure + /// Databricks Delta Lake Copy. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "dateFormat")] + public object DateFormat { get; set; } + + /// + /// Gets or sets specify the timestamp format for the csv in Azure + /// Databricks Delta Lake Copy. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "timestampFormat")] + public object TimestampFormat { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDatabricksDeltaLakeImportCommand.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDatabricksDeltaLakeImportCommand.cs new file mode 100644 index 000000000000..79e29fe8232d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDatabricksDeltaLakeImportCommand.cs @@ -0,0 +1,74 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure Databricks Delta Lake import command settings. + /// + public partial class AzureDatabricksDeltaLakeImportCommand : ImportSettings + { + /// + /// Initializes a new instance of the + /// AzureDatabricksDeltaLakeImportCommand class. + /// + public AzureDatabricksDeltaLakeImportCommand() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// AzureDatabricksDeltaLakeImportCommand class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Specify the date format for csv in Azure + /// Databricks Delta Lake Copy. Type: string (or Expression with + /// resultType string). + /// Specify the timestamp format for csv + /// in Azure Databricks Delta Lake Copy. Type: string (or Expression + /// with resultType string). + public AzureDatabricksDeltaLakeImportCommand(IDictionary additionalProperties = default(IDictionary), object dateFormat = default(object), object timestampFormat = default(object)) + : base(additionalProperties) + { + DateFormat = dateFormat; + TimestampFormat = timestampFormat; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specify the date format for csv in Azure Databricks + /// Delta Lake Copy. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "dateFormat")] + public object DateFormat { get; set; } + + /// + /// Gets or sets specify the timestamp format for csv in Azure + /// Databricks Delta Lake Copy. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "timestampFormat")] + public object TimestampFormat { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDatabricksDeltaLakeLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDatabricksDeltaLakeLinkedService.cs new file mode 100644 index 000000000000..7e4018dbfe41 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDatabricksDeltaLakeLinkedService.cs @@ -0,0 +1,148 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure Databricks Delta Lake linked service. + /// + [Newtonsoft.Json.JsonObject("AzureDatabricksDeltaLake")] + [Rest.Serialization.JsonTransformation] + public partial class AzureDatabricksDeltaLakeLinkedService : LinkedService + { + /// + /// Initializes a new instance of the + /// AzureDatabricksDeltaLakeLinkedService class. + /// + public AzureDatabricksDeltaLakeLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// AzureDatabricksDeltaLakeLinkedService class. + /// + /// <REGION>.azuredatabricks.net, domain + /// name of your Databricks deployment. Type: string (or Expression + /// with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Access token for databricks REST API. + /// Refer to + /// https://docs.azuredatabricks.net/api/latest/authentication.html. + /// Type: string, SecureString or AzureKeyVaultSecretReference. + /// The id of an existing interactive cluster + /// that will be used for all runs of this job. Type: string (or + /// Expression with resultType string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// The credential reference containing + /// authentication information. + /// Workspace resource id for + /// databricks REST API. Type: string (or Expression with resultType + /// string). + public AzureDatabricksDeltaLakeLinkedService(object domain, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), SecretBase accessToken = default(SecretBase), object clusterId = default(object), string encryptedCredential = default(string), CredentialReference credential = default(CredentialReference), object workspaceResourceId = default(object)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Domain = domain; + AccessToken = accessToken; + ClusterId = clusterId; + EncryptedCredential = encryptedCredential; + Credential = credential; + WorkspaceResourceId = workspaceResourceId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets &lt;REGION&gt;.azuredatabricks.net, domain + /// name of your Databricks deployment. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.domain")] + public object Domain { get; set; } + + /// + /// Gets or sets access token for databricks REST API. Refer to + /// https://docs.azuredatabricks.net/api/latest/authentication.html. + /// Type: string, SecureString or AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.accessToken")] + public SecretBase AccessToken { get; set; } + + /// + /// Gets or sets the id of an existing interactive cluster that will be + /// used for all runs of this job. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.clusterId")] + public object ClusterId { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets the credential reference containing authentication + /// information. + /// + [JsonProperty(PropertyName = "typeProperties.credential")] + public CredentialReference Credential { get; set; } + + /// + /// Gets or sets workspace resource id for databricks REST API. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.workspaceResourceId")] + public object WorkspaceResourceId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Domain == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Domain"); + } + if (Credential != null) + { + Credential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDatabricksDeltaLakeSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDatabricksDeltaLakeSink.cs new file mode 100644 index 000000000000..a7918ed8f104 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDatabricksDeltaLakeSink.cs @@ -0,0 +1,85 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure Databricks Delta Lake sink. + /// + public partial class AzureDatabricksDeltaLakeSink : CopySink + { + /// + /// Initializes a new instance of the AzureDatabricksDeltaLakeSink + /// class. + /// + public AzureDatabricksDeltaLakeSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureDatabricksDeltaLakeSink + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// SQL pre-copy script. Type: string (or + /// Expression with resultType string). + /// Azure Databricks Delta Lake import + /// settings. + public AzureDatabricksDeltaLakeSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object preCopyScript = default(object), AzureDatabricksDeltaLakeImportCommand importSettings = default(AzureDatabricksDeltaLakeImportCommand)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + PreCopyScript = preCopyScript; + ImportSettings = importSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SQL pre-copy script. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "preCopyScript")] + public object PreCopyScript { get; set; } + + /// + /// Gets or sets azure Databricks Delta Lake import settings. + /// + [JsonProperty(PropertyName = "importSettings")] + public AzureDatabricksDeltaLakeImportCommand ImportSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDatabricksDeltaLakeSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDatabricksDeltaLakeSource.cs new file mode 100644 index 000000000000..e51bdc2bbc7d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDatabricksDeltaLakeSource.cs @@ -0,0 +1,80 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure Databricks Delta Lake source. + /// + public partial class AzureDatabricksDeltaLakeSource : CopySource + { + /// + /// Initializes a new instance of the AzureDatabricksDeltaLakeSource + /// class. + /// + public AzureDatabricksDeltaLakeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureDatabricksDeltaLakeSource + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Azure Databricks Delta Lake Sql query. Type: + /// string (or Expression with resultType string). + /// Azure Databricks Delta Lake export + /// settings. + public AzureDatabricksDeltaLakeSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object query = default(object), AzureDatabricksDeltaLakeExportCommand exportSettings = default(AzureDatabricksDeltaLakeExportCommand)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + Query = query; + ExportSettings = exportSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets azure Databricks Delta Lake Sql query. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets azure Databricks Delta Lake export settings. + /// + [JsonProperty(PropertyName = "exportSettings")] + public AzureDatabricksDeltaLakeExportCommand ExportSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDatabricksLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDatabricksLinkedService.cs new file mode 100644 index 000000000000..eb98c9e8ed20 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureDatabricksLinkedService.cs @@ -0,0 +1,321 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure Databricks linked service. + /// + [Newtonsoft.Json.JsonObject("AzureDatabricks")] + [Rest.Serialization.JsonTransformation] + public partial class AzureDatabricksLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AzureDatabricksLinkedService + /// class. + /// + public AzureDatabricksLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureDatabricksLinkedService + /// class. + /// + /// <REGION>.azuredatabricks.net, domain + /// name of your Databricks deployment. Type: string (or Expression + /// with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Access token for databricks REST API. + /// Refer to + /// https://docs.azuredatabricks.net/api/latest/authentication.html. + /// Type: string (or Expression with resultType string). + /// Required to specify MSI, if using + /// Workspace resource id for databricks REST API. Type: string (or + /// Expression with resultType string). + /// Workspace resource id for + /// databricks REST API. Type: string (or Expression with resultType + /// string). + /// The id of an existing interactive + /// cluster that will be used for all runs of this activity. Type: + /// string (or Expression with resultType string). + /// The id of an existing instance pool + /// that will be used for all runs of this activity. Type: string (or + /// Expression with resultType string). + /// If not using an existing + /// interactive cluster, this specifies the Spark version of a new job + /// cluster or instance pool nodes created for each run of this + /// activity. Required if instancePoolId is specified. Type: string (or + /// Expression with resultType string). + /// If not using an existing + /// interactive cluster, this specifies the number of worker nodes to + /// use for the new job cluster or instance pool. For new job clusters, + /// this a string-formatted Int32, like '1' means numOfWorker is 1 or + /// '1:10' means auto-scale from 1 (min) to 10 (max). For instance + /// pools, this is a string-formatted Int32, and can only specify a + /// fixed number of worker nodes, such as '2'. Required if + /// newClusterVersion is specified. Type: string (or Expression with + /// resultType string). + /// The node type of the new job + /// cluster. This property is required if newClusterVersion is + /// specified and instancePoolId is not specified. If instancePoolId is + /// specified, this property is ignored. Type: string (or Expression + /// with resultType string). + /// A set of optional, user-specified + /// Spark configuration key-value pairs. + /// A set of optional, + /// user-specified Spark environment variables key-value pairs. + /// Additional tags for cluster + /// resources. This property is ignored in instance pool + /// configurations. + /// Specify a location to + /// deliver Spark driver, worker, and event logs. Type: string (or + /// Expression with resultType string). + /// The driver node type for the + /// new job cluster. This property is ignored in instance pool + /// configurations. Type: string (or Expression with resultType + /// string). + /// User-defined initialization + /// scripts for the new cluster. Type: array of strings (or Expression + /// with resultType array of strings). + /// Enable the elastic disk + /// on the new cluster. This property is now ignored, and takes the + /// default elastic disk behavior in Databricks (elastic disks are + /// always enabled). Type: boolean (or Expression with resultType + /// boolean). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// The policy id for limiting the ability to + /// configure clusters based on a user defined set of rules. Type: + /// string (or Expression with resultType string). + /// The credential reference containing + /// authentication information. + public AzureDatabricksLinkedService(object domain, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), SecretBase accessToken = default(SecretBase), object authentication = default(object), object workspaceResourceId = default(object), object existingClusterId = default(object), object instancePoolId = default(object), object newClusterVersion = default(object), object newClusterNumOfWorker = default(object), object newClusterNodeType = default(object), IDictionary newClusterSparkConf = default(IDictionary), IDictionary newClusterSparkEnvVars = default(IDictionary), IDictionary newClusterCustomTags = default(IDictionary), object newClusterLogDestination = default(object), object newClusterDriverNodeType = default(object), object newClusterInitScripts = default(object), object newClusterEnableElasticDisk = default(object), string encryptedCredential = default(string), object policyId = default(object), CredentialReference credential = default(CredentialReference)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Domain = domain; + AccessToken = accessToken; + Authentication = authentication; + WorkspaceResourceId = workspaceResourceId; + ExistingClusterId = existingClusterId; + InstancePoolId = instancePoolId; + NewClusterVersion = newClusterVersion; + NewClusterNumOfWorker = newClusterNumOfWorker; + NewClusterNodeType = newClusterNodeType; + NewClusterSparkConf = newClusterSparkConf; + NewClusterSparkEnvVars = newClusterSparkEnvVars; + NewClusterCustomTags = newClusterCustomTags; + NewClusterLogDestination = newClusterLogDestination; + NewClusterDriverNodeType = newClusterDriverNodeType; + NewClusterInitScripts = newClusterInitScripts; + NewClusterEnableElasticDisk = newClusterEnableElasticDisk; + EncryptedCredential = encryptedCredential; + PolicyId = policyId; + Credential = credential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets &lt;REGION&gt;.azuredatabricks.net, domain + /// name of your Databricks deployment. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.domain")] + public object Domain { get; set; } + + /// + /// Gets or sets access token for databricks REST API. Refer to + /// https://docs.azuredatabricks.net/api/latest/authentication.html. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.accessToken")] + public SecretBase AccessToken { get; set; } + + /// + /// Gets or sets required to specify MSI, if using Workspace resource + /// id for databricks REST API. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.authentication")] + public object Authentication { get; set; } + + /// + /// Gets or sets workspace resource id for databricks REST API. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.workspaceResourceId")] + public object WorkspaceResourceId { get; set; } + + /// + /// Gets or sets the id of an existing interactive cluster that will be + /// used for all runs of this activity. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.existingClusterId")] + public object ExistingClusterId { get; set; } + + /// + /// Gets or sets the id of an existing instance pool that will be used + /// for all runs of this activity. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.instancePoolId")] + public object InstancePoolId { get; set; } + + /// + /// Gets or sets if not using an existing interactive cluster, this + /// specifies the Spark version of a new job cluster or instance pool + /// nodes created for each run of this activity. Required if + /// instancePoolId is specified. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.newClusterVersion")] + public object NewClusterVersion { get; set; } + + /// + /// Gets or sets if not using an existing interactive cluster, this + /// specifies the number of worker nodes to use for the new job cluster + /// or instance pool. For new job clusters, this a string-formatted + /// Int32, like '1' means numOfWorker is 1 or '1:10' means auto-scale + /// from 1 (min) to 10 (max). For instance pools, this is a + /// string-formatted Int32, and can only specify a fixed number of + /// worker nodes, such as '2'. Required if newClusterVersion is + /// specified. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.newClusterNumOfWorker")] + public object NewClusterNumOfWorker { get; set; } + + /// + /// Gets or sets the node type of the new job cluster. This property is + /// required if newClusterVersion is specified and instancePoolId is + /// not specified. If instancePoolId is specified, this property is + /// ignored. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.newClusterNodeType")] + public object NewClusterNodeType { get; set; } + + /// + /// Gets or sets a set of optional, user-specified Spark configuration + /// key-value pairs. + /// + [JsonProperty(PropertyName = "typeProperties.newClusterSparkConf")] + public IDictionary NewClusterSparkConf { get; set; } + + /// + /// Gets or sets a set of optional, user-specified Spark environment + /// variables key-value pairs. + /// + [JsonProperty(PropertyName = "typeProperties.newClusterSparkEnvVars")] + public IDictionary NewClusterSparkEnvVars { get; set; } + + /// + /// Gets or sets additional tags for cluster resources. This property + /// is ignored in instance pool configurations. + /// + [JsonProperty(PropertyName = "typeProperties.newClusterCustomTags")] + public IDictionary NewClusterCustomTags { get; set; } + + /// + /// Gets or sets specify a location to deliver Spark driver, worker, + /// and event logs. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.newClusterLogDestination")] + public object NewClusterLogDestination { get; set; } + + /// + /// Gets or sets the driver node type for the new job cluster. This + /// property is ignored in instance pool configurations. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.newClusterDriverNodeType")] + public object NewClusterDriverNodeType { get; set; } + + /// + /// Gets or sets user-defined initialization scripts for the new + /// cluster. Type: array of strings (or Expression with resultType + /// array of strings). + /// + [JsonProperty(PropertyName = "typeProperties.newClusterInitScripts")] + public object NewClusterInitScripts { get; set; } + + /// + /// Gets or sets enable the elastic disk on the new cluster. This + /// property is now ignored, and takes the default elastic disk + /// behavior in Databricks (elastic disks are always enabled). Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.newClusterEnableElasticDisk")] + public object NewClusterEnableElasticDisk { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets the policy id for limiting the ability to configure + /// clusters based on a user defined set of rules. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.policyId")] + public object PolicyId { get; set; } + + /// + /// Gets or sets the credential reference containing authentication + /// information. + /// + [JsonProperty(PropertyName = "typeProperties.credential")] + public CredentialReference Credential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Domain == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Domain"); + } + if (Credential != null) + { + Credential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureFileStorageLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureFileStorageLinkedService.cs new file mode 100644 index 000000000000..ecdcc617aaa8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureFileStorageLinkedService.cs @@ -0,0 +1,210 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure File Storage linked service. + /// + [Newtonsoft.Json.JsonObject("AzureFileStorage")] + [Rest.Serialization.JsonTransformation] + public partial class AzureFileStorageLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AzureFileStorageLinkedService + /// class. + /// + public AzureFileStorageLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureFileStorageLinkedService + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Host name of the server. Type: string (or + /// Expression with resultType string). + /// User ID to logon the server. Type: string (or + /// Expression with resultType string). + /// Password to logon the server. + /// The connection string. It is + /// mutually exclusive with sasUri property. Type: string, SecureString + /// or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of + /// accountKey in connection string. + /// SAS URI of the Azure File resource. It is + /// mutually exclusive with connectionString property. Type: string, + /// SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of + /// sasToken in sas uri. + /// The azure file share name. It is required + /// when auth with accountKey/sasToken. Type: string (or Expression + /// with resultType string). + /// The azure file share snapshot version. Type: + /// string (or Expression with resultType string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// File service endpoint of the Azure + /// File Storage resource. It is mutually exclusive with + /// connectionString, sasUri property. + /// The credential reference containing + /// authentication information. + public AzureFileStorageLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object host = default(object), object userId = default(object), SecretBase password = default(SecretBase), object connectionString = default(object), AzureKeyVaultSecretReference accountKey = default(AzureKeyVaultSecretReference), object sasUri = default(object), AzureKeyVaultSecretReference sasToken = default(AzureKeyVaultSecretReference), object fileShare = default(object), object snapshot = default(object), string encryptedCredential = default(string), object serviceEndpoint = default(object), CredentialReference credential = default(CredentialReference)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Host = host; + UserId = userId; + Password = password; + ConnectionString = connectionString; + AccountKey = accountKey; + SasUri = sasUri; + SasToken = sasToken; + FileShare = fileShare; + Snapshot = snapshot; + EncryptedCredential = encryptedCredential; + ServiceEndpoint = serviceEndpoint; + Credential = credential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets host name of the server. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.host")] + public object Host { get; set; } + + /// + /// Gets or sets user ID to logon the server. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userId")] + public object UserId { get; set; } + + /// + /// Gets or sets password to logon the server. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the connection string. It is mutually exclusive with + /// sasUri property. Type: string, SecureString or + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of accountKey in + /// connection string. + /// + [JsonProperty(PropertyName = "typeProperties.accountKey")] + public AzureKeyVaultSecretReference AccountKey { get; set; } + + /// + /// Gets or sets SAS URI of the Azure File resource. It is mutually + /// exclusive with connectionString property. Type: string, + /// SecureString or AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.sasUri")] + public object SasUri { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of sasToken in + /// sas uri. + /// + [JsonProperty(PropertyName = "typeProperties.sasToken")] + public AzureKeyVaultSecretReference SasToken { get; set; } + + /// + /// Gets or sets the azure file share name. It is required when auth + /// with accountKey/sasToken. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.fileShare")] + public object FileShare { get; set; } + + /// + /// Gets or sets the azure file share snapshot version. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.snapshot")] + public object Snapshot { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets file service endpoint of the Azure File Storage + /// resource. It is mutually exclusive with connectionString, sasUri + /// property. + /// + [JsonProperty(PropertyName = "typeProperties.serviceEndpoint")] + public object ServiceEndpoint { get; set; } + + /// + /// Gets or sets the credential reference containing authentication + /// information. + /// + [JsonProperty(PropertyName = "typeProperties.credential")] + public CredentialReference Credential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (AccountKey != null) + { + AccountKey.Validate(); + } + if (SasToken != null) + { + SasToken.Validate(); + } + if (Credential != null) + { + Credential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureFileStorageLocation.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureFileStorageLocation.cs new file mode 100644 index 000000000000..beac26fc6656 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureFileStorageLocation.cs @@ -0,0 +1,51 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The location of file server dataset. + /// + public partial class AzureFileStorageLocation : DatasetLocation + { + /// + /// Initializes a new instance of the AzureFileStorageLocation class. + /// + public AzureFileStorageLocation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureFileStorageLocation class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Specify the folder path of dataset. Type: + /// string (or Expression with resultType string) + /// Specify the file name of dataset. Type: + /// string (or Expression with resultType string). + public AzureFileStorageLocation(IDictionary additionalProperties = default(IDictionary), object folderPath = default(object), object fileName = default(object)) + : base(additionalProperties, folderPath, fileName) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureFileStorageReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureFileStorageReadSettings.cs new file mode 100644 index 000000000000..f4bcee5cfb97 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureFileStorageReadSettings.cs @@ -0,0 +1,171 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure File Storage read settings. + /// + public partial class AzureFileStorageReadSettings : StoreReadSettings + { + /// + /// Initializes a new instance of the AzureFileStorageReadSettings + /// class. + /// + public AzureFileStorageReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureFileStorageReadSettings + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// If true, files under the folder path will + /// be read recursively. Default is true. Type: boolean (or Expression + /// with resultType boolean). + /// Azure File Storage + /// wildcardFolderPath. Type: string (or Expression with resultType + /// string). + /// Azure File Storage wildcardFileName. + /// Type: string (or Expression with resultType string). + /// The prefix filter for the Azure File name + /// starting from root path. Type: string (or Expression with + /// resultType string). + /// Point to a text file that lists each + /// file (relative path to the path configured in the dataset) that you + /// want to copy. Type: string (or Expression with resultType + /// string). + /// Indicates whether to enable + /// partition discovery. Type: boolean (or Expression with resultType + /// boolean). + /// Specify the root path where + /// partition discovery starts from. Type: string (or Expression with + /// resultType string). + /// Indicates whether the + /// source files need to be deleted after copy completion. Default is + /// false. Type: boolean (or Expression with resultType + /// boolean). + /// The start of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + /// The end of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + public AzureFileStorageReadSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object recursive = default(object), object wildcardFolderPath = default(object), object wildcardFileName = default(object), object prefix = default(object), object fileListPath = default(object), object enablePartitionDiscovery = default(object), object partitionRootPath = default(object), object deleteFilesAfterCompletion = default(object), object modifiedDatetimeStart = default(object), object modifiedDatetimeEnd = default(object)) + : base(additionalProperties, maxConcurrentConnections, disableMetricsCollection) + { + Recursive = recursive; + WildcardFolderPath = wildcardFolderPath; + WildcardFileName = wildcardFileName; + Prefix = prefix; + FileListPath = fileListPath; + EnablePartitionDiscovery = enablePartitionDiscovery; + PartitionRootPath = partitionRootPath; + DeleteFilesAfterCompletion = deleteFilesAfterCompletion; + ModifiedDatetimeStart = modifiedDatetimeStart; + ModifiedDatetimeEnd = modifiedDatetimeEnd; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets if true, files under the folder path will be read + /// recursively. Default is true. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "recursive")] + public object Recursive { get; set; } + + /// + /// Gets or sets azure File Storage wildcardFolderPath. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFolderPath")] + public object WildcardFolderPath { get; set; } + + /// + /// Gets or sets azure File Storage wildcardFileName. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFileName")] + public object WildcardFileName { get; set; } + + /// + /// Gets or sets the prefix filter for the Azure File name starting + /// from root path. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "prefix")] + public object Prefix { get; set; } + + /// + /// Gets or sets point to a text file that lists each file (relative + /// path to the path configured in the dataset) that you want to copy. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "fileListPath")] + public object FileListPath { get; set; } + + /// + /// Gets or sets indicates whether to enable partition discovery. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "enablePartitionDiscovery")] + public object EnablePartitionDiscovery { get; set; } + + /// + /// Gets or sets specify the root path where partition discovery starts + /// from. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionRootPath")] + public object PartitionRootPath { get; set; } + + /// + /// Gets or sets indicates whether the source files need to be deleted + /// after copy completion. Default is false. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "deleteFilesAfterCompletion")] + public object DeleteFilesAfterCompletion { get; set; } + + /// + /// Gets or sets the start of file's modified datetime. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "modifiedDatetimeStart")] + public object ModifiedDatetimeStart { get; set; } + + /// + /// Gets or sets the end of file's modified datetime. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "modifiedDatetimeEnd")] + public object ModifiedDatetimeEnd { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureFileStorageWriteSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureFileStorageWriteSettings.cs new file mode 100644 index 000000000000..65bfcdfeb349 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureFileStorageWriteSettings.cs @@ -0,0 +1,60 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure File Storage write settings. + /// + public partial class AzureFileStorageWriteSettings : StoreWriteSettings + { + /// + /// Initializes a new instance of the AzureFileStorageWriteSettings + /// class. + /// + public AzureFileStorageWriteSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureFileStorageWriteSettings + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The type of copy behavior for copy + /// sink. + /// Specify the custom metadata to be added to + /// sink data. Type: array of objects (or Expression with resultType + /// array of objects). + public AzureFileStorageWriteSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object copyBehavior = default(object), IList metadata = default(IList)) + : base(additionalProperties, maxConcurrentConnections, disableMetricsCollection, copyBehavior, metadata) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureFunctionActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureFunctionActivity.cs new file mode 100644 index 000000000000..9edd41e7f933 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureFunctionActivity.cs @@ -0,0 +1,133 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure Function activity. + /// + [Rest.Serialization.JsonTransformation] + public partial class AzureFunctionActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the AzureFunctionActivity class. + /// + public AzureFunctionActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureFunctionActivity class. + /// + /// Activity name. + /// Rest API method for target endpoint. Possible + /// values include: 'GET', 'POST', 'PUT', 'DELETE', 'OPTIONS', 'HEAD', + /// 'TRACE' + /// Name of the Function that the Azure + /// Function Activity will call. Type: string (or Expression with + /// resultType string) + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// Represents the headers that will be sent to + /// the request. For example, to set the language and type on a + /// request: "headers" : { "Accept-Language": "en-us", "Content-Type": + /// "application/json" }. Type: string (or Expression with resultType + /// string). + /// Represents the payload that will be sent to the + /// endpoint. Required for POST/PUT method, not allowed for GET method + /// Type: string (or Expression with resultType string). + public AzureFunctionActivity(string name, string method, object functionName, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), IDictionary headers = default(IDictionary), object body = default(object)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + Method = method; + FunctionName = functionName; + Headers = headers; + Body = body; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets rest API method for target endpoint. Possible values + /// include: 'GET', 'POST', 'PUT', 'DELETE', 'OPTIONS', 'HEAD', 'TRACE' + /// + [JsonProperty(PropertyName = "typeProperties.method")] + public string Method { get; set; } + + /// + /// Gets or sets name of the Function that the Azure Function Activity + /// will call. Type: string (or Expression with resultType string) + /// + [JsonProperty(PropertyName = "typeProperties.functionName")] + public object FunctionName { get; set; } + + /// + /// Gets or sets represents the headers that will be sent to the + /// request. For example, to set the language and type on a request: + /// "headers" : { "Accept-Language": "en-us", "Content-Type": + /// "application/json" }. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.headers")] + public IDictionary Headers { get; set; } + + /// + /// Gets or sets represents the payload that will be sent to the + /// endpoint. Required for POST/PUT method, not allowed for GET method + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.body")] + public object Body { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Method == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Method"); + } + if (FunctionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "FunctionName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureFunctionActivityMethod.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureFunctionActivityMethod.cs new file mode 100644 index 000000000000..fd10ff2a1fab --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureFunctionActivityMethod.cs @@ -0,0 +1,27 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for AzureFunctionActivityMethod. + /// + public static class AzureFunctionActivityMethod + { + public const string GET = "GET"; + public const string POST = "POST"; + public const string PUT = "PUT"; + public const string DELETE = "DELETE"; + public const string OPTIONS = "OPTIONS"; + public const string HEAD = "HEAD"; + public const string TRACE = "TRACE"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureFunctionLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureFunctionLinkedService.cs new file mode 100644 index 000000000000..6baea3357ff4 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureFunctionLinkedService.cs @@ -0,0 +1,143 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure Function linked service. + /// + [Newtonsoft.Json.JsonObject("AzureFunction")] + [Rest.Serialization.JsonTransformation] + public partial class AzureFunctionLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AzureFunctionLinkedService class. + /// + public AzureFunctionLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureFunctionLinkedService class. + /// + /// The endpoint of the Azure Function + /// App. URL will be in the format + /// https://<accountName>.azurewebsites.net. Type: string (or + /// Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Function or Host key for Azure Function + /// App. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// The credential reference containing + /// authentication information. + /// Allowed token audiences for azure + /// function. Type: string (or Expression with resultType + /// string). + /// Type of authentication (Required to + /// specify MSI) used to connect to AzureFunction. Type: string (or + /// Expression with resultType string). + public AzureFunctionLinkedService(object functionAppUrl, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), SecretBase functionKey = default(SecretBase), string encryptedCredential = default(string), CredentialReference credential = default(CredentialReference), object resourceId = default(object), object authentication = default(object)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + FunctionAppUrl = functionAppUrl; + FunctionKey = functionKey; + EncryptedCredential = encryptedCredential; + Credential = credential; + ResourceId = resourceId; + Authentication = authentication; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the endpoint of the Azure Function App. URL will be in + /// the format https://&lt;accountName&gt;.azurewebsites.net. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.functionAppUrl")] + public object FunctionAppUrl { get; set; } + + /// + /// Gets or sets function or Host key for Azure Function App. + /// + [JsonProperty(PropertyName = "typeProperties.functionKey")] + public SecretBase FunctionKey { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets the credential reference containing authentication + /// information. + /// + [JsonProperty(PropertyName = "typeProperties.credential")] + public CredentialReference Credential { get; set; } + + /// + /// Gets or sets allowed token audiences for azure function. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.resourceId")] + public object ResourceId { get; set; } + + /// + /// Gets or sets type of authentication (Required to specify MSI) used + /// to connect to AzureFunction. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.authentication")] + public object Authentication { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (FunctionAppUrl == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "FunctionAppUrl"); + } + if (Credential != null) + { + Credential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureKeyVaultLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureKeyVaultLinkedService.cs new file mode 100644 index 000000000000..66dc21022bbe --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureKeyVaultLinkedService.cs @@ -0,0 +1,98 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure Key Vault linked service. + /// + [Newtonsoft.Json.JsonObject("AzureKeyVault")] + [Rest.Serialization.JsonTransformation] + public partial class AzureKeyVaultLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AzureKeyVaultLinkedService class. + /// + public AzureKeyVaultLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureKeyVaultLinkedService class. + /// + /// The base URL of the Azure Key Vault. e.g. + /// https://myakv.vault.azure.net Type: string (or Expression with + /// resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The credential reference containing + /// authentication information. + public AzureKeyVaultLinkedService(object baseUrl, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), CredentialReference credential = default(CredentialReference)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + BaseUrl = baseUrl; + Credential = credential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the base URL of the Azure Key Vault. e.g. + /// https://myakv.vault.azure.net Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.baseUrl")] + public object BaseUrl { get; set; } + + /// + /// Gets or sets the credential reference containing authentication + /// information. + /// + [JsonProperty(PropertyName = "typeProperties.credential")] + public CredentialReference Credential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (BaseUrl == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "BaseUrl"); + } + if (Credential != null) + { + Credential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureKeyVaultSecretReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureKeyVaultSecretReference.cs new file mode 100644 index 000000000000..92dd000b13aa --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureKeyVaultSecretReference.cs @@ -0,0 +1,100 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Azure Key Vault secret reference. + /// + [Newtonsoft.Json.JsonObject("AzureKeyVaultSecret")] + public partial class AzureKeyVaultSecretReference : SecretBase + { + /// + /// Initializes a new instance of the AzureKeyVaultSecretReference + /// class. + /// + public AzureKeyVaultSecretReference() + { + Store = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureKeyVaultSecretReference + /// class. + /// + /// The Azure Key Vault linked service + /// reference. + /// The name of the secret in Azure Key Vault. + /// Type: string (or Expression with resultType string). + /// The version of the secret in Azure Key + /// Vault. The default value is the latest version of the secret. Type: + /// string (or Expression with resultType string). + public AzureKeyVaultSecretReference(LinkedServiceReference store, object secretName, object secretVersion = default(object)) + { + Store = store; + SecretName = secretName; + SecretVersion = secretVersion; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Azure Key Vault linked service reference. + /// + [JsonProperty(PropertyName = "store")] + public LinkedServiceReference Store { get; set; } + + /// + /// Gets or sets the name of the secret in Azure Key Vault. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "secretName")] + public object SecretName { get; set; } + + /// + /// Gets or sets the version of the secret in Azure Key Vault. The + /// default value is the latest version of the secret. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "secretVersion")] + public object SecretVersion { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Store == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Store"); + } + if (SecretName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SecretName"); + } + if (Store != null) + { + Store.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMLBatchExecutionActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMLBatchExecutionActivity.cs new file mode 100644 index 000000000000..56e4d67914c4 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMLBatchExecutionActivity.cs @@ -0,0 +1,146 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure ML Batch Execution activity. + /// + [Newtonsoft.Json.JsonObject("AzureMLBatchExecution")] + [Rest.Serialization.JsonTransformation] + public partial class AzureMLBatchExecutionActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the AzureMLBatchExecutionActivity + /// class. + /// + public AzureMLBatchExecutionActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureMLBatchExecutionActivity + /// class. + /// + /// Activity name. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// Key,Value pairs to be passed to the + /// Azure ML Batch Execution Service endpoint. Keys must match the + /// names of web service parameters defined in the published Azure ML + /// web service. Values will be passed in the GlobalParameters property + /// of the Azure ML batch execution request. + /// Key,Value pairs, mapping the names + /// of Azure ML endpoint's Web Service Outputs to AzureMLWebServiceFile + /// objects specifying the output Blob locations. This information will + /// be passed in the WebServiceOutputs property of the Azure ML batch + /// execution request. + /// Key,Value pairs, mapping the names + /// of Azure ML endpoint's Web Service Inputs to AzureMLWebServiceFile + /// objects specifying the input Blob locations.. This information will + /// be passed in the WebServiceInputs property of the Azure ML batch + /// execution request. + public AzureMLBatchExecutionActivity(string name, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), IDictionary globalParameters = default(IDictionary), IDictionary webServiceOutputs = default(IDictionary), IDictionary webServiceInputs = default(IDictionary)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + GlobalParameters = globalParameters; + WebServiceOutputs = webServiceOutputs; + WebServiceInputs = webServiceInputs; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets key,Value pairs to be passed to the Azure ML Batch + /// Execution Service endpoint. Keys must match the names of web + /// service parameters defined in the published Azure ML web service. + /// Values will be passed in the GlobalParameters property of the Azure + /// ML batch execution request. + /// + [JsonProperty(PropertyName = "typeProperties.globalParameters")] + public IDictionary GlobalParameters { get; set; } + + /// + /// Gets or sets key,Value pairs, mapping the names of Azure ML + /// endpoint's Web Service Outputs to AzureMLWebServiceFile objects + /// specifying the output Blob locations. This information will be + /// passed in the WebServiceOutputs property of the Azure ML batch + /// execution request. + /// + [JsonProperty(PropertyName = "typeProperties.webServiceOutputs")] + public IDictionary WebServiceOutputs { get; set; } + + /// + /// Gets or sets key,Value pairs, mapping the names of Azure ML + /// endpoint's Web Service Inputs to AzureMLWebServiceFile objects + /// specifying the input Blob locations.. This information will be + /// passed in the WebServiceInputs property of the Azure ML batch + /// execution request. + /// + [JsonProperty(PropertyName = "typeProperties.webServiceInputs")] + public IDictionary WebServiceInputs { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (WebServiceOutputs != null) + { + foreach (var valueElement in WebServiceOutputs.Values) + { + if (valueElement != null) + { + valueElement.Validate(); + } + } + } + if (WebServiceInputs != null) + { + foreach (var valueElement1 in WebServiceInputs.Values) + { + if (valueElement1 != null) + { + valueElement1.Validate(); + } + } + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMLExecutePipelineActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMLExecutePipelineActivity.cs new file mode 100644 index 000000000000..6465999b9f5c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMLExecutePipelineActivity.cs @@ -0,0 +1,186 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure ML Execute Pipeline activity. + /// + [Newtonsoft.Json.JsonObject("AzureMLExecutePipeline")] + [Rest.Serialization.JsonTransformation] + public partial class AzureMLExecutePipelineActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the AzureMLExecutePipelineActivity + /// class. + /// + public AzureMLExecutePipelineActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureMLExecutePipelineActivity + /// class. + /// + /// Activity name. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// ID of the published Azure ML pipeline. + /// Type: string (or Expression with resultType string). + /// ID of the published Azure ML + /// pipeline endpoint. Type: string (or Expression with resultType + /// string). + /// Version of the published Azure ML pipeline + /// endpoint. Type: string (or Expression with resultType + /// string). + /// Run history experiment name of the + /// pipeline run. This information will be passed in the ExperimentName + /// property of the published pipeline execution request. Type: string + /// (or Expression with resultType string). + /// Key,Value pairs to be passed to + /// the published Azure ML pipeline endpoint. Keys must match the names + /// of pipeline parameters defined in the published pipeline. Values + /// will be passed in the ParameterAssignments property of the + /// published pipeline execution request. Type: object with key value + /// pairs (or Expression with resultType object). + /// Dictionary used for changing data + /// path assignments without retraining. Values will be passed in the + /// dataPathAssignments property of the published pipeline execution + /// request. Type: object (or Expression with resultType + /// object). + /// The parent Azure ML Service pipeline + /// run id. This information will be passed in the ParentRunId property + /// of the published pipeline execution request. Type: string (or + /// Expression with resultType string). + /// Whether to continue execution + /// of other steps in the PipelineRun if a step fails. This information + /// will be passed in the continueOnStepFailure property of the + /// published pipeline execution request. Type: boolean (or Expression + /// with resultType boolean). + public AzureMLExecutePipelineActivity(string name, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), object mlPipelineId = default(object), object mlPipelineEndpointId = default(object), object version = default(object), object experimentName = default(object), object mlPipelineParameters = default(object), object dataPathAssignments = default(object), object mlParentRunId = default(object), object continueOnStepFailure = default(object)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + MlPipelineId = mlPipelineId; + MlPipelineEndpointId = mlPipelineEndpointId; + Version = version; + ExperimentName = experimentName; + MlPipelineParameters = mlPipelineParameters; + DataPathAssignments = dataPathAssignments; + MlParentRunId = mlParentRunId; + ContinueOnStepFailure = continueOnStepFailure; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets ID of the published Azure ML pipeline. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.mlPipelineId")] + public object MlPipelineId { get; set; } + + /// + /// Gets or sets ID of the published Azure ML pipeline endpoint. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.mlPipelineEndpointId")] + public object MlPipelineEndpointId { get; set; } + + /// + /// Gets or sets version of the published Azure ML pipeline endpoint. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.version")] + public object Version { get; set; } + + /// + /// Gets or sets run history experiment name of the pipeline run. This + /// information will be passed in the ExperimentName property of the + /// published pipeline execution request. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.experimentName")] + public object ExperimentName { get; set; } + + /// + /// Gets or sets key,Value pairs to be passed to the published Azure ML + /// pipeline endpoint. Keys must match the names of pipeline parameters + /// defined in the published pipeline. Values will be passed in the + /// ParameterAssignments property of the published pipeline execution + /// request. Type: object with key value pairs (or Expression with + /// resultType object). + /// + [JsonProperty(PropertyName = "typeProperties.mlPipelineParameters")] + public object MlPipelineParameters { get; set; } + + /// + /// Gets or sets dictionary used for changing data path assignments + /// without retraining. Values will be passed in the + /// dataPathAssignments property of the published pipeline execution + /// request. Type: object (or Expression with resultType object). + /// + [JsonProperty(PropertyName = "typeProperties.dataPathAssignments")] + public object DataPathAssignments { get; set; } + + /// + /// Gets or sets the parent Azure ML Service pipeline run id. This + /// information will be passed in the ParentRunId property of the + /// published pipeline execution request. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.mlParentRunId")] + public object MlParentRunId { get; set; } + + /// + /// Gets or sets whether to continue execution of other steps in the + /// PipelineRun if a step fails. This information will be passed in the + /// continueOnStepFailure property of the published pipeline execution + /// request. Type: boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.continueOnStepFailure")] + public object ContinueOnStepFailure { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMLLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMLLinkedService.cs new file mode 100644 index 000000000000..9a0fb2456024 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMLLinkedService.cs @@ -0,0 +1,170 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure ML Studio Web Service linked service. + /// + [Newtonsoft.Json.JsonObject("AzureML")] + [Rest.Serialization.JsonTransformation] + public partial class AzureMLLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AzureMLLinkedService class. + /// + public AzureMLLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureMLLinkedService class. + /// + /// The Batch Execution REST URL for an Azure + /// ML Studio Web Service endpoint. Type: string (or Expression with + /// resultType string). + /// The API key for accessing the Azure ML model + /// endpoint. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The Update Resource REST URL + /// for an Azure ML Studio Web Service endpoint. Type: string (or + /// Expression with resultType string). + /// The ID of the service principal + /// used to authenticate against the ARM-based updateResourceEndpoint + /// of an Azure ML Studio web service. Type: string (or Expression with + /// resultType string). + /// The key of the service principal + /// used to authenticate against the ARM-based updateResourceEndpoint + /// of an Azure ML Studio web service. + /// The name or ID of the tenant to which the + /// service principal belongs. Type: string (or Expression with + /// resultType string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// Type of authentication (Required to + /// specify MSI) used to connect to AzureML. Type: string (or + /// Expression with resultType string). + public AzureMLLinkedService(object mlEndpoint, SecretBase apiKey, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object updateResourceEndpoint = default(object), object servicePrincipalId = default(object), SecretBase servicePrincipalKey = default(SecretBase), object tenant = default(object), string encryptedCredential = default(string), object authentication = default(object)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + MlEndpoint = mlEndpoint; + ApiKey = apiKey; + UpdateResourceEndpoint = updateResourceEndpoint; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + EncryptedCredential = encryptedCredential; + Authentication = authentication; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Batch Execution REST URL for an Azure ML Studio + /// Web Service endpoint. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.mlEndpoint")] + public object MlEndpoint { get; set; } + + /// + /// Gets or sets the API key for accessing the Azure ML model endpoint. + /// + [JsonProperty(PropertyName = "typeProperties.apiKey")] + public SecretBase ApiKey { get; set; } + + /// + /// Gets or sets the Update Resource REST URL for an Azure ML Studio + /// Web Service endpoint. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.updateResourceEndpoint")] + public object UpdateResourceEndpoint { get; set; } + + /// + /// Gets or sets the ID of the service principal used to authenticate + /// against the ARM-based updateResourceEndpoint of an Azure ML Studio + /// web service. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalId")] + public object ServicePrincipalId { get; set; } + + /// + /// Gets or sets the key of the service principal used to authenticate + /// against the ARM-based updateResourceEndpoint of an Azure ML Studio + /// web service. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalKey")] + public SecretBase ServicePrincipalKey { get; set; } + + /// + /// Gets or sets the name or ID of the tenant to which the service + /// principal belongs. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.tenant")] + public object Tenant { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets type of authentication (Required to specify MSI) used + /// to connect to AzureML. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.authentication")] + public object Authentication { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (MlEndpoint == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MlEndpoint"); + } + if (ApiKey == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ApiKey"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMLServiceLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMLServiceLinkedService.cs new file mode 100644 index 000000000000..a864eb80a33a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMLServiceLinkedService.cs @@ -0,0 +1,174 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure ML Service linked service. + /// + [Newtonsoft.Json.JsonObject("AzureMLService")] + [Rest.Serialization.JsonTransformation] + public partial class AzureMLServiceLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AzureMLServiceLinkedService + /// class. + /// + public AzureMLServiceLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureMLServiceLinkedService + /// class. + /// + /// Azure ML Service workspace + /// subscription ID. Type: string (or Expression with resultType + /// string). + /// Azure ML Service workspace resource + /// group name. Type: string (or Expression with resultType + /// string). + /// Azure ML Service workspace name. + /// Type: string (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Type of authentication (Required to + /// specify MSI) used to connect to AzureML. Type: string (or + /// Expression with resultType string). + /// The ID of the service principal + /// used to authenticate against the endpoint of a published Azure ML + /// Service pipeline. Type: string (or Expression with resultType + /// string). + /// The key of the service principal + /// used to authenticate against the endpoint of a published Azure ML + /// Service pipeline. + /// The name or ID of the tenant to which the + /// service principal belongs. Type: string (or Expression with + /// resultType string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public AzureMLServiceLinkedService(object subscriptionId, object resourceGroupName, object mlWorkspaceName, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object authentication = default(object), object servicePrincipalId = default(object), SecretBase servicePrincipalKey = default(SecretBase), object tenant = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + SubscriptionId = subscriptionId; + ResourceGroupName = resourceGroupName; + MlWorkspaceName = mlWorkspaceName; + Authentication = authentication; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets azure ML Service workspace subscription ID. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.subscriptionId")] + public object SubscriptionId { get; set; } + + /// + /// Gets or sets azure ML Service workspace resource group name. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.resourceGroupName")] + public object ResourceGroupName { get; set; } + + /// + /// Gets or sets azure ML Service workspace name. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.mlWorkspaceName")] + public object MlWorkspaceName { get; set; } + + /// + /// Gets or sets type of authentication (Required to specify MSI) used + /// to connect to AzureML. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.authentication")] + public object Authentication { get; set; } + + /// + /// Gets or sets the ID of the service principal used to authenticate + /// against the endpoint of a published Azure ML Service pipeline. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalId")] + public object ServicePrincipalId { get; set; } + + /// + /// Gets or sets the key of the service principal used to authenticate + /// against the endpoint of a published Azure ML Service pipeline. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalKey")] + public SecretBase ServicePrincipalKey { get; set; } + + /// + /// Gets or sets the name or ID of the tenant to which the service + /// principal belongs. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.tenant")] + public object Tenant { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SubscriptionId"); + } + if (ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ResourceGroupName"); + } + if (MlWorkspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MlWorkspaceName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMLUpdateResourceActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMLUpdateResourceActivity.cs new file mode 100644 index 000000000000..9129ad239993 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMLUpdateResourceActivity.cs @@ -0,0 +1,131 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure ML Update Resource management activity. + /// + [Newtonsoft.Json.JsonObject("AzureMLUpdateResource")] + [Rest.Serialization.JsonTransformation] + public partial class AzureMLUpdateResourceActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the AzureMLUpdateResourceActivity + /// class. + /// + public AzureMLUpdateResourceActivity() + { + TrainedModelLinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureMLUpdateResourceActivity + /// class. + /// + /// Activity name. + /// Name of the Trained Model module in + /// the Web Service experiment to be updated. Type: string (or + /// Expression with resultType string). + /// Name of Azure Storage + /// linked service holding the .ilearner file that will be uploaded by + /// the update operation. + /// The relative file path in + /// trainedModelLinkedService to represent the .ilearner file that will + /// be uploaded by the update operation. Type: string (or Expression + /// with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + public AzureMLUpdateResourceActivity(string name, object trainedModelName, LinkedServiceReference trainedModelLinkedServiceName, object trainedModelFilePath, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + TrainedModelName = trainedModelName; + TrainedModelLinkedServiceName = trainedModelLinkedServiceName; + TrainedModelFilePath = trainedModelFilePath; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the Trained Model module in the Web Service + /// experiment to be updated. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.trainedModelName")] + public object TrainedModelName { get; set; } + + /// + /// Gets or sets name of Azure Storage linked service holding the + /// .ilearner file that will be uploaded by the update operation. + /// + [JsonProperty(PropertyName = "typeProperties.trainedModelLinkedServiceName")] + public LinkedServiceReference TrainedModelLinkedServiceName { get; set; } + + /// + /// Gets or sets the relative file path in trainedModelLinkedService to + /// represent the .ilearner file that will be uploaded by the update + /// operation. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.trainedModelFilePath")] + public object TrainedModelFilePath { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (TrainedModelName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TrainedModelName"); + } + if (TrainedModelLinkedServiceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TrainedModelLinkedServiceName"); + } + if (TrainedModelFilePath == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TrainedModelFilePath"); + } + if (TrainedModelLinkedServiceName != null) + { + TrainedModelLinkedServiceName.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMLWebServiceFile.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMLWebServiceFile.cs new file mode 100644 index 000000000000..2c7d84e8faf1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMLWebServiceFile.cs @@ -0,0 +1,89 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Azure ML WebService Input/Output file + /// + public partial class AzureMLWebServiceFile + { + /// + /// Initializes a new instance of the AzureMLWebServiceFile class. + /// + public AzureMLWebServiceFile() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureMLWebServiceFile class. + /// + /// The relative file path, including container + /// name, in the Azure Blob Storage specified by the LinkedService. + /// Type: string (or Expression with resultType string). + /// Reference to an Azure Storage + /// LinkedService, where Azure ML WebService Input/Output file + /// located. + public AzureMLWebServiceFile(object filePath, LinkedServiceReference linkedServiceName) + { + FilePath = filePath; + LinkedServiceName = linkedServiceName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the relative file path, including container name, in + /// the Azure Blob Storage specified by the LinkedService. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "filePath")] + public object FilePath { get; set; } + + /// + /// Gets or sets reference to an Azure Storage LinkedService, where + /// Azure ML WebService Input/Output file located. + /// + [JsonProperty(PropertyName = "linkedServiceName")] + public LinkedServiceReference LinkedServiceName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (FilePath == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "FilePath"); + } + if (LinkedServiceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "LinkedServiceName"); + } + if (LinkedServiceName != null) + { + LinkedServiceName.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMariaDBLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMariaDBLinkedService.cs new file mode 100644 index 000000000000..c86ee5b8e3a1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMariaDBLinkedService.cs @@ -0,0 +1,104 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure Database for MariaDB linked service. + /// + [Newtonsoft.Json.JsonObject("AzureMariaDB")] + [Rest.Serialization.JsonTransformation] + public partial class AzureMariaDBLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AzureMariaDBLinkedService class. + /// + public AzureMariaDBLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureMariaDBLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// An ODBC connection string. Type: + /// string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of password + /// in connection string. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public AzureMariaDBLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object connectionString = default(object), AzureKeyVaultSecretReference pwd = default(AzureKeyVaultSecretReference), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionString = connectionString; + Pwd = pwd; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets an ODBC connection string. Type: string, SecureString + /// or AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of password in + /// connection string. + /// + [JsonProperty(PropertyName = "typeProperties.pwd")] + public AzureKeyVaultSecretReference Pwd { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Pwd != null) + { + Pwd.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMariaDBSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMariaDBSource.cs new file mode 100644 index 000000000000..ab1ec46fec08 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMariaDBSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure MariaDB source. + /// + public partial class AzureMariaDBSource : TabularSource + { + /// + /// Initializes a new instance of the AzureMariaDBSource class. + /// + public AzureMariaDBSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureMariaDBSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public AzureMariaDBSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMariaDBTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMariaDBTableDataset.cs new file mode 100644 index 000000000000..c7d223b31713 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMariaDBTableDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure Database for MariaDB dataset. + /// + [Newtonsoft.Json.JsonObject("AzureMariaDBTable")] + [Rest.Serialization.JsonTransformation] + public partial class AzureMariaDBTableDataset : Dataset + { + /// + /// Initializes a new instance of the AzureMariaDBTableDataset class. + /// + public AzureMariaDBTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureMariaDBTableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name. Type: string (or Expression + /// with resultType string). + public AzureMariaDBTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMySqlLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMySqlLinkedService.cs new file mode 100644 index 000000000000..a18b8fd3d7c8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMySqlLinkedService.cs @@ -0,0 +1,108 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure MySQL database linked service. + /// + [Newtonsoft.Json.JsonObject("AzureMySql")] + [Rest.Serialization.JsonTransformation] + public partial class AzureMySqlLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AzureMySqlLinkedService class. + /// + public AzureMySqlLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureMySqlLinkedService class. + /// + /// The connection string. Type: string, + /// SecureString or AzureKeyVaultSecretReference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The Azure key vault secret reference of + /// password in connection string. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public AzureMySqlLinkedService(object connectionString, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), AzureKeyVaultSecretReference password = default(AzureKeyVaultSecretReference), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionString = connectionString; + Password = password; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the connection string. Type: string, SecureString or + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of password in + /// connection string. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public AzureKeyVaultSecretReference Password { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ConnectionString == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ConnectionString"); + } + if (Password != null) + { + Password.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMySqlSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMySqlSink.cs new file mode 100644 index 000000000000..9b22e3ee042d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMySqlSink.cs @@ -0,0 +1,74 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure MySql sink. + /// + public partial class AzureMySqlSink : CopySink + { + /// + /// Initializes a new instance of the AzureMySqlSink class. + /// + public AzureMySqlSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureMySqlSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// A query to execute before starting the + /// copy. Type: string (or Expression with resultType string). + public AzureMySqlSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object preCopyScript = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + PreCopyScript = preCopyScript; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to execute before starting the copy. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "preCopyScript")] + public object PreCopyScript { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMySqlSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMySqlSource.cs new file mode 100644 index 000000000000..3e2f11f30363 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMySqlSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure MySQL source. + /// + public partial class AzureMySqlSource : TabularSource + { + /// + /// Initializes a new instance of the AzureMySqlSource class. + /// + public AzureMySqlSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureMySqlSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// Database query. Type: string (or Expression + /// with resultType string). + public AzureMySqlSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets database query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMySqlTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMySqlTableDataset.cs new file mode 100644 index 000000000000..cb579c2cab12 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureMySqlTableDataset.cs @@ -0,0 +1,96 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Azure MySQL database dataset. + /// + [Newtonsoft.Json.JsonObject("AzureMySqlTable")] + [Rest.Serialization.JsonTransformation] + public partial class AzureMySqlTableDataset : Dataset + { + /// + /// Initializes a new instance of the AzureMySqlTableDataset class. + /// + public AzureMySqlTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureMySqlTableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The Azure MySQL database table name. Type: + /// string (or Expression with resultType string). + /// The name of Azure MySQL database table. Type: + /// string (or Expression with resultType string). + public AzureMySqlTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object), object table = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + Table = table; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Azure MySQL database table name. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Gets or sets the name of Azure MySQL database table. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzurePostgreSqlLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzurePostgreSqlLinkedService.cs new file mode 100644 index 000000000000..c1ac5d48b1f6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzurePostgreSqlLinkedService.cs @@ -0,0 +1,220 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure PostgreSQL linked service. + /// + [Newtonsoft.Json.JsonObject("AzurePostgreSql")] + [Rest.Serialization.JsonTransformation] + public partial class AzurePostgreSqlLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AzurePostgreSqlLinkedService + /// class. + /// + public AzurePostgreSqlLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzurePostgreSqlLinkedService + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// An ODBC connection string. Type: + /// string, SecureString or AzureKeyVaultSecretReference. + /// Server name for connection. Type: + /// string. + /// The port for the connection. Type: + /// integer. + /// Username for authentication. Type: + /// string. + /// Database name for connection. Type: + /// string. + /// SSL mode for connection. Type: integer. 0: + /// disable, 1:allow, 2: prefer, 3: require, 4: verify-ca, 5: + /// verify-full. Type: integer. + /// The time to wait (in seconds) while trying to + /// establish a connection before terminating the attempt and + /// generating an error. Type: integer. + /// The time to wait (in seconds) while + /// trying to execute a command before terminating the attempt and + /// generating an error. Set to zero for infinity. Type: + /// integer. + /// Whether to trust the server + /// certificate without validating it. Type: boolean. + /// Determines the size of the internal + /// buffer uses when reading. Increasing may improve performance if + /// transferring large values from the database. Type: integer. + /// Gets or sets the session timezone. Type: + /// string. + /// Gets or sets the .NET encoding that will be + /// used to encode/decode PostgreSQL string data. Type: string + /// The Azure key vault secret reference of + /// password in connection string. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public AzurePostgreSqlLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object connectionString = default(object), object server = default(object), object port = default(object), object username = default(object), object database = default(object), object sslMode = default(object), object timeout = default(object), object commandTimeout = default(object), object trustServerCertificate = default(object), object readBufferSize = default(object), object timezone = default(object), object encoding = default(object), AzureKeyVaultSecretReference password = default(AzureKeyVaultSecretReference), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionString = connectionString; + Server = server; + Port = port; + Username = username; + Database = database; + SslMode = sslMode; + Timeout = timeout; + CommandTimeout = commandTimeout; + TrustServerCertificate = trustServerCertificate; + ReadBufferSize = readBufferSize; + Timezone = timezone; + Encoding = encoding; + Password = password; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets an ODBC connection string. Type: string, SecureString + /// or AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets server name for connection. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.server")] + public object Server { get; set; } + + /// + /// Gets or sets the port for the connection. Type: integer. + /// + [JsonProperty(PropertyName = "typeProperties.port")] + public object Port { get; set; } + + /// + /// Gets or sets username for authentication. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets database name for connection. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.database")] + public object Database { get; set; } + + /// + /// Gets or sets SSL mode for connection. Type: integer. 0: disable, + /// 1:allow, 2: prefer, 3: require, 4: verify-ca, 5: verify-full. Type: + /// integer. + /// + [JsonProperty(PropertyName = "typeProperties.sslMode")] + public object SslMode { get; set; } + + /// + /// Gets or sets the time to wait (in seconds) while trying to + /// establish a connection before terminating the attempt and + /// generating an error. Type: integer. + /// + [JsonProperty(PropertyName = "typeProperties.timeout")] + public object Timeout { get; set; } + + /// + /// Gets or sets the time to wait (in seconds) while trying to execute + /// a command before terminating the attempt and generating an error. + /// Set to zero for infinity. Type: integer. + /// + [JsonProperty(PropertyName = "typeProperties.commandTimeout")] + public object CommandTimeout { get; set; } + + /// + /// Gets or sets whether to trust the server certificate without + /// validating it. Type: boolean. + /// + [JsonProperty(PropertyName = "typeProperties.trustServerCertificate")] + public object TrustServerCertificate { get; set; } + + /// + /// Gets or sets determines the size of the internal buffer uses when + /// reading. Increasing may improve performance if transferring large + /// values from the database. Type: integer. + /// + [JsonProperty(PropertyName = "typeProperties.readBufferSize")] + public object ReadBufferSize { get; set; } + + /// + /// Gets or sets the session timezone. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.timezone")] + public object Timezone { get; set; } + + /// + /// Gets or sets the .NET encoding that will be used to encode/decode + /// PostgreSQL string data. Type: string + /// + [JsonProperty(PropertyName = "typeProperties.encoding")] + public object Encoding { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of password in + /// connection string. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public AzureKeyVaultSecretReference Password { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Password != null) + { + Password.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzurePostgreSqlSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzurePostgreSqlSink.cs new file mode 100644 index 000000000000..b55a0437d4d4 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzurePostgreSqlSink.cs @@ -0,0 +1,74 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure PostgreSQL sink. + /// + public partial class AzurePostgreSqlSink : CopySink + { + /// + /// Initializes a new instance of the AzurePostgreSqlSink class. + /// + public AzurePostgreSqlSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzurePostgreSqlSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// A query to execute before starting the + /// copy. Type: string (or Expression with resultType string). + public AzurePostgreSqlSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object preCopyScript = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + PreCopyScript = preCopyScript; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to execute before starting the copy. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "preCopyScript")] + public object PreCopyScript { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzurePostgreSqlSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzurePostgreSqlSource.cs new file mode 100644 index 000000000000..a95dd58377cc --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzurePostgreSqlSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure PostgreSQL source. + /// + public partial class AzurePostgreSqlSource : TabularSource + { + /// + /// Initializes a new instance of the AzurePostgreSqlSource class. + /// + public AzurePostgreSqlSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzurePostgreSqlSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public AzurePostgreSqlSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzurePostgreSqlTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzurePostgreSqlTableDataset.cs new file mode 100644 index 000000000000..cad0ef71175e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzurePostgreSqlTableDataset.cs @@ -0,0 +1,112 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure PostgreSQL dataset. + /// + [Newtonsoft.Json.JsonObject("AzurePostgreSqlTable")] + [Rest.Serialization.JsonTransformation] + public partial class AzurePostgreSqlTableDataset : Dataset + { + /// + /// Initializes a new instance of the AzurePostgreSqlTableDataset + /// class. + /// + public AzurePostgreSqlTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the AzurePostgreSqlTableDataset + /// class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name of the Azure PostgreSQL + /// database which includes both schema and table. Type: string (or + /// Expression with resultType string). + /// The table name of the Azure PostgreSQL + /// database. Type: string (or Expression with resultType + /// string). + /// The schema name of + /// the Azure PostgreSQL database. Type: string (or Expression with + /// resultType string). + public AzurePostgreSqlTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object), object table = default(object), object azurePostgreSqlTableDatasetSchema = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + Table = table; + AzurePostgreSqlTableDatasetSchema = azurePostgreSqlTableDatasetSchema; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name of the Azure PostgreSQL database which + /// includes both schema and table. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Gets or sets the table name of the Azure PostgreSQL database. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Gets or sets the schema name of the Azure PostgreSQL database. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object AzurePostgreSqlTableDatasetSchema { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureQueueSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureQueueSink.cs new file mode 100644 index 000000000000..473887e4208c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureQueueSink.cs @@ -0,0 +1,63 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure Queue sink. + /// + public partial class AzureQueueSink : CopySink + { + /// + /// Initializes a new instance of the AzureQueueSink class. + /// + public AzureQueueSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureQueueSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + public AzureQueueSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSearchIndexDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSearchIndexDataset.cs new file mode 100644 index 000000000000..2e139be0c3d2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSearchIndexDataset.cs @@ -0,0 +1,90 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Azure Search Index. + /// + [Newtonsoft.Json.JsonObject("AzureSearchIndex")] + [Rest.Serialization.JsonTransformation] + public partial class AzureSearchIndexDataset : Dataset + { + /// + /// Initializes a new instance of the AzureSearchIndexDataset class. + /// + public AzureSearchIndexDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureSearchIndexDataset class. + /// + /// Linked service reference. + /// The name of the Azure Search Index. Type: + /// string (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + public AzureSearchIndexDataset(LinkedServiceReference linkedServiceName, object indexName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + IndexName = indexName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the Azure Search Index. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.indexName")] + public object IndexName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (IndexName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "IndexName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSearchIndexSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSearchIndexSink.cs new file mode 100644 index 000000000000..7699e920e525 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSearchIndexSink.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure Search Index sink. + /// + public partial class AzureSearchIndexSink : CopySink + { + /// + /// Initializes a new instance of the AzureSearchIndexSink class. + /// + public AzureSearchIndexSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureSearchIndexSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Specify the write behavior when + /// upserting documents into Azure Search Index. Possible values + /// include: 'Merge', 'Upload' + public AzureSearchIndexSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), string writeBehavior = default(string)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + WriteBehavior = writeBehavior; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specify the write behavior when upserting documents + /// into Azure Search Index. Possible values include: 'Merge', 'Upload' + /// + [JsonProperty(PropertyName = "writeBehavior")] + public string WriteBehavior { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSearchIndexWriteBehaviorType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSearchIndexWriteBehaviorType.cs new file mode 100644 index 000000000000..677ef93c37c1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSearchIndexWriteBehaviorType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for AzureSearchIndexWriteBehaviorType. + /// + public static class AzureSearchIndexWriteBehaviorType + { + public const string Merge = "Merge"; + public const string Upload = "Upload"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSearchLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSearchLinkedService.cs new file mode 100644 index 000000000000..8a9780c86581 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSearchLinkedService.cs @@ -0,0 +1,102 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for Windows Azure Search Service. + /// + [Newtonsoft.Json.JsonObject("AzureSearch")] + [Rest.Serialization.JsonTransformation] + public partial class AzureSearchLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AzureSearchLinkedService class. + /// + public AzureSearchLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureSearchLinkedService class. + /// + /// URL for Azure Search service. Type: string (or + /// Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Admin Key for Azure Search service + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public AzureSearchLinkedService(object url, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), SecretBase key = default(SecretBase), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Url = url; + Key = key; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets URL for Azure Search service. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.url")] + public object Url { get; set; } + + /// + /// Gets or sets admin Key for Azure Search service + /// + [JsonProperty(PropertyName = "typeProperties.key")] + public SecretBase Key { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Url == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Url"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlDWAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlDWAuthenticationType.cs new file mode 100644 index 000000000000..e99eefc888d5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlDWAuthenticationType.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for AzureSqlDWAuthenticationType. + /// + public static class AzureSqlDWAuthenticationType + { + public const string SQL = "SQL"; + public const string ServicePrincipal = "ServicePrincipal"; + public const string SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity"; + public const string UserAssignedManagedIdentity = "UserAssignedManagedIdentity"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlDWLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlDWLinkedService.cs new file mode 100644 index 000000000000..7f34b2c6486c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlDWLinkedService.cs @@ -0,0 +1,501 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure SQL Data Warehouse linked service. + /// + [Newtonsoft.Json.JsonObject("AzureSqlDW")] + [Rest.Serialization.JsonTransformation] + public partial class AzureSqlDWLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AzureSqlDWLinkedService class. + /// + public AzureSqlDWLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureSqlDWLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The name or network address of the instance of + /// SQL Server to which to connect, used by recommended version. Type: + /// string (or Expression with resultType string). + /// The name of the database, used by + /// recommended version. Type: string (or Expression with resultType + /// string). + /// Indicate whether TLS encryption is required + /// for all data sent between the client and server, used by + /// recommended version. Possible values are true/yes/mandatory, + /// false/no/optional and strict. Type: string (or Expression with + /// resultType string). + /// Indicate whether the channel + /// will be encrypted while bypassing walking the certificate chain to + /// validate trust, used by recommended version. Type: Boolean (or + /// Expression with resultType boolean). + /// The host name to use when + /// validating the server certificate for the connection. When not + /// specified, the server name from the Data Source is used for + /// certificate validation, used by recommended version. Type: string + /// (or Expression with resultType string). + /// The application workload type when + /// connecting to a server, used by recommended version. Possible + /// values are ReadOnly and ReadWrite. Type: string (or Expression with + /// resultType string). + /// The length of time (in seconds) to + /// wait for a connection to the server before terminating the attempt + /// and generating an error, used by recommended version. Type: integer + /// (or Expression with resultType integer). + /// The number of re-connections + /// attempted after identifying that there was an idle connection + /// failure, used by recommended version. This must be an integer + /// between 0 and 255. Type: integer (or Expression with resultType + /// integer). + /// The amount of time (in seconds) + /// between each re-connection attempt after identifying that there was + /// an idle connection failure, used by recommended version. This must + /// be an integer between 1 and 60. Type: integer (or Expression with + /// resultType integer). + /// The minimum time, in seconds, for + /// the connection to live in the connection pool before being + /// destroyed, used by recommended version. Type: integer (or + /// Expression with resultType integer). + /// The default wait time (in seconds) + /// before terminating the attempt to execute a command and generating + /// an error, used by recommended version. Type: integer (or Expression + /// with resultType integer). + /// Indicate whether User ID and + /// Password are specified in the connection (when false) or whether + /// the current Windows account credentials are used for authentication + /// (when true), used by recommended version. Type: Boolean (or + /// Expression with resultType boolean). + /// The name or address of the partner + /// server to connect to if the primary server is down, used by + /// recommended version. Type: string (or Expression with resultType + /// string). + /// The maximum number of connections allowed + /// in the connection pool for this specific connection string, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// The minimum number of connections allowed + /// in the connection pool for this specific connection string, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// When true, an application + /// can maintain multiple active result sets (MARS). When false, an + /// application must process or cancel all result sets from one batch + /// before it can execute any other batch on that connection, used by + /// recommended version. Type: Boolean (or Expression with resultType + /// boolean). + /// If your application is connecting + /// to an AlwaysOn availability group (AG) on different subnets, + /// setting MultiSubnetFailover=true provides faster detection of and + /// connection to the (currently) active server, used by recommended + /// version. Type: Boolean (or Expression with resultType + /// boolean). + /// The size in bytes of the network packets + /// used to communicate with an instance of server, used by recommended + /// version. Type: integer (or Expression with resultType + /// integer). + /// Indicate whether the connection will be + /// pooled or explicitly opened every time that the connection is + /// requested, used by recommended version. Type: Boolean (or + /// Expression with resultType boolean). + /// The connection string. Type: string, + /// SecureString or AzureKeyVaultSecretReference. Type: string, + /// SecureString or AzureKeyVaultSecretReference. + /// The type used for authentication. + /// Type: string. Possible values include: 'SQL', 'ServicePrincipal', + /// 'SystemAssignedManagedIdentity', + /// 'UserAssignedManagedIdentity' + /// The user name to be used when connecting to + /// server. Type: string (or Expression with resultType + /// string). + /// The Azure key vault secret reference of + /// password in connection string. + /// The ID of the service principal + /// used to authenticate against Azure SQL Data Warehouse. Type: string + /// (or Expression with resultType string). + /// The key of the service principal + /// used to authenticate against Azure SQL Data Warehouse. + /// The service principal + /// credential type to use in Server-To-Server authentication. + /// 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for + /// certificate. Type: string (or Expression with resultType + /// string). + /// The credential of the + /// service principal object in Azure Active Directory. If + /// servicePrincipalCredentialType is 'ServicePrincipalKey', + /// servicePrincipalCredential can be SecureString or + /// AzureKeyVaultSecretReference. If servicePrincipalCredentialType is + /// 'ServicePrincipalCert', servicePrincipalCredential can only be + /// AzureKeyVaultSecretReference. + /// The name or ID of the tenant to which the + /// service principal belongs. Type: string (or Expression with + /// resultType string). + /// Indicates the azure cloud type of the + /// service principle auth. Allowed values are AzurePublic, AzureChina, + /// AzureUsGovernment, AzureGermany. Default value is the data factory + /// regions’ cloud type. Type: string (or Expression with resultType + /// string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// The credential reference containing + /// authentication information. + public AzureSqlDWLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object server = default(object), object database = default(object), object encrypt = default(object), object trustServerCertificate = default(object), object hostNameInCertificate = default(object), object applicationIntent = default(object), object connectTimeout = default(object), object connectRetryCount = default(object), object connectRetryInterval = default(object), object loadBalanceTimeout = default(object), object commandTimeout = default(object), object integratedSecurity = default(object), object failoverPartner = default(object), object maxPoolSize = default(object), object minPoolSize = default(object), object multipleActiveResultSets = default(object), object multiSubnetFailover = default(object), object packetSize = default(object), object pooling = default(object), object connectionString = default(object), string authenticationType = default(string), object userName = default(object), AzureKeyVaultSecretReference password = default(AzureKeyVaultSecretReference), object servicePrincipalId = default(object), SecretBase servicePrincipalKey = default(SecretBase), object servicePrincipalCredentialType = default(object), SecretBase servicePrincipalCredential = default(SecretBase), object tenant = default(object), object azureCloudType = default(object), string encryptedCredential = default(string), CredentialReference credential = default(CredentialReference)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Server = server; + Database = database; + Encrypt = encrypt; + TrustServerCertificate = trustServerCertificate; + HostNameInCertificate = hostNameInCertificate; + ApplicationIntent = applicationIntent; + ConnectTimeout = connectTimeout; + ConnectRetryCount = connectRetryCount; + ConnectRetryInterval = connectRetryInterval; + LoadBalanceTimeout = loadBalanceTimeout; + CommandTimeout = commandTimeout; + IntegratedSecurity = integratedSecurity; + FailoverPartner = failoverPartner; + MaxPoolSize = maxPoolSize; + MinPoolSize = minPoolSize; + MultipleActiveResultSets = multipleActiveResultSets; + MultiSubnetFailover = multiSubnetFailover; + PacketSize = packetSize; + Pooling = pooling; + ConnectionString = connectionString; + AuthenticationType = authenticationType; + UserName = userName; + Password = password; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + ServicePrincipalCredentialType = servicePrincipalCredentialType; + ServicePrincipalCredential = servicePrincipalCredential; + Tenant = tenant; + AzureCloudType = azureCloudType; + EncryptedCredential = encryptedCredential; + Credential = credential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name or network address of the instance of SQL + /// Server to which to connect, used by recommended version. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.server")] + public object Server { get; set; } + + /// + /// Gets or sets the name of the database, used by recommended version. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.database")] + public object Database { get; set; } + + /// + /// Gets or sets indicate whether TLS encryption is required for all + /// data sent between the client and server, used by recommended + /// version. Possible values are true/yes/mandatory, false/no/optional + /// and strict. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.encrypt")] + public object Encrypt { get; set; } + + /// + /// Gets or sets indicate whether the channel will be encrypted while + /// bypassing walking the certificate chain to validate trust, used by + /// recommended version. Type: Boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "typeProperties.trustServerCertificate")] + public object TrustServerCertificate { get; set; } + + /// + /// Gets or sets the host name to use when validating the server + /// certificate for the connection. When not specified, the server name + /// from the Data Source is used for certificate validation, used by + /// recommended version. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.hostNameInCertificate")] + public object HostNameInCertificate { get; set; } + + /// + /// Gets or sets the application workload type when connecting to a + /// server, used by recommended version. Possible values are ReadOnly + /// and ReadWrite. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.applicationIntent")] + public object ApplicationIntent { get; set; } + + /// + /// Gets or sets the length of time (in seconds) to wait for a + /// connection to the server before terminating the attempt and + /// generating an error, used by recommended version. Type: integer (or + /// Expression with resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.connectTimeout")] + public object ConnectTimeout { get; set; } + + /// + /// Gets or sets the number of re-connections attempted after + /// identifying that there was an idle connection failure, used by + /// recommended version. This must be an integer between 0 and 255. + /// Type: integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.connectRetryCount")] + public object ConnectRetryCount { get; set; } + + /// + /// Gets or sets the amount of time (in seconds) between each + /// re-connection attempt after identifying that there was an idle + /// connection failure, used by recommended version. This must be an + /// integer between 1 and 60. Type: integer (or Expression with + /// resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.connectRetryInterval")] + public object ConnectRetryInterval { get; set; } + + /// + /// Gets or sets the minimum time, in seconds, for the connection to + /// live in the connection pool before being destroyed, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// + [JsonProperty(PropertyName = "typeProperties.loadBalanceTimeout")] + public object LoadBalanceTimeout { get; set; } + + /// + /// Gets or sets the default wait time (in seconds) before terminating + /// the attempt to execute a command and generating an error, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// + [JsonProperty(PropertyName = "typeProperties.commandTimeout")] + public object CommandTimeout { get; set; } + + /// + /// Gets or sets indicate whether User ID and Password are specified in + /// the connection (when false) or whether the current Windows account + /// credentials are used for authentication (when true), used by + /// recommended version. Type: Boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "typeProperties.integratedSecurity")] + public object IntegratedSecurity { get; set; } + + /// + /// Gets or sets the name or address of the partner server to connect + /// to if the primary server is down, used by recommended version. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.failoverPartner")] + public object FailoverPartner { get; set; } + + /// + /// Gets or sets the maximum number of connections allowed in the + /// connection pool for this specific connection string, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// + [JsonProperty(PropertyName = "typeProperties.maxPoolSize")] + public object MaxPoolSize { get; set; } + + /// + /// Gets or sets the minimum number of connections allowed in the + /// connection pool for this specific connection string, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// + [JsonProperty(PropertyName = "typeProperties.minPoolSize")] + public object MinPoolSize { get; set; } + + /// + /// Gets or sets when true, an application can maintain multiple active + /// result sets (MARS). When false, an application must process or + /// cancel all result sets from one batch before it can execute any + /// other batch on that connection, used by recommended version. Type: + /// Boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.multipleActiveResultSets")] + public object MultipleActiveResultSets { get; set; } + + /// + /// Gets or sets if your application is connecting to an AlwaysOn + /// availability group (AG) on different subnets, setting + /// MultiSubnetFailover=true provides faster detection of and + /// connection to the (currently) active server, used by recommended + /// version. Type: Boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.multiSubnetFailover")] + public object MultiSubnetFailover { get; set; } + + /// + /// Gets or sets the size in bytes of the network packets used to + /// communicate with an instance of server, used by recommended + /// version. Type: integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.packetSize")] + public object PacketSize { get; set; } + + /// + /// Gets or sets indicate whether the connection will be pooled or + /// explicitly opened every time that the connection is requested, used + /// by recommended version. Type: Boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.pooling")] + public object Pooling { get; set; } + + /// + /// Gets or sets the connection string. Type: string, SecureString or + /// AzureKeyVaultSecretReference. Type: string, SecureString or + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets the type used for authentication. Type: string. + /// Possible values include: 'SQL', 'ServicePrincipal', + /// 'SystemAssignedManagedIdentity', 'UserAssignedManagedIdentity' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets the user name to be used when connecting to server. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of password in + /// connection string. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public AzureKeyVaultSecretReference Password { get; set; } + + /// + /// Gets or sets the ID of the service principal used to authenticate + /// against Azure SQL Data Warehouse. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalId")] + public object ServicePrincipalId { get; set; } + + /// + /// Gets or sets the key of the service principal used to authenticate + /// against Azure SQL Data Warehouse. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalKey")] + public SecretBase ServicePrincipalKey { get; set; } + + /// + /// Gets or sets the service principal credential type to use in + /// Server-To-Server authentication. 'ServicePrincipalKey' for + /// key/secret, 'ServicePrincipalCert' for certificate. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalCredentialType")] + public object ServicePrincipalCredentialType { get; set; } + + /// + /// Gets or sets the credential of the service principal object in + /// Azure Active Directory. If servicePrincipalCredentialType is + /// 'ServicePrincipalKey', servicePrincipalCredential can be + /// SecureString or AzureKeyVaultSecretReference. If + /// servicePrincipalCredentialType is 'ServicePrincipalCert', + /// servicePrincipalCredential can only be + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalCredential")] + public SecretBase ServicePrincipalCredential { get; set; } + + /// + /// Gets or sets the name or ID of the tenant to which the service + /// principal belongs. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.tenant")] + public object Tenant { get; set; } + + /// + /// Gets or sets indicates the azure cloud type of the service + /// principle auth. Allowed values are AzurePublic, AzureChina, + /// AzureUsGovernment, AzureGermany. Default value is the data factory + /// regions’ cloud type. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.azureCloudType")] + public object AzureCloudType { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets the credential reference containing authentication + /// information. + /// + [JsonProperty(PropertyName = "typeProperties.credential")] + public CredentialReference Credential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Password != null) + { + Password.Validate(); + } + if (Credential != null) + { + Credential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlDWTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlDWTableDataset.cs new file mode 100644 index 000000000000..bc737b8eca22 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlDWTableDataset.cs @@ -0,0 +1,107 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Azure SQL Data Warehouse dataset. + /// + [Newtonsoft.Json.JsonObject("AzureSqlDWTable")] + [Rest.Serialization.JsonTransformation] + public partial class AzureSqlDWTableDataset : Dataset + { + /// + /// Initializes a new instance of the AzureSqlDWTableDataset class. + /// + public AzureSqlDWTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureSqlDWTableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// This property will be retired. Please + /// consider using schema + table properties instead. + /// The schema name of the + /// Azure SQL Data Warehouse. Type: string (or Expression with + /// resultType string). + /// The table name of the Azure SQL Data Warehouse. + /// Type: string (or Expression with resultType string). + public AzureSqlDWTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object), object azureSqlDWTableDatasetSchema = default(object), object table = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + AzureSqlDWTableDatasetSchema = azureSqlDWTableDatasetSchema; + Table = table; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property will be retired. Please consider using + /// schema + table properties instead. + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Gets or sets the schema name of the Azure SQL Data Warehouse. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object AzureSqlDWTableDatasetSchema { get; set; } + + /// + /// Gets or sets the table name of the Azure SQL Data Warehouse. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlDatabaseAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlDatabaseAuthenticationType.cs new file mode 100644 index 000000000000..4ca8ba9e8a3c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlDatabaseAuthenticationType.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for AzureSqlDatabaseAuthenticationType. + /// + public static class AzureSqlDatabaseAuthenticationType + { + public const string SQL = "SQL"; + public const string ServicePrincipal = "ServicePrincipal"; + public const string SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity"; + public const string UserAssignedManagedIdentity = "UserAssignedManagedIdentity"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlDatabaseLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlDatabaseLinkedService.cs new file mode 100644 index 000000000000..c52bdbd646d8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlDatabaseLinkedService.cs @@ -0,0 +1,514 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Microsoft Azure SQL Database linked service. + /// + [Newtonsoft.Json.JsonObject("AzureSqlDatabase")] + [Rest.Serialization.JsonTransformation] + public partial class AzureSqlDatabaseLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AzureSqlDatabaseLinkedService + /// class. + /// + public AzureSqlDatabaseLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureSqlDatabaseLinkedService + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The name or network address of the instance of + /// SQL Server to which to connect, used by recommended version. Type: + /// string (or Expression with resultType string). + /// The name of the database, used by + /// recommended version. Type: string (or Expression with resultType + /// string). + /// Indicate whether TLS encryption is required + /// for all data sent between the client and server, used by + /// recommended version. Possible values are true/yes/mandatory, + /// false/no/optional and strict. Type: string (or Expression with + /// resultType string). + /// Indicate whether the channel + /// will be encrypted while bypassing walking the certificate chain to + /// validate trust, used by recommended version. Type: Boolean (or + /// Expression with resultType boolean). + /// The host name to use when + /// validating the server certificate for the connection. When not + /// specified, the server name from the Data Source is used for + /// certificate validation, used by recommended version. Type: string + /// (or Expression with resultType string). + /// The application workload type when + /// connecting to a server, used by recommended version. Possible + /// values are ReadOnly and ReadWrite. Type: string (or Expression with + /// resultType string). + /// The length of time (in seconds) to + /// wait for a connection to the server before terminating the attempt + /// and generating an error, used by recommended version. Type: integer + /// (or Expression with resultType integer). + /// The number of re-connections + /// attempted after identifying that there was an idle connection + /// failure, used by recommended version. This must be an integer + /// between 0 and 255. Type: integer (or Expression with resultType + /// integer). + /// The amount of time (in seconds) + /// between each re-connection attempt after identifying that there was + /// an idle connection failure, used by recommended version. This must + /// be an integer between 1 and 60. Type: integer (or Expression with + /// resultType integer). + /// The minimum time, in seconds, for + /// the connection to live in the connection pool before being + /// destroyed, used by recommended version. Type: integer (or + /// Expression with resultType integer). + /// The default wait time (in seconds) + /// before terminating the attempt to execute a command and generating + /// an error, used by recommended version. Type: integer (or Expression + /// with resultType integer). + /// Indicate whether User ID and + /// Password are specified in the connection (when false) or whether + /// the current Windows account credentials are used for authentication + /// (when true), used by recommended version. Type: Boolean (or + /// Expression with resultType boolean). + /// The name or address of the partner + /// server to connect to if the primary server is down, used by + /// recommended version. Type: string (or Expression with resultType + /// string). + /// The maximum number of connections allowed + /// in the connection pool for this specific connection string, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// The minimum number of connections allowed + /// in the connection pool for this specific connection string, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// When true, an application + /// can maintain multiple active result sets (MARS). When false, an + /// application must process or cancel all result sets from one batch + /// before it can execute any other batch on that connection, used by + /// recommended version. Type: Boolean (or Expression with resultType + /// boolean). + /// If your application is connecting + /// to an AlwaysOn availability group (AG) on different subnets, + /// setting MultiSubnetFailover=true provides faster detection of and + /// connection to the (currently) active server, used by recommended + /// version. Type: Boolean (or Expression with resultType + /// boolean). + /// The size in bytes of the network packets + /// used to communicate with an instance of server, used by recommended + /// version. Type: integer (or Expression with resultType + /// integer). + /// Indicate whether the connection will be + /// pooled or explicitly opened every time that the connection is + /// requested, used by recommended version. Type: Boolean (or + /// Expression with resultType boolean). + /// The connection string. Type: string, + /// SecureString or AzureKeyVaultSecretReference. + /// The type used for authentication. + /// Type: string. Possible values include: 'SQL', 'ServicePrincipal', + /// 'SystemAssignedManagedIdentity', + /// 'UserAssignedManagedIdentity' + /// The user name to be used when connecting to + /// server. Type: string (or Expression with resultType + /// string). + /// The Azure key vault secret reference of + /// password in connection string. + /// The ID of the service principal + /// used to authenticate against Azure SQL Database. Type: string (or + /// Expression with resultType string). + /// The key of the service principal + /// used to authenticate against Azure SQL Database. + /// The service principal + /// credential type to use in Server-To-Server authentication. + /// 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for + /// certificate. Type: string (or Expression with resultType + /// string). + /// The credential of the + /// service principal object in Azure Active Directory. If + /// servicePrincipalCredentialType is 'ServicePrincipalKey', + /// servicePrincipalCredential can be SecureString or + /// AzureKeyVaultSecretReference. If servicePrincipalCredentialType is + /// 'ServicePrincipalCert', servicePrincipalCredential can only be + /// AzureKeyVaultSecretReference. + /// The name or ID of the tenant to which the + /// service principal belongs. Type: string (or Expression with + /// resultType string). + /// Indicates the azure cloud type of the + /// service principle auth. Allowed values are AzurePublic, AzureChina, + /// AzureUsGovernment, AzureGermany. Default value is the data factory + /// regions’ cloud type. Type: string (or Expression with resultType + /// string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// Sql always encrypted + /// properties. + /// The credential reference containing + /// authentication information. + public AzureSqlDatabaseLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object server = default(object), object database = default(object), object encrypt = default(object), object trustServerCertificate = default(object), object hostNameInCertificate = default(object), object applicationIntent = default(object), object connectTimeout = default(object), object connectRetryCount = default(object), object connectRetryInterval = default(object), object loadBalanceTimeout = default(object), object commandTimeout = default(object), object integratedSecurity = default(object), object failoverPartner = default(object), object maxPoolSize = default(object), object minPoolSize = default(object), object multipleActiveResultSets = default(object), object multiSubnetFailover = default(object), object packetSize = default(object), object pooling = default(object), object connectionString = default(object), string authenticationType = default(string), object userName = default(object), AzureKeyVaultSecretReference password = default(AzureKeyVaultSecretReference), object servicePrincipalId = default(object), SecretBase servicePrincipalKey = default(SecretBase), object servicePrincipalCredentialType = default(object), SecretBase servicePrincipalCredential = default(SecretBase), object tenant = default(object), object azureCloudType = default(object), string encryptedCredential = default(string), SqlAlwaysEncryptedProperties alwaysEncryptedSettings = default(SqlAlwaysEncryptedProperties), CredentialReference credential = default(CredentialReference)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Server = server; + Database = database; + Encrypt = encrypt; + TrustServerCertificate = trustServerCertificate; + HostNameInCertificate = hostNameInCertificate; + ApplicationIntent = applicationIntent; + ConnectTimeout = connectTimeout; + ConnectRetryCount = connectRetryCount; + ConnectRetryInterval = connectRetryInterval; + LoadBalanceTimeout = loadBalanceTimeout; + CommandTimeout = commandTimeout; + IntegratedSecurity = integratedSecurity; + FailoverPartner = failoverPartner; + MaxPoolSize = maxPoolSize; + MinPoolSize = minPoolSize; + MultipleActiveResultSets = multipleActiveResultSets; + MultiSubnetFailover = multiSubnetFailover; + PacketSize = packetSize; + Pooling = pooling; + ConnectionString = connectionString; + AuthenticationType = authenticationType; + UserName = userName; + Password = password; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + ServicePrincipalCredentialType = servicePrincipalCredentialType; + ServicePrincipalCredential = servicePrincipalCredential; + Tenant = tenant; + AzureCloudType = azureCloudType; + EncryptedCredential = encryptedCredential; + AlwaysEncryptedSettings = alwaysEncryptedSettings; + Credential = credential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name or network address of the instance of SQL + /// Server to which to connect, used by recommended version. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.server")] + public object Server { get; set; } + + /// + /// Gets or sets the name of the database, used by recommended version. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.database")] + public object Database { get; set; } + + /// + /// Gets or sets indicate whether TLS encryption is required for all + /// data sent between the client and server, used by recommended + /// version. Possible values are true/yes/mandatory, false/no/optional + /// and strict. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.encrypt")] + public object Encrypt { get; set; } + + /// + /// Gets or sets indicate whether the channel will be encrypted while + /// bypassing walking the certificate chain to validate trust, used by + /// recommended version. Type: Boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "typeProperties.trustServerCertificate")] + public object TrustServerCertificate { get; set; } + + /// + /// Gets or sets the host name to use when validating the server + /// certificate for the connection. When not specified, the server name + /// from the Data Source is used for certificate validation, used by + /// recommended version. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.hostNameInCertificate")] + public object HostNameInCertificate { get; set; } + + /// + /// Gets or sets the application workload type when connecting to a + /// server, used by recommended version. Possible values are ReadOnly + /// and ReadWrite. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.applicationIntent")] + public object ApplicationIntent { get; set; } + + /// + /// Gets or sets the length of time (in seconds) to wait for a + /// connection to the server before terminating the attempt and + /// generating an error, used by recommended version. Type: integer (or + /// Expression with resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.connectTimeout")] + public object ConnectTimeout { get; set; } + + /// + /// Gets or sets the number of re-connections attempted after + /// identifying that there was an idle connection failure, used by + /// recommended version. This must be an integer between 0 and 255. + /// Type: integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.connectRetryCount")] + public object ConnectRetryCount { get; set; } + + /// + /// Gets or sets the amount of time (in seconds) between each + /// re-connection attempt after identifying that there was an idle + /// connection failure, used by recommended version. This must be an + /// integer between 1 and 60. Type: integer (or Expression with + /// resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.connectRetryInterval")] + public object ConnectRetryInterval { get; set; } + + /// + /// Gets or sets the minimum time, in seconds, for the connection to + /// live in the connection pool before being destroyed, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// + [JsonProperty(PropertyName = "typeProperties.loadBalanceTimeout")] + public object LoadBalanceTimeout { get; set; } + + /// + /// Gets or sets the default wait time (in seconds) before terminating + /// the attempt to execute a command and generating an error, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// + [JsonProperty(PropertyName = "typeProperties.commandTimeout")] + public object CommandTimeout { get; set; } + + /// + /// Gets or sets indicate whether User ID and Password are specified in + /// the connection (when false) or whether the current Windows account + /// credentials are used for authentication (when true), used by + /// recommended version. Type: Boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "typeProperties.integratedSecurity")] + public object IntegratedSecurity { get; set; } + + /// + /// Gets or sets the name or address of the partner server to connect + /// to if the primary server is down, used by recommended version. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.failoverPartner")] + public object FailoverPartner { get; set; } + + /// + /// Gets or sets the maximum number of connections allowed in the + /// connection pool for this specific connection string, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// + [JsonProperty(PropertyName = "typeProperties.maxPoolSize")] + public object MaxPoolSize { get; set; } + + /// + /// Gets or sets the minimum number of connections allowed in the + /// connection pool for this specific connection string, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// + [JsonProperty(PropertyName = "typeProperties.minPoolSize")] + public object MinPoolSize { get; set; } + + /// + /// Gets or sets when true, an application can maintain multiple active + /// result sets (MARS). When false, an application must process or + /// cancel all result sets from one batch before it can execute any + /// other batch on that connection, used by recommended version. Type: + /// Boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.multipleActiveResultSets")] + public object MultipleActiveResultSets { get; set; } + + /// + /// Gets or sets if your application is connecting to an AlwaysOn + /// availability group (AG) on different subnets, setting + /// MultiSubnetFailover=true provides faster detection of and + /// connection to the (currently) active server, used by recommended + /// version. Type: Boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.multiSubnetFailover")] + public object MultiSubnetFailover { get; set; } + + /// + /// Gets or sets the size in bytes of the network packets used to + /// communicate with an instance of server, used by recommended + /// version. Type: integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.packetSize")] + public object PacketSize { get; set; } + + /// + /// Gets or sets indicate whether the connection will be pooled or + /// explicitly opened every time that the connection is requested, used + /// by recommended version. Type: Boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.pooling")] + public object Pooling { get; set; } + + /// + /// Gets or sets the connection string. Type: string, SecureString or + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets the type used for authentication. Type: string. + /// Possible values include: 'SQL', 'ServicePrincipal', + /// 'SystemAssignedManagedIdentity', 'UserAssignedManagedIdentity' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets the user name to be used when connecting to server. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of password in + /// connection string. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public AzureKeyVaultSecretReference Password { get; set; } + + /// + /// Gets or sets the ID of the service principal used to authenticate + /// against Azure SQL Database. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalId")] + public object ServicePrincipalId { get; set; } + + /// + /// Gets or sets the key of the service principal used to authenticate + /// against Azure SQL Database. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalKey")] + public SecretBase ServicePrincipalKey { get; set; } + + /// + /// Gets or sets the service principal credential type to use in + /// Server-To-Server authentication. 'ServicePrincipalKey' for + /// key/secret, 'ServicePrincipalCert' for certificate. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalCredentialType")] + public object ServicePrincipalCredentialType { get; set; } + + /// + /// Gets or sets the credential of the service principal object in + /// Azure Active Directory. If servicePrincipalCredentialType is + /// 'ServicePrincipalKey', servicePrincipalCredential can be + /// SecureString or AzureKeyVaultSecretReference. If + /// servicePrincipalCredentialType is 'ServicePrincipalCert', + /// servicePrincipalCredential can only be + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalCredential")] + public SecretBase ServicePrincipalCredential { get; set; } + + /// + /// Gets or sets the name or ID of the tenant to which the service + /// principal belongs. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.tenant")] + public object Tenant { get; set; } + + /// + /// Gets or sets indicates the azure cloud type of the service + /// principle auth. Allowed values are AzurePublic, AzureChina, + /// AzureUsGovernment, AzureGermany. Default value is the data factory + /// regions’ cloud type. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.azureCloudType")] + public object AzureCloudType { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets sql always encrypted properties. + /// + [JsonProperty(PropertyName = "typeProperties.alwaysEncryptedSettings")] + public SqlAlwaysEncryptedProperties AlwaysEncryptedSettings { get; set; } + + /// + /// Gets or sets the credential reference containing authentication + /// information. + /// + [JsonProperty(PropertyName = "typeProperties.credential")] + public CredentialReference Credential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Password != null) + { + Password.Validate(); + } + if (AlwaysEncryptedSettings != null) + { + AlwaysEncryptedSettings.Validate(); + } + if (Credential != null) + { + Credential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlMIAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlMIAuthenticationType.cs new file mode 100644 index 000000000000..f1ac9ed90c6f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlMIAuthenticationType.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for AzureSqlMIAuthenticationType. + /// + public static class AzureSqlMIAuthenticationType + { + public const string SQL = "SQL"; + public const string ServicePrincipal = "ServicePrincipal"; + public const string SystemAssignedManagedIdentity = "SystemAssignedManagedIdentity"; + public const string UserAssignedManagedIdentity = "UserAssignedManagedIdentity"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlMILinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlMILinkedService.cs new file mode 100644 index 000000000000..72dd6d8de656 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlMILinkedService.cs @@ -0,0 +1,512 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure SQL Managed Instance linked service. + /// + [Newtonsoft.Json.JsonObject("AzureSqlMI")] + [Rest.Serialization.JsonTransformation] + public partial class AzureSqlMILinkedService : LinkedService + { + /// + /// Initializes a new instance of the AzureSqlMILinkedService class. + /// + public AzureSqlMILinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureSqlMILinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The name or network address of the instance of + /// SQL Server to which to connect, used by recommended version. Type: + /// string (or Expression with resultType string). + /// The name of the database, used by + /// recommended version. Type: string (or Expression with resultType + /// string). + /// Indicate whether TLS encryption is required + /// for all data sent between the client and server, used by + /// recommended version. Possible values are true/yes/mandatory, + /// false/no/optional and strict. Type: string (or Expression with + /// resultType string). + /// Indicate whether the channel + /// will be encrypted while bypassing walking the certificate chain to + /// validate trust, used by recommended version. Type: Boolean (or + /// Expression with resultType boolean). + /// The host name to use when + /// validating the server certificate for the connection. When not + /// specified, the server name from the Data Source is used for + /// certificate validation, used by recommended version. Type: string + /// (or Expression with resultType string). + /// The application workload type when + /// connecting to a server, used by recommended version. Possible + /// values are ReadOnly and ReadWrite. Type: string (or Expression with + /// resultType string). + /// The length of time (in seconds) to + /// wait for a connection to the server before terminating the attempt + /// and generating an error, used by recommended version. Type: integer + /// (or Expression with resultType integer). + /// The number of re-connections + /// attempted after identifying that there was an idle connection + /// failure, used by recommended version. This must be an integer + /// between 0 and 255. Type: integer (or Expression with resultType + /// integer). + /// The amount of time (in seconds) + /// between each re-connection attempt after identifying that there was + /// an idle connection failure, used by recommended version. This must + /// be an integer between 1 and 60. Type: integer (or Expression with + /// resultType integer). + /// The minimum time, in seconds, for + /// the connection to live in the connection pool before being + /// destroyed, used by recommended version. Type: integer (or + /// Expression with resultType integer). + /// The default wait time (in seconds) + /// before terminating the attempt to execute a command and generating + /// an error, used by recommended version. Type: integer (or Expression + /// with resultType integer). + /// Indicate whether User ID and + /// Password are specified in the connection (when false) or whether + /// the current Windows account credentials are used for authentication + /// (when true), used by recommended version. Type: Boolean (or + /// Expression with resultType boolean). + /// The name or address of the partner + /// server to connect to if the primary server is down, used by + /// recommended version. Type: string (or Expression with resultType + /// string). + /// The maximum number of connections allowed + /// in the connection pool for this specific connection string, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// The minimum number of connections allowed + /// in the connection pool for this specific connection string, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// When true, an application + /// can maintain multiple active result sets (MARS). When false, an + /// application must process or cancel all result sets from one batch + /// before it can execute any other batch on that connection, used by + /// recommended version. Type: Boolean (or Expression with resultType + /// boolean). + /// If your application is connecting + /// to an AlwaysOn availability group (AG) on different subnets, + /// setting MultiSubnetFailover=true provides faster detection of and + /// connection to the (currently) active server, used by recommended + /// version. Type: Boolean (or Expression with resultType + /// boolean). + /// The size in bytes of the network packets + /// used to communicate with an instance of server, used by recommended + /// version. Type: integer (or Expression with resultType + /// integer). + /// Indicate whether the connection will be + /// pooled or explicitly opened every time that the connection is + /// requested, used by recommended version. Type: Boolean (or + /// Expression with resultType boolean). + /// The connection string. Type: string, + /// SecureString or AzureKeyVaultSecretReference. + /// The type used for authentication. + /// Type: string. Possible values include: 'SQL', 'ServicePrincipal', + /// 'SystemAssignedManagedIdentity', + /// 'UserAssignedManagedIdentity' + /// The user name to be used when connecting to + /// server. Type: string (or Expression with resultType + /// string). + /// The Azure key vault secret reference of + /// password in connection string. + /// The ID of the service principal + /// used to authenticate against Azure SQL Managed Instance. Type: + /// string (or Expression with resultType string). + /// The key of the service principal + /// used to authenticate against Azure SQL Managed Instance. + /// The service principal + /// credential type to use in Server-To-Server authentication. + /// 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for + /// certificate. Type: string (or Expression with resultType + /// string). + /// The credential of the + /// service principal object in Azure Active Directory. If + /// servicePrincipalCredentialType is 'ServicePrincipalKey', + /// servicePrincipalCredential can be SecureString or + /// AzureKeyVaultSecretReference. If servicePrincipalCredentialType is + /// 'ServicePrincipalCert', servicePrincipalCredential can only be + /// AzureKeyVaultSecretReference. + /// The name or ID of the tenant to which the + /// service principal belongs. Type: string (or Expression with + /// resultType string). + /// Indicates the azure cloud type of the + /// service principle auth. Allowed values are AzurePublic, AzureChina, + /// AzureUsGovernment, AzureGermany. Default value is the data factory + /// regions’ cloud type. Type: string (or Expression with resultType + /// string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// Sql always encrypted + /// properties. + /// The credential reference containing + /// authentication information. + public AzureSqlMILinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object server = default(object), object database = default(object), object encrypt = default(object), object trustServerCertificate = default(object), object hostNameInCertificate = default(object), object applicationIntent = default(object), object connectTimeout = default(object), object connectRetryCount = default(object), object connectRetryInterval = default(object), object loadBalanceTimeout = default(object), object commandTimeout = default(object), object integratedSecurity = default(object), object failoverPartner = default(object), object maxPoolSize = default(object), object minPoolSize = default(object), object multipleActiveResultSets = default(object), object multiSubnetFailover = default(object), object packetSize = default(object), object pooling = default(object), object connectionString = default(object), string authenticationType = default(string), object userName = default(object), AzureKeyVaultSecretReference password = default(AzureKeyVaultSecretReference), object servicePrincipalId = default(object), SecretBase servicePrincipalKey = default(SecretBase), object servicePrincipalCredentialType = default(object), SecretBase servicePrincipalCredential = default(SecretBase), object tenant = default(object), object azureCloudType = default(object), string encryptedCredential = default(string), SqlAlwaysEncryptedProperties alwaysEncryptedSettings = default(SqlAlwaysEncryptedProperties), CredentialReference credential = default(CredentialReference)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Server = server; + Database = database; + Encrypt = encrypt; + TrustServerCertificate = trustServerCertificate; + HostNameInCertificate = hostNameInCertificate; + ApplicationIntent = applicationIntent; + ConnectTimeout = connectTimeout; + ConnectRetryCount = connectRetryCount; + ConnectRetryInterval = connectRetryInterval; + LoadBalanceTimeout = loadBalanceTimeout; + CommandTimeout = commandTimeout; + IntegratedSecurity = integratedSecurity; + FailoverPartner = failoverPartner; + MaxPoolSize = maxPoolSize; + MinPoolSize = minPoolSize; + MultipleActiveResultSets = multipleActiveResultSets; + MultiSubnetFailover = multiSubnetFailover; + PacketSize = packetSize; + Pooling = pooling; + ConnectionString = connectionString; + AuthenticationType = authenticationType; + UserName = userName; + Password = password; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + ServicePrincipalCredentialType = servicePrincipalCredentialType; + ServicePrincipalCredential = servicePrincipalCredential; + Tenant = tenant; + AzureCloudType = azureCloudType; + EncryptedCredential = encryptedCredential; + AlwaysEncryptedSettings = alwaysEncryptedSettings; + Credential = credential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name or network address of the instance of SQL + /// Server to which to connect, used by recommended version. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.server")] + public object Server { get; set; } + + /// + /// Gets or sets the name of the database, used by recommended version. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.database")] + public object Database { get; set; } + + /// + /// Gets or sets indicate whether TLS encryption is required for all + /// data sent between the client and server, used by recommended + /// version. Possible values are true/yes/mandatory, false/no/optional + /// and strict. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.encrypt")] + public object Encrypt { get; set; } + + /// + /// Gets or sets indicate whether the channel will be encrypted while + /// bypassing walking the certificate chain to validate trust, used by + /// recommended version. Type: Boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "typeProperties.trustServerCertificate")] + public object TrustServerCertificate { get; set; } + + /// + /// Gets or sets the host name to use when validating the server + /// certificate for the connection. When not specified, the server name + /// from the Data Source is used for certificate validation, used by + /// recommended version. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.hostNameInCertificate")] + public object HostNameInCertificate { get; set; } + + /// + /// Gets or sets the application workload type when connecting to a + /// server, used by recommended version. Possible values are ReadOnly + /// and ReadWrite. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.applicationIntent")] + public object ApplicationIntent { get; set; } + + /// + /// Gets or sets the length of time (in seconds) to wait for a + /// connection to the server before terminating the attempt and + /// generating an error, used by recommended version. Type: integer (or + /// Expression with resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.connectTimeout")] + public object ConnectTimeout { get; set; } + + /// + /// Gets or sets the number of re-connections attempted after + /// identifying that there was an idle connection failure, used by + /// recommended version. This must be an integer between 0 and 255. + /// Type: integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.connectRetryCount")] + public object ConnectRetryCount { get; set; } + + /// + /// Gets or sets the amount of time (in seconds) between each + /// re-connection attempt after identifying that there was an idle + /// connection failure, used by recommended version. This must be an + /// integer between 1 and 60. Type: integer (or Expression with + /// resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.connectRetryInterval")] + public object ConnectRetryInterval { get; set; } + + /// + /// Gets or sets the minimum time, in seconds, for the connection to + /// live in the connection pool before being destroyed, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// + [JsonProperty(PropertyName = "typeProperties.loadBalanceTimeout")] + public object LoadBalanceTimeout { get; set; } + + /// + /// Gets or sets the default wait time (in seconds) before terminating + /// the attempt to execute a command and generating an error, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// + [JsonProperty(PropertyName = "typeProperties.commandTimeout")] + public object CommandTimeout { get; set; } + + /// + /// Gets or sets indicate whether User ID and Password are specified in + /// the connection (when false) or whether the current Windows account + /// credentials are used for authentication (when true), used by + /// recommended version. Type: Boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "typeProperties.integratedSecurity")] + public object IntegratedSecurity { get; set; } + + /// + /// Gets or sets the name or address of the partner server to connect + /// to if the primary server is down, used by recommended version. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.failoverPartner")] + public object FailoverPartner { get; set; } + + /// + /// Gets or sets the maximum number of connections allowed in the + /// connection pool for this specific connection string, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// + [JsonProperty(PropertyName = "typeProperties.maxPoolSize")] + public object MaxPoolSize { get; set; } + + /// + /// Gets or sets the minimum number of connections allowed in the + /// connection pool for this specific connection string, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// + [JsonProperty(PropertyName = "typeProperties.minPoolSize")] + public object MinPoolSize { get; set; } + + /// + /// Gets or sets when true, an application can maintain multiple active + /// result sets (MARS). When false, an application must process or + /// cancel all result sets from one batch before it can execute any + /// other batch on that connection, used by recommended version. Type: + /// Boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.multipleActiveResultSets")] + public object MultipleActiveResultSets { get; set; } + + /// + /// Gets or sets if your application is connecting to an AlwaysOn + /// availability group (AG) on different subnets, setting + /// MultiSubnetFailover=true provides faster detection of and + /// connection to the (currently) active server, used by recommended + /// version. Type: Boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.multiSubnetFailover")] + public object MultiSubnetFailover { get; set; } + + /// + /// Gets or sets the size in bytes of the network packets used to + /// communicate with an instance of server, used by recommended + /// version. Type: integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.packetSize")] + public object PacketSize { get; set; } + + /// + /// Gets or sets indicate whether the connection will be pooled or + /// explicitly opened every time that the connection is requested, used + /// by recommended version. Type: Boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.pooling")] + public object Pooling { get; set; } + + /// + /// Gets or sets the connection string. Type: string, SecureString or + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets the type used for authentication. Type: string. + /// Possible values include: 'SQL', 'ServicePrincipal', + /// 'SystemAssignedManagedIdentity', 'UserAssignedManagedIdentity' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets the user name to be used when connecting to server. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of password in + /// connection string. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public AzureKeyVaultSecretReference Password { get; set; } + + /// + /// Gets or sets the ID of the service principal used to authenticate + /// against Azure SQL Managed Instance. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalId")] + public object ServicePrincipalId { get; set; } + + /// + /// Gets or sets the key of the service principal used to authenticate + /// against Azure SQL Managed Instance. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalKey")] + public SecretBase ServicePrincipalKey { get; set; } + + /// + /// Gets or sets the service principal credential type to use in + /// Server-To-Server authentication. 'ServicePrincipalKey' for + /// key/secret, 'ServicePrincipalCert' for certificate. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalCredentialType")] + public object ServicePrincipalCredentialType { get; set; } + + /// + /// Gets or sets the credential of the service principal object in + /// Azure Active Directory. If servicePrincipalCredentialType is + /// 'ServicePrincipalKey', servicePrincipalCredential can be + /// SecureString or AzureKeyVaultSecretReference. If + /// servicePrincipalCredentialType is 'ServicePrincipalCert', + /// servicePrincipalCredential can only be + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalCredential")] + public SecretBase ServicePrincipalCredential { get; set; } + + /// + /// Gets or sets the name or ID of the tenant to which the service + /// principal belongs. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.tenant")] + public object Tenant { get; set; } + + /// + /// Gets or sets indicates the azure cloud type of the service + /// principle auth. Allowed values are AzurePublic, AzureChina, + /// AzureUsGovernment, AzureGermany. Default value is the data factory + /// regions’ cloud type. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.azureCloudType")] + public object AzureCloudType { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets sql always encrypted properties. + /// + [JsonProperty(PropertyName = "typeProperties.alwaysEncryptedSettings")] + public SqlAlwaysEncryptedProperties AlwaysEncryptedSettings { get; set; } + + /// + /// Gets or sets the credential reference containing authentication + /// information. + /// + [JsonProperty(PropertyName = "typeProperties.credential")] + public CredentialReference Credential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Password != null) + { + Password.Validate(); + } + if (AlwaysEncryptedSettings != null) + { + AlwaysEncryptedSettings.Validate(); + } + if (Credential != null) + { + Credential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlMITableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlMITableDataset.cs new file mode 100644 index 000000000000..c98b4cf7dd9c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlMITableDataset.cs @@ -0,0 +1,108 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Azure SQL Managed Instance dataset. + /// + [Newtonsoft.Json.JsonObject("AzureSqlMITable")] + [Rest.Serialization.JsonTransformation] + public partial class AzureSqlMITableDataset : Dataset + { + /// + /// Initializes a new instance of the AzureSqlMITableDataset class. + /// + public AzureSqlMITableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureSqlMITableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// This property will be retired. Please + /// consider using schema + table properties instead. + /// The schema name of the + /// Azure SQL Managed Instance. Type: string (or Expression with + /// resultType string). + /// The table name of the Azure SQL Managed + /// Instance dataset. Type: string (or Expression with resultType + /// string). + public AzureSqlMITableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object), object azureSqlMITableDatasetSchema = default(object), object table = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + AzureSqlMITableDatasetSchema = azureSqlMITableDatasetSchema; + Table = table; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property will be retired. Please consider using + /// schema + table properties instead. + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Gets or sets the schema name of the Azure SQL Managed Instance. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object AzureSqlMITableDatasetSchema { get; set; } + + /// + /// Gets or sets the table name of the Azure SQL Managed Instance + /// dataset. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlSink.cs new file mode 100644 index 000000000000..e5a7c233e4ca --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlSink.cs @@ -0,0 +1,158 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure SQL sink. + /// + public partial class AzureSqlSink : CopySink + { + /// + /// Initializes a new instance of the AzureSqlSink class. + /// + public AzureSqlSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureSqlSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// SQL writer stored + /// procedure name. Type: string (or Expression with resultType + /// string). + /// SQL writer table type. Type: + /// string (or Expression with resultType string). + /// SQL pre-copy script. Type: string (or + /// Expression with resultType string). + /// SQL stored procedure + /// parameters. + /// The stored + /// procedure parameter name of the table type. Type: string (or + /// Expression with resultType string). + /// The option to handle sink table, such as + /// autoCreate. For now only 'autoCreate' value is supported. Type: + /// string (or Expression with resultType string). + /// Whether to use table lock + /// during bulk copy. Type: boolean (or Expression with resultType + /// boolean). + /// Write behavior when copying data into + /// Azure SQL. Type: SqlWriteBehaviorEnum (or Expression with + /// resultType SqlWriteBehaviorEnum) + /// SQL upsert settings. + public AzureSqlSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object sqlWriterStoredProcedureName = default(object), object sqlWriterTableType = default(object), object preCopyScript = default(object), object storedProcedureParameters = default(object), object storedProcedureTableTypeParameterName = default(object), object tableOption = default(object), object sqlWriterUseTableLock = default(object), object writeBehavior = default(object), SqlUpsertSettings upsertSettings = default(SqlUpsertSettings)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + SqlWriterStoredProcedureName = sqlWriterStoredProcedureName; + SqlWriterTableType = sqlWriterTableType; + PreCopyScript = preCopyScript; + StoredProcedureParameters = storedProcedureParameters; + StoredProcedureTableTypeParameterName = storedProcedureTableTypeParameterName; + TableOption = tableOption; + SqlWriterUseTableLock = sqlWriterUseTableLock; + WriteBehavior = writeBehavior; + UpsertSettings = upsertSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SQL writer stored procedure name. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "sqlWriterStoredProcedureName")] + public object SqlWriterStoredProcedureName { get; set; } + + /// + /// Gets or sets SQL writer table type. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "sqlWriterTableType")] + public object SqlWriterTableType { get; set; } + + /// + /// Gets or sets SQL pre-copy script. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "preCopyScript")] + public object PreCopyScript { get; set; } + + /// + /// Gets or sets SQL stored procedure parameters. + /// + [JsonProperty(PropertyName = "storedProcedureParameters")] + public object StoredProcedureParameters { get; set; } + + /// + /// Gets or sets the stored procedure parameter name of the table type. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "storedProcedureTableTypeParameterName")] + public object StoredProcedureTableTypeParameterName { get; set; } + + /// + /// Gets or sets the option to handle sink table, such as autoCreate. + /// For now only 'autoCreate' value is supported. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "tableOption")] + public object TableOption { get; set; } + + /// + /// Gets or sets whether to use table lock during bulk copy. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "sqlWriterUseTableLock")] + public object SqlWriterUseTableLock { get; set; } + + /// + /// Gets or sets write behavior when copying data into Azure SQL. Type: + /// SqlWriteBehaviorEnum (or Expression with resultType + /// SqlWriteBehaviorEnum) + /// + [JsonProperty(PropertyName = "writeBehavior")] + public object WriteBehavior { get; set; } + + /// + /// Gets or sets SQL upsert settings. + /// + [JsonProperty(PropertyName = "upsertSettings")] + public SqlUpsertSettings UpsertSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlSource.cs new file mode 100644 index 000000000000..210bd0dcd765 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlSource.cs @@ -0,0 +1,148 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure SQL source. + /// + public partial class AzureSqlSource : TabularSource + { + /// + /// Initializes a new instance of the AzureSqlSource class. + /// + public AzureSqlSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureSqlSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// SQL reader query. Type: string (or + /// Expression with resultType string). + /// Name of the stored + /// procedure for a SQL Database source. This cannot be used at the + /// same time as SqlReaderQuery. Type: string (or Expression with + /// resultType string). + /// Value and type setting for + /// stored procedure parameters. Example: "{Parameter1: {value: "1", + /// type: "int"}}". + /// Specifies the transaction locking + /// behavior for the SQL source. Allowed values: + /// ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. + /// The default value is ReadCommitted. Type: string (or Expression + /// with resultType string). + /// Which additional types to + /// produce. + /// The partition mechanism that will be + /// used for Sql read in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". Type: string (or + /// Expression with resultType string). + /// The settings that will be leveraged + /// for Sql source partitioning. + public AzureSqlSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object sqlReaderQuery = default(object), object sqlReaderStoredProcedureName = default(object), object storedProcedureParameters = default(object), object isolationLevel = default(object), object produceAdditionalTypes = default(object), object partitionOption = default(object), SqlPartitionSettings partitionSettings = default(SqlPartitionSettings)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + SqlReaderQuery = sqlReaderQuery; + SqlReaderStoredProcedureName = sqlReaderStoredProcedureName; + StoredProcedureParameters = storedProcedureParameters; + IsolationLevel = isolationLevel; + ProduceAdditionalTypes = produceAdditionalTypes; + PartitionOption = partitionOption; + PartitionSettings = partitionSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SQL reader query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "sqlReaderQuery")] + public object SqlReaderQuery { get; set; } + + /// + /// Gets or sets name of the stored procedure for a SQL Database + /// source. This cannot be used at the same time as SqlReaderQuery. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "sqlReaderStoredProcedureName")] + public object SqlReaderStoredProcedureName { get; set; } + + /// + /// Gets or sets value and type setting for stored procedure + /// parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + /// + [JsonProperty(PropertyName = "storedProcedureParameters")] + public object StoredProcedureParameters { get; set; } + + /// + /// Gets or sets specifies the transaction locking behavior for the SQL + /// source. Allowed values: + /// ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. + /// The default value is ReadCommitted. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "isolationLevel")] + public object IsolationLevel { get; set; } + + /// + /// Gets or sets which additional types to produce. + /// + [JsonProperty(PropertyName = "produceAdditionalTypes")] + public object ProduceAdditionalTypes { get; set; } + + /// + /// Gets or sets the partition mechanism that will be used for Sql read + /// in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionOption")] + public object PartitionOption { get; set; } + + /// + /// Gets or sets the settings that will be leveraged for Sql source + /// partitioning. + /// + [JsonProperty(PropertyName = "partitionSettings")] + public SqlPartitionSettings PartitionSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlTableDataset.cs new file mode 100644 index 000000000000..9c9dc3ad7470 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSqlTableDataset.cs @@ -0,0 +1,107 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Azure SQL Server database dataset. + /// + [Newtonsoft.Json.JsonObject("AzureSqlTable")] + [Rest.Serialization.JsonTransformation] + public partial class AzureSqlTableDataset : Dataset + { + /// + /// Initializes a new instance of the AzureSqlTableDataset class. + /// + public AzureSqlTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureSqlTableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// This property will be retired. Please + /// consider using schema + table properties instead. + /// The schema name of the + /// Azure SQL database. Type: string (or Expression with resultType + /// string). + /// The table name of the Azure SQL database. Type: + /// string (or Expression with resultType string). + public AzureSqlTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object), object azureSqlTableDatasetSchema = default(object), object table = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + AzureSqlTableDatasetSchema = azureSqlTableDatasetSchema; + Table = table; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property will be retired. Please consider using + /// schema + table properties instead. + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Gets or sets the schema name of the Azure SQL database. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object AzureSqlTableDatasetSchema { get; set; } + + /// + /// Gets or sets the table name of the Azure SQL database. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureStorageAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureStorageAuthenticationType.cs new file mode 100644 index 000000000000..27ed0889979a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureStorageAuthenticationType.cs @@ -0,0 +1,25 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for AzureStorageAuthenticationType. + /// + public static class AzureStorageAuthenticationType + { + public const string Anonymous = "Anonymous"; + public const string AccountKey = "AccountKey"; + public const string SasUri = "SasUri"; + public const string ServicePrincipal = "ServicePrincipal"; + public const string Msi = "Msi"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureStorageLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureStorageLinkedService.cs new file mode 100644 index 000000000000..aca25ffb50c5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureStorageLinkedService.cs @@ -0,0 +1,132 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The storage account linked service. + /// + [Newtonsoft.Json.JsonObject("AzureStorage")] + [Rest.Serialization.JsonTransformation] + public partial class AzureStorageLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AzureStorageLinkedService class. + /// + public AzureStorageLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureStorageLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The connection string. It is + /// mutually exclusive with sasUri property. Type: string, SecureString + /// or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of + /// accountKey in connection string. + /// SAS URI of the Azure Storage resource. It is + /// mutually exclusive with connectionString property. Type: string, + /// SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of + /// sasToken in sas uri. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public AzureStorageLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object connectionString = default(object), AzureKeyVaultSecretReference accountKey = default(AzureKeyVaultSecretReference), object sasUri = default(object), AzureKeyVaultSecretReference sasToken = default(AzureKeyVaultSecretReference), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionString = connectionString; + AccountKey = accountKey; + SasUri = sasUri; + SasToken = sasToken; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the connection string. It is mutually exclusive with + /// sasUri property. Type: string, SecureString or + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of accountKey in + /// connection string. + /// + [JsonProperty(PropertyName = "typeProperties.accountKey")] + public AzureKeyVaultSecretReference AccountKey { get; set; } + + /// + /// Gets or sets SAS URI of the Azure Storage resource. It is mutually + /// exclusive with connectionString property. Type: string, + /// SecureString or AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.sasUri")] + public object SasUri { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of sasToken in + /// sas uri. + /// + [JsonProperty(PropertyName = "typeProperties.sasToken")] + public AzureKeyVaultSecretReference SasToken { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (AccountKey != null) + { + AccountKey.Validate(); + } + if (SasToken != null) + { + SasToken.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSynapseArtifactsLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSynapseArtifactsLinkedService.cs new file mode 100644 index 000000000000..979239dc287b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureSynapseArtifactsLinkedService.cs @@ -0,0 +1,114 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure Synapse Analytics (Artifacts) linked service. + /// + [Newtonsoft.Json.JsonObject("AzureSynapseArtifacts")] + [Rest.Serialization.JsonTransformation] + public partial class AzureSynapseArtifactsLinkedService : LinkedService + { + /// + /// Initializes a new instance of the + /// AzureSynapseArtifactsLinkedService class. + /// + public AzureSynapseArtifactsLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// AzureSynapseArtifactsLinkedService class. + /// + /// https://<workspacename>.dev.azuresynapse.net, + /// Azure Synapse Analytics workspace URL. Type: string (or Expression + /// with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Required to specify MSI, if using + /// system assigned managed identity as authentication method. Type: + /// string (or Expression with resultType string). + /// The resource ID of the Synapse + /// workspace. The format should be: + /// /subscriptions/{subscriptionID}/resourceGroups/{resourceGroup}/providers/Microsoft.Synapse/workspaces/{workspaceName}. + /// Type: string (or Expression with resultType string). + public AzureSynapseArtifactsLinkedService(object endpoint, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object authentication = default(object), object workspaceResourceId = default(object)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Endpoint = endpoint; + Authentication = authentication; + WorkspaceResourceId = workspaceResourceId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets + /// https://&lt;workspacename&gt;.dev.azuresynapse.net, Azure + /// Synapse Analytics workspace URL. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.endpoint")] + public object Endpoint { get; set; } + + /// + /// Gets or sets required to specify MSI, if using system assigned + /// managed identity as authentication method. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.authentication")] + public object Authentication { get; set; } + + /// + /// Gets or sets the resource ID of the Synapse workspace. The format + /// should be: + /// /subscriptions/{subscriptionID}/resourceGroups/{resourceGroup}/providers/Microsoft.Synapse/workspaces/{workspaceName}. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.workspaceResourceId")] + public object WorkspaceResourceId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Endpoint == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Endpoint"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureTableDataset.cs new file mode 100644 index 000000000000..0cf3a16350fb --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureTableDataset.cs @@ -0,0 +1,90 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Azure Table storage dataset. + /// + [Newtonsoft.Json.JsonObject("AzureTable")] + [Rest.Serialization.JsonTransformation] + public partial class AzureTableDataset : Dataset + { + /// + /// Initializes a new instance of the AzureTableDataset class. + /// + public AzureTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureTableDataset class. + /// + /// Linked service reference. + /// The table name of the Azure Table storage. + /// Type: string (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + public AzureTableDataset(LinkedServiceReference linkedServiceName, object tableName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name of the Azure Table storage. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (TableName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TableName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureTableSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureTableSink.cs new file mode 100644 index 000000000000..43a902f560fe --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureTableSink.cs @@ -0,0 +1,105 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure Table sink. + /// + public partial class AzureTableSink : CopySink + { + /// + /// Initializes a new instance of the AzureTableSink class. + /// + public AzureTableSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureTableSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Azure Table + /// default partition key value. Type: string (or Expression with + /// resultType string). + /// Azure Table partition key + /// name. Type: string (or Expression with resultType string). + /// Azure Table row key name. Type: + /// string (or Expression with resultType string). + /// Azure Table insert type. Type: + /// string (or Expression with resultType string). + public AzureTableSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object azureTableDefaultPartitionKeyValue = default(object), object azureTablePartitionKeyName = default(object), object azureTableRowKeyName = default(object), object azureTableInsertType = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + AzureTableDefaultPartitionKeyValue = azureTableDefaultPartitionKeyValue; + AzureTablePartitionKeyName = azureTablePartitionKeyName; + AzureTableRowKeyName = azureTableRowKeyName; + AzureTableInsertType = azureTableInsertType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets azure Table default partition key value. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "azureTableDefaultPartitionKeyValue")] + public object AzureTableDefaultPartitionKeyValue { get; set; } + + /// + /// Gets or sets azure Table partition key name. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "azureTablePartitionKeyName")] + public object AzureTablePartitionKeyName { get; set; } + + /// + /// Gets or sets azure Table row key name. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "azureTableRowKeyName")] + public object AzureTableRowKeyName { get; set; } + + /// + /// Gets or sets azure Table insert type. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "azureTableInsertType")] + public object AzureTableInsertType { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureTableSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureTableSource.cs new file mode 100644 index 000000000000..48541d68fa69 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureTableSource.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure Table source. + /// + public partial class AzureTableSource : TabularSource + { + /// + /// Initializes a new instance of the AzureTableSource class. + /// + public AzureTableSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureTableSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// Azure Table source query. Type: + /// string (or Expression with resultType string). + /// Azure Table + /// source ignore table not found. Type: boolean (or Expression with + /// resultType boolean). + public AzureTableSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object azureTableSourceQuery = default(object), object azureTableSourceIgnoreTableNotFound = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + AzureTableSourceQuery = azureTableSourceQuery; + AzureTableSourceIgnoreTableNotFound = azureTableSourceIgnoreTableNotFound; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets azure Table source query. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "azureTableSourceQuery")] + public object AzureTableSourceQuery { get; set; } + + /// + /// Gets or sets azure Table source ignore table not found. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "azureTableSourceIgnoreTableNotFound")] + public object AzureTableSourceIgnoreTableNotFound { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureTableStorageLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureTableStorageLinkedService.cs new file mode 100644 index 000000000000..8e7a4898acd4 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AzureTableStorageLinkedService.cs @@ -0,0 +1,160 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The azure table storage linked service. + /// + [Newtonsoft.Json.JsonObject("AzureTableStorage")] + [Rest.Serialization.JsonTransformation] + public partial class AzureTableStorageLinkedService : LinkedService + { + /// + /// Initializes a new instance of the AzureTableStorageLinkedService + /// class. + /// + public AzureTableStorageLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AzureTableStorageLinkedService + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The connection string. It is + /// mutually exclusive with sasUri property. Type: string, SecureString + /// or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of + /// accountKey in connection string. + /// SAS URI of the Azure Storage resource. It is + /// mutually exclusive with connectionString property. Type: string, + /// SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of + /// sasToken in sas uri. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// Table service endpoint of the Azure + /// Table Storage resource. It is mutually exclusive with + /// connectionString, sasUri property. + /// The credential reference containing + /// authentication information. + public AzureTableStorageLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object connectionString = default(object), AzureKeyVaultSecretReference accountKey = default(AzureKeyVaultSecretReference), object sasUri = default(object), AzureKeyVaultSecretReference sasToken = default(AzureKeyVaultSecretReference), string encryptedCredential = default(string), object serviceEndpoint = default(object), CredentialReference credential = default(CredentialReference)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionString = connectionString; + AccountKey = accountKey; + SasUri = sasUri; + SasToken = sasToken; + EncryptedCredential = encryptedCredential; + ServiceEndpoint = serviceEndpoint; + Credential = credential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the connection string. It is mutually exclusive with + /// sasUri property. Type: string, SecureString or + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of accountKey in + /// connection string. + /// + [JsonProperty(PropertyName = "typeProperties.accountKey")] + public AzureKeyVaultSecretReference AccountKey { get; set; } + + /// + /// Gets or sets SAS URI of the Azure Storage resource. It is mutually + /// exclusive with connectionString property. Type: string, + /// SecureString or AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.sasUri")] + public object SasUri { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of sasToken in + /// sas uri. + /// + [JsonProperty(PropertyName = "typeProperties.sasToken")] + public AzureKeyVaultSecretReference SasToken { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets table service endpoint of the Azure Table Storage + /// resource. It is mutually exclusive with connectionString, sasUri + /// property. + /// + [JsonProperty(PropertyName = "typeProperties.serviceEndpoint")] + public object ServiceEndpoint { get; set; } + + /// + /// Gets or sets the credential reference containing authentication + /// information. + /// + [JsonProperty(PropertyName = "typeProperties.credential")] + public CredentialReference Credential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (AccountKey != null) + { + AccountKey.Validate(); + } + if (SasToken != null) + { + SasToken.Validate(); + } + if (Credential != null) + { + Credential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BigDataPoolParametrizationReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BigDataPoolParametrizationReference.cs new file mode 100644 index 000000000000..f23ca69df67d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BigDataPoolParametrizationReference.cs @@ -0,0 +1,82 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Big data pool reference type. + /// + public partial class BigDataPoolParametrizationReference + { + /// + /// Initializes a new instance of the + /// BigDataPoolParametrizationReference class. + /// + public BigDataPoolParametrizationReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// BigDataPoolParametrizationReference class. + /// + /// Reference big data pool name. Type: + /// string (or Expression with resultType string). + public BigDataPoolParametrizationReference(object referenceName) + { + ReferenceName = referenceName; + CustomInit(); + } + /// + /// Static constructor for BigDataPoolParametrizationReference class. + /// + static BigDataPoolParametrizationReference() + { + Type = "BigDataPoolReference"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets reference big data pool name. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "referenceName")] + public object ReferenceName { get; set; } + + /// + /// Big data pool reference type. + /// + [JsonProperty(PropertyName = "type")] + public static string Type { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ReferenceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ReferenceName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BinaryDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BinaryDataset.cs new file mode 100644 index 000000000000..78be5e1d668f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BinaryDataset.cs @@ -0,0 +1,102 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Binary dataset. + /// + [Newtonsoft.Json.JsonObject("Binary")] + [Rest.Serialization.JsonTransformation] + public partial class BinaryDataset : Dataset + { + /// + /// Initializes a new instance of the BinaryDataset class. + /// + public BinaryDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the BinaryDataset class. + /// + /// Linked service reference. + /// The location of the Binary storage. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The data compression method used for the + /// binary dataset. + public BinaryDataset(LinkedServiceReference linkedServiceName, DatasetLocation location, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), DatasetCompression compression = default(DatasetCompression)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Location = location; + Compression = compression; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the location of the Binary storage. + /// + [JsonProperty(PropertyName = "typeProperties.location")] + public DatasetLocation Location { get; set; } + + /// + /// Gets or sets the data compression method used for the binary + /// dataset. + /// + [JsonProperty(PropertyName = "typeProperties.compression")] + public DatasetCompression Compression { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Location"); + } + if (Compression != null) + { + Compression.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BinaryReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BinaryReadSettings.cs new file mode 100644 index 000000000000..9488ce06d542 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BinaryReadSettings.cs @@ -0,0 +1,56 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Binary read settings. + /// + public partial class BinaryReadSettings : FormatReadSettings + { + /// + /// Initializes a new instance of the BinaryReadSettings class. + /// + public BinaryReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the BinaryReadSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Compression settings. + public BinaryReadSettings(IDictionary additionalProperties = default(IDictionary), CompressionReadSettings compressionProperties = default(CompressionReadSettings)) + : base(additionalProperties) + { + CompressionProperties = compressionProperties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets compression settings. + /// + [JsonProperty(PropertyName = "compressionProperties")] + public CompressionReadSettings CompressionProperties { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BinarySink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BinarySink.cs new file mode 100644 index 000000000000..ab1b00c4b2ac --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BinarySink.cs @@ -0,0 +1,72 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Binary sink. + /// + public partial class BinarySink : CopySink + { + /// + /// Initializes a new instance of the BinarySink class. + /// + public BinarySink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the BinarySink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Binary store settings. + public BinarySink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), StoreWriteSettings storeSettings = default(StoreWriteSettings)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + StoreSettings = storeSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets binary store settings. + /// + [JsonProperty(PropertyName = "storeSettings")] + public StoreWriteSettings StoreSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BinarySource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BinarySource.cs new file mode 100644 index 000000000000..71c7bde2e2d9 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BinarySource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Binary source. + /// + public partial class BinarySource : CopySource + { + /// + /// Initializes a new instance of the BinarySource class. + /// + public BinarySource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the BinarySource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Binary store settings. + /// Binary format settings. + public BinarySource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), StoreReadSettings storeSettings = default(StoreReadSettings), BinaryReadSettings formatSettings = default(BinaryReadSettings)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + StoreSettings = storeSettings; + FormatSettings = formatSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets binary store settings. + /// + [JsonProperty(PropertyName = "storeSettings")] + public StoreReadSettings StoreSettings { get; set; } + + /// + /// Gets or sets binary format settings. + /// + [JsonProperty(PropertyName = "formatSettings")] + public BinaryReadSettings FormatSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BlobEventTypes.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BlobEventTypes.cs new file mode 100644 index 000000000000..6c56e2e943d8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BlobEventTypes.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for BlobEventTypes. + /// + public static class BlobEventTypes + { + public const string MicrosoftStorageBlobCreated = "Microsoft.Storage.BlobCreated"; + public const string MicrosoftStorageBlobDeleted = "Microsoft.Storage.BlobDeleted"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BlobEventsTrigger.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BlobEventsTrigger.cs new file mode 100644 index 000000000000..93d16ba6dc4b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BlobEventsTrigger.cs @@ -0,0 +1,135 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Trigger that runs every time a Blob event occurs. + /// + [Rest.Serialization.JsonTransformation] + public partial class BlobEventsTrigger : MultiplePipelineTrigger + { + /// + /// Initializes a new instance of the BlobEventsTrigger class. + /// + public BlobEventsTrigger() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the BlobEventsTrigger class. + /// + /// The type of events that cause this trigger to + /// fire. + /// The ARM resource ID of the Storage + /// Account. + /// Unmatched properties from the + /// message are deserialized this collection + /// Trigger description. + /// Indicates if trigger is running or not. + /// Updated when Start/Stop APIs are called on the Trigger. Possible + /// values include: 'Started', 'Stopped', 'Disabled' + /// List of tags that can be used for + /// describing the trigger. + /// Pipelines that need to be started. + /// The blob path must begin with the + /// pattern provided for trigger to fire. For example, + /// '/records/blobs/december/' will only fire the trigger for blobs in + /// the december folder under the records container. At least one of + /// these must be provided: blobPathBeginsWith, + /// blobPathEndsWith. + /// The blob path must end with the + /// pattern provided for trigger to fire. For example, + /// 'december/boxes.csv' will only fire the trigger for blobs named + /// boxes in a december folder. At least one of these must be provided: + /// blobPathBeginsWith, blobPathEndsWith. + /// If set to true, blobs with zero + /// bytes will be ignored. + public BlobEventsTrigger(IList events, string scope, IDictionary additionalProperties = default(IDictionary), string description = default(string), string runtimeState = default(string), IList annotations = default(IList), IList pipelines = default(IList), string blobPathBeginsWith = default(string), string blobPathEndsWith = default(string), bool? ignoreEmptyBlobs = default(bool?)) + : base(additionalProperties, description, runtimeState, annotations, pipelines) + { + BlobPathBeginsWith = blobPathBeginsWith; + BlobPathEndsWith = blobPathEndsWith; + IgnoreEmptyBlobs = ignoreEmptyBlobs; + Events = events; + Scope = scope; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the blob path must begin with the pattern provided for + /// trigger to fire. For example, '/records/blobs/december/' will only + /// fire the trigger for blobs in the december folder under the records + /// container. At least one of these must be provided: + /// blobPathBeginsWith, blobPathEndsWith. + /// + [JsonProperty(PropertyName = "typeProperties.blobPathBeginsWith")] + public string BlobPathBeginsWith { get; set; } + + /// + /// Gets or sets the blob path must end with the pattern provided for + /// trigger to fire. For example, 'december/boxes.csv' will only fire + /// the trigger for blobs named boxes in a december folder. At least + /// one of these must be provided: blobPathBeginsWith, + /// blobPathEndsWith. + /// + [JsonProperty(PropertyName = "typeProperties.blobPathEndsWith")] + public string BlobPathEndsWith { get; set; } + + /// + /// Gets or sets if set to true, blobs with zero bytes will be ignored. + /// + [JsonProperty(PropertyName = "typeProperties.ignoreEmptyBlobs")] + public bool? IgnoreEmptyBlobs { get; set; } + + /// + /// Gets or sets the type of events that cause this trigger to fire. + /// + [JsonProperty(PropertyName = "typeProperties.events")] + public IList Events { get; set; } + + /// + /// Gets or sets the ARM resource ID of the Storage Account. + /// + [JsonProperty(PropertyName = "typeProperties.scope")] + public string Scope { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Events == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Events"); + } + if (Scope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Scope"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BlobSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BlobSink.cs new file mode 100644 index 000000000000..1ca0be7d6217 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BlobSink.cs @@ -0,0 +1,116 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure Blob sink. + /// + public partial class BlobSink : CopySink + { + /// + /// Initializes a new instance of the BlobSink class. + /// + public BlobSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the BlobSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Blob writer overwrite files. + /// Type: boolean (or Expression with resultType boolean). + /// Blob writer date time + /// format. Type: string (or Expression with resultType + /// string). + /// Blob writer add header. Type: + /// boolean (or Expression with resultType boolean). + /// The type of copy behavior for copy + /// sink. + /// Specify the custom metadata to be added to + /// sink data. Type: array of objects (or Expression with resultType + /// array of objects). + public BlobSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object blobWriterOverwriteFiles = default(object), object blobWriterDateTimeFormat = default(object), object blobWriterAddHeader = default(object), object copyBehavior = default(object), IList metadata = default(IList)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + BlobWriterOverwriteFiles = blobWriterOverwriteFiles; + BlobWriterDateTimeFormat = blobWriterDateTimeFormat; + BlobWriterAddHeader = blobWriterAddHeader; + CopyBehavior = copyBehavior; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets blob writer overwrite files. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "blobWriterOverwriteFiles")] + public object BlobWriterOverwriteFiles { get; set; } + + /// + /// Gets or sets blob writer date time format. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "blobWriterDateTimeFormat")] + public object BlobWriterDateTimeFormat { get; set; } + + /// + /// Gets or sets blob writer add header. Type: boolean (or Expression + /// with resultType boolean). + /// + [JsonProperty(PropertyName = "blobWriterAddHeader")] + public object BlobWriterAddHeader { get; set; } + + /// + /// Gets or sets the type of copy behavior for copy sink. + /// + [JsonProperty(PropertyName = "copyBehavior")] + public object CopyBehavior { get; set; } + + /// + /// Gets or sets specify the custom metadata to be added to sink data. + /// Type: array of objects (or Expression with resultType array of + /// objects). + /// + [JsonProperty(PropertyName = "metadata")] + public IList Metadata { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BlobSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BlobSource.cs new file mode 100644 index 000000000000..b3ec0bf75ea5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BlobSource.cs @@ -0,0 +1,92 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure Blob source. + /// + public partial class BlobSource : CopySource + { + /// + /// Initializes a new instance of the BlobSource class. + /// + public BlobSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the BlobSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Treat empty as null. Type: boolean + /// (or Expression with resultType boolean). + /// Number of header lines to skip + /// from each blob. Type: integer (or Expression with resultType + /// integer). + /// If true, files under the folder path will + /// be read recursively. Default is true. Type: boolean (or Expression + /// with resultType boolean). + public BlobSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object treatEmptyAsNull = default(object), object skipHeaderLineCount = default(object), object recursive = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + TreatEmptyAsNull = treatEmptyAsNull; + SkipHeaderLineCount = skipHeaderLineCount; + Recursive = recursive; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets treat empty as null. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "treatEmptyAsNull")] + public object TreatEmptyAsNull { get; set; } + + /// + /// Gets or sets number of header lines to skip from each blob. Type: + /// integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "skipHeaderLineCount")] + public object SkipHeaderLineCount { get; set; } + + /// + /// Gets or sets if true, files under the folder path will be read + /// recursively. Default is true. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "recursive")] + public object Recursive { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BlobTrigger.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BlobTrigger.cs new file mode 100644 index 000000000000..63ecbf8730c8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/BlobTrigger.cs @@ -0,0 +1,109 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Trigger that runs every time the selected Blob container changes. + /// + [Rest.Serialization.JsonTransformation] + public partial class BlobTrigger : MultiplePipelineTrigger + { + /// + /// Initializes a new instance of the BlobTrigger class. + /// + public BlobTrigger() + { + LinkedService = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the BlobTrigger class. + /// + /// The path of the container/folder that will + /// trigger the pipeline. + /// The max number of parallel files to + /// handle when it is triggered. + /// The Azure Storage linked service + /// reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Trigger description. + /// Indicates if trigger is running or not. + /// Updated when Start/Stop APIs are called on the Trigger. Possible + /// values include: 'Started', 'Stopped', 'Disabled' + /// List of tags that can be used for + /// describing the trigger. + /// Pipelines that need to be started. + public BlobTrigger(string folderPath, int maxConcurrency, LinkedServiceReference linkedService, IDictionary additionalProperties = default(IDictionary), string description = default(string), string runtimeState = default(string), IList annotations = default(IList), IList pipelines = default(IList)) + : base(additionalProperties, description, runtimeState, annotations, pipelines) + { + FolderPath = folderPath; + MaxConcurrency = maxConcurrency; + LinkedService = linkedService; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the path of the container/folder that will trigger the + /// pipeline. + /// + [JsonProperty(PropertyName = "typeProperties.folderPath")] + public string FolderPath { get; set; } + + /// + /// Gets or sets the max number of parallel files to handle when it is + /// triggered. + /// + [JsonProperty(PropertyName = "typeProperties.maxConcurrency")] + public int MaxConcurrency { get; set; } + + /// + /// Gets or sets the Azure Storage linked service reference. + /// + [JsonProperty(PropertyName = "typeProperties.linkedService")] + public LinkedServiceReference LinkedService { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (FolderPath == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "FolderPath"); + } + if (LinkedService == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "LinkedService"); + } + if (LinkedService != null) + { + LinkedService.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CMKIdentityDefinition.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CMKIdentityDefinition.cs new file mode 100644 index 000000000000..c9eabb262a4e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CMKIdentityDefinition.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Managed Identity used for CMK. + /// + public partial class CMKIdentityDefinition + { + /// + /// Initializes a new instance of the CMKIdentityDefinition class. + /// + public CMKIdentityDefinition() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CMKIdentityDefinition class. + /// + /// The resource id of the user + /// assigned identity to authenticate to customer's key vault. + public CMKIdentityDefinition(string userAssignedIdentity = default(string)) + { + UserAssignedIdentity = userAssignedIdentity; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the resource id of the user assigned identity to + /// authenticate to customer's key vault. + /// + [JsonProperty(PropertyName = "userAssignedIdentity")] + public string UserAssignedIdentity { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CassandraLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CassandraLinkedService.cs new file mode 100644 index 000000000000..eaf9ec1cc2d8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CassandraLinkedService.cs @@ -0,0 +1,133 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for Cassandra data source. + /// + [Newtonsoft.Json.JsonObject("Cassandra")] + [Rest.Serialization.JsonTransformation] + public partial class CassandraLinkedService : LinkedService + { + /// + /// Initializes a new instance of the CassandraLinkedService class. + /// + public CassandraLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CassandraLinkedService class. + /// + /// Host name for connection. Type: string (or + /// Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// AuthenticationType to be used for + /// connection. Type: string (or Expression with resultType + /// string). + /// The port for the connection. Type: integer (or + /// Expression with resultType integer). + /// Username for authentication. Type: string + /// (or Expression with resultType string). + /// Password for authentication. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public CassandraLinkedService(object host, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object authenticationType = default(object), object port = default(object), object username = default(object), SecretBase password = default(SecretBase), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Host = host; + AuthenticationType = authenticationType; + Port = port; + Username = username; + Password = password; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets host name for connection. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.host")] + public object Host { get; set; } + + /// + /// Gets or sets authenticationType to be used for connection. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public object AuthenticationType { get; set; } + + /// + /// Gets or sets the port for the connection. Type: integer (or + /// Expression with resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.port")] + public object Port { get; set; } + + /// + /// Gets or sets username for authentication. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets password for authentication. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Host == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Host"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CassandraSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CassandraSource.cs new file mode 100644 index 000000000000..6d1bcb6df0db --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CassandraSource.cs @@ -0,0 +1,99 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for a Cassandra database. + /// + public partial class CassandraSource : TabularSource + { + /// + /// Initializes a new instance of the CassandraSource class. + /// + public CassandraSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CassandraSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// Database query. Should be a SQL-92 query + /// expression or Cassandra Query Language (CQL) command. Type: string + /// (or Expression with resultType string). + /// The consistency level specifies how + /// many Cassandra servers must respond to a read request before + /// returning data to the client application. Cassandra checks the + /// specified number of Cassandra servers for data to satisfy the read + /// request. Must be one of cassandraSourceReadConsistencyLevels. The + /// default value is 'ONE'. It is case-insensitive. Possible values + /// include: 'ALL', 'EACH_QUORUM', 'QUORUM', 'LOCAL_QUORUM', 'ONE', + /// 'TWO', 'THREE', 'LOCAL_ONE', 'SERIAL', 'LOCAL_SERIAL' + public CassandraSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object), string consistencyLevel = default(string)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + ConsistencyLevel = consistencyLevel; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets database query. Should be a SQL-92 query expression or + /// Cassandra Query Language (CQL) command. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets the consistency level specifies how many Cassandra + /// servers must respond to a read request before returning data to the + /// client application. Cassandra checks the specified number of + /// Cassandra servers for data to satisfy the read request. Must be one + /// of cassandraSourceReadConsistencyLevels. The default value is + /// 'ONE'. It is case-insensitive. Possible values include: 'ALL', + /// 'EACH_QUORUM', 'QUORUM', 'LOCAL_QUORUM', 'ONE', 'TWO', 'THREE', + /// 'LOCAL_ONE', 'SERIAL', 'LOCAL_SERIAL' + /// + [JsonProperty(PropertyName = "consistencyLevel")] + public string ConsistencyLevel { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CassandraSourceReadConsistencyLevels.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CassandraSourceReadConsistencyLevels.cs new file mode 100644 index 000000000000..9b05158f8c3c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CassandraSourceReadConsistencyLevels.cs @@ -0,0 +1,30 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for CassandraSourceReadConsistencyLevels. + /// + public static class CassandraSourceReadConsistencyLevels + { + public const string ALL = "ALL"; + public const string EACHQUORUM = "EACH_QUORUM"; + public const string QUORUM = "QUORUM"; + public const string LOCALQUORUM = "LOCAL_QUORUM"; + public const string ONE = "ONE"; + public const string TWO = "TWO"; + public const string THREE = "THREE"; + public const string LOCALONE = "LOCAL_ONE"; + public const string SERIAL = "SERIAL"; + public const string LOCALSERIAL = "LOCAL_SERIAL"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CassandraTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CassandraTableDataset.cs new file mode 100644 index 000000000000..b0be07f81f87 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CassandraTableDataset.cs @@ -0,0 +1,96 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Cassandra database dataset. + /// + [Newtonsoft.Json.JsonObject("CassandraTable")] + [Rest.Serialization.JsonTransformation] + public partial class CassandraTableDataset : Dataset + { + /// + /// Initializes a new instance of the CassandraTableDataset class. + /// + public CassandraTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the CassandraTableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name of the Cassandra database. + /// Type: string (or Expression with resultType string). + /// The keyspace of the Cassandra database. + /// Type: string (or Expression with resultType string). + public CassandraTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object), object keyspace = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + Keyspace = keyspace; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name of the Cassandra database. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Gets or sets the keyspace of the Cassandra database. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.keyspace")] + public object Keyspace { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ChainingTrigger.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ChainingTrigger.cs new file mode 100644 index 000000000000..5f3386bbedc7 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ChainingTrigger.cs @@ -0,0 +1,126 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Trigger that allows the referenced pipeline to depend on other pipeline + /// runs based on runDimension Name/Value pairs. Upstream pipelines should + /// declare the same runDimension Name and their runs should have the + /// values for those runDimensions. The referenced pipeline run would be + /// triggered if the values for the runDimension match for all upstream + /// pipeline runs. + /// + [Rest.Serialization.JsonTransformation] + public partial class ChainingTrigger : Trigger + { + /// + /// Initializes a new instance of the ChainingTrigger class. + /// + public ChainingTrigger() + { + Pipeline = new TriggerPipelineReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the ChainingTrigger class. + /// + /// Pipeline for which runs are created when all + /// upstream pipelines complete successfully. + /// Upstream Pipelines. + /// Run Dimension property that needs to be + /// emitted by upstream pipelines. + /// Unmatched properties from the + /// message are deserialized this collection + /// Trigger description. + /// Indicates if trigger is running or not. + /// Updated when Start/Stop APIs are called on the Trigger. Possible + /// values include: 'Started', 'Stopped', 'Disabled' + /// List of tags that can be used for + /// describing the trigger. + public ChainingTrigger(TriggerPipelineReference pipeline, IList dependsOn, string runDimension, IDictionary additionalProperties = default(IDictionary), string description = default(string), string runtimeState = default(string), IList annotations = default(IList)) + : base(additionalProperties, description, runtimeState, annotations) + { + Pipeline = pipeline; + DependsOn = dependsOn; + RunDimension = runDimension; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets pipeline for which runs are created when all upstream + /// pipelines complete successfully. + /// + [JsonProperty(PropertyName = "pipeline")] + public TriggerPipelineReference Pipeline { get; set; } + + /// + /// Gets or sets upstream Pipelines. + /// + [JsonProperty(PropertyName = "typeProperties.dependsOn")] + public IList DependsOn { get; set; } + + /// + /// Gets or sets run Dimension property that needs to be emitted by + /// upstream pipelines. + /// + [JsonProperty(PropertyName = "typeProperties.runDimension")] + public string RunDimension { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Pipeline == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Pipeline"); + } + if (DependsOn == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DependsOn"); + } + if (RunDimension == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "RunDimension"); + } + if (Pipeline != null) + { + Pipeline.Validate(); + } + if (DependsOn != null) + { + foreach (var element in DependsOn) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ChangeDataCaptureFolder.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ChangeDataCaptureFolder.cs new file mode 100644 index 000000000000..3f921c3d9bf9 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ChangeDataCaptureFolder.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The folder that this CDC is in. If not specified, CDC will appear at + /// the root level. + /// + public partial class ChangeDataCaptureFolder + { + /// + /// Initializes a new instance of the ChangeDataCaptureFolder class. + /// + public ChangeDataCaptureFolder() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ChangeDataCaptureFolder class. + /// + /// The name of the folder that this CDC is + /// in. + public ChangeDataCaptureFolder(string name = default(string)) + { + Name = name; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the folder that this CDC is in. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ChangeDataCaptureResource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ChangeDataCaptureResource.cs new file mode 100644 index 000000000000..91bf8f143579 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ChangeDataCaptureResource.cs @@ -0,0 +1,170 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Change data capture resource type. + /// + [Rest.Serialization.JsonTransformation] + public partial class ChangeDataCaptureResource : SubResource + { + /// + /// Initializes a new instance of the ChangeDataCaptureResource class. + /// + public ChangeDataCaptureResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ChangeDataCaptureResource class. + /// + /// List of sources connections + /// that can be used as sources in the CDC. + /// List of target connections that + /// can be used as sources in the CDC. + /// CDC policy + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + /// Unmatched properties from the + /// message are deserialized this collection + /// The folder that this CDC is in. If not + /// specified, CDC will appear at the root level. + /// The description of the change data + /// capture. + /// A boolean to determine if the vnet + /// configuration needs to be overwritten. + /// Status of the CDC as to if it is running or + /// stopped. + public ChangeDataCaptureResource(IList sourceConnectionsInfo, IList targetConnectionsInfo, MapperPolicy policy, string id = default(string), string name = default(string), string type = default(string), string etag = default(string), IDictionary additionalProperties = default(IDictionary), ChangeDataCaptureFolder folder = default(ChangeDataCaptureFolder), string description = default(string), bool? allowVNetOverride = default(bool?), string status = default(string)) + : base(id, name, type, etag) + { + AdditionalProperties = additionalProperties; + Folder = folder; + Description = description; + SourceConnectionsInfo = sourceConnectionsInfo; + TargetConnectionsInfo = targetConnectionsInfo; + Policy = policy; + AllowVNetOverride = allowVNetOverride; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets the folder that this CDC is in. If not specified, CDC + /// will appear at the root level. + /// + [JsonProperty(PropertyName = "properties.folder")] + public ChangeDataCaptureFolder Folder { get; set; } + + /// + /// Gets or sets the description of the change data capture. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets or sets list of sources connections that can be used as + /// sources in the CDC. + /// + [JsonProperty(PropertyName = "properties.sourceConnectionsInfo")] + public IList SourceConnectionsInfo { get; set; } + + /// + /// Gets or sets list of target connections that can be used as sources + /// in the CDC. + /// + [JsonProperty(PropertyName = "properties.targetConnectionsInfo")] + public IList TargetConnectionsInfo { get; set; } + + /// + /// Gets or sets CDC policy + /// + [JsonProperty(PropertyName = "properties.policy")] + public MapperPolicy Policy { get; set; } + + /// + /// Gets or sets a boolean to determine if the vnet configuration needs + /// to be overwritten. + /// + [JsonProperty(PropertyName = "properties.allowVNetOverride")] + public bool? AllowVNetOverride { get; set; } + + /// + /// Gets or sets status of the CDC as to if it is running or stopped. + /// + [JsonProperty(PropertyName = "properties.status")] + public string Status { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (SourceConnectionsInfo == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SourceConnectionsInfo"); + } + if (TargetConnectionsInfo == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TargetConnectionsInfo"); + } + if (Policy == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Policy"); + } + if (SourceConnectionsInfo != null) + { + foreach (var element in SourceConnectionsInfo) + { + if (element != null) + { + element.Validate(); + } + } + } + if (TargetConnectionsInfo != null) + { + foreach (var element1 in TargetConnectionsInfo) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CmdkeySetup.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CmdkeySetup.cs new file mode 100644 index 000000000000..1349a0872739 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CmdkeySetup.cs @@ -0,0 +1,93 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The custom setup of running cmdkey commands. + /// + [Rest.Serialization.JsonTransformation] + public partial class CmdkeySetup : CustomSetupBase + { + /// + /// Initializes a new instance of the CmdkeySetup class. + /// + public CmdkeySetup() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CmdkeySetup class. + /// + /// The server name of data source access. + /// Type: string. + /// The user name of data source access. Type: + /// string. + /// The password of data source access. + public CmdkeySetup(object targetName, object userName, SecretBase password) + { + TargetName = targetName; + UserName = userName; + Password = password; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the server name of data source access. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.targetName")] + public object TargetName { get; set; } + + /// + /// Gets or sets the user name of data source access. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets the password of data source access. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (TargetName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TargetName"); + } + if (UserName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "UserName"); + } + if (Password == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Password"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CommonDataServiceForAppsEntityDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CommonDataServiceForAppsEntityDataset.cs new file mode 100644 index 000000000000..8325649af1fd --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CommonDataServiceForAppsEntityDataset.cs @@ -0,0 +1,88 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Common Data Service for Apps entity dataset. + /// + [Newtonsoft.Json.JsonObject("CommonDataServiceForAppsEntity")] + [Rest.Serialization.JsonTransformation] + public partial class CommonDataServiceForAppsEntityDataset : Dataset + { + /// + /// Initializes a new instance of the + /// CommonDataServiceForAppsEntityDataset class. + /// + public CommonDataServiceForAppsEntityDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// CommonDataServiceForAppsEntityDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The logical name of the entity. Type: + /// string (or Expression with resultType string). + public CommonDataServiceForAppsEntityDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object entityName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + EntityName = entityName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the logical name of the entity. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.entityName")] + public object EntityName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CommonDataServiceForAppsLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CommonDataServiceForAppsLinkedService.cs new file mode 100644 index 000000000000..9585b6ace465 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CommonDataServiceForAppsLinkedService.cs @@ -0,0 +1,259 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Common Data Service for Apps linked service. + /// + [Newtonsoft.Json.JsonObject("CommonDataServiceForApps")] + [Rest.Serialization.JsonTransformation] + public partial class CommonDataServiceForAppsLinkedService : LinkedService + { + /// + /// Initializes a new instance of the + /// CommonDataServiceForAppsLinkedService class. + /// + public CommonDataServiceForAppsLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// CommonDataServiceForAppsLinkedService class. + /// + /// The deployment type of the Common Data + /// Service for Apps instance. 'Online' for Common Data Service for + /// Apps Online and 'OnPremisesWithIfd' for Common Data Service for + /// Apps on-premises with Ifd. Type: string (or Expression with + /// resultType string). + /// The authentication type to connect + /// to Common Data Service for Apps server. 'Office365' for online + /// scenario, 'Ifd' for on-premises with Ifd scenario. + /// 'AADServicePrincipal' for Server-To-Server authentication in online + /// scenario, 'Active Directory' for Dynamics on-premises with IFD. + /// Type: string (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The host name of the on-premises Common Data + /// Service for Apps server. The property is required for on-prem and + /// not allowed for online. Type: string (or Expression with resultType + /// string). + /// The port of on-premises Common Data Service for + /// Apps server. The property is required for on-prem and not allowed + /// for online. Default is 443. Type: integer (or Expression with + /// resultType integer), minimum: 0. + /// The URL to the Microsoft Common Data + /// Service for Apps server. The property is required for on-line and + /// not allowed for on-prem. Type: string (or Expression with + /// resultType string). + /// The organization name of the Common + /// Data Service for Apps instance. The property is required for + /// on-prem and required for online when there are more than one Common + /// Data Service for Apps instances associated with the user. Type: + /// string (or Expression with resultType string). + /// The Active Directory domain that will verify + /// user credentials. Type: string (or Expression with resultType + /// string). + /// User name to access the Common Data Service + /// for Apps instance. Type: string (or Expression with resultType + /// string). + /// Password to access the Common Data Service + /// for Apps instance. + /// The client ID of the application + /// in Azure Active Directory used for Server-To-Server authentication. + /// Type: string (or Expression with resultType string). + /// The service principal + /// credential type to use in Server-To-Server authentication. + /// 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for + /// certificate. Type: string (or Expression with resultType + /// string). + /// The credential of the + /// service principal object in Azure Active Directory. If + /// servicePrincipalCredentialType is 'ServicePrincipalKey', + /// servicePrincipalCredential can be SecureString or + /// AzureKeyVaultSecretReference. If servicePrincipalCredentialType is + /// 'ServicePrincipalCert', servicePrincipalCredential can only be + /// AzureKeyVaultSecretReference. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public CommonDataServiceForAppsLinkedService(object deploymentType, object authenticationType, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object hostName = default(object), object port = default(object), object serviceUri = default(object), object organizationName = default(object), object domain = default(object), object username = default(object), SecretBase password = default(SecretBase), object servicePrincipalId = default(object), object servicePrincipalCredentialType = default(object), SecretBase servicePrincipalCredential = default(SecretBase), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + DeploymentType = deploymentType; + HostName = hostName; + Port = port; + ServiceUri = serviceUri; + OrganizationName = organizationName; + AuthenticationType = authenticationType; + Domain = domain; + Username = username; + Password = password; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalCredentialType = servicePrincipalCredentialType; + ServicePrincipalCredential = servicePrincipalCredential; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the deployment type of the Common Data Service for + /// Apps instance. 'Online' for Common Data Service for Apps Online and + /// 'OnPremisesWithIfd' for Common Data Service for Apps on-premises + /// with Ifd. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.deploymentType")] + public object DeploymentType { get; set; } + + /// + /// Gets or sets the host name of the on-premises Common Data Service + /// for Apps server. The property is required for on-prem and not + /// allowed for online. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.hostName")] + public object HostName { get; set; } + + /// + /// Gets or sets the port of on-premises Common Data Service for Apps + /// server. The property is required for on-prem and not allowed for + /// online. Default is 443. Type: integer (or Expression with + /// resultType integer), minimum: 0. + /// + [JsonProperty(PropertyName = "typeProperties.port")] + public object Port { get; set; } + + /// + /// Gets or sets the URL to the Microsoft Common Data Service for Apps + /// server. The property is required for on-line and not allowed for + /// on-prem. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.serviceUri")] + public object ServiceUri { get; set; } + + /// + /// Gets or sets the organization name of the Common Data Service for + /// Apps instance. The property is required for on-prem and required + /// for online when there are more than one Common Data Service for + /// Apps instances associated with the user. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.organizationName")] + public object OrganizationName { get; set; } + + /// + /// Gets or sets the authentication type to connect to Common Data + /// Service for Apps server. 'Office365' for online scenario, 'Ifd' for + /// on-premises with Ifd scenario. 'AADServicePrincipal' for + /// Server-To-Server authentication in online scenario, 'Active + /// Directory' for Dynamics on-premises with IFD. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public object AuthenticationType { get; set; } + + /// + /// Gets or sets the Active Directory domain that will verify user + /// credentials. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.domain")] + public object Domain { get; set; } + + /// + /// Gets or sets user name to access the Common Data Service for Apps + /// instance. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets password to access the Common Data Service for Apps + /// instance. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the client ID of the application in Azure Active + /// Directory used for Server-To-Server authentication. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalId")] + public object ServicePrincipalId { get; set; } + + /// + /// Gets or sets the service principal credential type to use in + /// Server-To-Server authentication. 'ServicePrincipalKey' for + /// key/secret, 'ServicePrincipalCert' for certificate. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalCredentialType")] + public object ServicePrincipalCredentialType { get; set; } + + /// + /// Gets or sets the credential of the service principal object in + /// Azure Active Directory. If servicePrincipalCredentialType is + /// 'ServicePrincipalKey', servicePrincipalCredential can be + /// SecureString or AzureKeyVaultSecretReference. If + /// servicePrincipalCredentialType is 'ServicePrincipalCert', + /// servicePrincipalCredential can only be + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalCredential")] + public SecretBase ServicePrincipalCredential { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (DeploymentType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DeploymentType"); + } + if (AuthenticationType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AuthenticationType"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CommonDataServiceForAppsSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CommonDataServiceForAppsSink.cs new file mode 100644 index 000000000000..67010038f1fe --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CommonDataServiceForAppsSink.cs @@ -0,0 +1,104 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Common Data Service for Apps sink. + /// + public partial class CommonDataServiceForAppsSink : CopySink + { + /// + /// Initializes a new instance of the CommonDataServiceForAppsSink + /// class. + /// + public CommonDataServiceForAppsSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CommonDataServiceForAppsSink + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The flag indicating whether to + /// ignore null values from input dataset (except key fields) during + /// write operation. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The logical name of the alternate + /// key which will be used when upserting records. Type: string (or + /// Expression with resultType string). + public CommonDataServiceForAppsSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object ignoreNullValues = default(object), object alternateKeyName = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + IgnoreNullValues = ignoreNullValues; + AlternateKeyName = alternateKeyName; + CustomInit(); + } + /// + /// Static constructor for CommonDataServiceForAppsSink class. + /// + static CommonDataServiceForAppsSink() + { + WriteBehavior = "Upsert"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the flag indicating whether to ignore null values from + /// input dataset (except key fields) during write operation. Default + /// is false. Type: boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "ignoreNullValues")] + public object IgnoreNullValues { get; set; } + + /// + /// Gets or sets the logical name of the alternate key which will be + /// used when upserting records. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "alternateKeyName")] + public object AlternateKeyName { get; set; } + + /// + /// The write behavior for the operation. + /// + [JsonProperty(PropertyName = "writeBehavior")] + public static string WriteBehavior { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CommonDataServiceForAppsSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CommonDataServiceForAppsSource.cs new file mode 100644 index 000000000000..99097ecc7382 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CommonDataServiceForAppsSource.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Common Data Service for Apps source. + /// + public partial class CommonDataServiceForAppsSource : CopySource + { + /// + /// Initializes a new instance of the CommonDataServiceForAppsSource + /// class. + /// + public CommonDataServiceForAppsSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CommonDataServiceForAppsSource + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// FetchXML is a proprietary query language that + /// is used in Microsoft Common Data Service for Apps (online & + /// on-premises). Type: string (or Expression with resultType + /// string). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public CommonDataServiceForAppsSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object query = default(object), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + Query = query; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets fetchXML is a proprietary query language that is used + /// in Microsoft Common Data Service for Apps (online &amp; + /// on-premises). Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ComponentSetup.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ComponentSetup.cs new file mode 100644 index 000000000000..138abe506601 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ComponentSetup.cs @@ -0,0 +1,77 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The custom setup of installing 3rd party components. + /// + [Rest.Serialization.JsonTransformation] + public partial class ComponentSetup : CustomSetupBase + { + /// + /// Initializes a new instance of the ComponentSetup class. + /// + public ComponentSetup() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ComponentSetup class. + /// + /// The name of the 3rd party + /// component. + /// The license key to activate the + /// component. + public ComponentSetup(string componentName, SecretBase licenseKey = default(SecretBase)) + { + ComponentName = componentName; + LicenseKey = licenseKey; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the 3rd party component. + /// + [JsonProperty(PropertyName = "typeProperties.componentName")] + public string ComponentName { get; set; } + + /// + /// Gets or sets the license key to activate the component. + /// + [JsonProperty(PropertyName = "typeProperties.licenseKey")] + public SecretBase LicenseKey { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ComponentName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ComponentName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CompressionCodec.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CompressionCodec.cs new file mode 100644 index 000000000000..8f3c05cd399d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CompressionCodec.cs @@ -0,0 +1,30 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for CompressionCodec. + /// + public static class CompressionCodec + { + public const string None = "none"; + public const string Lzo = "lzo"; + public const string Bzip2 = "bzip2"; + public const string Gzip = "gzip"; + public const string Deflate = "deflate"; + public const string ZipDeflate = "zipDeflate"; + public const string Snappy = "snappy"; + public const string Lz4 = "lz4"; + public const string Tar = "tar"; + public const string TarGZip = "tarGZip"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CompressionReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CompressionReadSettings.cs new file mode 100644 index 000000000000..d4d594b13561 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CompressionReadSettings.cs @@ -0,0 +1,55 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Compression read settings. + /// + public partial class CompressionReadSettings + { + /// + /// Initializes a new instance of the CompressionReadSettings class. + /// + public CompressionReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CompressionReadSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + public CompressionReadSettings(IDictionary additionalProperties = default(IDictionary)) + { + AdditionalProperties = additionalProperties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ConcurLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ConcurLinkedService.cs new file mode 100644 index 000000000000..5a57056d3cbb --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ConcurLinkedService.cs @@ -0,0 +1,163 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Concur Service linked service. + /// + [Newtonsoft.Json.JsonObject("Concur")] + [Rest.Serialization.JsonTransformation] + public partial class ConcurLinkedService : LinkedService + { + /// + /// Initializes a new instance of the ConcurLinkedService class. + /// + public ConcurLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ConcurLinkedService class. + /// + /// Application client_id supplied by Concur App + /// Management. + /// The user name that you use to access Concur + /// Service. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Properties used to connect to + /// Concur. It is mutually exclusive with any other properties in the + /// linked service. Type: object. + /// The password corresponding to the user name + /// that you provided in the username field. + /// Specifies whether the data + /// source endpoints are encrypted using HTTPS. The default value is + /// true. + /// Specifies whether to require the + /// host name in the server's certificate to match the host name of the + /// server when connecting over SSL. The default value is true. + /// Specifies whether to verify the + /// identity of the server when connecting over SSL. The default value + /// is true. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public ConcurLinkedService(object clientId, object username, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object connectionProperties = default(object), SecretBase password = default(SecretBase), object useEncryptedEndpoints = default(object), object useHostVerification = default(object), object usePeerVerification = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionProperties = connectionProperties; + ClientId = clientId; + Username = username; + Password = password; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets properties used to connect to Concur. It is mutually + /// exclusive with any other properties in the linked service. Type: + /// object. + /// + [JsonProperty(PropertyName = "typeProperties.connectionProperties")] + public object ConnectionProperties { get; set; } + + /// + /// Gets or sets application client_id supplied by Concur App + /// Management. + /// + [JsonProperty(PropertyName = "typeProperties.clientId")] + public object ClientId { get; set; } + + /// + /// Gets or sets the user name that you use to access Concur Service. + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets the password corresponding to the user name that you + /// provided in the username field. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets specifies whether the data source endpoints are + /// encrypted using HTTPS. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useEncryptedEndpoints")] + public object UseEncryptedEndpoints { get; set; } + + /// + /// Gets or sets specifies whether to require the host name in the + /// server's certificate to match the host name of the server when + /// connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useHostVerification")] + public object UseHostVerification { get; set; } + + /// + /// Gets or sets specifies whether to verify the identity of the server + /// when connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.usePeerVerification")] + public object UsePeerVerification { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ClientId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ClientId"); + } + if (Username == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Username"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ConcurObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ConcurObjectDataset.cs new file mode 100644 index 000000000000..ed895d0db113 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ConcurObjectDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Concur Service dataset. + /// + [Newtonsoft.Json.JsonObject("ConcurObject")] + [Rest.Serialization.JsonTransformation] + public partial class ConcurObjectDataset : Dataset + { + /// + /// Initializes a new instance of the ConcurObjectDataset class. + /// + public ConcurObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the ConcurObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name. Type: string (or Expression + /// with resultType string). + public ConcurObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ConcurSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ConcurSource.cs new file mode 100644 index 000000000000..a4e7a8ca5500 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ConcurSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Concur Service source. + /// + public partial class ConcurSource : TabularSource + { + /// + /// Initializes a new instance of the ConcurSource class. + /// + public ConcurSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ConcurSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public ConcurSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ConfigurationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ConfigurationType.cs new file mode 100644 index 000000000000..16b2cc6a30d2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ConfigurationType.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for ConfigurationType. + /// + public static class ConfigurationType + { + public const string Default = "Default"; + public const string Customized = "Customized"; + public const string Artifact = "Artifact"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ConnectionStateProperties.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ConnectionStateProperties.cs new file mode 100644 index 000000000000..4d636f0110aa --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ConnectionStateProperties.cs @@ -0,0 +1,69 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The connection state of a managed private endpoint + /// + public partial class ConnectionStateProperties + { + /// + /// Initializes a new instance of the ConnectionStateProperties class. + /// + public ConnectionStateProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ConnectionStateProperties class. + /// + /// The actions required on the managed + /// private endpoint + /// The managed private endpoint + /// description + /// The approval status + public ConnectionStateProperties(string actionsRequired = default(string), string description = default(string), string status = default(string)) + { + ActionsRequired = actionsRequired; + Description = description; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the actions required on the managed private endpoint + /// + [JsonProperty(PropertyName = "actionsRequired")] + public string ActionsRequired { get; private set; } + + /// + /// Gets the managed private endpoint description + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; private set; } + + /// + /// Gets the approval status + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ConnectionType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ConnectionType.cs new file mode 100644 index 000000000000..8cf9891bd660 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ConnectionType.cs @@ -0,0 +1,21 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for ConnectionType. + /// + public static class ConnectionType + { + public const string Linkedservicetype = "linkedservicetype"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ContinuationSettingsReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ContinuationSettingsReference.cs new file mode 100644 index 000000000000..ebc453d52f2e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ContinuationSettingsReference.cs @@ -0,0 +1,71 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Continuation settings for execute data flow activity. + /// + public partial class ContinuationSettingsReference + { + /// + /// Initializes a new instance of the ContinuationSettingsReference + /// class. + /// + public ContinuationSettingsReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ContinuationSettingsReference + /// class. + /// + /// Continuation TTL in + /// minutes. + /// Idle condition. + /// Customized checkpoint + /// key. + public ContinuationSettingsReference(object continuationTtlInMinutes = default(object), object idleCondition = default(object), object customizedCheckpointKey = default(object)) + { + ContinuationTtlInMinutes = continuationTtlInMinutes; + IdleCondition = idleCondition; + CustomizedCheckpointKey = customizedCheckpointKey; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets continuation TTL in minutes. + /// + [JsonProperty(PropertyName = "continuationTtlInMinutes")] + public object ContinuationTtlInMinutes { get; set; } + + /// + /// Gets or sets idle condition. + /// + [JsonProperty(PropertyName = "idleCondition")] + public object IdleCondition { get; set; } + + /// + /// Gets or sets customized checkpoint key. + /// + [JsonProperty(PropertyName = "customizedCheckpointKey")] + public object CustomizedCheckpointKey { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ControlActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ControlActivity.cs new file mode 100644 index 000000000000..d5f4ed11e04c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ControlActivity.cs @@ -0,0 +1,72 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Base class for all control activities like IfCondition, ForEach , + /// Until. + /// + [Newtonsoft.Json.JsonObject("Container")] + public partial class ControlActivity : Activity + { + /// + /// Initializes a new instance of the ControlActivity class. + /// + public ControlActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ControlActivity class. + /// + /// Activity name. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + public ControlActivity(string name, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CopyActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CopyActivity.cs new file mode 100644 index 000000000000..5cd9d473727e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CopyActivity.cs @@ -0,0 +1,287 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Copy activity. + /// + [Newtonsoft.Json.JsonObject("Copy")] + [Rest.Serialization.JsonTransformation] + public partial class CopyActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the CopyActivity class. + /// + public CopyActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CopyActivity class. + /// + /// Activity name. + /// Copy activity source. + /// Copy activity sink. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// Copy activity translator. If not + /// specified, tabular translator is used. + /// Specifies whether to copy data via an + /// interim staging. Default value is false. Type: boolean (or + /// Expression with resultType boolean). + /// Specifies interim staging settings + /// when EnableStaging is true. + /// Maximum number of concurrent sessions + /// opened on the source or sink to avoid overloading the data store. + /// Type: integer (or Expression with resultType integer), minimum: + /// 0. + /// Maximum number of data + /// integration units that can be used to perform this data movement. + /// Type: integer (or Expression with resultType integer), minimum: + /// 0. + /// Whether to skip + /// incompatible row. Default value is false. Type: boolean (or + /// Expression with resultType boolean). + /// Redirect incompatible + /// row settings when EnableSkipIncompatibleRow is true. + /// (Deprecated. Please use + /// LogSettings) Log storage settings customer need to provide when + /// enabling session log. + /// Log settings customer needs provide when + /// enabling log. + /// Preserve Rules. + /// Preserve rules. + /// Whether to enable Data + /// Consistency validation. Type: boolean (or Expression with + /// resultType boolean). + /// Specify the fault tolerance for data + /// consistency. + /// List of inputs for the activity. + /// List of outputs for the activity. + public CopyActivity(string name, CopySource source, CopySink sink, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), object translator = default(object), object enableStaging = default(object), StagingSettings stagingSettings = default(StagingSettings), object parallelCopies = default(object), object dataIntegrationUnits = default(object), object enableSkipIncompatibleRow = default(object), RedirectIncompatibleRowSettings redirectIncompatibleRowSettings = default(RedirectIncompatibleRowSettings), LogStorageSettings logStorageSettings = default(LogStorageSettings), LogSettings logSettings = default(LogSettings), IList preserveRules = default(IList), IList preserve = default(IList), object validateDataConsistency = default(object), SkipErrorFile skipErrorFile = default(SkipErrorFile), IList inputs = default(IList), IList outputs = default(IList)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + Source = source; + Sink = sink; + Translator = translator; + EnableStaging = enableStaging; + StagingSettings = stagingSettings; + ParallelCopies = parallelCopies; + DataIntegrationUnits = dataIntegrationUnits; + EnableSkipIncompatibleRow = enableSkipIncompatibleRow; + RedirectIncompatibleRowSettings = redirectIncompatibleRowSettings; + LogStorageSettings = logStorageSettings; + LogSettings = logSettings; + PreserveRules = preserveRules; + Preserve = preserve; + ValidateDataConsistency = validateDataConsistency; + SkipErrorFile = skipErrorFile; + Inputs = inputs; + Outputs = outputs; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets copy activity source. + /// + [JsonProperty(PropertyName = "typeProperties.source")] + public CopySource Source { get; set; } + + /// + /// Gets or sets copy activity sink. + /// + [JsonProperty(PropertyName = "typeProperties.sink")] + public CopySink Sink { get; set; } + + /// + /// Gets or sets copy activity translator. If not specified, tabular + /// translator is used. + /// + [JsonProperty(PropertyName = "typeProperties.translator")] + public object Translator { get; set; } + + /// + /// Gets or sets specifies whether to copy data via an interim staging. + /// Default value is false. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.enableStaging")] + public object EnableStaging { get; set; } + + /// + /// Gets or sets specifies interim staging settings when EnableStaging + /// is true. + /// + [JsonProperty(PropertyName = "typeProperties.stagingSettings")] + public StagingSettings StagingSettings { get; set; } + + /// + /// Gets or sets maximum number of concurrent sessions opened on the + /// source or sink to avoid overloading the data store. Type: integer + /// (or Expression with resultType integer), minimum: 0. + /// + [JsonProperty(PropertyName = "typeProperties.parallelCopies")] + public object ParallelCopies { get; set; } + + /// + /// Gets or sets maximum number of data integration units that can be + /// used to perform this data movement. Type: integer (or Expression + /// with resultType integer), minimum: 0. + /// + [JsonProperty(PropertyName = "typeProperties.dataIntegrationUnits")] + public object DataIntegrationUnits { get; set; } + + /// + /// Gets or sets whether to skip incompatible row. Default value is + /// false. Type: boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.enableSkipIncompatibleRow")] + public object EnableSkipIncompatibleRow { get; set; } + + /// + /// Gets or sets redirect incompatible row settings when + /// EnableSkipIncompatibleRow is true. + /// + [JsonProperty(PropertyName = "typeProperties.redirectIncompatibleRowSettings")] + public RedirectIncompatibleRowSettings RedirectIncompatibleRowSettings { get; set; } + + /// + /// Gets or sets (Deprecated. Please use LogSettings) Log storage + /// settings customer need to provide when enabling session log. + /// + [JsonProperty(PropertyName = "typeProperties.logStorageSettings")] + public LogStorageSettings LogStorageSettings { get; set; } + + /// + /// Gets or sets log settings customer needs provide when enabling log. + /// + [JsonProperty(PropertyName = "typeProperties.logSettings")] + public LogSettings LogSettings { get; set; } + + /// + /// Gets or sets preserve Rules. + /// + [JsonProperty(PropertyName = "typeProperties.preserveRules")] + public IList PreserveRules { get; set; } + + /// + /// Gets or sets preserve rules. + /// + [JsonProperty(PropertyName = "typeProperties.preserve")] + public IList Preserve { get; set; } + + /// + /// Gets or sets whether to enable Data Consistency validation. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.validateDataConsistency")] + public object ValidateDataConsistency { get; set; } + + /// + /// Gets or sets specify the fault tolerance for data consistency. + /// + [JsonProperty(PropertyName = "typeProperties.skipErrorFile")] + public SkipErrorFile SkipErrorFile { get; set; } + + /// + /// Gets or sets list of inputs for the activity. + /// + [JsonProperty(PropertyName = "inputs")] + public IList Inputs { get; set; } + + /// + /// Gets or sets list of outputs for the activity. + /// + [JsonProperty(PropertyName = "outputs")] + public IList Outputs { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Source == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Source"); + } + if (Sink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Sink"); + } + if (StagingSettings != null) + { + StagingSettings.Validate(); + } + if (RedirectIncompatibleRowSettings != null) + { + RedirectIncompatibleRowSettings.Validate(); + } + if (LogStorageSettings != null) + { + LogStorageSettings.Validate(); + } + if (LogSettings != null) + { + LogSettings.Validate(); + } + if (Inputs != null) + { + foreach (var element in Inputs) + { + if (element != null) + { + element.Validate(); + } + } + } + if (Outputs != null) + { + foreach (var element1 in Outputs) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CopyActivityLogSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CopyActivityLogSettings.cs new file mode 100644 index 000000000000..39faed8f717a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CopyActivityLogSettings.cs @@ -0,0 +1,65 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Settings for copy activity log. + /// + public partial class CopyActivityLogSettings + { + /// + /// Initializes a new instance of the CopyActivityLogSettings class. + /// + public CopyActivityLogSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CopyActivityLogSettings class. + /// + /// Gets or sets the log level, support: Info, + /// Warning. Type: string (or Expression with resultType + /// string). + /// Specifies whether to enable + /// reliable logging. Type: boolean (or Expression with resultType + /// boolean). + public CopyActivityLogSettings(object logLevel = default(object), object enableReliableLogging = default(object)) + { + LogLevel = logLevel; + EnableReliableLogging = enableReliableLogging; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the log level, support: Info, Warning. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "logLevel")] + public object LogLevel { get; set; } + + /// + /// Gets or sets specifies whether to enable reliable logging. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "enableReliableLogging")] + public object EnableReliableLogging { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CopyBehaviorType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CopyBehaviorType.cs new file mode 100644 index 000000000000..01cc5d50b1bb --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CopyBehaviorType.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for CopyBehaviorType. + /// + public static class CopyBehaviorType + { + public const string PreserveHierarchy = "PreserveHierarchy"; + public const string FlattenHierarchy = "FlattenHierarchy"; + public const string MergeFiles = "MergeFiles"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CopyComputeScaleProperties.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CopyComputeScaleProperties.cs new file mode 100644 index 000000000000..e2645c4adbf5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CopyComputeScaleProperties.cs @@ -0,0 +1,94 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// CopyComputeScale properties for managed integration runtime. + /// + public partial class CopyComputeScaleProperties + { + /// + /// Initializes a new instance of the CopyComputeScaleProperties class. + /// + public CopyComputeScaleProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CopyComputeScaleProperties class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// DIU number setting reserved for + /// copy activity execution. Supported values are multiples of 4 in + /// range 4-256. + /// Time to live (in minutes) setting of + /// integration runtime which will execute copy activity. + public CopyComputeScaleProperties(IDictionary additionalProperties = default(IDictionary), int? dataIntegrationUnit = default(int?), int? timeToLive = default(int?)) + { + AdditionalProperties = additionalProperties; + DataIntegrationUnit = dataIntegrationUnit; + TimeToLive = timeToLive; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets DIU number setting reserved for copy activity + /// execution. Supported values are multiples of 4 in range 4-256. + /// + [JsonProperty(PropertyName = "dataIntegrationUnit")] + public int? DataIntegrationUnit { get; set; } + + /// + /// Gets or sets time to live (in minutes) setting of integration + /// runtime which will execute copy activity. + /// + [JsonProperty(PropertyName = "timeToLive")] + public int? TimeToLive { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (DataIntegrationUnit < 4) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "DataIntegrationUnit", 4); + } + if (TimeToLive < 5) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "TimeToLive", 5); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CopySink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CopySink.cs new file mode 100644 index 000000000000..f026994c4449 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CopySink.cs @@ -0,0 +1,122 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity sink. + /// + public partial class CopySink + { + /// + /// Initializes a new instance of the CopySink class. + /// + public CopySink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CopySink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + public CopySink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object)) + { + AdditionalProperties = additionalProperties; + WriteBatchSize = writeBatchSize; + WriteBatchTimeout = writeBatchTimeout; + SinkRetryCount = sinkRetryCount; + SinkRetryWait = sinkRetryWait; + MaxConcurrentConnections = maxConcurrentConnections; + DisableMetricsCollection = disableMetricsCollection; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets write batch size. Type: integer (or Expression with + /// resultType integer), minimum: 0. + /// + [JsonProperty(PropertyName = "writeBatchSize")] + public object WriteBatchSize { get; set; } + + /// + /// Gets or sets write batch timeout. Type: string (or Expression with + /// resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "writeBatchTimeout")] + public object WriteBatchTimeout { get; set; } + + /// + /// Gets or sets sink retry count. Type: integer (or Expression with + /// resultType integer). + /// + [JsonProperty(PropertyName = "sinkRetryCount")] + public object SinkRetryCount { get; set; } + + /// + /// Gets or sets sink retry wait. Type: string (or Expression with + /// resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "sinkRetryWait")] + public object SinkRetryWait { get; set; } + + /// + /// Gets or sets the maximum concurrent connection count for the sink + /// data store. Type: integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "maxConcurrentConnections")] + public object MaxConcurrentConnections { get; set; } + + /// + /// Gets or sets if true, disable data store metrics collection. + /// Default is false. Type: boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "disableMetricsCollection")] + public object DisableMetricsCollection { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CopySource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CopySource.cs new file mode 100644 index 000000000000..f26d45b26ae0 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CopySource.cs @@ -0,0 +1,100 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source. + /// + public partial class CopySource + { + /// + /// Initializes a new instance of the CopySource class. + /// + public CopySource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CopySource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + public CopySource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object)) + { + AdditionalProperties = additionalProperties; + SourceRetryCount = sourceRetryCount; + SourceRetryWait = sourceRetryWait; + MaxConcurrentConnections = maxConcurrentConnections; + DisableMetricsCollection = disableMetricsCollection; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets source retry count. Type: integer (or Expression with + /// resultType integer). + /// + [JsonProperty(PropertyName = "sourceRetryCount")] + public object SourceRetryCount { get; set; } + + /// + /// Gets or sets source retry wait. Type: string (or Expression with + /// resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "sourceRetryWait")] + public object SourceRetryWait { get; set; } + + /// + /// Gets or sets the maximum concurrent connection count for the source + /// data store. Type: integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "maxConcurrentConnections")] + public object MaxConcurrentConnections { get; set; } + + /// + /// Gets or sets if true, disable data store metrics collection. + /// Default is false. Type: boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "disableMetricsCollection")] + public object DisableMetricsCollection { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CopyTranslator.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CopyTranslator.cs new file mode 100644 index 000000000000..5247ddc6ea5b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CopyTranslator.cs @@ -0,0 +1,55 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity translator. + /// + public partial class CopyTranslator + { + /// + /// Initializes a new instance of the CopyTranslator class. + /// + public CopyTranslator() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CopyTranslator class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + public CopyTranslator(IDictionary additionalProperties = default(IDictionary)) + { + AdditionalProperties = additionalProperties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbConnectionMode.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbConnectionMode.cs new file mode 100644 index 000000000000..e0c61225bc58 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbConnectionMode.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for CosmosDbConnectionMode. + /// + public static class CosmosDbConnectionMode + { + public const string Gateway = "Gateway"; + public const string Direct = "Direct"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbLinkedService.cs new file mode 100644 index 000000000000..232cfca5229a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbLinkedService.cs @@ -0,0 +1,220 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Microsoft Azure Cosmos Database (CosmosDB) linked service. + /// + [Newtonsoft.Json.JsonObject("CosmosDb")] + [Rest.Serialization.JsonTransformation] + public partial class CosmosDbLinkedService : LinkedService + { + /// + /// Initializes a new instance of the CosmosDbLinkedService class. + /// + public CosmosDbLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CosmosDbLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The connection string. Type: string, + /// SecureString or AzureKeyVaultSecretReference. + /// The endpoint of the Azure CosmosDB + /// account. Type: string (or Expression with resultType + /// string) + /// The name of the database. Type: string (or + /// Expression with resultType string) + /// The account key of the Azure CosmosDB + /// account. Type: SecureString or + /// AzureKeyVaultSecretReference. + /// The client ID of the application + /// in Azure Active Directory used for Server-To-Server authentication. + /// Type: string (or Expression with resultType string). + /// The service principal + /// credential type to use in Server-To-Server authentication. + /// 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for + /// certificate. Type: string. + /// The credential of the + /// service principal object in Azure Active Directory. If + /// servicePrincipalCredentialType is 'ServicePrincipalKey', + /// servicePrincipalCredential can be SecureString or + /// AzureKeyVaultSecretReference. If servicePrincipalCredentialType is + /// 'ServicePrincipalCert', servicePrincipalCredential can only be + /// AzureKeyVaultSecretReference. + /// The name or ID of the tenant to which the + /// service principal belongs. Type: string (or Expression with + /// resultType string). + /// Indicates the azure cloud type of the + /// service principle auth. Allowed values are AzurePublic, AzureChina, + /// AzureUsGovernment, AzureGermany. Default value is the data factory + /// regions’ cloud type. Type: string (or Expression with resultType + /// string). + /// The connection mode used to access + /// CosmosDB account. Type: string. Possible values include: 'Gateway', + /// 'Direct' + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// The credential reference containing + /// authentication information. + public CosmosDbLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object connectionString = default(object), object accountEndpoint = default(object), object database = default(object), SecretBase accountKey = default(SecretBase), object servicePrincipalId = default(object), object servicePrincipalCredentialType = default(object), SecretBase servicePrincipalCredential = default(SecretBase), object tenant = default(object), object azureCloudType = default(object), string connectionMode = default(string), string encryptedCredential = default(string), CredentialReference credential = default(CredentialReference)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionString = connectionString; + AccountEndpoint = accountEndpoint; + Database = database; + AccountKey = accountKey; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalCredentialType = servicePrincipalCredentialType; + ServicePrincipalCredential = servicePrincipalCredential; + Tenant = tenant; + AzureCloudType = azureCloudType; + ConnectionMode = connectionMode; + EncryptedCredential = encryptedCredential; + Credential = credential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the connection string. Type: string, SecureString or + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets the endpoint of the Azure CosmosDB account. Type: + /// string (or Expression with resultType string) + /// + [JsonProperty(PropertyName = "typeProperties.accountEndpoint")] + public object AccountEndpoint { get; set; } + + /// + /// Gets or sets the name of the database. Type: string (or Expression + /// with resultType string) + /// + [JsonProperty(PropertyName = "typeProperties.database")] + public object Database { get; set; } + + /// + /// Gets or sets the account key of the Azure CosmosDB account. Type: + /// SecureString or AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.accountKey")] + public SecretBase AccountKey { get; set; } + + /// + /// Gets or sets the client ID of the application in Azure Active + /// Directory used for Server-To-Server authentication. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalId")] + public object ServicePrincipalId { get; set; } + + /// + /// Gets or sets the service principal credential type to use in + /// Server-To-Server authentication. 'ServicePrincipalKey' for + /// key/secret, 'ServicePrincipalCert' for certificate. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalCredentialType")] + public object ServicePrincipalCredentialType { get; set; } + + /// + /// Gets or sets the credential of the service principal object in + /// Azure Active Directory. If servicePrincipalCredentialType is + /// 'ServicePrincipalKey', servicePrincipalCredential can be + /// SecureString or AzureKeyVaultSecretReference. If + /// servicePrincipalCredentialType is 'ServicePrincipalCert', + /// servicePrincipalCredential can only be + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalCredential")] + public SecretBase ServicePrincipalCredential { get; set; } + + /// + /// Gets or sets the name or ID of the tenant to which the service + /// principal belongs. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.tenant")] + public object Tenant { get; set; } + + /// + /// Gets or sets indicates the azure cloud type of the service + /// principle auth. Allowed values are AzurePublic, AzureChina, + /// AzureUsGovernment, AzureGermany. Default value is the data factory + /// regions’ cloud type. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.azureCloudType")] + public object AzureCloudType { get; set; } + + /// + /// Gets or sets the connection mode used to access CosmosDB account. + /// Type: string. Possible values include: 'Gateway', 'Direct' + /// + [JsonProperty(PropertyName = "typeProperties.connectionMode")] + public string ConnectionMode { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets the credential reference containing authentication + /// information. + /// + [JsonProperty(PropertyName = "typeProperties.credential")] + public CredentialReference Credential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Credential != null) + { + Credential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbMongoDbApiCollectionDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbMongoDbApiCollectionDataset.cs new file mode 100644 index 000000000000..51596aade302 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbMongoDbApiCollectionDataset.cs @@ -0,0 +1,93 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The CosmosDB (MongoDB API) database dataset. + /// + [Newtonsoft.Json.JsonObject("CosmosDbMongoDbApiCollection")] + [Rest.Serialization.JsonTransformation] + public partial class CosmosDbMongoDbApiCollectionDataset : Dataset + { + /// + /// Initializes a new instance of the + /// CosmosDbMongoDbApiCollectionDataset class. + /// + public CosmosDbMongoDbApiCollectionDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// CosmosDbMongoDbApiCollectionDataset class. + /// + /// Linked service reference. + /// The collection name of the CosmosDB + /// (MongoDB API) database. Type: string (or Expression with resultType + /// string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + public CosmosDbMongoDbApiCollectionDataset(LinkedServiceReference linkedServiceName, object collection, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Collection = collection; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the collection name of the CosmosDB (MongoDB API) + /// database. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.collection")] + public object Collection { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Collection == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Collection"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbMongoDbApiLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbMongoDbApiLinkedService.cs new file mode 100644 index 000000000000..8817aac2d364 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbMongoDbApiLinkedService.cs @@ -0,0 +1,115 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for CosmosDB (MongoDB API) data source. + /// + [Newtonsoft.Json.JsonObject("CosmosDbMongoDbApi")] + [Rest.Serialization.JsonTransformation] + public partial class CosmosDbMongoDbApiLinkedService : LinkedService + { + /// + /// Initializes a new instance of the CosmosDbMongoDbApiLinkedService + /// class. + /// + public CosmosDbMongoDbApiLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CosmosDbMongoDbApiLinkedService + /// class. + /// + /// The CosmosDB (MongoDB API) + /// connection string. Type: string, SecureString or + /// AzureKeyVaultSecretReference. Type: string, SecureString or + /// AzureKeyVaultSecretReference. + /// The name of the CosmosDB (MongoDB API) + /// database that you want to access. Type: string (or Expression with + /// resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Whether the CosmosDB (MongoDB + /// API) server version is higher than 3.2. The default value is false. + /// Type: boolean (or Expression with resultType boolean). + public CosmosDbMongoDbApiLinkedService(object connectionString, object database, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object isServerVersionAbove32 = default(object)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + IsServerVersionAbove32 = isServerVersionAbove32; + ConnectionString = connectionString; + Database = database; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets whether the CosmosDB (MongoDB API) server version is + /// higher than 3.2. The default value is false. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.isServerVersionAbove32")] + public object IsServerVersionAbove32 { get; set; } + + /// + /// Gets or sets the CosmosDB (MongoDB API) connection string. Type: + /// string, SecureString or AzureKeyVaultSecretReference. Type: string, + /// SecureString or AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets the name of the CosmosDB (MongoDB API) database that + /// you want to access. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.database")] + public object Database { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ConnectionString == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ConnectionString"); + } + if (Database == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Database"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbMongoDbApiSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbMongoDbApiSink.cs new file mode 100644 index 000000000000..624ec13eab8b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbMongoDbApiSink.cs @@ -0,0 +1,80 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity sink for a CosmosDB (MongoDB API) database. + /// + public partial class CosmosDbMongoDbApiSink : CopySink + { + /// + /// Initializes a new instance of the CosmosDbMongoDbApiSink class. + /// + public CosmosDbMongoDbApiSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CosmosDbMongoDbApiSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Specifies whether the document with + /// same key to be overwritten (upsert) rather than throw exception + /// (insert). The default value is "insert". Type: string (or + /// Expression with resultType string). Type: string (or Expression + /// with resultType string). + public CosmosDbMongoDbApiSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object writeBehavior = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + WriteBehavior = writeBehavior; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies whether the document with same key to be + /// overwritten (upsert) rather than throw exception (insert). The + /// default value is "insert". Type: string (or Expression with + /// resultType string). Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "writeBehavior")] + public object WriteBehavior { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbMongoDbApiSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbMongoDbApiSource.cs new file mode 100644 index 000000000000..762ea01faf44 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbMongoDbApiSource.cs @@ -0,0 +1,124 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for a CosmosDB (MongoDB API) database. + /// + public partial class CosmosDbMongoDbApiSource : CopySource + { + /// + /// Initializes a new instance of the CosmosDbMongoDbApiSource class. + /// + public CosmosDbMongoDbApiSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CosmosDbMongoDbApiSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Specifies selection filter using query + /// operators. To return all documents in a collection, omit this + /// parameter or pass an empty document ({}). Type: string (or + /// Expression with resultType string). + /// Cursor methods for Mongodb + /// query. + /// Specifies the number of documents to return + /// in each batch of the response from MongoDB instance. In most cases, + /// modifying the batch size will not affect the user or the + /// application. This property's main purpose is to avoid hit the + /// limitation of response size. Type: integer (or Expression with + /// resultType integer). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public CosmosDbMongoDbApiSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object filter = default(object), MongoDbCursorMethodsProperties cursorMethods = default(MongoDbCursorMethodsProperties), object batchSize = default(object), object queryTimeout = default(object), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + Filter = filter; + CursorMethods = cursorMethods; + BatchSize = batchSize; + QueryTimeout = queryTimeout; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies selection filter using query operators. To + /// return all documents in a collection, omit this parameter or pass + /// an empty document ({}). Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "filter")] + public object Filter { get; set; } + + /// + /// Gets or sets cursor methods for Mongodb query. + /// + [JsonProperty(PropertyName = "cursorMethods")] + public MongoDbCursorMethodsProperties CursorMethods { get; set; } + + /// + /// Gets or sets specifies the number of documents to return in each + /// batch of the response from MongoDB instance. In most cases, + /// modifying the batch size will not affect the user or the + /// application. This property's main purpose is to avoid hit the + /// limitation of response size. Type: integer (or Expression with + /// resultType integer). + /// + [JsonProperty(PropertyName = "batchSize")] + public object BatchSize { get; set; } + + /// + /// Gets or sets query timeout. Type: string (or Expression with + /// resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "queryTimeout")] + public object QueryTimeout { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbSqlApiCollectionDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbSqlApiCollectionDataset.cs new file mode 100644 index 000000000000..7e787f7f1263 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbSqlApiCollectionDataset.cs @@ -0,0 +1,92 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Microsoft Azure CosmosDB (SQL API) Collection dataset. + /// + [Newtonsoft.Json.JsonObject("CosmosDbSqlApiCollection")] + [Rest.Serialization.JsonTransformation] + public partial class CosmosDbSqlApiCollectionDataset : Dataset + { + /// + /// Initializes a new instance of the CosmosDbSqlApiCollectionDataset + /// class. + /// + public CosmosDbSqlApiCollectionDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the CosmosDbSqlApiCollectionDataset + /// class. + /// + /// Linked service reference. + /// CosmosDB (SQL API) collection name. + /// Type: string (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + public CosmosDbSqlApiCollectionDataset(LinkedServiceReference linkedServiceName, object collectionName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + CollectionName = collectionName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets cosmosDB (SQL API) collection name. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.collectionName")] + public object CollectionName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (CollectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "CollectionName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbSqlApiSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbSqlApiSink.cs new file mode 100644 index 000000000000..7cf403306e7e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbSqlApiSink.cs @@ -0,0 +1,76 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure CosmosDB (SQL API) Collection sink. + /// + public partial class CosmosDbSqlApiSink : CopySink + { + /// + /// Initializes a new instance of the CosmosDbSqlApiSink class. + /// + public CosmosDbSqlApiSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CosmosDbSqlApiSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Describes how to write data to Azure + /// Cosmos DB. Type: string (or Expression with resultType string). + /// Allowed values: insert and upsert. + public CosmosDbSqlApiSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object writeBehavior = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + WriteBehavior = writeBehavior; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets describes how to write data to Azure Cosmos DB. Type: + /// string (or Expression with resultType string). Allowed values: + /// insert and upsert. + /// + [JsonProperty(PropertyName = "writeBehavior")] + public object WriteBehavior { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbSqlApiSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbSqlApiSource.cs new file mode 100644 index 000000000000..10051e10beb4 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbSqlApiSource.cs @@ -0,0 +1,112 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure CosmosDB (SQL API) Collection source. + /// + public partial class CosmosDbSqlApiSource : CopySource + { + /// + /// Initializes a new instance of the CosmosDbSqlApiSource class. + /// + public CosmosDbSqlApiSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CosmosDbSqlApiSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// SQL API query. Type: string (or Expression with + /// resultType string). + /// Page size of the result. Type: integer (or + /// Expression with resultType integer). + /// Preferred regions. Type: array of + /// strings (or Expression with resultType array of strings). + /// Whether detect primitive values as + /// datetime values. Type: boolean (or Expression with resultType + /// boolean). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public CosmosDbSqlApiSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object query = default(object), object pageSize = default(object), object preferredRegions = default(object), object detectDatetime = default(object), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + Query = query; + PageSize = pageSize; + PreferredRegions = preferredRegions; + DetectDatetime = detectDatetime; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SQL API query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets page size of the result. Type: integer (or Expression + /// with resultType integer). + /// + [JsonProperty(PropertyName = "pageSize")] + public object PageSize { get; set; } + + /// + /// Gets or sets preferred regions. Type: array of strings (or + /// Expression with resultType array of strings). + /// + [JsonProperty(PropertyName = "preferredRegions")] + public object PreferredRegions { get; set; } + + /// + /// Gets or sets whether detect primitive values as datetime values. + /// Type: boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "detectDatetime")] + public object DetectDatetime { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CouchbaseLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CouchbaseLinkedService.cs new file mode 100644 index 000000000000..88e9c8fac0e8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CouchbaseLinkedService.cs @@ -0,0 +1,104 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Couchbase server linked service. + /// + [Newtonsoft.Json.JsonObject("Couchbase")] + [Rest.Serialization.JsonTransformation] + public partial class CouchbaseLinkedService : LinkedService + { + /// + /// Initializes a new instance of the CouchbaseLinkedService class. + /// + public CouchbaseLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CouchbaseLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// An ODBC connection string. Type: + /// string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of + /// credString in connection string. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public CouchbaseLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object connectionString = default(object), AzureKeyVaultSecretReference credString = default(AzureKeyVaultSecretReference), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionString = connectionString; + CredString = credString; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets an ODBC connection string. Type: string, SecureString + /// or AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of credString in + /// connection string. + /// + [JsonProperty(PropertyName = "typeProperties.credString")] + public AzureKeyVaultSecretReference CredString { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (CredString != null) + { + CredString.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CouchbaseSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CouchbaseSource.cs new file mode 100644 index 000000000000..1c348b748a62 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CouchbaseSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Couchbase server source. + /// + public partial class CouchbaseSource : TabularSource + { + /// + /// Initializes a new instance of the CouchbaseSource class. + /// + public CouchbaseSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CouchbaseSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public CouchbaseSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CouchbaseTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CouchbaseTableDataset.cs new file mode 100644 index 000000000000..a5f3dcfbab8c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CouchbaseTableDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Couchbase server dataset. + /// + [Newtonsoft.Json.JsonObject("CouchbaseTable")] + [Rest.Serialization.JsonTransformation] + public partial class CouchbaseTableDataset : Dataset + { + /// + /// Initializes a new instance of the CouchbaseTableDataset class. + /// + public CouchbaseTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the CouchbaseTableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name. Type: string (or Expression + /// with resultType string). + public CouchbaseTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CreateDataFlowDebugSessionRequest.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CreateDataFlowDebugSessionRequest.cs new file mode 100644 index 000000000000..d3dded7f90f4 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CreateDataFlowDebugSessionRequest.cs @@ -0,0 +1,99 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Request body structure for creating data flow debug session. + /// + public partial class CreateDataFlowDebugSessionRequest + { + /// + /// Initializes a new instance of the CreateDataFlowDebugSessionRequest + /// class. + /// + public CreateDataFlowDebugSessionRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CreateDataFlowDebugSessionRequest + /// class. + /// + /// Compute type of the cluster. The value + /// will be overwritten by the same setting in integration runtime if + /// provided. + /// Core count of the cluster. The value will + /// be overwritten by the same setting in integration runtime if + /// provided. + /// Time to live setting of the cluster in + /// minutes. + /// Set to use integration runtime + /// setting for data flow debug session. + public CreateDataFlowDebugSessionRequest(string computeType = default(string), int? coreCount = default(int?), int? timeToLive = default(int?), IntegrationRuntimeDebugResource integrationRuntime = default(IntegrationRuntimeDebugResource)) + { + ComputeType = computeType; + CoreCount = coreCount; + TimeToLive = timeToLive; + IntegrationRuntime = integrationRuntime; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets compute type of the cluster. The value will be + /// overwritten by the same setting in integration runtime if provided. + /// + [JsonProperty(PropertyName = "computeType")] + public string ComputeType { get; set; } + + /// + /// Gets or sets core count of the cluster. The value will be + /// overwritten by the same setting in integration runtime if provided. + /// + [JsonProperty(PropertyName = "coreCount")] + public int? CoreCount { get; set; } + + /// + /// Gets or sets time to live setting of the cluster in minutes. + /// + [JsonProperty(PropertyName = "timeToLive")] + public int? TimeToLive { get; set; } + + /// + /// Gets or sets set to use integration runtime setting for data flow + /// debug session. + /// + [JsonProperty(PropertyName = "integrationRuntime")] + public IntegrationRuntimeDebugResource IntegrationRuntime { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (IntegrationRuntime != null) + { + IntegrationRuntime.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CreateDataFlowDebugSessionResponse.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CreateDataFlowDebugSessionResponse.cs new file mode 100644 index 000000000000..f2f79da08226 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CreateDataFlowDebugSessionResponse.cs @@ -0,0 +1,61 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Response body structure for creating data flow debug session. + /// + public partial class CreateDataFlowDebugSessionResponse + { + /// + /// Initializes a new instance of the + /// CreateDataFlowDebugSessionResponse class. + /// + public CreateDataFlowDebugSessionResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// CreateDataFlowDebugSessionResponse class. + /// + /// The state of the debug session. + /// The ID of data flow debug session. + public CreateDataFlowDebugSessionResponse(string status = default(string), string sessionId = default(string)) + { + Status = status; + SessionId = sessionId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the state of the debug session. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or sets the ID of data flow debug session. + /// + [JsonProperty(PropertyName = "sessionId")] + public string SessionId { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CreateLinkedIntegrationRuntimeRequest.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CreateLinkedIntegrationRuntimeRequest.cs new file mode 100644 index 000000000000..6e981cc138ce --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CreateLinkedIntegrationRuntimeRequest.cs @@ -0,0 +1,84 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The linked integration runtime information. + /// + public partial class CreateLinkedIntegrationRuntimeRequest + { + /// + /// Initializes a new instance of the + /// CreateLinkedIntegrationRuntimeRequest class. + /// + public CreateLinkedIntegrationRuntimeRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// CreateLinkedIntegrationRuntimeRequest class. + /// + /// The name of the linked integration + /// runtime. + /// The ID of the subscription that the + /// linked integration runtime belongs to. + /// The name of the data factory that the + /// linked integration runtime belongs to. + /// The location of the data factory + /// that the linked integration runtime belongs to. + public CreateLinkedIntegrationRuntimeRequest(string name = default(string), string subscriptionId = default(string), string dataFactoryName = default(string), string dataFactoryLocation = default(string)) + { + Name = name; + SubscriptionId = subscriptionId; + DataFactoryName = dataFactoryName; + DataFactoryLocation = dataFactoryLocation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the linked integration runtime. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the ID of the subscription that the linked integration + /// runtime belongs to. + /// + [JsonProperty(PropertyName = "subscriptionId")] + public string SubscriptionId { get; set; } + + /// + /// Gets or sets the name of the data factory that the linked + /// integration runtime belongs to. + /// + [JsonProperty(PropertyName = "dataFactoryName")] + public string DataFactoryName { get; set; } + + /// + /// Gets or sets the location of the data factory that the linked + /// integration runtime belongs to. + /// + [JsonProperty(PropertyName = "dataFactoryLocation")] + public string DataFactoryLocation { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CreateRunResponse.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CreateRunResponse.cs new file mode 100644 index 000000000000..01baa9991e49 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CreateRunResponse.cs @@ -0,0 +1,65 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Response body with a run identifier. + /// + public partial class CreateRunResponse + { + /// + /// Initializes a new instance of the CreateRunResponse class. + /// + public CreateRunResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CreateRunResponse class. + /// + /// Identifier of a run. + public CreateRunResponse(string runId) + { + RunId = runId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets identifier of a run. + /// + [JsonProperty(PropertyName = "runId")] + public string RunId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (RunId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "RunId"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Credential.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Credential.cs new file mode 100644 index 000000000000..b29d0d3c46d2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Credential.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Azure Data Factory nested object which contains the information and + /// credential which can be used to connect with related store or compute + /// resource. + /// + public partial class Credential + { + /// + /// Initializes a new instance of the Credential class. + /// + public Credential() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Credential class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Credential description. + /// List of tags that can be used for + /// describing the Credential. + public Credential(IDictionary additionalProperties = default(IDictionary), string description = default(string), IList annotations = default(IList)) + { + AdditionalProperties = additionalProperties; + Description = description; + Annotations = annotations; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets credential description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets list of tags that can be used for describing the + /// Credential. + /// + [JsonProperty(PropertyName = "annotations")] + public IList Annotations { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CredentialReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CredentialReference.cs new file mode 100644 index 000000000000..297507c3b4c5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CredentialReference.cs @@ -0,0 +1,90 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Credential reference type. + /// + public partial class CredentialReference + { + /// + /// Initializes a new instance of the CredentialReference class. + /// + public CredentialReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CredentialReference class. + /// + /// Reference credential name. + /// Unmatched properties from the + /// message are deserialized this collection + public CredentialReference(string referenceName, IDictionary additionalProperties = default(IDictionary)) + { + AdditionalProperties = additionalProperties; + ReferenceName = referenceName; + CustomInit(); + } + /// + /// Static constructor for CredentialReference class. + /// + static CredentialReference() + { + Type = "CredentialReference"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets reference credential name. + /// + [JsonProperty(PropertyName = "referenceName")] + public string ReferenceName { get; set; } + + /// + /// Credential reference type. + /// + [JsonProperty(PropertyName = "type")] + public static string Type { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ReferenceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ReferenceName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CredentialResource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CredentialResource.cs new file mode 100644 index 000000000000..68aed210eb0e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CredentialResource.cs @@ -0,0 +1,70 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Credential resource type. + /// + public partial class CredentialResource : SubResource + { + /// + /// Initializes a new instance of the CredentialResource class. + /// + public CredentialResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CredentialResource class. + /// + /// Properties of credentials. + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + public CredentialResource(Credential properties, string id = default(string), string name = default(string), string type = default(string), string etag = default(string)) + : base(id, name, type, etag) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets properties of credentials. + /// + [JsonProperty(PropertyName = "properties")] + public Credential Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CustomActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CustomActivity.cs new file mode 100644 index 000000000000..5b8df33e4a90 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CustomActivity.cs @@ -0,0 +1,157 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Custom activity type. + /// + [Newtonsoft.Json.JsonObject("Custom")] + [Rest.Serialization.JsonTransformation] + public partial class CustomActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the CustomActivity class. + /// + public CustomActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CustomActivity class. + /// + /// Activity name. + /// Command for custom activity Type: string (or + /// Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// Resource linked service + /// reference. + /// Folder path for resource files Type: + /// string (or Expression with resultType string). + /// Reference objects + /// User defined property bag. There + /// is no restriction on the keys or values that can be used. The user + /// specified custom activity has the full responsibility to consume + /// and interpret the content defined. + /// The retention time for the files + /// submitted for custom activity. Type: double (or Expression with + /// resultType double). + /// Elevation level and scope for + /// the user, default is nonadmin task. Type: string (or Expression + /// with resultType double). + public CustomActivity(string name, object command, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), LinkedServiceReference resourceLinkedService = default(LinkedServiceReference), object folderPath = default(object), CustomActivityReferenceObject referenceObjects = default(CustomActivityReferenceObject), IDictionary extendedProperties = default(IDictionary), object retentionTimeInDays = default(object), object autoUserSpecification = default(object)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + Command = command; + ResourceLinkedService = resourceLinkedService; + FolderPath = folderPath; + ReferenceObjects = referenceObjects; + ExtendedProperties = extendedProperties; + RetentionTimeInDays = retentionTimeInDays; + AutoUserSpecification = autoUserSpecification; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets command for custom activity Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.command")] + public object Command { get; set; } + + /// + /// Gets or sets resource linked service reference. + /// + [JsonProperty(PropertyName = "typeProperties.resourceLinkedService")] + public LinkedServiceReference ResourceLinkedService { get; set; } + + /// + /// Gets or sets folder path for resource files Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.folderPath")] + public object FolderPath { get; set; } + + /// + /// Gets or sets reference objects + /// + [JsonProperty(PropertyName = "typeProperties.referenceObjects")] + public CustomActivityReferenceObject ReferenceObjects { get; set; } + + /// + /// Gets or sets user defined property bag. There is no restriction on + /// the keys or values that can be used. The user specified custom + /// activity has the full responsibility to consume and interpret the + /// content defined. + /// + [JsonProperty(PropertyName = "typeProperties.extendedProperties")] + public IDictionary ExtendedProperties { get; set; } + + /// + /// Gets or sets the retention time for the files submitted for custom + /// activity. Type: double (or Expression with resultType double). + /// + [JsonProperty(PropertyName = "typeProperties.retentionTimeInDays")] + public object RetentionTimeInDays { get; set; } + + /// + /// Gets or sets elevation level and scope for the user, default is + /// nonadmin task. Type: string (or Expression with resultType double). + /// + [JsonProperty(PropertyName = "typeProperties.autoUserSpecification")] + public object AutoUserSpecification { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Command == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Command"); + } + if (ResourceLinkedService != null) + { + ResourceLinkedService.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CustomActivityReferenceObject.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CustomActivityReferenceObject.cs new file mode 100644 index 000000000000..389723149f64 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CustomActivityReferenceObject.cs @@ -0,0 +1,63 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Reference objects for custom activity + /// + public partial class CustomActivityReferenceObject + { + /// + /// Initializes a new instance of the CustomActivityReferenceObject + /// class. + /// + public CustomActivityReferenceObject() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CustomActivityReferenceObject + /// class. + /// + /// Linked service references. + /// Dataset references. + public CustomActivityReferenceObject(IList linkedServices = default(IList), IList datasets = default(IList)) + { + LinkedServices = linkedServices; + Datasets = datasets; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets linked service references. + /// + [JsonProperty(PropertyName = "linkedServices")] + public IList LinkedServices { get; set; } + + /// + /// Gets or sets dataset references. + /// + [JsonProperty(PropertyName = "datasets")] + public IList Datasets { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CustomDataSourceLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CustomDataSourceLinkedService.cs new file mode 100644 index 000000000000..c9481aa99994 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CustomDataSourceLinkedService.cs @@ -0,0 +1,81 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Custom linked service. + /// + [Newtonsoft.Json.JsonObject("CustomDataSource")] + public partial class CustomDataSourceLinkedService : LinkedService + { + /// + /// Initializes a new instance of the CustomDataSourceLinkedService + /// class. + /// + public CustomDataSourceLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CustomDataSourceLinkedService + /// class. + /// + /// Custom linked service + /// properties. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + public CustomDataSourceLinkedService(object typeProperties, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + TypeProperties = typeProperties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets custom linked service properties. + /// + [JsonProperty(PropertyName = "typeProperties")] + public object TypeProperties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (TypeProperties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TypeProperties"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CustomDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CustomDataset.cs new file mode 100644 index 000000000000..b4242988f107 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CustomDataset.cs @@ -0,0 +1,80 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The custom dataset. + /// + public partial class CustomDataset : Dataset + { + /// + /// Initializes a new instance of the CustomDataset class. + /// + public CustomDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the CustomDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// Custom dataset properties. + public CustomDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object typeProperties = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TypeProperties = typeProperties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets custom dataset properties. + /// + [JsonProperty(PropertyName = "typeProperties")] + public object TypeProperties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CustomEventsTrigger.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CustomEventsTrigger.cs new file mode 100644 index 000000000000..0d4b9bda3495 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CustomEventsTrigger.cs @@ -0,0 +1,118 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Trigger that runs every time a custom event is received. + /// + [Rest.Serialization.JsonTransformation] + public partial class CustomEventsTrigger : MultiplePipelineTrigger + { + /// + /// Initializes a new instance of the CustomEventsTrigger class. + /// + public CustomEventsTrigger() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CustomEventsTrigger class. + /// + /// The list of event types that cause this + /// trigger to fire. + /// The ARM resource ID of the Azure Event Grid + /// Topic. + /// Unmatched properties from the + /// message are deserialized this collection + /// Trigger description. + /// Indicates if trigger is running or not. + /// Updated when Start/Stop APIs are called on the Trigger. Possible + /// values include: 'Started', 'Stopped', 'Disabled' + /// List of tags that can be used for + /// describing the trigger. + /// Pipelines that need to be started. + /// The event subject must begin with + /// the pattern provided for trigger to fire. At least one of these + /// must be provided: subjectBeginsWith, subjectEndsWith. + /// The event subject must end with the + /// pattern provided for trigger to fire. At least one of these must be + /// provided: subjectBeginsWith, subjectEndsWith. + public CustomEventsTrigger(IList events, string scope, IDictionary additionalProperties = default(IDictionary), string description = default(string), string runtimeState = default(string), IList annotations = default(IList), IList pipelines = default(IList), string subjectBeginsWith = default(string), string subjectEndsWith = default(string)) + : base(additionalProperties, description, runtimeState, annotations, pipelines) + { + SubjectBeginsWith = subjectBeginsWith; + SubjectEndsWith = subjectEndsWith; + Events = events; + Scope = scope; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the event subject must begin with the pattern provided + /// for trigger to fire. At least one of these must be provided: + /// subjectBeginsWith, subjectEndsWith. + /// + [JsonProperty(PropertyName = "typeProperties.subjectBeginsWith")] + public string SubjectBeginsWith { get; set; } + + /// + /// Gets or sets the event subject must end with the pattern provided + /// for trigger to fire. At least one of these must be provided: + /// subjectBeginsWith, subjectEndsWith. + /// + [JsonProperty(PropertyName = "typeProperties.subjectEndsWith")] + public string SubjectEndsWith { get; set; } + + /// + /// Gets or sets the list of event types that cause this trigger to + /// fire. + /// + [JsonProperty(PropertyName = "typeProperties.events")] + public IList Events { get; set; } + + /// + /// Gets or sets the ARM resource ID of the Azure Event Grid Topic. + /// + [JsonProperty(PropertyName = "typeProperties.scope")] + public string Scope { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Events == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Events"); + } + if (Scope == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Scope"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CustomSetupBase.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CustomSetupBase.cs new file mode 100644 index 000000000000..eb4d7b084004 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CustomSetupBase.cs @@ -0,0 +1,35 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using System.Linq; + + /// + /// The base definition of the custom setup. + /// + public partial class CustomSetupBase + { + /// + /// Initializes a new instance of the CustomSetupBase class. + /// + public CustomSetupBase() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DWCopyCommandDefaultValue.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DWCopyCommandDefaultValue.cs new file mode 100644 index 000000000000..8c0f932ae478 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DWCopyCommandDefaultValue.cs @@ -0,0 +1,63 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Default value. + /// + public partial class DWCopyCommandDefaultValue + { + /// + /// Initializes a new instance of the DWCopyCommandDefaultValue class. + /// + public DWCopyCommandDefaultValue() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DWCopyCommandDefaultValue class. + /// + /// Column name. Type: object (or Expression + /// with resultType string). + /// The default value of the column. Type: + /// object (or Expression with resultType string). + public DWCopyCommandDefaultValue(object columnName = default(object), object defaultValue = default(object)) + { + ColumnName = columnName; + DefaultValue = defaultValue; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets column name. Type: object (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "columnName")] + public object ColumnName { get; set; } + + /// + /// Gets or sets the default value of the column. Type: object (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "defaultValue")] + public object DefaultValue { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DWCopyCommandSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DWCopyCommandSettings.cs new file mode 100644 index 000000000000..fc9d34469377 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DWCopyCommandSettings.cs @@ -0,0 +1,76 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// DW Copy Command settings. + /// + public partial class DWCopyCommandSettings + { + /// + /// Initializes a new instance of the DWCopyCommandSettings class. + /// + public DWCopyCommandSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DWCopyCommandSettings class. + /// + /// Specifies the default values for each + /// target column in SQL DW. The default values in the property + /// overwrite the DEFAULT constraint set in the DB, and identity column + /// cannot have a default value. Type: array of objects (or Expression + /// with resultType array of objects). + /// Additional options directly passed + /// to SQL DW in Copy Command. Type: key value pairs (value should be + /// string type) (or Expression with resultType object). Example: + /// "additionalOptions": { "MAXERRORS": "1000", "DATEFORMAT": "'ymd'" + /// } + public DWCopyCommandSettings(IList defaultValues = default(IList), IDictionary additionalOptions = default(IDictionary)) + { + DefaultValues = defaultValues; + AdditionalOptions = additionalOptions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies the default values for each target column in + /// SQL DW. The default values in the property overwrite the DEFAULT + /// constraint set in the DB, and identity column cannot have a default + /// value. Type: array of objects (or Expression with resultType array + /// of objects). + /// + [JsonProperty(PropertyName = "defaultValues")] + public IList DefaultValues { get; set; } + + /// + /// Gets or sets additional options directly passed to SQL DW in Copy + /// Command. Type: key value pairs (value should be string type) (or + /// Expression with resultType object). Example: "additionalOptions": { + /// "MAXERRORS": "1000", "DATEFORMAT": "'ymd'" } + /// + [JsonProperty(PropertyName = "additionalOptions")] + public IDictionary AdditionalOptions { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlow.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlow.cs new file mode 100644 index 000000000000..f88c4d091d89 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlow.cs @@ -0,0 +1,74 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure Data Factory nested object which contains a flow with data + /// movements and transformations. + /// + public partial class DataFlow + { + /// + /// Initializes a new instance of the DataFlow class. + /// + public DataFlow() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlow class. + /// + /// The description of the data flow. + /// List of tags that can be used for + /// describing the data flow. + /// The folder that this data flow is in. If not + /// specified, Data flow will appear at the root level. + public DataFlow(string description = default(string), IList annotations = default(IList), DataFlowFolder folder = default(DataFlowFolder)) + { + Description = description; + Annotations = annotations; + Folder = folder; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the description of the data flow. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets list of tags that can be used for describing the data + /// flow. + /// + [JsonProperty(PropertyName = "annotations")] + public IList Annotations { get; set; } + + /// + /// Gets or sets the folder that this data flow is in. If not + /// specified, Data flow will appear at the root level. + /// + [JsonProperty(PropertyName = "folder")] + public DataFlowFolder Folder { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowComputeType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowComputeType.cs new file mode 100644 index 000000000000..e6aa0cc39be3 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowComputeType.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for DataFlowComputeType. + /// + public static class DataFlowComputeType + { + public const string General = "General"; + public const string MemoryOptimized = "MemoryOptimized"; + public const string ComputeOptimized = "ComputeOptimized"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandPayload.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandPayload.cs new file mode 100644 index 000000000000..c54876caac7f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandPayload.cs @@ -0,0 +1,95 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Structure of command payload. + /// + public partial class DataFlowDebugCommandPayload + { + /// + /// Initializes a new instance of the DataFlowDebugCommandPayload + /// class. + /// + public DataFlowDebugCommandPayload() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowDebugCommandPayload + /// class. + /// + /// The stream name which is used for + /// preview. + /// Row limits for preview response. + /// Array of column names. + /// The expression which is used for + /// preview. + public DataFlowDebugCommandPayload(string streamName, int? rowLimits = default(int?), IList columns = default(IList), string expression = default(string)) + { + StreamName = streamName; + RowLimits = rowLimits; + Columns = columns; + Expression = expression; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the stream name which is used for preview. + /// + [JsonProperty(PropertyName = "streamName")] + public string StreamName { get; set; } + + /// + /// Gets or sets row limits for preview response. + /// + [JsonProperty(PropertyName = "rowLimits")] + public int? RowLimits { get; set; } + + /// + /// Gets or sets array of column names. + /// + [JsonProperty(PropertyName = "columns")] + public IList Columns { get; set; } + + /// + /// Gets or sets the expression which is used for preview. + /// + [JsonProperty(PropertyName = "expression")] + public string Expression { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (StreamName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "StreamName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandRequest.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandRequest.cs new file mode 100644 index 000000000000..66c559cf2f30 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandRequest.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Request body structure for data flow debug command. + /// + public partial class DataFlowDebugCommandRequest + { + /// + /// Initializes a new instance of the DataFlowDebugCommandRequest + /// class. + /// + public DataFlowDebugCommandRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowDebugCommandRequest + /// class. + /// + /// The ID of data flow debug session. + /// The command type. Possible values include: + /// 'executePreviewQuery', 'executeStatisticsQuery', + /// 'executeExpressionQuery' + /// The command payload object. + public DataFlowDebugCommandRequest(string sessionId = default(string), string command = default(string), DataFlowDebugCommandPayload commandPayload = default(DataFlowDebugCommandPayload)) + { + SessionId = sessionId; + Command = command; + CommandPayload = commandPayload; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the ID of data flow debug session. + /// + [JsonProperty(PropertyName = "sessionId")] + public string SessionId { get; set; } + + /// + /// Gets or sets the command type. Possible values include: + /// 'executePreviewQuery', 'executeStatisticsQuery', + /// 'executeExpressionQuery' + /// + [JsonProperty(PropertyName = "command")] + public string Command { get; set; } + + /// + /// Gets or sets the command payload object. + /// + [JsonProperty(PropertyName = "commandPayload")] + public DataFlowDebugCommandPayload CommandPayload { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (CommandPayload != null) + { + CommandPayload.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandResponse.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandResponse.cs new file mode 100644 index 000000000000..034a3c28f49b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandResponse.cs @@ -0,0 +1,66 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Response body structure of data flow result for data preview, + /// statistics or expression preview. + /// + public partial class DataFlowDebugCommandResponse + { + /// + /// Initializes a new instance of the DataFlowDebugCommandResponse + /// class. + /// + public DataFlowDebugCommandResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowDebugCommandResponse + /// class. + /// + /// The run status of data preview, statistics or + /// expression preview. + /// The result data of data preview, statistics or + /// expression preview. + public DataFlowDebugCommandResponse(string status = default(string), string data = default(string)) + { + Status = status; + Data = data; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the run status of data preview, statistics or + /// expression preview. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or sets the result data of data preview, statistics or + /// expression preview. + /// + [JsonProperty(PropertyName = "data")] + public string Data { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandType.cs new file mode 100644 index 000000000000..23470ffe9278 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandType.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for DataFlowDebugCommandType. + /// + public static class DataFlowDebugCommandType + { + public const string ExecutePreviewQuery = "executePreviewQuery"; + public const string ExecuteStatisticsQuery = "executeStatisticsQuery"; + public const string ExecuteExpressionQuery = "executeExpressionQuery"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugPackage.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugPackage.cs new file mode 100644 index 000000000000..32e44a94be82 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugPackage.cs @@ -0,0 +1,158 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Request body structure for starting data flow debug session. + /// + public partial class DataFlowDebugPackage + { + /// + /// Initializes a new instance of the DataFlowDebugPackage class. + /// + public DataFlowDebugPackage() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowDebugPackage class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The ID of data flow debug session. + /// Data flow instance. + /// List of Data flows + /// List of datasets. + /// List of linked services. + /// Staging info for debug session. + /// Data flow debug settings. + public DataFlowDebugPackage(IDictionary additionalProperties = default(IDictionary), string sessionId = default(string), DataFlowDebugResource dataFlow = default(DataFlowDebugResource), IList dataFlows = default(IList), IList datasets = default(IList), IList linkedServices = default(IList), DataFlowStagingInfo staging = default(DataFlowStagingInfo), DataFlowDebugPackageDebugSettings debugSettings = default(DataFlowDebugPackageDebugSettings)) + { + AdditionalProperties = additionalProperties; + SessionId = sessionId; + DataFlow = dataFlow; + DataFlows = dataFlows; + Datasets = datasets; + LinkedServices = linkedServices; + Staging = staging; + DebugSettings = debugSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets the ID of data flow debug session. + /// + [JsonProperty(PropertyName = "sessionId")] + public string SessionId { get; set; } + + /// + /// Gets or sets data flow instance. + /// + [JsonProperty(PropertyName = "dataFlow")] + public DataFlowDebugResource DataFlow { get; set; } + + /// + /// Gets or sets list of Data flows + /// + [JsonProperty(PropertyName = "dataFlows")] + public IList DataFlows { get; set; } + + /// + /// Gets or sets list of datasets. + /// + [JsonProperty(PropertyName = "datasets")] + public IList Datasets { get; set; } + + /// + /// Gets or sets list of linked services. + /// + [JsonProperty(PropertyName = "linkedServices")] + public IList LinkedServices { get; set; } + + /// + /// Gets or sets staging info for debug session. + /// + [JsonProperty(PropertyName = "staging")] + public DataFlowStagingInfo Staging { get; set; } + + /// + /// Gets or sets data flow debug settings. + /// + [JsonProperty(PropertyName = "debugSettings")] + public DataFlowDebugPackageDebugSettings DebugSettings { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (DataFlow != null) + { + DataFlow.Validate(); + } + if (DataFlows != null) + { + foreach (var element in DataFlows) + { + if (element != null) + { + element.Validate(); + } + } + } + if (Datasets != null) + { + foreach (var element1 in Datasets) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + if (LinkedServices != null) + { + foreach (var element2 in LinkedServices) + { + if (element2 != null) + { + element2.Validate(); + } + } + } + if (Staging != null) + { + Staging.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugPackageDebugSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugPackageDebugSettings.cs new file mode 100644 index 000000000000..ba905f0711b3 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugPackageDebugSettings.cs @@ -0,0 +1,72 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Data flow debug settings. + /// + public partial class DataFlowDebugPackageDebugSettings + { + /// + /// Initializes a new instance of the DataFlowDebugPackageDebugSettings + /// class. + /// + public DataFlowDebugPackageDebugSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowDebugPackageDebugSettings + /// class. + /// + /// Source setting for data flow + /// debug. + /// Data flow parameters. + /// Parameters for dataset. + public DataFlowDebugPackageDebugSettings(IList sourceSettings = default(IList), IDictionary parameters = default(IDictionary), object datasetParameters = default(object)) + { + SourceSettings = sourceSettings; + Parameters = parameters; + DatasetParameters = datasetParameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets source setting for data flow debug. + /// + [JsonProperty(PropertyName = "sourceSettings")] + public IList SourceSettings { get; set; } + + /// + /// Gets or sets data flow parameters. + /// + [JsonProperty(PropertyName = "parameters")] + public IDictionary Parameters { get; set; } + + /// + /// Gets or sets parameters for dataset. + /// + [JsonProperty(PropertyName = "datasetParameters")] + public object DatasetParameters { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugResource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugResource.cs new file mode 100644 index 000000000000..a2406c546cb7 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugResource.cs @@ -0,0 +1,67 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Data flow debug resource. + /// + public partial class DataFlowDebugResource : SubResourceDebugResource + { + /// + /// Initializes a new instance of the DataFlowDebugResource class. + /// + public DataFlowDebugResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowDebugResource class. + /// + /// Data flow properties. + /// The resource name. + public DataFlowDebugResource(DataFlow properties, string name = default(string)) + : base(name) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets data flow properties. + /// + [JsonProperty(PropertyName = "properties")] + public DataFlow Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugSessionCreateHeaders.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugSessionCreateHeaders.cs new file mode 100644 index 000000000000..d2e5f57282df --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugSessionCreateHeaders.cs @@ -0,0 +1,54 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Create operation. + /// + public partial class DataFlowDebugSessionCreateHeaders + { + /// + /// Initializes a new instance of the DataFlowDebugSessionCreateHeaders + /// class. + /// + public DataFlowDebugSessionCreateHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowDebugSessionCreateHeaders + /// class. + /// + /// URI to poll for asynchronous operation + /// status. + public DataFlowDebugSessionCreateHeaders(string location = default(string)) + { + Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets URI to poll for asynchronous operation status. + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugSessionExecuteCommandHeaders.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugSessionExecuteCommandHeaders.cs new file mode 100644 index 000000000000..6b26e807ebf7 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugSessionExecuteCommandHeaders.cs @@ -0,0 +1,54 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for ExecuteCommand operation. + /// + public partial class DataFlowDebugSessionExecuteCommandHeaders + { + /// + /// Initializes a new instance of the + /// DataFlowDebugSessionExecuteCommandHeaders class. + /// + public DataFlowDebugSessionExecuteCommandHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// DataFlowDebugSessionExecuteCommandHeaders class. + /// + /// URI to poll for asynchronous operation + /// status. + public DataFlowDebugSessionExecuteCommandHeaders(string location = default(string)) + { + Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets URI to poll for asynchronous operation status. + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugSessionInfo.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugSessionInfo.cs new file mode 100644 index 000000000000..4269ae63d198 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugSessionInfo.cs @@ -0,0 +1,133 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Data flow debug session info. + /// + public partial class DataFlowDebugSessionInfo + { + /// + /// Initializes a new instance of the DataFlowDebugSessionInfo class. + /// + public DataFlowDebugSessionInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowDebugSessionInfo class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The name of the data flow. + /// Compute type of the cluster. + /// Core count of the cluster. + /// Node count of the cluster. (deprecated + /// property) + /// Attached integration runtime + /// name of data flow debug session. + /// The ID of data flow debug session. + /// Start time of data flow debug + /// session. + /// Compute type of the + /// cluster. + /// Last activity time of data flow + /// debug session. + public DataFlowDebugSessionInfo(IDictionary additionalProperties = default(IDictionary), string dataFlowName = default(string), string computeType = default(string), int? coreCount = default(int?), int? nodeCount = default(int?), string integrationRuntimeName = default(string), string sessionId = default(string), string startTime = default(string), int? timeToLiveInMinutes = default(int?), string lastActivityTime = default(string)) + { + AdditionalProperties = additionalProperties; + DataFlowName = dataFlowName; + ComputeType = computeType; + CoreCount = coreCount; + NodeCount = nodeCount; + IntegrationRuntimeName = integrationRuntimeName; + SessionId = sessionId; + StartTime = startTime; + TimeToLiveInMinutes = timeToLiveInMinutes; + LastActivityTime = lastActivityTime; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets the name of the data flow. + /// + [JsonProperty(PropertyName = "dataFlowName")] + public string DataFlowName { get; set; } + + /// + /// Gets or sets compute type of the cluster. + /// + [JsonProperty(PropertyName = "computeType")] + public string ComputeType { get; set; } + + /// + /// Gets or sets core count of the cluster. + /// + [JsonProperty(PropertyName = "coreCount")] + public int? CoreCount { get; set; } + + /// + /// Gets or sets node count of the cluster. (deprecated property) + /// + [JsonProperty(PropertyName = "nodeCount")] + public int? NodeCount { get; set; } + + /// + /// Gets or sets attached integration runtime name of data flow debug + /// session. + /// + [JsonProperty(PropertyName = "integrationRuntimeName")] + public string IntegrationRuntimeName { get; set; } + + /// + /// Gets or sets the ID of data flow debug session. + /// + [JsonProperty(PropertyName = "sessionId")] + public string SessionId { get; set; } + + /// + /// Gets or sets start time of data flow debug session. + /// + [JsonProperty(PropertyName = "startTime")] + public string StartTime { get; set; } + + /// + /// Gets or sets compute type of the cluster. + /// + [JsonProperty(PropertyName = "timeToLiveInMinutes")] + public int? TimeToLiveInMinutes { get; set; } + + /// + /// Gets or sets last activity time of data flow debug session. + /// + [JsonProperty(PropertyName = "lastActivityTime")] + public string LastActivityTime { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowFolder.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowFolder.cs new file mode 100644 index 000000000000..99419a661eee --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowFolder.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The folder that this data flow is in. If not specified, Data flow will + /// appear at the root level. + /// + public partial class DataFlowFolder + { + /// + /// Initializes a new instance of the DataFlowFolder class. + /// + public DataFlowFolder() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowFolder class. + /// + /// The name of the folder that this data flow is + /// in. + public DataFlowFolder(string name = default(string)) + { + Name = name; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the folder that this data flow is in. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowReference.cs new file mode 100644 index 000000000000..c46e78927edd --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowReference.cs @@ -0,0 +1,107 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Data flow reference type. + /// + public partial class DataFlowReference + { + /// + /// Initializes a new instance of the DataFlowReference class. + /// + public DataFlowReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowReference class. + /// + /// Reference data flow name. + /// Unmatched properties from the + /// message are deserialized this collection + /// Reference data flow parameters from + /// dataset. + /// Data flow parameters + public DataFlowReference(string referenceName, IDictionary additionalProperties = default(IDictionary), object datasetParameters = default(object), IDictionary parameters = default(IDictionary)) + { + AdditionalProperties = additionalProperties; + ReferenceName = referenceName; + DatasetParameters = datasetParameters; + Parameters = parameters; + CustomInit(); + } + /// + /// Static constructor for DataFlowReference class. + /// + static DataFlowReference() + { + Type = "DataFlowReference"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets reference data flow name. + /// + [JsonProperty(PropertyName = "referenceName")] + public string ReferenceName { get; set; } + + /// + /// Gets or sets reference data flow parameters from dataset. + /// + [JsonProperty(PropertyName = "datasetParameters")] + public object DatasetParameters { get; set; } + + /// + /// Gets or sets data flow parameters + /// + [JsonProperty(PropertyName = "parameters")] + public IDictionary Parameters { get; set; } + + /// + /// Data flow reference type. + /// + [JsonProperty(PropertyName = "type")] + public static string Type { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ReferenceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ReferenceName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowResource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowResource.cs new file mode 100644 index 000000000000..6ee35e23dc6e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowResource.cs @@ -0,0 +1,70 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Data flow resource type. + /// + public partial class DataFlowResource : SubResource + { + /// + /// Initializes a new instance of the DataFlowResource class. + /// + public DataFlowResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowResource class. + /// + /// Data flow properties. + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + public DataFlowResource(DataFlow properties, string id = default(string), string name = default(string), string type = default(string), string etag = default(string)) + : base(id, name, type, etag) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets data flow properties. + /// + [JsonProperty(PropertyName = "properties")] + public DataFlow Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowSink.cs new file mode 100644 index 000000000000..9559f1c4027b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowSink.cs @@ -0,0 +1,85 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Transformation for data flow sink. + /// + public partial class DataFlowSink : Transformation + { + /// + /// Initializes a new instance of the DataFlowSink class. + /// + public DataFlowSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowSink class. + /// + /// Transformation name. + /// Transformation description. + /// Dataset reference. + /// Linked service reference. + /// Flowlet Reference + /// Schema linked service + /// reference. + /// Rejected data linked + /// service reference. + public DataFlowSink(string name, string description = default(string), DatasetReference dataset = default(DatasetReference), LinkedServiceReference linkedService = default(LinkedServiceReference), DataFlowReference flowlet = default(DataFlowReference), LinkedServiceReference schemaLinkedService = default(LinkedServiceReference), LinkedServiceReference rejectedDataLinkedService = default(LinkedServiceReference)) + : base(name, description, dataset, linkedService, flowlet) + { + SchemaLinkedService = schemaLinkedService; + RejectedDataLinkedService = rejectedDataLinkedService; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets schema linked service reference. + /// + [JsonProperty(PropertyName = "schemaLinkedService")] + public LinkedServiceReference SchemaLinkedService { get; set; } + + /// + /// Gets or sets rejected data linked service reference. + /// + [JsonProperty(PropertyName = "rejectedDataLinkedService")] + public LinkedServiceReference RejectedDataLinkedService { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (SchemaLinkedService != null) + { + SchemaLinkedService.Validate(); + } + if (RejectedDataLinkedService != null) + { + RejectedDataLinkedService.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowSource.cs new file mode 100644 index 000000000000..d6ca33961443 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowSource.cs @@ -0,0 +1,72 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Transformation for data flow source. + /// + public partial class DataFlowSource : Transformation + { + /// + /// Initializes a new instance of the DataFlowSource class. + /// + public DataFlowSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowSource class. + /// + /// Transformation name. + /// Transformation description. + /// Dataset reference. + /// Linked service reference. + /// Flowlet Reference + /// Schema linked service + /// reference. + public DataFlowSource(string name, string description = default(string), DatasetReference dataset = default(DatasetReference), LinkedServiceReference linkedService = default(LinkedServiceReference), DataFlowReference flowlet = default(DataFlowReference), LinkedServiceReference schemaLinkedService = default(LinkedServiceReference)) + : base(name, description, dataset, linkedService, flowlet) + { + SchemaLinkedService = schemaLinkedService; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets schema linked service reference. + /// + [JsonProperty(PropertyName = "schemaLinkedService")] + public LinkedServiceReference SchemaLinkedService { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (SchemaLinkedService != null) + { + SchemaLinkedService.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowSourceSetting.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowSourceSetting.cs new file mode 100644 index 000000000000..1ab99dab0459 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowSourceSetting.cs @@ -0,0 +1,72 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Definition of data flow source setting for debug. + /// + public partial class DataFlowSourceSetting + { + /// + /// Initializes a new instance of the DataFlowSourceSetting class. + /// + public DataFlowSourceSetting() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowSourceSetting class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The data flow source name. + /// Defines the row limit of data flow source in + /// debug. + public DataFlowSourceSetting(IDictionary additionalProperties = default(IDictionary), string sourceName = default(string), int? rowLimit = default(int?)) + { + AdditionalProperties = additionalProperties; + SourceName = sourceName; + RowLimit = rowLimit; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets the data flow source name. + /// + [JsonProperty(PropertyName = "sourceName")] + public string SourceName { get; set; } + + /// + /// Gets or sets defines the row limit of data flow source in debug. + /// + [JsonProperty(PropertyName = "rowLimit")] + public int? RowLimit { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowStagingInfo.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowStagingInfo.cs new file mode 100644 index 000000000000..67e7c7e5fd5d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowStagingInfo.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Staging info for execute data flow activity. + /// + public partial class DataFlowStagingInfo + { + /// + /// Initializes a new instance of the DataFlowStagingInfo class. + /// + public DataFlowStagingInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowStagingInfo class. + /// + /// Staging linked service + /// reference. + /// Folder path for staging blob. Type: string + /// (or Expression with resultType string) + public DataFlowStagingInfo(LinkedServiceReference linkedService = default(LinkedServiceReference), object folderPath = default(object)) + { + LinkedService = linkedService; + FolderPath = folderPath; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets staging linked service reference. + /// + [JsonProperty(PropertyName = "linkedService")] + public LinkedServiceReference LinkedService { get; set; } + + /// + /// Gets or sets folder path for staging blob. Type: string (or + /// Expression with resultType string) + /// + [JsonProperty(PropertyName = "folderPath")] + public object FolderPath { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (LinkedService != null) + { + LinkedService.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataLakeAnalyticsUSQLActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataLakeAnalyticsUSQLActivity.cs new file mode 100644 index 000000000000..a8908caaf008 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataLakeAnalyticsUSQLActivity.cs @@ -0,0 +1,168 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Data Lake Analytics U-SQL activity. + /// + [Newtonsoft.Json.JsonObject("DataLakeAnalyticsU-SQL")] + [Rest.Serialization.JsonTransformation] + public partial class DataLakeAnalyticsUSQLActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the DataLakeAnalyticsUSQLActivity + /// class. + /// + public DataLakeAnalyticsUSQLActivity() + { + ScriptLinkedService = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the DataLakeAnalyticsUSQLActivity + /// class. + /// + /// Activity name. + /// Case-sensitive path to folder that + /// contains the U-SQL script. Type: string (or Expression with + /// resultType string). + /// Script linked service + /// reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// The maximum number of nodes + /// simultaneously used to run the job. Default value is 1. Type: + /// integer (or Expression with resultType integer), minimum: + /// 1. + /// Determines which jobs out of all that are + /// queued should be selected to run first. The lower the number, the + /// higher the priority. Default value is 1000. Type: integer (or + /// Expression with resultType integer), minimum: 1. + /// Parameters for U-SQL job request. + /// Runtime version of the U-SQL engine to + /// use. Type: string (or Expression with resultType string). + /// Compilation mode of U-SQL. Must be + /// one of these values : Semantic, Full and SingleBox. Type: string + /// (or Expression with resultType string). + public DataLakeAnalyticsUSQLActivity(string name, object scriptPath, LinkedServiceReference scriptLinkedService, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), object degreeOfParallelism = default(object), object priority = default(object), IDictionary parameters = default(IDictionary), object runtimeVersion = default(object), object compilationMode = default(object)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + ScriptPath = scriptPath; + ScriptLinkedService = scriptLinkedService; + DegreeOfParallelism = degreeOfParallelism; + Priority = priority; + Parameters = parameters; + RuntimeVersion = runtimeVersion; + CompilationMode = compilationMode; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets case-sensitive path to folder that contains the U-SQL + /// script. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.scriptPath")] + public object ScriptPath { get; set; } + + /// + /// Gets or sets script linked service reference. + /// + [JsonProperty(PropertyName = "typeProperties.scriptLinkedService")] + public LinkedServiceReference ScriptLinkedService { get; set; } + + /// + /// Gets or sets the maximum number of nodes simultaneously used to run + /// the job. Default value is 1. Type: integer (or Expression with + /// resultType integer), minimum: 1. + /// + [JsonProperty(PropertyName = "typeProperties.degreeOfParallelism")] + public object DegreeOfParallelism { get; set; } + + /// + /// Gets or sets determines which jobs out of all that are queued + /// should be selected to run first. The lower the number, the higher + /// the priority. Default value is 1000. Type: integer (or Expression + /// with resultType integer), minimum: 1. + /// + [JsonProperty(PropertyName = "typeProperties.priority")] + public object Priority { get; set; } + + /// + /// Gets or sets parameters for U-SQL job request. + /// + [JsonProperty(PropertyName = "typeProperties.parameters")] + public IDictionary Parameters { get; set; } + + /// + /// Gets or sets runtime version of the U-SQL engine to use. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.runtimeVersion")] + public object RuntimeVersion { get; set; } + + /// + /// Gets or sets compilation mode of U-SQL. Must be one of these values + /// : Semantic, Full and SingleBox. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.compilationMode")] + public object CompilationMode { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ScriptPath == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ScriptPath"); + } + if (ScriptLinkedService == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ScriptLinkedService"); + } + if (ScriptLinkedService != null) + { + ScriptLinkedService.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataMapperMapping.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataMapperMapping.cs new file mode 100644 index 000000000000..c0365fa7dbff --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataMapperMapping.cs @@ -0,0 +1,89 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Source and target table mapping details. + /// + public partial class DataMapperMapping + { + /// + /// Initializes a new instance of the DataMapperMapping class. + /// + public DataMapperMapping() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataMapperMapping class. + /// + /// Name of the target table + /// Name of the source table + /// The connection reference + /// for the source connection. + /// This holds the user provided + /// attribute mapping information. + /// This holds the source + /// denormalization information used while joining multiple + /// sources. + public DataMapperMapping(string targetEntityName = default(string), string sourceEntityName = default(string), MapperConnectionReference sourceConnectionReference = default(MapperConnectionReference), MapperAttributeMappings attributeMappingInfo = default(MapperAttributeMappings), object sourceDenormalizeInfo = default(object)) + { + TargetEntityName = targetEntityName; + SourceEntityName = sourceEntityName; + SourceConnectionReference = sourceConnectionReference; + AttributeMappingInfo = attributeMappingInfo; + SourceDenormalizeInfo = sourceDenormalizeInfo; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the target table + /// + [JsonProperty(PropertyName = "targetEntityName")] + public string TargetEntityName { get; set; } + + /// + /// Gets or sets name of the source table + /// + [JsonProperty(PropertyName = "sourceEntityName")] + public string SourceEntityName { get; set; } + + /// + /// Gets or sets the connection reference for the source connection. + /// + [JsonProperty(PropertyName = "sourceConnectionReference")] + public MapperConnectionReference SourceConnectionReference { get; set; } + + /// + /// Gets or sets this holds the user provided attribute mapping + /// information. + /// + [JsonProperty(PropertyName = "attributeMappingInfo")] + public MapperAttributeMappings AttributeMappingInfo { get; set; } + + /// + /// Gets or sets this holds the source denormalization information used + /// while joining multiple sources. + /// + [JsonProperty(PropertyName = "sourceDenormalizeInfo")] + public object SourceDenormalizeInfo { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatabricksNotebookActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatabricksNotebookActivity.cs new file mode 100644 index 000000000000..28feae18b5e6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatabricksNotebookActivity.cs @@ -0,0 +1,115 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// DatabricksNotebook activity. + /// + [Newtonsoft.Json.JsonObject("DatabricksNotebook")] + [Rest.Serialization.JsonTransformation] + public partial class DatabricksNotebookActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the DatabricksNotebookActivity class. + /// + public DatabricksNotebookActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatabricksNotebookActivity class. + /// + /// Activity name. + /// The absolute path of the notebook to be + /// run in the Databricks Workspace. This path must begin with a slash. + /// Type: string (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// Base parameters to be used for each + /// run of this job.If the notebook takes a parameter that is not + /// specified, the default value from the notebook will be + /// used. + /// A list of libraries to be installed on the + /// cluster that will execute the job. + public DatabricksNotebookActivity(string name, object notebookPath, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), IDictionary baseParameters = default(IDictionary), IList> libraries = default(IList>)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + NotebookPath = notebookPath; + BaseParameters = baseParameters; + Libraries = libraries; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the absolute path of the notebook to be run in the + /// Databricks Workspace. This path must begin with a slash. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.notebookPath")] + public object NotebookPath { get; set; } + + /// + /// Gets or sets base parameters to be used for each run of this job.If + /// the notebook takes a parameter that is not specified, the default + /// value from the notebook will be used. + /// + [JsonProperty(PropertyName = "typeProperties.baseParameters")] + public IDictionary BaseParameters { get; set; } + + /// + /// Gets or sets a list of libraries to be installed on the cluster + /// that will execute the job. + /// + [JsonProperty(PropertyName = "typeProperties.libraries")] + public IList> Libraries { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (NotebookPath == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "NotebookPath"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatabricksSparkJarActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatabricksSparkJarActivity.cs new file mode 100644 index 000000000000..d1d964f8cb4b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatabricksSparkJarActivity.cs @@ -0,0 +1,112 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// DatabricksSparkJar activity. + /// + [Newtonsoft.Json.JsonObject("DatabricksSparkJar")] + [Rest.Serialization.JsonTransformation] + public partial class DatabricksSparkJarActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the DatabricksSparkJarActivity class. + /// + public DatabricksSparkJarActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatabricksSparkJarActivity class. + /// + /// Activity name. + /// The full name of the class containing + /// the main method to be executed. This class must be contained in a + /// JAR provided as a library. Type: string (or Expression with + /// resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// Parameters that will be passed to the main + /// method. + /// A list of libraries to be installed on the + /// cluster that will execute the job. + public DatabricksSparkJarActivity(string name, object mainClassName, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), IList parameters = default(IList), IList> libraries = default(IList>)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + MainClassName = mainClassName; + Parameters = parameters; + Libraries = libraries; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the full name of the class containing the main method + /// to be executed. This class must be contained in a JAR provided as a + /// library. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.mainClassName")] + public object MainClassName { get; set; } + + /// + /// Gets or sets parameters that will be passed to the main method. + /// + [JsonProperty(PropertyName = "typeProperties.parameters")] + public IList Parameters { get; set; } + + /// + /// Gets or sets a list of libraries to be installed on the cluster + /// that will execute the job. + /// + [JsonProperty(PropertyName = "typeProperties.libraries")] + public IList> Libraries { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (MainClassName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MainClassName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatabricksSparkPythonActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatabricksSparkPythonActivity.cs new file mode 100644 index 000000000000..643b27e0202d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatabricksSparkPythonActivity.cs @@ -0,0 +1,113 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// DatabricksSparkPython activity. + /// + [Newtonsoft.Json.JsonObject("DatabricksSparkPython")] + [Rest.Serialization.JsonTransformation] + public partial class DatabricksSparkPythonActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the DatabricksSparkPythonActivity + /// class. + /// + public DatabricksSparkPythonActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatabricksSparkPythonActivity + /// class. + /// + /// Activity name. + /// The URI of the Python file to be executed. + /// DBFS paths are supported. Type: string (or Expression with + /// resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// Command line parameters that will be + /// passed to the Python file. + /// A list of libraries to be installed on the + /// cluster that will execute the job. + public DatabricksSparkPythonActivity(string name, object pythonFile, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), IList parameters = default(IList), IList> libraries = default(IList>)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + PythonFile = pythonFile; + Parameters = parameters; + Libraries = libraries; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the URI of the Python file to be executed. DBFS paths + /// are supported. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.pythonFile")] + public object PythonFile { get; set; } + + /// + /// Gets or sets command line parameters that will be passed to the + /// Python file. + /// + [JsonProperty(PropertyName = "typeProperties.parameters")] + public IList Parameters { get; set; } + + /// + /// Gets or sets a list of libraries to be installed on the cluster + /// that will execute the job. + /// + [JsonProperty(PropertyName = "typeProperties.libraries")] + public IList> Libraries { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (PythonFile == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PythonFile"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Dataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Dataset.cs new file mode 100644 index 000000000000..218416aab457 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Dataset.cs @@ -0,0 +1,153 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Azure Data Factory nested object which identifies data within + /// different data stores, such as tables, files, folders, and documents. + /// + public partial class Dataset + { + /// + /// Initializes a new instance of the Dataset class. + /// + public Dataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the Dataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + public Dataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder)) + { + AdditionalProperties = additionalProperties; + Description = description; + Structure = structure; + Schema = schema; + LinkedServiceName = linkedServiceName; + Parameters = parameters; + Annotations = annotations; + Folder = folder; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets dataset description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets columns that define the structure of the dataset. + /// Type: array (or Expression with resultType array), itemType: + /// DatasetDataElement. + /// + [JsonProperty(PropertyName = "structure")] + public object Structure { get; set; } + + /// + /// Gets or sets columns that define the physical type schema of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// + [JsonProperty(PropertyName = "schema")] + public object Schema { get; set; } + + /// + /// Gets or sets linked service reference. + /// + [JsonProperty(PropertyName = "linkedServiceName")] + public LinkedServiceReference LinkedServiceName { get; set; } + + /// + /// Gets or sets parameters for dataset. + /// + [JsonProperty(PropertyName = "parameters")] + public IDictionary Parameters { get; set; } + + /// + /// Gets or sets list of tags that can be used for describing the + /// Dataset. + /// + [JsonProperty(PropertyName = "annotations")] + public IList Annotations { get; set; } + + /// + /// Gets or sets the folder that this Dataset is in. If not specified, + /// Dataset will appear at the root level. + /// + [JsonProperty(PropertyName = "folder")] + public DatasetFolder Folder { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (LinkedServiceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "LinkedServiceName"); + } + if (LinkedServiceName != null) + { + LinkedServiceName.Validate(); + } + if (Parameters != null) + { + foreach (var valueElement in Parameters.Values) + { + if (valueElement != null) + { + valueElement.Validate(); + } + } + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetCompression.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetCompression.cs new file mode 100644 index 000000000000..b074fe86b12d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetCompression.cs @@ -0,0 +1,89 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The compression method used on a dataset. + /// + public partial class DatasetCompression + { + /// + /// Initializes a new instance of the DatasetCompression class. + /// + public DatasetCompression() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatasetCompression class. + /// + /// Type of dataset compression. Type: string (or + /// Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// The dataset compression level. Type: string (or + /// Expression with resultType string). + public DatasetCompression(object type, IDictionary additionalProperties = default(IDictionary), object level = default(object)) + { + AdditionalProperties = additionalProperties; + Type = type; + Level = level; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets type of dataset compression. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "type")] + public object Type { get; set; } + + /// + /// Gets or sets the dataset compression level. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "level")] + public object Level { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetCompressionLevel.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetCompressionLevel.cs new file mode 100644 index 000000000000..0735c55af417 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetCompressionLevel.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for DatasetCompressionLevel. + /// + public static class DatasetCompressionLevel + { + public const string Optimal = "Optimal"; + public const string Fastest = "Fastest"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetDataElement.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetDataElement.cs new file mode 100644 index 000000000000..d6871725ed8b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetDataElement.cs @@ -0,0 +1,63 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Columns that define the structure of the dataset. + /// + public partial class DatasetDataElement + { + /// + /// Initializes a new instance of the DatasetDataElement class. + /// + public DatasetDataElement() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatasetDataElement class. + /// + /// Name of the column. Type: string (or Expression + /// with resultType string). + /// Type of the column. Type: string (or Expression + /// with resultType string). + public DatasetDataElement(object name = default(object), object type = default(object)) + { + Name = name; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the column. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "name")] + public object Name { get; set; } + + /// + /// Gets or sets type of the column. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "type")] + public object Type { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetDebugResource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetDebugResource.cs new file mode 100644 index 000000000000..e7663cefc472 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetDebugResource.cs @@ -0,0 +1,72 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Dataset debug resource. + /// + public partial class DatasetDebugResource : SubResourceDebugResource + { + /// + /// Initializes a new instance of the DatasetDebugResource class. + /// + public DatasetDebugResource() + { + Properties = new Dataset(); + CustomInit(); + } + + /// + /// Initializes a new instance of the DatasetDebugResource class. + /// + /// Dataset properties. + /// The resource name. + public DatasetDebugResource(Dataset properties, string name = default(string)) + : base(name) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets dataset properties. + /// + [JsonProperty(PropertyName = "properties")] + public Dataset Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + if (Properties != null) + { + Properties.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetFolder.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetFolder.cs new file mode 100644 index 000000000000..a12c472feaf5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetFolder.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The folder that this Dataset is in. If not specified, Dataset will + /// appear at the root level. + /// + public partial class DatasetFolder + { + /// + /// Initializes a new instance of the DatasetFolder class. + /// + public DatasetFolder() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatasetFolder class. + /// + /// The name of the folder that this Dataset is + /// in. + public DatasetFolder(string name = default(string)) + { + Name = name; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the folder that this Dataset is in. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetLocation.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetLocation.cs new file mode 100644 index 000000000000..3ec6738030ce --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetLocation.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Dataset location. + /// + public partial class DatasetLocation + { + /// + /// Initializes a new instance of the DatasetLocation class. + /// + public DatasetLocation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatasetLocation class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Specify the folder path of dataset. Type: + /// string (or Expression with resultType string) + /// Specify the file name of dataset. Type: + /// string (or Expression with resultType string). + public DatasetLocation(IDictionary additionalProperties = default(IDictionary), object folderPath = default(object), object fileName = default(object)) + { + AdditionalProperties = additionalProperties; + FolderPath = folderPath; + FileName = fileName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets specify the folder path of dataset. Type: string (or + /// Expression with resultType string) + /// + [JsonProperty(PropertyName = "folderPath")] + public object FolderPath { get; set; } + + /// + /// Gets or sets specify the file name of dataset. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "fileName")] + public object FileName { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetReference.cs new file mode 100644 index 000000000000..859df9b55f85 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetReference.cs @@ -0,0 +1,88 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Dataset reference type. + /// + public partial class DatasetReference + { + /// + /// Initializes a new instance of the DatasetReference class. + /// + public DatasetReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatasetReference class. + /// + /// Reference dataset name. + /// Arguments for dataset. + public DatasetReference(string referenceName, IDictionary parameters = default(IDictionary)) + { + ReferenceName = referenceName; + Parameters = parameters; + CustomInit(); + } + /// + /// Static constructor for DatasetReference class. + /// + static DatasetReference() + { + Type = "DatasetReference"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets reference dataset name. + /// + [JsonProperty(PropertyName = "referenceName")] + public string ReferenceName { get; set; } + + /// + /// Gets or sets arguments for dataset. + /// + [JsonProperty(PropertyName = "parameters")] + public IDictionary Parameters { get; set; } + + /// + /// Dataset reference type. + /// + [JsonProperty(PropertyName = "type")] + public static string Type { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ReferenceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ReferenceName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetResource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetResource.cs new file mode 100644 index 000000000000..11f2afa4dc7c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetResource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Dataset resource type. + /// + public partial class DatasetResource : SubResource + { + /// + /// Initializes a new instance of the DatasetResource class. + /// + public DatasetResource() + { + Properties = new Dataset(); + CustomInit(); + } + + /// + /// Initializes a new instance of the DatasetResource class. + /// + /// Dataset properties. + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + public DatasetResource(Dataset properties, string id = default(string), string name = default(string), string type = default(string), string etag = default(string)) + : base(id, name, type, etag) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets dataset properties. + /// + [JsonProperty(PropertyName = "properties")] + public Dataset Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + if (Properties != null) + { + Properties.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetSchemaDataElement.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetSchemaDataElement.cs new file mode 100644 index 000000000000..b79a156e2b66 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetSchemaDataElement.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Columns that define the physical type schema of the dataset. + /// + public partial class DatasetSchemaDataElement + { + /// + /// Initializes a new instance of the DatasetSchemaDataElement class. + /// + public DatasetSchemaDataElement() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatasetSchemaDataElement class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Name of the schema column. Type: string (or + /// Expression with resultType string). + /// Type of the schema column. Type: string (or + /// Expression with resultType string). + public DatasetSchemaDataElement(IDictionary additionalProperties = default(IDictionary), object name = default(object), object type = default(object)) + { + AdditionalProperties = additionalProperties; + Name = name; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets name of the schema column. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "name")] + public object Name { get; set; } + + /// + /// Gets or sets type of the schema column. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "type")] + public object Type { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetStorageFormat.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetStorageFormat.cs new file mode 100644 index 000000000000..9666f91b0e06 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DatasetStorageFormat.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The format definition of a storage. + /// + public partial class DatasetStorageFormat + { + /// + /// Initializes a new instance of the DatasetStorageFormat class. + /// + public DatasetStorageFormat() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatasetStorageFormat class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Serializer. Type: string (or Expression + /// with resultType string). + /// Deserializer. Type: string (or + /// Expression with resultType string). + public DatasetStorageFormat(IDictionary additionalProperties = default(IDictionary), object serializer = default(object), object deserializer = default(object)) + { + AdditionalProperties = additionalProperties; + Serializer = serializer; + Deserializer = deserializer; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets serializer. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "serializer")] + public object Serializer { get; set; } + + /// + /// Gets or sets deserializer. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "deserializer")] + public object Deserializer { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataworldLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataworldLinkedService.cs new file mode 100644 index 000000000000..6239428689db --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataworldLinkedService.cs @@ -0,0 +1,93 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for Dataworld. + /// + [Newtonsoft.Json.JsonObject("Dataworld")] + [Rest.Serialization.JsonTransformation] + public partial class DataworldLinkedService : LinkedService + { + /// + /// Initializes a new instance of the DataworldLinkedService class. + /// + public DataworldLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataworldLinkedService class. + /// + /// The api token for the Dataworld + /// source. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public DataworldLinkedService(SecretBase apiToken, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ApiToken = apiToken; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the api token for the Dataworld source. + /// + [JsonProperty(PropertyName = "typeProperties.apiToken")] + public SecretBase ApiToken { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ApiToken == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ApiToken"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DayOfWeek.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DayOfWeek.cs new file mode 100644 index 000000000000..9df6c3af95a9 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DayOfWeek.cs @@ -0,0 +1,90 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for DayOfWeek. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum DayOfWeek + { + [EnumMember(Value = "Sunday")] + Sunday, + [EnumMember(Value = "Monday")] + Monday, + [EnumMember(Value = "Tuesday")] + Tuesday, + [EnumMember(Value = "Wednesday")] + Wednesday, + [EnumMember(Value = "Thursday")] + Thursday, + [EnumMember(Value = "Friday")] + Friday, + [EnumMember(Value = "Saturday")] + Saturday + } + internal static class DayOfWeekEnumExtension + { + internal static string ToSerializedValue(this DayOfWeek? value) + { + return value == null ? null : ((DayOfWeek)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this DayOfWeek value) + { + switch( value ) + { + case DayOfWeek.Sunday: + return "Sunday"; + case DayOfWeek.Monday: + return "Monday"; + case DayOfWeek.Tuesday: + return "Tuesday"; + case DayOfWeek.Wednesday: + return "Wednesday"; + case DayOfWeek.Thursday: + return "Thursday"; + case DayOfWeek.Friday: + return "Friday"; + case DayOfWeek.Saturday: + return "Saturday"; + } + return null; + } + + internal static DayOfWeek? ParseDayOfWeek(this string value) + { + switch( value ) + { + case "Sunday": + return DayOfWeek.Sunday; + case "Monday": + return DayOfWeek.Monday; + case "Tuesday": + return DayOfWeek.Tuesday; + case "Wednesday": + return DayOfWeek.Wednesday; + case "Thursday": + return DayOfWeek.Thursday; + case "Friday": + return DayOfWeek.Friday; + case "Saturday": + return DayOfWeek.Saturday; + } + return null; + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DaysOfWeek.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DaysOfWeek.cs new file mode 100644 index 000000000000..6046209a2a5d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DaysOfWeek.cs @@ -0,0 +1,90 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for DaysOfWeek. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum DaysOfWeek + { + [EnumMember(Value = "Sunday")] + Sunday, + [EnumMember(Value = "Monday")] + Monday, + [EnumMember(Value = "Tuesday")] + Tuesday, + [EnumMember(Value = "Wednesday")] + Wednesday, + [EnumMember(Value = "Thursday")] + Thursday, + [EnumMember(Value = "Friday")] + Friday, + [EnumMember(Value = "Saturday")] + Saturday + } + internal static class DaysOfWeekEnumExtension + { + internal static string ToSerializedValue(this DaysOfWeek? value) + { + return value == null ? null : ((DaysOfWeek)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this DaysOfWeek value) + { + switch( value ) + { + case DaysOfWeek.Sunday: + return "Sunday"; + case DaysOfWeek.Monday: + return "Monday"; + case DaysOfWeek.Tuesday: + return "Tuesday"; + case DaysOfWeek.Wednesday: + return "Wednesday"; + case DaysOfWeek.Thursday: + return "Thursday"; + case DaysOfWeek.Friday: + return "Friday"; + case DaysOfWeek.Saturday: + return "Saturday"; + } + return null; + } + + internal static DaysOfWeek? ParseDaysOfWeek(this string value) + { + switch( value ) + { + case "Sunday": + return DaysOfWeek.Sunday; + case "Monday": + return DaysOfWeek.Monday; + case "Tuesday": + return DaysOfWeek.Tuesday; + case "Wednesday": + return DaysOfWeek.Wednesday; + case "Thursday": + return DaysOfWeek.Thursday; + case "Friday": + return DaysOfWeek.Friday; + case "Saturday": + return DaysOfWeek.Saturday; + } + return null; + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Db2AuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Db2AuthenticationType.cs new file mode 100644 index 000000000000..fe9aa4be4f4f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Db2AuthenticationType.cs @@ -0,0 +1,21 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for Db2AuthenticationType. + /// + public static class Db2AuthenticationType + { + public const string Basic = "Basic"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Db2LinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Db2LinkedService.cs new file mode 100644 index 000000000000..0218cf4eebed --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Db2LinkedService.cs @@ -0,0 +1,178 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for DB2 data source. + /// + [Newtonsoft.Json.JsonObject("Db2")] + [Rest.Serialization.JsonTransformation] + public partial class Db2LinkedService : LinkedService + { + /// + /// Initializes a new instance of the Db2LinkedService class. + /// + public Db2LinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Db2LinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The connection string. It is + /// mutually exclusive with server, database, authenticationType, + /// userName, packageCollection and certificateCommonName property. + /// Type: string, SecureString or AzureKeyVaultSecretReference. + /// Server name for connection. It is mutually + /// exclusive with connectionString property. Type: string (or + /// Expression with resultType string). + /// Database name for connection. It is mutually + /// exclusive with connectionString property. Type: string (or + /// Expression with resultType string). + /// AuthenticationType to be used for + /// connection. It is mutually exclusive with connectionString + /// property. Possible values include: 'Basic' + /// Username for authentication. It is mutually + /// exclusive with connectionString property. Type: string (or + /// Expression with resultType string). + /// Password for authentication. + /// Under where packages are created + /// when querying database. It is mutually exclusive with + /// connectionString property. Type: string (or Expression with + /// resultType string). + /// Certificate Common Name when + /// TLS is enabled. It is mutually exclusive with connectionString + /// property. Type: string (or Expression with resultType + /// string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. It is mutually exclusive with + /// connectionString property. Type: string. + public Db2LinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object connectionString = default(object), object server = default(object), object database = default(object), string authenticationType = default(string), object username = default(object), SecretBase password = default(SecretBase), object packageCollection = default(object), object certificateCommonName = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionString = connectionString; + Server = server; + Database = database; + AuthenticationType = authenticationType; + Username = username; + Password = password; + PackageCollection = packageCollection; + CertificateCommonName = certificateCommonName; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the connection string. It is mutually exclusive with + /// server, database, authenticationType, userName, packageCollection + /// and certificateCommonName property. Type: string, SecureString or + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets server name for connection. It is mutually exclusive + /// with connectionString property. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.server")] + public object Server { get; set; } + + /// + /// Gets or sets database name for connection. It is mutually exclusive + /// with connectionString property. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.database")] + public object Database { get; set; } + + /// + /// Gets or sets authenticationType to be used for connection. It is + /// mutually exclusive with connectionString property. Possible values + /// include: 'Basic' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets username for authentication. It is mutually exclusive + /// with connectionString property. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets password for authentication. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets under where packages are created when querying + /// database. It is mutually exclusive with connectionString property. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.packageCollection")] + public object PackageCollection { get; set; } + + /// + /// Gets or sets certificate Common Name when TLS is enabled. It is + /// mutually exclusive with connectionString property. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.certificateCommonName")] + public object CertificateCommonName { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. It is mutually exclusive with connectionString property. + /// Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Db2Source.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Db2Source.cs new file mode 100644 index 000000000000..d740916793b5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Db2Source.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for Db2 databases. + /// + public partial class Db2Source : TabularSource + { + /// + /// Initializes a new instance of the Db2Source class. + /// + public Db2Source() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Db2Source class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// Database query. Type: string (or Expression + /// with resultType string). + public Db2Source(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets database query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Db2TableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Db2TableDataset.cs new file mode 100644 index 000000000000..ada85bf54b53 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Db2TableDataset.cs @@ -0,0 +1,106 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Db2 table dataset. + /// + [Newtonsoft.Json.JsonObject("Db2Table")] + [Rest.Serialization.JsonTransformation] + public partial class Db2TableDataset : Dataset + { + /// + /// Initializes a new instance of the Db2TableDataset class. + /// + public Db2TableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the Db2TableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// This property will be retired. Please + /// consider using schema + table properties instead. + /// The Db2 schema name. Type: + /// string (or Expression with resultType string). + /// The Db2 table name. Type: string (or Expression + /// with resultType string). + public Db2TableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object), object db2TableDatasetSchema = default(object), object table = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + Db2TableDatasetSchema = db2TableDatasetSchema; + Table = table; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property will be retired. Please consider using + /// schema + table properties instead. + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Gets or sets the Db2 schema name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object Db2TableDatasetSchema { get; set; } + + /// + /// Gets or sets the Db2 table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DeleteActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DeleteActivity.cs new file mode 100644 index 000000000000..8fbd9db7e869 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DeleteActivity.cs @@ -0,0 +1,153 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Delete activity. + /// + [Newtonsoft.Json.JsonObject("Delete")] + [Rest.Serialization.JsonTransformation] + public partial class DeleteActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the DeleteActivity class. + /// + public DeleteActivity() + { + Dataset = new DatasetReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the DeleteActivity class. + /// + /// Activity name. + /// Delete activity dataset reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// If true, files or sub-folders under current + /// folder path will be deleted recursively. Default is false. Type: + /// boolean (or Expression with resultType boolean). + /// The max concurrent + /// connections to connect data source at the same time. + /// Whether to record detailed logs of + /// delete-activity execution. Default value is false. Type: boolean + /// (or Expression with resultType boolean). + /// Log storage settings customer need + /// to provide when enableLogging is true. + /// Delete activity store settings. + public DeleteActivity(string name, DatasetReference dataset, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), object recursive = default(object), int? maxConcurrentConnections = default(int?), object enableLogging = default(object), LogStorageSettings logStorageSettings = default(LogStorageSettings), StoreReadSettings storeSettings = default(StoreReadSettings)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + Recursive = recursive; + MaxConcurrentConnections = maxConcurrentConnections; + EnableLogging = enableLogging; + LogStorageSettings = logStorageSettings; + Dataset = dataset; + StoreSettings = storeSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets if true, files or sub-folders under current folder + /// path will be deleted recursively. Default is false. Type: boolean + /// (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.recursive")] + public object Recursive { get; set; } + + /// + /// Gets or sets the max concurrent connections to connect data source + /// at the same time. + /// + [JsonProperty(PropertyName = "typeProperties.maxConcurrentConnections")] + public int? MaxConcurrentConnections { get; set; } + + /// + /// Gets or sets whether to record detailed logs of delete-activity + /// execution. Default value is false. Type: boolean (or Expression + /// with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.enableLogging")] + public object EnableLogging { get; set; } + + /// + /// Gets or sets log storage settings customer need to provide when + /// enableLogging is true. + /// + [JsonProperty(PropertyName = "typeProperties.logStorageSettings")] + public LogStorageSettings LogStorageSettings { get; set; } + + /// + /// Gets or sets delete activity dataset reference. + /// + [JsonProperty(PropertyName = "typeProperties.dataset")] + public DatasetReference Dataset { get; set; } + + /// + /// Gets or sets delete activity store settings. + /// + [JsonProperty(PropertyName = "typeProperties.storeSettings")] + public StoreReadSettings StoreSettings { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Dataset == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Dataset"); + } + if (MaxConcurrentConnections < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "MaxConcurrentConnections", 1); + } + if (LogStorageSettings != null) + { + LogStorageSettings.Validate(); + } + if (Dataset != null) + { + Dataset.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DeleteDataFlowDebugSessionRequest.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DeleteDataFlowDebugSessionRequest.cs new file mode 100644 index 000000000000..d6bcccba884a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DeleteDataFlowDebugSessionRequest.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Request body structure for deleting data flow debug session. + /// + public partial class DeleteDataFlowDebugSessionRequest + { + /// + /// Initializes a new instance of the DeleteDataFlowDebugSessionRequest + /// class. + /// + public DeleteDataFlowDebugSessionRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DeleteDataFlowDebugSessionRequest + /// class. + /// + /// The ID of data flow debug session. + public DeleteDataFlowDebugSessionRequest(string sessionId = default(string)) + { + SessionId = sessionId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the ID of data flow debug session. + /// + [JsonProperty(PropertyName = "sessionId")] + public string SessionId { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DelimitedTextDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DelimitedTextDataset.cs new file mode 100644 index 000000000000..3abb3b0b91a5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DelimitedTextDataset.cs @@ -0,0 +1,190 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Delimited text dataset. + /// + [Newtonsoft.Json.JsonObject("DelimitedText")] + [Rest.Serialization.JsonTransformation] + public partial class DelimitedTextDataset : Dataset + { + /// + /// Initializes a new instance of the DelimitedTextDataset class. + /// + public DelimitedTextDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the DelimitedTextDataset class. + /// + /// Linked service reference. + /// The location of the delimited text + /// storage. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The column delimiter. Type: string + /// (or Expression with resultType string). + /// The row delimiter. Type: string (or + /// Expression with resultType string). + /// The code page name of the preferred + /// encoding. If miss, the default value is UTF-8, unless BOM denotes + /// another Unicode encoding. Refer to the name column of the table in + /// the following link to set supported values: + /// https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: + /// string (or Expression with resultType string). + /// The data compressionCodec. Type: + /// string (or Expression with resultType string). + /// The data compression method used for + /// DelimitedText. + /// The quote character. Type: string (or + /// Expression with resultType string). + /// The escape character. Type: string (or + /// Expression with resultType string). + /// When used as input, treat the first + /// row of data as headers. When used as output,write the headers into + /// the output as the first row of data. The default value is false. + /// Type: boolean (or Expression with resultType boolean). + /// The null value string. Type: string (or + /// Expression with resultType string). + public DelimitedTextDataset(LinkedServiceReference linkedServiceName, DatasetLocation location, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object columnDelimiter = default(object), object rowDelimiter = default(object), object encodingName = default(object), object compressionCodec = default(object), object compressionLevel = default(object), object quoteChar = default(object), object escapeChar = default(object), object firstRowAsHeader = default(object), object nullValue = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Location = location; + ColumnDelimiter = columnDelimiter; + RowDelimiter = rowDelimiter; + EncodingName = encodingName; + CompressionCodec = compressionCodec; + CompressionLevel = compressionLevel; + QuoteChar = quoteChar; + EscapeChar = escapeChar; + FirstRowAsHeader = firstRowAsHeader; + NullValue = nullValue; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the location of the delimited text storage. + /// + [JsonProperty(PropertyName = "typeProperties.location")] + public DatasetLocation Location { get; set; } + + /// + /// Gets or sets the column delimiter. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.columnDelimiter")] + public object ColumnDelimiter { get; set; } + + /// + /// Gets or sets the row delimiter. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.rowDelimiter")] + public object RowDelimiter { get; set; } + + /// + /// Gets or sets the code page name of the preferred encoding. If miss, + /// the default value is UTF-8, unless BOM denotes another Unicode + /// encoding. Refer to the name column of the table in the following + /// link to set supported values: + /// https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.encodingName")] + public object EncodingName { get; set; } + + /// + /// Gets or sets the data compressionCodec. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.compressionCodec")] + public object CompressionCodec { get; set; } + + /// + /// Gets or sets the data compression method used for DelimitedText. + /// + [JsonProperty(PropertyName = "typeProperties.compressionLevel")] + public object CompressionLevel { get; set; } + + /// + /// Gets or sets the quote character. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.quoteChar")] + public object QuoteChar { get; set; } + + /// + /// Gets or sets the escape character. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.escapeChar")] + public object EscapeChar { get; set; } + + /// + /// Gets or sets when used as input, treat the first row of data as + /// headers. When used as output,write the headers into the output as + /// the first row of data. The default value is false. Type: boolean + /// (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.firstRowAsHeader")] + public object FirstRowAsHeader { get; set; } + + /// + /// Gets or sets the null value string. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.nullValue")] + public object NullValue { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Location"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DelimitedTextReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DelimitedTextReadSettings.cs new file mode 100644 index 000000000000..3179a642cb00 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DelimitedTextReadSettings.cs @@ -0,0 +1,68 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Delimited text read settings. + /// + public partial class DelimitedTextReadSettings : FormatReadSettings + { + /// + /// Initializes a new instance of the DelimitedTextReadSettings class. + /// + public DelimitedTextReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DelimitedTextReadSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Indicates the number of non-empty rows + /// to skip when reading data from input files. Type: integer (or + /// Expression with resultType integer). + /// Compression settings. + public DelimitedTextReadSettings(IDictionary additionalProperties = default(IDictionary), object skipLineCount = default(object), CompressionReadSettings compressionProperties = default(CompressionReadSettings)) + : base(additionalProperties) + { + SkipLineCount = skipLineCount; + CompressionProperties = compressionProperties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets indicates the number of non-empty rows to skip when + /// reading data from input files. Type: integer (or Expression with + /// resultType integer). + /// + [JsonProperty(PropertyName = "skipLineCount")] + public object SkipLineCount { get; set; } + + /// + /// Gets or sets compression settings. + /// + [JsonProperty(PropertyName = "compressionProperties")] + public CompressionReadSettings CompressionProperties { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DelimitedTextSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DelimitedTextSink.cs new file mode 100644 index 000000000000..605bda41154b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DelimitedTextSink.cs @@ -0,0 +1,93 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity DelimitedText sink. + /// + public partial class DelimitedTextSink : CopySink + { + /// + /// Initializes a new instance of the DelimitedTextSink class. + /// + public DelimitedTextSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DelimitedTextSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// DelimitedText store settings. + /// DelimitedText format settings. + public DelimitedTextSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), StoreWriteSettings storeSettings = default(StoreWriteSettings), DelimitedTextWriteSettings formatSettings = default(DelimitedTextWriteSettings)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + StoreSettings = storeSettings; + FormatSettings = formatSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets delimitedText store settings. + /// + [JsonProperty(PropertyName = "storeSettings")] + public StoreWriteSettings StoreSettings { get; set; } + + /// + /// Gets or sets delimitedText format settings. + /// + [JsonProperty(PropertyName = "formatSettings")] + public DelimitedTextWriteSettings FormatSettings { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (FormatSettings != null) + { + FormatSettings.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DelimitedTextSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DelimitedTextSource.cs new file mode 100644 index 000000000000..7b0563570e9a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DelimitedTextSource.cs @@ -0,0 +1,87 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity DelimitedText source. + /// + public partial class DelimitedTextSource : CopySource + { + /// + /// Initializes a new instance of the DelimitedTextSource class. + /// + public DelimitedTextSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DelimitedTextSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// DelimitedText store settings. + /// DelimitedText format settings. + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public DelimitedTextSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), StoreReadSettings storeSettings = default(StoreReadSettings), DelimitedTextReadSettings formatSettings = default(DelimitedTextReadSettings), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + StoreSettings = storeSettings; + FormatSettings = formatSettings; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets delimitedText store settings. + /// + [JsonProperty(PropertyName = "storeSettings")] + public StoreReadSettings StoreSettings { get; set; } + + /// + /// Gets or sets delimitedText format settings. + /// + [JsonProperty(PropertyName = "formatSettings")] + public DelimitedTextReadSettings FormatSettings { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DelimitedTextWriteSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DelimitedTextWriteSettings.cs new file mode 100644 index 000000000000..31e6a7d966ef --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DelimitedTextWriteSettings.cs @@ -0,0 +1,110 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Delimited text write settings. + /// + public partial class DelimitedTextWriteSettings : FormatWriteSettings + { + /// + /// Initializes a new instance of the DelimitedTextWriteSettings class. + /// + public DelimitedTextWriteSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DelimitedTextWriteSettings class. + /// + /// The file extension used to create the + /// files. Type: string (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Indicates whether string values should + /// always be enclosed with quotes. Type: boolean (or Expression with + /// resultType boolean). + /// Limit the written file's row count to + /// be smaller than or equal to the specified count. Type: integer (or + /// Expression with resultType integer). + /// Specifies the file name pattern + /// <fileNamePrefix>_<fileIndex>.<fileExtension> when + /// copy from non-file based store without partitionOptions. Type: + /// string (or Expression with resultType string). + public DelimitedTextWriteSettings(object fileExtension, IDictionary additionalProperties = default(IDictionary), object quoteAllText = default(object), object maxRowsPerFile = default(object), object fileNamePrefix = default(object)) + : base(additionalProperties) + { + QuoteAllText = quoteAllText; + FileExtension = fileExtension; + MaxRowsPerFile = maxRowsPerFile; + FileNamePrefix = fileNamePrefix; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets indicates whether string values should always be + /// enclosed with quotes. Type: boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "quoteAllText")] + public object QuoteAllText { get; set; } + + /// + /// Gets or sets the file extension used to create the files. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "fileExtension")] + public object FileExtension { get; set; } + + /// + /// Gets or sets limit the written file's row count to be smaller than + /// or equal to the specified count. Type: integer (or Expression with + /// resultType integer). + /// + [JsonProperty(PropertyName = "maxRowsPerFile")] + public object MaxRowsPerFile { get; set; } + + /// + /// Gets or sets specifies the file name pattern + /// &lt;fileNamePrefix&gt;_&lt;fileIndex&gt;.&lt;fileExtension&gt; + /// when copy from non-file based store without partitionOptions. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "fileNamePrefix")] + public object FileNamePrefix { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (FileExtension == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "FileExtension"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DependencyCondition.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DependencyCondition.cs new file mode 100644 index 000000000000..62dad3c95c25 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DependencyCondition.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for DependencyCondition. + /// + public static class DependencyCondition + { + public const string Succeeded = "Succeeded"; + public const string Failed = "Failed"; + public const string Skipped = "Skipped"; + public const string Completed = "Completed"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DependencyReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DependencyReference.cs new file mode 100644 index 000000000000..60817bd12d4e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DependencyReference.cs @@ -0,0 +1,35 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using System.Linq; + + /// + /// Referenced dependency. + /// + public partial class DependencyReference + { + /// + /// Initializes a new instance of the DependencyReference class. + /// + public DependencyReference() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DistcpSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DistcpSettings.cs new file mode 100644 index 000000000000..afa77cce6ba4 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DistcpSettings.cs @@ -0,0 +1,97 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Distcp settings. + /// + public partial class DistcpSettings + { + /// + /// Initializes a new instance of the DistcpSettings class. + /// + public DistcpSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DistcpSettings class. + /// + /// Specifies the Yarn + /// ResourceManager endpoint. Type: string (or Expression with + /// resultType string). + /// Specifies an existing folder path + /// which will be used to store temp Distcp command script. The script + /// file is generated by ADF and will be removed after Copy job + /// finished. Type: string (or Expression with resultType + /// string). + /// Specifies the Distcp options. Type: + /// string (or Expression with resultType string). + public DistcpSettings(object resourceManagerEndpoint, object tempScriptPath, object distcpOptions = default(object)) + { + ResourceManagerEndpoint = resourceManagerEndpoint; + TempScriptPath = tempScriptPath; + DistcpOptions = distcpOptions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies the Yarn ResourceManager endpoint. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "resourceManagerEndpoint")] + public object ResourceManagerEndpoint { get; set; } + + /// + /// Gets or sets specifies an existing folder path which will be used + /// to store temp Distcp command script. The script file is generated + /// by ADF and will be removed after Copy job finished. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "tempScriptPath")] + public object TempScriptPath { get; set; } + + /// + /// Gets or sets specifies the Distcp options. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "distcpOptions")] + public object DistcpOptions { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ResourceManagerEndpoint == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ResourceManagerEndpoint"); + } + if (TempScriptPath == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TempScriptPath"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DocumentDbCollectionDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DocumentDbCollectionDataset.cs new file mode 100644 index 000000000000..b80c3d00f01c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DocumentDbCollectionDataset.cs @@ -0,0 +1,92 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Microsoft Azure Document Database Collection dataset. + /// + [Newtonsoft.Json.JsonObject("DocumentDbCollection")] + [Rest.Serialization.JsonTransformation] + public partial class DocumentDbCollectionDataset : Dataset + { + /// + /// Initializes a new instance of the DocumentDbCollectionDataset + /// class. + /// + public DocumentDbCollectionDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the DocumentDbCollectionDataset + /// class. + /// + /// Linked service reference. + /// Document Database collection name. + /// Type: string (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + public DocumentDbCollectionDataset(LinkedServiceReference linkedServiceName, object collectionName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + CollectionName = collectionName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets document Database collection name. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.collectionName")] + public object CollectionName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (CollectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "CollectionName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DocumentDbCollectionSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DocumentDbCollectionSink.cs new file mode 100644 index 000000000000..98af551674bd --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DocumentDbCollectionSink.cs @@ -0,0 +1,87 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Document Database Collection sink. + /// + public partial class DocumentDbCollectionSink : CopySink + { + /// + /// Initializes a new instance of the DocumentDbCollectionSink class. + /// + public DocumentDbCollectionSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DocumentDbCollectionSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Nested properties separator. Default + /// is . (dot). Type: string (or Expression with resultType + /// string). + /// Describes how to write data to Azure + /// Cosmos DB. Type: string (or Expression with resultType string). + /// Allowed values: insert and upsert. + public DocumentDbCollectionSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object nestingSeparator = default(object), object writeBehavior = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + NestingSeparator = nestingSeparator; + WriteBehavior = writeBehavior; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets nested properties separator. Default is . (dot). Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "nestingSeparator")] + public object NestingSeparator { get; set; } + + /// + /// Gets or sets describes how to write data to Azure Cosmos DB. Type: + /// string (or Expression with resultType string). Allowed values: + /// insert and upsert. + /// + [JsonProperty(PropertyName = "writeBehavior")] + public object WriteBehavior { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DocumentDbCollectionSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DocumentDbCollectionSource.cs new file mode 100644 index 000000000000..e5e476d2621e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DocumentDbCollectionSource.cs @@ -0,0 +1,103 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Document Database Collection source. + /// + public partial class DocumentDbCollectionSource : CopySource + { + /// + /// Initializes a new instance of the DocumentDbCollectionSource class. + /// + public DocumentDbCollectionSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DocumentDbCollectionSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Documents query. Type: string (or Expression + /// with resultType string). + /// Nested properties separator. Type: + /// string (or Expression with resultType string). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public DocumentDbCollectionSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object query = default(object), object nestingSeparator = default(object), object queryTimeout = default(object), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + Query = query; + NestingSeparator = nestingSeparator; + QueryTimeout = queryTimeout; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets documents query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets nested properties separator. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "nestingSeparator")] + public object NestingSeparator { get; set; } + + /// + /// Gets or sets query timeout. Type: string (or Expression with + /// resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "queryTimeout")] + public object QueryTimeout { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DrillLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DrillLinkedService.cs new file mode 100644 index 000000000000..8ca9aec1d387 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DrillLinkedService.cs @@ -0,0 +1,104 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Drill server linked service. + /// + [Newtonsoft.Json.JsonObject("Drill")] + [Rest.Serialization.JsonTransformation] + public partial class DrillLinkedService : LinkedService + { + /// + /// Initializes a new instance of the DrillLinkedService class. + /// + public DrillLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DrillLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// An ODBC connection string. Type: + /// string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of password + /// in connection string. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public DrillLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object connectionString = default(object), AzureKeyVaultSecretReference pwd = default(AzureKeyVaultSecretReference), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionString = connectionString; + Pwd = pwd; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets an ODBC connection string. Type: string, SecureString + /// or AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of password in + /// connection string. + /// + [JsonProperty(PropertyName = "typeProperties.pwd")] + public AzureKeyVaultSecretReference Pwd { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Pwd != null) + { + Pwd.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DrillSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DrillSource.cs new file mode 100644 index 000000000000..ef5393ad38e7 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DrillSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Drill server source. + /// + public partial class DrillSource : TabularSource + { + /// + /// Initializes a new instance of the DrillSource class. + /// + public DrillSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DrillSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public DrillSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DrillTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DrillTableDataset.cs new file mode 100644 index 000000000000..ae3548b2c522 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DrillTableDataset.cs @@ -0,0 +1,106 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Drill server dataset. + /// + [Newtonsoft.Json.JsonObject("DrillTable")] + [Rest.Serialization.JsonTransformation] + public partial class DrillTableDataset : Dataset + { + /// + /// Initializes a new instance of the DrillTableDataset class. + /// + public DrillTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the DrillTableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// This property will be retired. Please + /// consider using schema + table properties instead. + /// The table name of the Drill. Type: string (or + /// Expression with resultType string). + /// The schema name of the Drill. + /// Type: string (or Expression with resultType string). + public DrillTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object), object table = default(object), object drillTableDatasetSchema = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + Table = table; + DrillTableDatasetSchema = drillTableDatasetSchema; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property will be retired. Please consider using + /// schema + table properties instead. + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Gets or sets the table name of the Drill. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Gets or sets the schema name of the Drill. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object DrillTableDatasetSchema { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsAXLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsAXLinkedService.cs new file mode 100644 index 000000000000..550b3f02f257 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsAXLinkedService.cs @@ -0,0 +1,159 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Dynamics AX linked service. + /// + [Newtonsoft.Json.JsonObject("DynamicsAX")] + [Rest.Serialization.JsonTransformation] + public partial class DynamicsAXLinkedService : LinkedService + { + /// + /// Initializes a new instance of the DynamicsAXLinkedService class. + /// + public DynamicsAXLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DynamicsAXLinkedService class. + /// + /// The Dynamics AX (or Dynamics 365 Finance and + /// Operations) instance OData endpoint. + /// Specify the application's client + /// ID. Type: string (or Expression with resultType string). + /// Specify the application's key. + /// Mark this field as a SecureString to store it securely in Data + /// Factory, or reference a secret stored in Azure Key Vault. Type: + /// string (or Expression with resultType string). + /// Specify the tenant information (domain name or + /// tenant ID) under which your application resides. Retrieve it by + /// hovering the mouse in the top-right corner of the Azure portal. + /// Type: string (or Expression with resultType string). + /// Specify the resource you are requesting + /// authorization. Type: string (or Expression with resultType + /// string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public DynamicsAXLinkedService(object url, object servicePrincipalId, SecretBase servicePrincipalKey, object tenant, object aadResourceId, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Url = url; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + AadResourceId = aadResourceId; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Dynamics AX (or Dynamics 365 Finance and + /// Operations) instance OData endpoint. + /// + [JsonProperty(PropertyName = "typeProperties.url")] + public object Url { get; set; } + + /// + /// Gets or sets specify the application's client ID. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalId")] + public object ServicePrincipalId { get; set; } + + /// + /// Gets or sets specify the application's key. Mark this field as a + /// SecureString to store it securely in Data Factory, or reference a + /// secret stored in Azure Key Vault. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalKey")] + public SecretBase ServicePrincipalKey { get; set; } + + /// + /// Gets or sets specify the tenant information (domain name or tenant + /// ID) under which your application resides. Retrieve it by hovering + /// the mouse in the top-right corner of the Azure portal. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tenant")] + public object Tenant { get; set; } + + /// + /// Gets or sets specify the resource you are requesting authorization. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.aadResourceId")] + public object AadResourceId { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Url == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Url"); + } + if (ServicePrincipalId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ServicePrincipalId"); + } + if (ServicePrincipalKey == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ServicePrincipalKey"); + } + if (Tenant == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Tenant"); + } + if (AadResourceId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AadResourceId"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsAXResourceDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsAXResourceDataset.cs new file mode 100644 index 000000000000..6fb7e3b0ba0d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsAXResourceDataset.cs @@ -0,0 +1,90 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The path of the Dynamics AX OData entity. + /// + [Newtonsoft.Json.JsonObject("DynamicsAXResource")] + [Rest.Serialization.JsonTransformation] + public partial class DynamicsAXResourceDataset : Dataset + { + /// + /// Initializes a new instance of the DynamicsAXResourceDataset class. + /// + public DynamicsAXResourceDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the DynamicsAXResourceDataset class. + /// + /// Linked service reference. + /// The path of the Dynamics AX OData entity. Type: + /// string (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + public DynamicsAXResourceDataset(LinkedServiceReference linkedServiceName, object path, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Path = path; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the path of the Dynamics AX OData entity. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.path")] + public object Path { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Path"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsAXSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsAXSource.cs new file mode 100644 index 000000000000..447debe89246 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsAXSource.cs @@ -0,0 +1,91 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Dynamics AX source. + /// + public partial class DynamicsAXSource : TabularSource + { + /// + /// Initializes a new instance of the DynamicsAXSource class. + /// + public DynamicsAXSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DynamicsAXSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + /// The timeout (TimeSpan) to get an + /// HTTP response. It is the timeout to get a response, not the timeout + /// to read response data. Default value: 00:05:00. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + public DynamicsAXSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object), object httpRequestTimeout = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + HttpRequestTimeout = httpRequestTimeout; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets the timeout (TimeSpan) to get an HTTP response. It is + /// the timeout to get a response, not the timeout to read response + /// data. Default value: 00:05:00. Type: string (or Expression with + /// resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "httpRequestTimeout")] + public object HttpRequestTimeout { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsAuthenticationType.cs new file mode 100644 index 000000000000..cfb8af7a9c2c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsAuthenticationType.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for DynamicsAuthenticationType. + /// + public static class DynamicsAuthenticationType + { + public const string Office365 = "Office365"; + public const string Ifd = "Ifd"; + public const string AADServicePrincipal = "AADServicePrincipal"; + public const string ActiveDirectory = "Active Directory"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsCrmEntityDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsCrmEntityDataset.cs new file mode 100644 index 000000000000..3c5eade34448 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsCrmEntityDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Dynamics CRM entity dataset. + /// + [Newtonsoft.Json.JsonObject("DynamicsCrmEntity")] + [Rest.Serialization.JsonTransformation] + public partial class DynamicsCrmEntityDataset : Dataset + { + /// + /// Initializes a new instance of the DynamicsCrmEntityDataset class. + /// + public DynamicsCrmEntityDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the DynamicsCrmEntityDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The logical name of the entity. Type: + /// string (or Expression with resultType string). + public DynamicsCrmEntityDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object entityName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + EntityName = entityName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the logical name of the entity. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.entityName")] + public object EntityName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsCrmLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsCrmLinkedService.cs new file mode 100644 index 000000000000..ea739f4911be --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsCrmLinkedService.cs @@ -0,0 +1,267 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Dynamics CRM linked service. + /// + [Newtonsoft.Json.JsonObject("DynamicsCrm")] + [Rest.Serialization.JsonTransformation] + public partial class DynamicsCrmLinkedService : LinkedService + { + /// + /// Initializes a new instance of the DynamicsCrmLinkedService class. + /// + public DynamicsCrmLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DynamicsCrmLinkedService class. + /// + /// The deployment type of the Dynamics + /// CRM instance. 'Online' for Dynamics CRM Online and + /// 'OnPremisesWithIfd' for Dynamics CRM on-premises with Ifd. Type: + /// string (or Expression with resultType string). + /// The authentication type to connect + /// to Dynamics CRM server. 'Office365' for online scenario, 'Ifd' for + /// on-premises with Ifd scenario, 'AADServicePrincipal' for + /// Server-To-Server authentication in online scenario, 'Active + /// Directory' for Dynamics on-premises with IFD. Type: string (or + /// Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The host name of the on-premises Dynamics + /// CRM server. The property is required for on-prem and not allowed + /// for online. Type: string (or Expression with resultType + /// string). + /// The port of on-premises Dynamics CRM server. The + /// property is required for on-prem and not allowed for online. + /// Default is 443. Type: integer (or Expression with resultType + /// integer), minimum: 0. + /// The URL to the Microsoft Dynamics CRM + /// server. The property is required for on-line and not allowed for + /// on-prem. Type: string (or Expression with resultType + /// string). + /// The organization name of the + /// Dynamics CRM instance. The property is required for on-prem and + /// required for online when there are more than one Dynamics CRM + /// instances associated with the user. Type: string (or Expression + /// with resultType string). + /// The Active Directory domain that will verify + /// user credentials. Type: string (or Expression with resultType + /// string). + /// User name to access the Dynamics CRM + /// instance. Type: string (or Expression with resultType + /// string). + /// Password to access the Dynamics CRM + /// instance. + /// The client ID of the application + /// in Azure Active Directory used for Server-To-Server authentication. + /// Type: string (or Expression with resultType string). + /// The service principal + /// credential type to use in Server-To-Server authentication. + /// 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for + /// certificate. Type: string (or Expression with resultType + /// string). + /// The credential of the + /// service principal object in Azure Active Directory. If + /// servicePrincipalCredentialType is 'ServicePrincipalKey', + /// servicePrincipalCredential can be SecureString or + /// AzureKeyVaultSecretReference. If servicePrincipalCredentialType is + /// 'ServicePrincipalCert', servicePrincipalCredential can only be + /// AzureKeyVaultSecretReference. + /// The credential reference containing + /// authentication information. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public DynamicsCrmLinkedService(object deploymentType, object authenticationType, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object hostName = default(object), object port = default(object), object serviceUri = default(object), object organizationName = default(object), object domain = default(object), object username = default(object), SecretBase password = default(SecretBase), object servicePrincipalId = default(object), object servicePrincipalCredentialType = default(object), SecretBase servicePrincipalCredential = default(SecretBase), CredentialReference credential = default(CredentialReference), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + DeploymentType = deploymentType; + HostName = hostName; + Port = port; + ServiceUri = serviceUri; + OrganizationName = organizationName; + AuthenticationType = authenticationType; + Domain = domain; + Username = username; + Password = password; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalCredentialType = servicePrincipalCredentialType; + ServicePrincipalCredential = servicePrincipalCredential; + Credential = credential; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the deployment type of the Dynamics CRM instance. + /// 'Online' for Dynamics CRM Online and 'OnPremisesWithIfd' for + /// Dynamics CRM on-premises with Ifd. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.deploymentType")] + public object DeploymentType { get; set; } + + /// + /// Gets or sets the host name of the on-premises Dynamics CRM server. + /// The property is required for on-prem and not allowed for online. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.hostName")] + public object HostName { get; set; } + + /// + /// Gets or sets the port of on-premises Dynamics CRM server. The + /// property is required for on-prem and not allowed for online. + /// Default is 443. Type: integer (or Expression with resultType + /// integer), minimum: 0. + /// + [JsonProperty(PropertyName = "typeProperties.port")] + public object Port { get; set; } + + /// + /// Gets or sets the URL to the Microsoft Dynamics CRM server. The + /// property is required for on-line and not allowed for on-prem. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.serviceUri")] + public object ServiceUri { get; set; } + + /// + /// Gets or sets the organization name of the Dynamics CRM instance. + /// The property is required for on-prem and required for online when + /// there are more than one Dynamics CRM instances associated with the + /// user. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.organizationName")] + public object OrganizationName { get; set; } + + /// + /// Gets or sets the authentication type to connect to Dynamics CRM + /// server. 'Office365' for online scenario, 'Ifd' for on-premises with + /// Ifd scenario, 'AADServicePrincipal' for Server-To-Server + /// authentication in online scenario, 'Active Directory' for Dynamics + /// on-premises with IFD. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public object AuthenticationType { get; set; } + + /// + /// Gets or sets the Active Directory domain that will verify user + /// credentials. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.domain")] + public object Domain { get; set; } + + /// + /// Gets or sets user name to access the Dynamics CRM instance. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets password to access the Dynamics CRM instance. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the client ID of the application in Azure Active + /// Directory used for Server-To-Server authentication. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalId")] + public object ServicePrincipalId { get; set; } + + /// + /// Gets or sets the service principal credential type to use in + /// Server-To-Server authentication. 'ServicePrincipalKey' for + /// key/secret, 'ServicePrincipalCert' for certificate. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalCredentialType")] + public object ServicePrincipalCredentialType { get; set; } + + /// + /// Gets or sets the credential of the service principal object in + /// Azure Active Directory. If servicePrincipalCredentialType is + /// 'ServicePrincipalKey', servicePrincipalCredential can be + /// SecureString or AzureKeyVaultSecretReference. If + /// servicePrincipalCredentialType is 'ServicePrincipalCert', + /// servicePrincipalCredential can only be + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalCredential")] + public SecretBase ServicePrincipalCredential { get; set; } + + /// + /// Gets or sets the credential reference containing authentication + /// information. + /// + [JsonProperty(PropertyName = "typeProperties.credential")] + public CredentialReference Credential { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (DeploymentType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DeploymentType"); + } + if (AuthenticationType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AuthenticationType"); + } + if (Credential != null) + { + Credential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsCrmSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsCrmSink.cs new file mode 100644 index 000000000000..ae92e54257c4 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsCrmSink.cs @@ -0,0 +1,102 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Dynamics CRM sink. + /// + public partial class DynamicsCrmSink : CopySink + { + /// + /// Initializes a new instance of the DynamicsCrmSink class. + /// + public DynamicsCrmSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DynamicsCrmSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The flag indicating whether to + /// ignore null values from input dataset (except key fields) during + /// write operation. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The logical name of the alternate + /// key which will be used when upserting records. Type: string (or + /// Expression with resultType string). + public DynamicsCrmSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object ignoreNullValues = default(object), object alternateKeyName = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + IgnoreNullValues = ignoreNullValues; + AlternateKeyName = alternateKeyName; + CustomInit(); + } + /// + /// Static constructor for DynamicsCrmSink class. + /// + static DynamicsCrmSink() + { + WriteBehavior = "Upsert"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the flag indicating whether to ignore null values from + /// input dataset (except key fields) during write operation. Default + /// is false. Type: boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "ignoreNullValues")] + public object IgnoreNullValues { get; set; } + + /// + /// Gets or sets the logical name of the alternate key which will be + /// used when upserting records. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "alternateKeyName")] + public object AlternateKeyName { get; set; } + + /// + /// The write behavior for the operation. + /// + [JsonProperty(PropertyName = "writeBehavior")] + public static string WriteBehavior { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsCrmSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsCrmSource.cs new file mode 100644 index 000000000000..c75215b73aab --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsCrmSource.cs @@ -0,0 +1,83 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Dynamics CRM source. + /// + public partial class DynamicsCrmSource : CopySource + { + /// + /// Initializes a new instance of the DynamicsCrmSource class. + /// + public DynamicsCrmSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DynamicsCrmSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// FetchXML is a proprietary query language that + /// is used in Microsoft Dynamics CRM (online & on-premises). Type: + /// string (or Expression with resultType string). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public DynamicsCrmSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object query = default(object), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + Query = query; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets fetchXML is a proprietary query language that is used + /// in Microsoft Dynamics CRM (online &amp; on-premises). Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsDeploymentType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsDeploymentType.cs new file mode 100644 index 000000000000..393579fc62e7 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsDeploymentType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for DynamicsDeploymentType. + /// + public static class DynamicsDeploymentType + { + public const string Online = "Online"; + public const string OnPremisesWithIfd = "OnPremisesWithIfd"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsEntityDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsEntityDataset.cs new file mode 100644 index 000000000000..b9285564298d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsEntityDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Dynamics entity dataset. + /// + [Newtonsoft.Json.JsonObject("DynamicsEntity")] + [Rest.Serialization.JsonTransformation] + public partial class DynamicsEntityDataset : Dataset + { + /// + /// Initializes a new instance of the DynamicsEntityDataset class. + /// + public DynamicsEntityDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the DynamicsEntityDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The logical name of the entity. Type: + /// string (or Expression with resultType string). + public DynamicsEntityDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object entityName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + EntityName = entityName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the logical name of the entity. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.entityName")] + public object EntityName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsLinkedService.cs new file mode 100644 index 000000000000..efc7ad74d8c9 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsLinkedService.cs @@ -0,0 +1,263 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Dynamics linked service. + /// + [Newtonsoft.Json.JsonObject("Dynamics")] + [Rest.Serialization.JsonTransformation] + public partial class DynamicsLinkedService : LinkedService + { + /// + /// Initializes a new instance of the DynamicsLinkedService class. + /// + public DynamicsLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DynamicsLinkedService class. + /// + /// The deployment type of the Dynamics + /// instance. 'Online' for Dynamics Online and 'OnPremisesWithIfd' for + /// Dynamics on-premises with Ifd. Type: string (or Expression with + /// resultType string). + /// The authentication type to connect + /// to Dynamics server. 'Office365' for online scenario, 'Ifd' for + /// on-premises with Ifd scenario, 'AADServicePrincipal' for + /// Server-To-Server authentication in online scenario, 'Active + /// Directory' for Dynamics on-premises with IFD. Type: string (or + /// Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The host name of the on-premises Dynamics + /// server. The property is required for on-prem and not allowed for + /// online. Type: string (or Expression with resultType + /// string). + /// The port of on-premises Dynamics server. The + /// property is required for on-prem and not allowed for online. + /// Default is 443. Type: integer (or Expression with resultType + /// integer), minimum: 0. + /// The URL to the Microsoft Dynamics server. + /// The property is required for on-line and not allowed for on-prem. + /// Type: string (or Expression with resultType string). + /// The organization name of the + /// Dynamics instance. The property is required for on-prem and + /// required for online when there are more than one Dynamics instances + /// associated with the user. Type: string (or Expression with + /// resultType string). + /// The Active Directory domain that will verify + /// user credentials. Type: string (or Expression with resultType + /// string). + /// User name to access the Dynamics instance. + /// Type: string (or Expression with resultType string). + /// Password to access the Dynamics + /// instance. + /// The client ID of the application + /// in Azure Active Directory used for Server-To-Server authentication. + /// Type: string (or Expression with resultType string). + /// The service principal + /// credential type to use in Server-To-Server authentication. + /// 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for + /// certificate. Type: string (or Expression with resultType + /// string). + /// The credential of the + /// service principal object in Azure Active Directory. If + /// servicePrincipalCredentialType is 'ServicePrincipalKey', + /// servicePrincipalCredential can be SecureString or + /// AzureKeyVaultSecretReference. If servicePrincipalCredentialType is + /// 'ServicePrincipalCert', servicePrincipalCredential can only be + /// AzureKeyVaultSecretReference. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// The credential reference containing + /// authentication information. + public DynamicsLinkedService(object deploymentType, object authenticationType, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object hostName = default(object), object port = default(object), object serviceUri = default(object), object organizationName = default(object), object domain = default(object), object username = default(object), SecretBase password = default(SecretBase), object servicePrincipalId = default(object), object servicePrincipalCredentialType = default(object), SecretBase servicePrincipalCredential = default(SecretBase), string encryptedCredential = default(string), CredentialReference credential = default(CredentialReference)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + DeploymentType = deploymentType; + HostName = hostName; + Port = port; + ServiceUri = serviceUri; + OrganizationName = organizationName; + AuthenticationType = authenticationType; + Domain = domain; + Username = username; + Password = password; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalCredentialType = servicePrincipalCredentialType; + ServicePrincipalCredential = servicePrincipalCredential; + EncryptedCredential = encryptedCredential; + Credential = credential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the deployment type of the Dynamics instance. 'Online' + /// for Dynamics Online and 'OnPremisesWithIfd' for Dynamics + /// on-premises with Ifd. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.deploymentType")] + public object DeploymentType { get; set; } + + /// + /// Gets or sets the host name of the on-premises Dynamics server. The + /// property is required for on-prem and not allowed for online. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.hostName")] + public object HostName { get; set; } + + /// + /// Gets or sets the port of on-premises Dynamics server. The property + /// is required for on-prem and not allowed for online. Default is 443. + /// Type: integer (or Expression with resultType integer), minimum: 0. + /// + [JsonProperty(PropertyName = "typeProperties.port")] + public object Port { get; set; } + + /// + /// Gets or sets the URL to the Microsoft Dynamics server. The property + /// is required for on-line and not allowed for on-prem. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.serviceUri")] + public object ServiceUri { get; set; } + + /// + /// Gets or sets the organization name of the Dynamics instance. The + /// property is required for on-prem and required for online when there + /// are more than one Dynamics instances associated with the user. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.organizationName")] + public object OrganizationName { get; set; } + + /// + /// Gets or sets the authentication type to connect to Dynamics server. + /// 'Office365' for online scenario, 'Ifd' for on-premises with Ifd + /// scenario, 'AADServicePrincipal' for Server-To-Server authentication + /// in online scenario, 'Active Directory' for Dynamics on-premises + /// with IFD. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public object AuthenticationType { get; set; } + + /// + /// Gets or sets the Active Directory domain that will verify user + /// credentials. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.domain")] + public object Domain { get; set; } + + /// + /// Gets or sets user name to access the Dynamics instance. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets password to access the Dynamics instance. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the client ID of the application in Azure Active + /// Directory used for Server-To-Server authentication. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalId")] + public object ServicePrincipalId { get; set; } + + /// + /// Gets or sets the service principal credential type to use in + /// Server-To-Server authentication. 'ServicePrincipalKey' for + /// key/secret, 'ServicePrincipalCert' for certificate. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalCredentialType")] + public object ServicePrincipalCredentialType { get; set; } + + /// + /// Gets or sets the credential of the service principal object in + /// Azure Active Directory. If servicePrincipalCredentialType is + /// 'ServicePrincipalKey', servicePrincipalCredential can be + /// SecureString or AzureKeyVaultSecretReference. If + /// servicePrincipalCredentialType is 'ServicePrincipalCert', + /// servicePrincipalCredential can only be + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalCredential")] + public SecretBase ServicePrincipalCredential { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets the credential reference containing authentication + /// information. + /// + [JsonProperty(PropertyName = "typeProperties.credential")] + public CredentialReference Credential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (DeploymentType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DeploymentType"); + } + if (AuthenticationType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AuthenticationType"); + } + if (Credential != null) + { + Credential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsSink.cs new file mode 100644 index 000000000000..f8b59a3853c6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsSink.cs @@ -0,0 +1,102 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Dynamics sink. + /// + public partial class DynamicsSink : CopySink + { + /// + /// Initializes a new instance of the DynamicsSink class. + /// + public DynamicsSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DynamicsSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The flag indicating whether ignore + /// null values from input dataset (except key fields) during write + /// operation. Default is false. Type: boolean (or Expression with + /// resultType boolean). + /// The logical name of the alternate + /// key which will be used when upserting records. Type: string (or + /// Expression with resultType string). + public DynamicsSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object ignoreNullValues = default(object), object alternateKeyName = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + IgnoreNullValues = ignoreNullValues; + AlternateKeyName = alternateKeyName; + CustomInit(); + } + /// + /// Static constructor for DynamicsSink class. + /// + static DynamicsSink() + { + WriteBehavior = "Upsert"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the flag indicating whether ignore null values from + /// input dataset (except key fields) during write operation. Default + /// is false. Type: boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "ignoreNullValues")] + public object IgnoreNullValues { get; set; } + + /// + /// Gets or sets the logical name of the alternate key which will be + /// used when upserting records. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "alternateKeyName")] + public object AlternateKeyName { get; set; } + + /// + /// The write behavior for the operation. + /// + [JsonProperty(PropertyName = "writeBehavior")] + public static string WriteBehavior { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsSinkWriteBehavior.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsSinkWriteBehavior.cs new file mode 100644 index 000000000000..6dda872f1716 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsSinkWriteBehavior.cs @@ -0,0 +1,21 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for DynamicsSinkWriteBehavior. + /// + public static class DynamicsSinkWriteBehavior + { + public const string Upsert = "Upsert"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsSource.cs new file mode 100644 index 000000000000..72fdacfaf294 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DynamicsSource.cs @@ -0,0 +1,83 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Dynamics source. + /// + public partial class DynamicsSource : CopySource + { + /// + /// Initializes a new instance of the DynamicsSource class. + /// + public DynamicsSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DynamicsSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// FetchXML is a proprietary query language that + /// is used in Microsoft Dynamics (online & on-premises). Type: + /// string (or Expression with resultType string). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public DynamicsSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object query = default(object), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + Query = query; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets fetchXML is a proprietary query language that is used + /// in Microsoft Dynamics (online &amp; on-premises). Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/EloquaLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/EloquaLinkedService.cs new file mode 100644 index 000000000000..3b510a00d7d4 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/EloquaLinkedService.cs @@ -0,0 +1,151 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Eloqua server linked service. + /// + [Newtonsoft.Json.JsonObject("Eloqua")] + [Rest.Serialization.JsonTransformation] + public partial class EloquaLinkedService : LinkedService + { + /// + /// Initializes a new instance of the EloquaLinkedService class. + /// + public EloquaLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EloquaLinkedService class. + /// + /// The endpoint of the Eloqua server. (i.e. + /// eloqua.example.com) + /// The site name and user name of your Eloqua + /// account in the form: sitename/username. (i.e. Eloqua/Alice) + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The password corresponding to the user + /// name. + /// Specifies whether the data + /// source endpoints are encrypted using HTTPS. The default value is + /// true. + /// Specifies whether to require the + /// host name in the server's certificate to match the host name of the + /// server when connecting over SSL. The default value is true. + /// Specifies whether to verify the + /// identity of the server when connecting over SSL. The default value + /// is true. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public EloquaLinkedService(object endpoint, object username, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), SecretBase password = default(SecretBase), object useEncryptedEndpoints = default(object), object useHostVerification = default(object), object usePeerVerification = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Endpoint = endpoint; + Username = username; + Password = password; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the endpoint of the Eloqua server. (i.e. + /// eloqua.example.com) + /// + [JsonProperty(PropertyName = "typeProperties.endpoint")] + public object Endpoint { get; set; } + + /// + /// Gets or sets the site name and user name of your Eloqua account in + /// the form: sitename/username. (i.e. Eloqua/Alice) + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets the password corresponding to the user name. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets specifies whether the data source endpoints are + /// encrypted using HTTPS. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useEncryptedEndpoints")] + public object UseEncryptedEndpoints { get; set; } + + /// + /// Gets or sets specifies whether to require the host name in the + /// server's certificate to match the host name of the server when + /// connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useHostVerification")] + public object UseHostVerification { get; set; } + + /// + /// Gets or sets specifies whether to verify the identity of the server + /// when connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.usePeerVerification")] + public object UsePeerVerification { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Endpoint == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Endpoint"); + } + if (Username == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Username"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/EloquaObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/EloquaObjectDataset.cs new file mode 100644 index 000000000000..77b0329dc32c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/EloquaObjectDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Eloqua server dataset. + /// + [Newtonsoft.Json.JsonObject("EloquaObject")] + [Rest.Serialization.JsonTransformation] + public partial class EloquaObjectDataset : Dataset + { + /// + /// Initializes a new instance of the EloquaObjectDataset class. + /// + public EloquaObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the EloquaObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name. Type: string (or Expression + /// with resultType string). + public EloquaObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/EloquaSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/EloquaSource.cs new file mode 100644 index 000000000000..ca4607f95a79 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/EloquaSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Eloqua server source. + /// + public partial class EloquaSource : TabularSource + { + /// + /// Initializes a new instance of the EloquaSource class. + /// + public EloquaSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EloquaSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public EloquaSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/EncryptionConfiguration.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/EncryptionConfiguration.cs new file mode 100644 index 000000000000..7a9910e6bb19 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/EncryptionConfiguration.cs @@ -0,0 +1,102 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Definition of CMK for the factory. + /// + public partial class EncryptionConfiguration + { + /// + /// Initializes a new instance of the EncryptionConfiguration class. + /// + public EncryptionConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EncryptionConfiguration class. + /// + /// The name of the key in Azure Key Vault to use + /// as Customer Managed Key. + /// The url of the Azure Key Vault used for + /// CMK. + /// The version of the key used for CMK. If + /// not provided, latest version will be used. + /// User assigned identity to use to + /// authenticate to customer's key vault. If not provided Managed + /// Service Identity will be used. + public EncryptionConfiguration(string keyName, string vaultBaseUrl, string keyVersion = default(string), CMKIdentityDefinition identity = default(CMKIdentityDefinition)) + { + KeyName = keyName; + VaultBaseUrl = vaultBaseUrl; + KeyVersion = keyVersion; + Identity = identity; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the key in Azure Key Vault to use as + /// Customer Managed Key. + /// + [JsonProperty(PropertyName = "keyName")] + public string KeyName { get; set; } + + /// + /// Gets or sets the url of the Azure Key Vault used for CMK. + /// + [JsonProperty(PropertyName = "vaultBaseUrl")] + public string VaultBaseUrl { get; set; } + + /// + /// Gets or sets the version of the key used for CMK. If not provided, + /// latest version will be used. + /// + [JsonProperty(PropertyName = "keyVersion")] + public string KeyVersion { get; set; } + + /// + /// Gets or sets user assigned identity to use to authenticate to + /// customer's key vault. If not provided Managed Service Identity will + /// be used. + /// + [JsonProperty(PropertyName = "identity")] + public CMKIdentityDefinition Identity { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (KeyName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "KeyName"); + } + if (VaultBaseUrl == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "VaultBaseUrl"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/EntityReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/EntityReference.cs new file mode 100644 index 000000000000..426eaad1140a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/EntityReference.cs @@ -0,0 +1,63 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The entity reference. + /// + public partial class EntityReference + { + /// + /// Initializes a new instance of the EntityReference class. + /// + public EntityReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EntityReference class. + /// + /// The type of this referenced entity. Possible + /// values include: 'IntegrationRuntimeReference', + /// 'LinkedServiceReference' + /// The name of this referenced + /// entity. + public EntityReference(string type = default(string), string referenceName = default(string)) + { + Type = type; + ReferenceName = referenceName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the type of this referenced entity. Possible values + /// include: 'IntegrationRuntimeReference', 'LinkedServiceReference' + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets the name of this referenced entity. + /// + [JsonProperty(PropertyName = "referenceName")] + public string ReferenceName { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/EnvironmentVariableSetup.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/EnvironmentVariableSetup.cs new file mode 100644 index 000000000000..f5845ebf762b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/EnvironmentVariableSetup.cs @@ -0,0 +1,81 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The custom setup of setting environment variable. + /// + [Rest.Serialization.JsonTransformation] + public partial class EnvironmentVariableSetup : CustomSetupBase + { + /// + /// Initializes a new instance of the EnvironmentVariableSetup class. + /// + public EnvironmentVariableSetup() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EnvironmentVariableSetup class. + /// + /// The name of the environment + /// variable. + /// The value of the environment + /// variable. + public EnvironmentVariableSetup(string variableName, string variableValue) + { + VariableName = variableName; + VariableValue = variableValue; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the environment variable. + /// + [JsonProperty(PropertyName = "typeProperties.variableName")] + public string VariableName { get; set; } + + /// + /// Gets or sets the value of the environment variable. + /// + [JsonProperty(PropertyName = "typeProperties.variableValue")] + public string VariableValue { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (VariableName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "VariableName"); + } + if (VariableValue == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "VariableValue"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/EventSubscriptionStatus.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/EventSubscriptionStatus.cs new file mode 100644 index 000000000000..580f566a608d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/EventSubscriptionStatus.cs @@ -0,0 +1,25 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for EventSubscriptionStatus. + /// + public static class EventSubscriptionStatus + { + public const string Enabled = "Enabled"; + public const string Provisioning = "Provisioning"; + public const string Deprovisioning = "Deprovisioning"; + public const string Disabled = "Disabled"; + public const string Unknown = "Unknown"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExcelDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExcelDataset.cs new file mode 100644 index 000000000000..def09cafb570 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExcelDataset.cs @@ -0,0 +1,156 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Excel dataset. + /// + [Newtonsoft.Json.JsonObject("Excel")] + [Rest.Serialization.JsonTransformation] + public partial class ExcelDataset : Dataset + { + /// + /// Initializes a new instance of the ExcelDataset class. + /// + public ExcelDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the ExcelDataset class. + /// + /// Linked service reference. + /// The location of the excel storage. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The sheet name of excel file. Type: string + /// (or Expression with resultType string). + /// The sheet index of excel file and default + /// value is 0. Type: integer (or Expression with resultType + /// integer) + /// The partial data of one sheet. Type: string (or + /// Expression with resultType string). + /// When used as input, treat the first + /// row of data as headers. When used as output,write the headers into + /// the output as the first row of data. The default value is false. + /// Type: boolean (or Expression with resultType boolean). + /// The data compression method used for the + /// json dataset. + /// The null value string. Type: string (or + /// Expression with resultType string). + public ExcelDataset(LinkedServiceReference linkedServiceName, DatasetLocation location, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object sheetName = default(object), object sheetIndex = default(object), object range = default(object), object firstRowAsHeader = default(object), DatasetCompression compression = default(DatasetCompression), object nullValue = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Location = location; + SheetName = sheetName; + SheetIndex = sheetIndex; + Range = range; + FirstRowAsHeader = firstRowAsHeader; + Compression = compression; + NullValue = nullValue; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the location of the excel storage. + /// + [JsonProperty(PropertyName = "typeProperties.location")] + public DatasetLocation Location { get; set; } + + /// + /// Gets or sets the sheet name of excel file. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.sheetName")] + public object SheetName { get; set; } + + /// + /// Gets or sets the sheet index of excel file and default value is 0. + /// Type: integer (or Expression with resultType integer) + /// + [JsonProperty(PropertyName = "typeProperties.sheetIndex")] + public object SheetIndex { get; set; } + + /// + /// Gets or sets the partial data of one sheet. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.range")] + public object Range { get; set; } + + /// + /// Gets or sets when used as input, treat the first row of data as + /// headers. When used as output,write the headers into the output as + /// the first row of data. The default value is false. Type: boolean + /// (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.firstRowAsHeader")] + public object FirstRowAsHeader { get; set; } + + /// + /// Gets or sets the data compression method used for the json dataset. + /// + [JsonProperty(PropertyName = "typeProperties.compression")] + public DatasetCompression Compression { get; set; } + + /// + /// Gets or sets the null value string. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.nullValue")] + public object NullValue { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Location"); + } + if (Compression != null) + { + Compression.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExcelSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExcelSource.cs new file mode 100644 index 000000000000..b34bb69c3fd1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExcelSource.cs @@ -0,0 +1,79 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity excel source. + /// + public partial class ExcelSource : CopySource + { + /// + /// Initializes a new instance of the ExcelSource class. + /// + public ExcelSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExcelSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Excel store settings. + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public ExcelSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), StoreReadSettings storeSettings = default(StoreReadSettings), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + StoreSettings = storeSettings; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets excel store settings. + /// + [JsonProperty(PropertyName = "storeSettings")] + public StoreReadSettings StoreSettings { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteDataFlowActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteDataFlowActivity.cs new file mode 100644 index 000000000000..9261378beae9 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteDataFlowActivity.cs @@ -0,0 +1,187 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Execute data flow activity. + /// + [Newtonsoft.Json.JsonObject("ExecuteDataFlow")] + [Rest.Serialization.JsonTransformation] + public partial class ExecuteDataFlowActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the ExecuteDataFlowActivity class. + /// + public ExecuteDataFlowActivity() + { + DataFlow = new DataFlowReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the ExecuteDataFlowActivity class. + /// + /// Activity name. + /// Data flow reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// Staging info for execute data flow + /// activity. + /// The integration runtime + /// reference. + /// Continuation settings for + /// execute data flow activity. + /// Compute properties for data flow + /// activity. + /// Trace level setting used for data flow + /// monitoring output. Supported values are: 'coarse', 'fine', and + /// 'none'. Type: string (or Expression with resultType string) + /// Continue on error setting used for + /// data flow execution. Enables processing to continue if a sink + /// fails. Type: boolean (or Expression with resultType + /// boolean) + /// Concurrent run setting used for data + /// flow execution. Allows sinks with the same save order to be + /// processed concurrently. Type: boolean (or Expression with + /// resultType boolean) + /// Specify number of parallel + /// staging for sources applicable to the sink. Type: integer (or + /// Expression with resultType integer) + public ExecuteDataFlowActivity(string name, DataFlowReference dataFlow, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), DataFlowStagingInfo staging = default(DataFlowStagingInfo), IntegrationRuntimeReference integrationRuntime = default(IntegrationRuntimeReference), ContinuationSettingsReference continuationSettings = default(ContinuationSettingsReference), ExecuteDataFlowActivityTypePropertiesCompute compute = default(ExecuteDataFlowActivityTypePropertiesCompute), object traceLevel = default(object), object continueOnError = default(object), object runConcurrently = default(object), object sourceStagingConcurrency = default(object)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + DataFlow = dataFlow; + Staging = staging; + IntegrationRuntime = integrationRuntime; + ContinuationSettings = continuationSettings; + Compute = compute; + TraceLevel = traceLevel; + ContinueOnError = continueOnError; + RunConcurrently = runConcurrently; + SourceStagingConcurrency = sourceStagingConcurrency; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets data flow reference. + /// + [JsonProperty(PropertyName = "typeProperties.dataFlow")] + public DataFlowReference DataFlow { get; set; } + + /// + /// Gets or sets staging info for execute data flow activity. + /// + [JsonProperty(PropertyName = "typeProperties.staging")] + public DataFlowStagingInfo Staging { get; set; } + + /// + /// Gets or sets the integration runtime reference. + /// + [JsonProperty(PropertyName = "typeProperties.integrationRuntime")] + public IntegrationRuntimeReference IntegrationRuntime { get; set; } + + /// + /// Gets or sets continuation settings for execute data flow activity. + /// + [JsonProperty(PropertyName = "typeProperties.continuationSettings")] + public ContinuationSettingsReference ContinuationSettings { get; set; } + + /// + /// Gets or sets compute properties for data flow activity. + /// + [JsonProperty(PropertyName = "typeProperties.compute")] + public ExecuteDataFlowActivityTypePropertiesCompute Compute { get; set; } + + /// + /// Gets or sets trace level setting used for data flow monitoring + /// output. Supported values are: 'coarse', 'fine', and 'none'. Type: + /// string (or Expression with resultType string) + /// + [JsonProperty(PropertyName = "typeProperties.traceLevel")] + public object TraceLevel { get; set; } + + /// + /// Gets or sets continue on error setting used for data flow + /// execution. Enables processing to continue if a sink fails. Type: + /// boolean (or Expression with resultType boolean) + /// + [JsonProperty(PropertyName = "typeProperties.continueOnError")] + public object ContinueOnError { get; set; } + + /// + /// Gets or sets concurrent run setting used for data flow execution. + /// Allows sinks with the same save order to be processed concurrently. + /// Type: boolean (or Expression with resultType boolean) + /// + [JsonProperty(PropertyName = "typeProperties.runConcurrently")] + public object RunConcurrently { get; set; } + + /// + /// Gets or sets specify number of parallel staging for sources + /// applicable to the sink. Type: integer (or Expression with + /// resultType integer) + /// + [JsonProperty(PropertyName = "typeProperties.sourceStagingConcurrency")] + public object SourceStagingConcurrency { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (DataFlow == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DataFlow"); + } + if (DataFlow != null) + { + DataFlow.Validate(); + } + if (Staging != null) + { + Staging.Validate(); + } + if (IntegrationRuntime != null) + { + IntegrationRuntime.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteDataFlowActivityTypePropertiesCompute.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteDataFlowActivityTypePropertiesCompute.cs new file mode 100644 index 000000000000..52661554e508 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteDataFlowActivityTypePropertiesCompute.cs @@ -0,0 +1,72 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Compute properties for data flow activity. + /// + public partial class ExecuteDataFlowActivityTypePropertiesCompute + { + /// + /// Initializes a new instance of the + /// ExecuteDataFlowActivityTypePropertiesCompute class. + /// + public ExecuteDataFlowActivityTypePropertiesCompute() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ExecuteDataFlowActivityTypePropertiesCompute class. + /// + /// Compute type of the cluster which will + /// execute data flow job. Possible values include: 'General', + /// 'MemoryOptimized', 'ComputeOptimized'. Type: string (or Expression + /// with resultType string) + /// Core count of the cluster which will + /// execute data flow job. Supported values are: 8, 16, 32, 48, 80, 144 + /// and 272. Type: integer (or Expression with resultType + /// integer) + public ExecuteDataFlowActivityTypePropertiesCompute(object computeType = default(object), object coreCount = default(object)) + { + ComputeType = computeType; + CoreCount = coreCount; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets compute type of the cluster which will execute data + /// flow job. Possible values include: 'General', 'MemoryOptimized', + /// 'ComputeOptimized'. Type: string (or Expression with resultType + /// string) + /// + [JsonProperty(PropertyName = "computeType")] + public object ComputeType { get; set; } + + /// + /// Gets or sets core count of the cluster which will execute data flow + /// job. Supported values are: 8, 16, 32, 48, 80, 144 and 272. Type: + /// integer (or Expression with resultType integer) + /// + [JsonProperty(PropertyName = "coreCount")] + public object CoreCount { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecutePipelineActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecutePipelineActivity.cs new file mode 100644 index 000000000000..c7392984078e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecutePipelineActivity.cs @@ -0,0 +1,118 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Execute pipeline activity. + /// + [Newtonsoft.Json.JsonObject("ExecutePipeline")] + [Rest.Serialization.JsonTransformation] + public partial class ExecutePipelineActivity : ControlActivity + { + /// + /// Initializes a new instance of the ExecutePipelineActivity class. + /// + public ExecutePipelineActivity() + { + Pipeline = new PipelineReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the ExecutePipelineActivity class. + /// + /// Activity name. + /// Pipeline reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Execute pipeline activity policy. + /// Pipeline parameters. + /// Defines whether activity execution + /// will wait for the dependent pipeline execution to finish. Default + /// is false. + public ExecutePipelineActivity(string name, PipelineReference pipeline, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), ExecutePipelineActivityPolicy policy = default(ExecutePipelineActivityPolicy), IDictionary parameters = default(IDictionary), bool? waitOnCompletion = default(bool?)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties) + { + Policy = policy; + Pipeline = pipeline; + Parameters = parameters; + WaitOnCompletion = waitOnCompletion; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets execute pipeline activity policy. + /// + [JsonProperty(PropertyName = "policy")] + public ExecutePipelineActivityPolicy Policy { get; set; } + + /// + /// Gets or sets pipeline reference. + /// + [JsonProperty(PropertyName = "typeProperties.pipeline")] + public PipelineReference Pipeline { get; set; } + + /// + /// Gets or sets pipeline parameters. + /// + [JsonProperty(PropertyName = "typeProperties.parameters")] + public IDictionary Parameters { get; set; } + + /// + /// Gets or sets defines whether activity execution will wait for the + /// dependent pipeline execution to finish. Default is false. + /// + [JsonProperty(PropertyName = "typeProperties.waitOnCompletion")] + public bool? WaitOnCompletion { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Pipeline == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Pipeline"); + } + if (Pipeline != null) + { + Pipeline.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecutePipelineActivityPolicy.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecutePipelineActivityPolicy.cs new file mode 100644 index 000000000000..502c8137f185 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecutePipelineActivityPolicy.cs @@ -0,0 +1,67 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Execution policy for an execute pipeline activity. + /// + public partial class ExecutePipelineActivityPolicy + { + /// + /// Initializes a new instance of the ExecutePipelineActivityPolicy + /// class. + /// + public ExecutePipelineActivityPolicy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExecutePipelineActivityPolicy + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// When set to true, Input from activity is + /// considered as secure and will not be logged to monitoring. + public ExecutePipelineActivityPolicy(IDictionary additionalProperties = default(IDictionary), bool? secureInput = default(bool?)) + { + AdditionalProperties = additionalProperties; + SecureInput = secureInput; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets when set to true, Input from activity is considered as + /// secure and will not be logged to monitoring. + /// + [JsonProperty(PropertyName = "secureInput")] + public bool? SecureInput { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteSSISPackageActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteSSISPackageActivity.cs new file mode 100644 index 000000000000..482af746d134 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteSSISPackageActivity.cs @@ -0,0 +1,280 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Execute SSIS package activity. + /// + [Newtonsoft.Json.JsonObject("ExecuteSSISPackage")] + [Rest.Serialization.JsonTransformation] + public partial class ExecuteSSISPackageActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the ExecuteSSISPackageActivity class. + /// + public ExecuteSSISPackageActivity() + { + ConnectVia = new IntegrationRuntimeReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the ExecuteSSISPackageActivity class. + /// + /// Activity name. + /// SSIS package location. + /// The integration runtime reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// Specifies the runtime to execute SSIS + /// package. The value should be "x86" or "x64". Type: string (or + /// Expression with resultType string). + /// The logging level of SSIS package + /// execution. Type: string (or Expression with resultType + /// string). + /// The environment path to execute the + /// SSIS package. Type: string (or Expression with resultType + /// string). + /// The package execution + /// credential. + /// The project level parameters to + /// execute the SSIS package. + /// The package level parameters to + /// execute the SSIS package. + /// The project level + /// connection managers to execute the SSIS package. + /// The package level + /// connection managers to execute the SSIS package. + /// The property overrides to execute + /// the SSIS package. + /// SSIS package execution log + /// location. + public ExecuteSSISPackageActivity(string name, SSISPackageLocation packageLocation, IntegrationRuntimeReference connectVia, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), object runtime = default(object), object loggingLevel = default(object), object environmentPath = default(object), SSISExecutionCredential executionCredential = default(SSISExecutionCredential), IDictionary projectParameters = default(IDictionary), IDictionary packageParameters = default(IDictionary), IDictionary> projectConnectionManagers = default(IDictionary>), IDictionary> packageConnectionManagers = default(IDictionary>), IDictionary propertyOverrides = default(IDictionary), SSISLogLocation logLocation = default(SSISLogLocation)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + PackageLocation = packageLocation; + Runtime = runtime; + LoggingLevel = loggingLevel; + EnvironmentPath = environmentPath; + ExecutionCredential = executionCredential; + ConnectVia = connectVia; + ProjectParameters = projectParameters; + PackageParameters = packageParameters; + ProjectConnectionManagers = projectConnectionManagers; + PackageConnectionManagers = packageConnectionManagers; + PropertyOverrides = propertyOverrides; + LogLocation = logLocation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SSIS package location. + /// + [JsonProperty(PropertyName = "typeProperties.packageLocation")] + public SSISPackageLocation PackageLocation { get; set; } + + /// + /// Gets or sets specifies the runtime to execute SSIS package. The + /// value should be "x86" or "x64". Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.runtime")] + public object Runtime { get; set; } + + /// + /// Gets or sets the logging level of SSIS package execution. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.loggingLevel")] + public object LoggingLevel { get; set; } + + /// + /// Gets or sets the environment path to execute the SSIS package. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.environmentPath")] + public object EnvironmentPath { get; set; } + + /// + /// Gets or sets the package execution credential. + /// + [JsonProperty(PropertyName = "typeProperties.executionCredential")] + public SSISExecutionCredential ExecutionCredential { get; set; } + + /// + /// Gets or sets the integration runtime reference. + /// + [JsonProperty(PropertyName = "typeProperties.connectVia")] + public IntegrationRuntimeReference ConnectVia { get; set; } + + /// + /// Gets or sets the project level parameters to execute the SSIS + /// package. + /// + [JsonProperty(PropertyName = "typeProperties.projectParameters")] + public IDictionary ProjectParameters { get; set; } + + /// + /// Gets or sets the package level parameters to execute the SSIS + /// package. + /// + [JsonProperty(PropertyName = "typeProperties.packageParameters")] + public IDictionary PackageParameters { get; set; } + + /// + /// Gets or sets the project level connection managers to execute the + /// SSIS package. + /// + [JsonProperty(PropertyName = "typeProperties.projectConnectionManagers")] + public IDictionary> ProjectConnectionManagers { get; set; } + + /// + /// Gets or sets the package level connection managers to execute the + /// SSIS package. + /// + [JsonProperty(PropertyName = "typeProperties.packageConnectionManagers")] + public IDictionary> PackageConnectionManagers { get; set; } + + /// + /// Gets or sets the property overrides to execute the SSIS package. + /// + [JsonProperty(PropertyName = "typeProperties.propertyOverrides")] + public IDictionary PropertyOverrides { get; set; } + + /// + /// Gets or sets SSIS package execution log location. + /// + [JsonProperty(PropertyName = "typeProperties.logLocation")] + public SSISLogLocation LogLocation { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (PackageLocation == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PackageLocation"); + } + if (ConnectVia == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ConnectVia"); + } + if (PackageLocation != null) + { + PackageLocation.Validate(); + } + if (ExecutionCredential != null) + { + ExecutionCredential.Validate(); + } + if (ConnectVia != null) + { + ConnectVia.Validate(); + } + if (ProjectParameters != null) + { + foreach (var valueElement in ProjectParameters.Values) + { + if (valueElement != null) + { + valueElement.Validate(); + } + } + } + if (PackageParameters != null) + { + foreach (var valueElement1 in PackageParameters.Values) + { + if (valueElement1 != null) + { + valueElement1.Validate(); + } + } + } + if (ProjectConnectionManagers != null) + { + foreach (var valueElement2 in ProjectConnectionManagers.Values) + { + if (valueElement2 != null) + { + foreach (var valueElement3 in valueElement2.Values) + { + if (valueElement3 != null) + { + valueElement3.Validate(); + } + } + } + } + } + if (PackageConnectionManagers != null) + { + foreach (var valueElement4 in PackageConnectionManagers.Values) + { + if (valueElement4 != null) + { + foreach (var valueElement5 in valueElement4.Values) + { + if (valueElement5 != null) + { + valueElement5.Validate(); + } + } + } + } + } + if (PropertyOverrides != null) + { + foreach (var valueElement6 in PropertyOverrides.Values) + { + if (valueElement6 != null) + { + valueElement6.Validate(); + } + } + } + if (LogLocation != null) + { + LogLocation.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteWranglingDataflowActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteWranglingDataflowActivity.cs new file mode 100644 index 000000000000..a9e885c8094a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteWranglingDataflowActivity.cs @@ -0,0 +1,229 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Execute power query activity. + /// + [Newtonsoft.Json.JsonObject("ExecuteWranglingDataflow")] + [Rest.Serialization.JsonTransformation] + public partial class ExecuteWranglingDataflowActivity : Activity + { + /// + /// Initializes a new instance of the ExecuteWranglingDataflowActivity + /// class. + /// + public ExecuteWranglingDataflowActivity() + { + DataFlow = new DataFlowReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the ExecuteWranglingDataflowActivity + /// class. + /// + /// Activity name. + /// Data flow reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Staging info for execute data flow + /// activity. + /// The integration runtime + /// reference. + /// Continuation settings for + /// execute data flow activity. + /// Compute properties for data flow + /// activity. + /// Trace level setting used for data flow + /// monitoring output. Supported values are: 'coarse', 'fine', and + /// 'none'. Type: string (or Expression with resultType string) + /// Continue on error setting used for + /// data flow execution. Enables processing to continue if a sink + /// fails. Type: boolean (or Expression with resultType + /// boolean) + /// Concurrent run setting used for data + /// flow execution. Allows sinks with the same save order to be + /// processed concurrently. Type: boolean (or Expression with + /// resultType boolean) + /// Specify number of parallel + /// staging for sources applicable to the sink. Type: integer (or + /// Expression with resultType integer) + /// (Deprecated. Please use Queries). List of Power + /// Query activity sinks mapped to a queryName. + /// List of mapping for Power Query mashup query + /// to sink dataset(s). + /// Activity policy. + public ExecuteWranglingDataflowActivity(string name, DataFlowReference dataFlow, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), DataFlowStagingInfo staging = default(DataFlowStagingInfo), IntegrationRuntimeReference integrationRuntime = default(IntegrationRuntimeReference), ContinuationSettingsReference continuationSettings = default(ContinuationSettingsReference), ExecuteDataFlowActivityTypePropertiesCompute compute = default(ExecuteDataFlowActivityTypePropertiesCompute), object traceLevel = default(object), object continueOnError = default(object), object runConcurrently = default(object), object sourceStagingConcurrency = default(object), IDictionary sinks = default(IDictionary), IList queries = default(IList), ActivityPolicy policy = default(ActivityPolicy)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties) + { + DataFlow = dataFlow; + Staging = staging; + IntegrationRuntime = integrationRuntime; + ContinuationSettings = continuationSettings; + Compute = compute; + TraceLevel = traceLevel; + ContinueOnError = continueOnError; + RunConcurrently = runConcurrently; + SourceStagingConcurrency = sourceStagingConcurrency; + Sinks = sinks; + Queries = queries; + Policy = policy; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets data flow reference. + /// + [JsonProperty(PropertyName = "typeProperties.dataFlow")] + public DataFlowReference DataFlow { get; set; } + + /// + /// Gets or sets staging info for execute data flow activity. + /// + [JsonProperty(PropertyName = "typeProperties.staging")] + public DataFlowStagingInfo Staging { get; set; } + + /// + /// Gets or sets the integration runtime reference. + /// + [JsonProperty(PropertyName = "typeProperties.integrationRuntime")] + public IntegrationRuntimeReference IntegrationRuntime { get; set; } + + /// + /// Gets or sets continuation settings for execute data flow activity. + /// + [JsonProperty(PropertyName = "typeProperties.continuationSettings")] + public ContinuationSettingsReference ContinuationSettings { get; set; } + + /// + /// Gets or sets compute properties for data flow activity. + /// + [JsonProperty(PropertyName = "typeProperties.compute")] + public ExecuteDataFlowActivityTypePropertiesCompute Compute { get; set; } + + /// + /// Gets or sets trace level setting used for data flow monitoring + /// output. Supported values are: 'coarse', 'fine', and 'none'. Type: + /// string (or Expression with resultType string) + /// + [JsonProperty(PropertyName = "typeProperties.traceLevel")] + public object TraceLevel { get; set; } + + /// + /// Gets or sets continue on error setting used for data flow + /// execution. Enables processing to continue if a sink fails. Type: + /// boolean (or Expression with resultType boolean) + /// + [JsonProperty(PropertyName = "typeProperties.continueOnError")] + public object ContinueOnError { get; set; } + + /// + /// Gets or sets concurrent run setting used for data flow execution. + /// Allows sinks with the same save order to be processed concurrently. + /// Type: boolean (or Expression with resultType boolean) + /// + [JsonProperty(PropertyName = "typeProperties.runConcurrently")] + public object RunConcurrently { get; set; } + + /// + /// Gets or sets specify number of parallel staging for sources + /// applicable to the sink. Type: integer (or Expression with + /// resultType integer) + /// + [JsonProperty(PropertyName = "typeProperties.sourceStagingConcurrency")] + public object SourceStagingConcurrency { get; set; } + + /// + /// Gets or sets (Deprecated. Please use Queries). List of Power Query + /// activity sinks mapped to a queryName. + /// + [JsonProperty(PropertyName = "typeProperties.sinks")] + public IDictionary Sinks { get; set; } + + /// + /// Gets or sets list of mapping for Power Query mashup query to sink + /// dataset(s). + /// + [JsonProperty(PropertyName = "typeProperties.queries")] + public IList Queries { get; set; } + + /// + /// Gets or sets activity policy. + /// + [JsonProperty(PropertyName = "policy")] + public ActivityPolicy Policy { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (DataFlow == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DataFlow"); + } + if (DataFlow != null) + { + DataFlow.Validate(); + } + if (Staging != null) + { + Staging.Validate(); + } + if (IntegrationRuntime != null) + { + IntegrationRuntime.Validate(); + } + if (Sinks != null) + { + foreach (var valueElement in Sinks.Values) + { + if (valueElement != null) + { + valueElement.Validate(); + } + } + } + if (Policy != null) + { + Policy.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecutionActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecutionActivity.cs new file mode 100644 index 000000000000..d3cabbe1882b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecutionActivity.cs @@ -0,0 +1,95 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Base class for all execution activities. + /// + [Newtonsoft.Json.JsonObject("Execution")] + public partial class ExecutionActivity : Activity + { + /// + /// Initializes a new instance of the ExecutionActivity class. + /// + public ExecutionActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExecutionActivity class. + /// + /// Activity name. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + public ExecutionActivity(string name, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties) + { + LinkedServiceName = linkedServiceName; + Policy = policy; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets linked service reference. + /// + [JsonProperty(PropertyName = "linkedServiceName")] + public LinkedServiceReference LinkedServiceName { get; set; } + + /// + /// Gets or sets activity policy. + /// + [JsonProperty(PropertyName = "policy")] + public ActivityPolicy Policy { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (LinkedServiceName != null) + { + LinkedServiceName.Validate(); + } + if (Policy != null) + { + Policy.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExportSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExportSettings.cs new file mode 100644 index 000000000000..422b0c171cf0 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExportSettings.cs @@ -0,0 +1,55 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Export command settings. + /// + public partial class ExportSettings + { + /// + /// Initializes a new instance of the ExportSettings class. + /// + public ExportSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExportSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + public ExportSettings(IDictionary additionalProperties = default(IDictionary)) + { + AdditionalProperties = additionalProperties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExposureControlBatchRequest.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExposureControlBatchRequest.cs new file mode 100644 index 000000000000..4dd400968152 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExposureControlBatchRequest.cs @@ -0,0 +1,70 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A list of exposure control features. + /// + public partial class ExposureControlBatchRequest + { + /// + /// Initializes a new instance of the ExposureControlBatchRequest + /// class. + /// + public ExposureControlBatchRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExposureControlBatchRequest + /// class. + /// + /// List of exposure control + /// features. + public ExposureControlBatchRequest(IList exposureControlRequests) + { + ExposureControlRequests = exposureControlRequests; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of exposure control features. + /// + [JsonProperty(PropertyName = "exposureControlRequests")] + public IList ExposureControlRequests { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ExposureControlRequests == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ExposureControlRequests"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExposureControlBatchResponse.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExposureControlBatchResponse.cs new file mode 100644 index 000000000000..d17463940903 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExposureControlBatchResponse.cs @@ -0,0 +1,70 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A list of exposure control feature values. + /// + public partial class ExposureControlBatchResponse + { + /// + /// Initializes a new instance of the ExposureControlBatchResponse + /// class. + /// + public ExposureControlBatchResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExposureControlBatchResponse + /// class. + /// + /// List of exposure control + /// feature values. + public ExposureControlBatchResponse(IList exposureControlResponses) + { + ExposureControlResponses = exposureControlResponses; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of exposure control feature values. + /// + [JsonProperty(PropertyName = "exposureControlResponses")] + public IList ExposureControlResponses { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ExposureControlResponses == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ExposureControlResponses"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExposureControlRequest.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExposureControlRequest.cs new file mode 100644 index 000000000000..e091577a991a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExposureControlRequest.cs @@ -0,0 +1,59 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The exposure control request. + /// + public partial class ExposureControlRequest + { + /// + /// Initializes a new instance of the ExposureControlRequest class. + /// + public ExposureControlRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExposureControlRequest class. + /// + /// The feature name. + /// The feature type. + public ExposureControlRequest(string featureName = default(string), string featureType = default(string)) + { + FeatureName = featureName; + FeatureType = featureType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the feature name. + /// + [JsonProperty(PropertyName = "featureName")] + public string FeatureName { get; set; } + + /// + /// Gets or sets the feature type. + /// + [JsonProperty(PropertyName = "featureType")] + public string FeatureType { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExposureControlResponse.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExposureControlResponse.cs new file mode 100644 index 000000000000..e7d706343b00 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExposureControlResponse.cs @@ -0,0 +1,59 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The exposure control response. + /// + public partial class ExposureControlResponse + { + /// + /// Initializes a new instance of the ExposureControlResponse class. + /// + public ExposureControlResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExposureControlResponse class. + /// + /// The feature name. + /// The feature value. + public ExposureControlResponse(string featureName = default(string), string value = default(string)) + { + FeatureName = featureName; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the feature name. + /// + [JsonProperty(PropertyName = "featureName")] + public string FeatureName { get; private set; } + + /// + /// Gets the feature value. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Expression.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Expression.cs new file mode 100644 index 000000000000..2da948bd6f5a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Expression.cs @@ -0,0 +1,78 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Azure Data Factory expression definition. + /// + public partial class Expression + { + /// + /// Initializes a new instance of the Expression class. + /// + public Expression() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Expression class. + /// + /// Expression value. + public Expression(string value) + { + Value = value; + CustomInit(); + } + /// + /// Static constructor for Expression class. + /// + static Expression() + { + Type = "Expression"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets expression value. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + /// + /// Expression type. + /// + [JsonProperty(PropertyName = "type")] + public static string Type { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Value == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Value"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExpressionV2.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExpressionV2.cs new file mode 100644 index 000000000000..6a8dc5252d54 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExpressionV2.cs @@ -0,0 +1,82 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Nested representation of a complex expression. + /// + public partial class ExpressionV2 + { + /// + /// Initializes a new instance of the ExpressionV2 class. + /// + public ExpressionV2() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExpressionV2 class. + /// + /// Type of expressions supported by the system. + /// Type: string. Possible values include: 'Constant', 'Field', + /// 'Unary', 'Binary', 'NAry' + /// Value for Constant/Field Type: string. + /// Expression operator value Type: list of + /// strings. + /// List of nested expressions. + public ExpressionV2(string type = default(string), string value = default(string), IList operators = default(IList), IList operands = default(IList)) + { + Type = type; + Value = value; + Operators = operators; + Operands = operands; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets type of expressions supported by the system. Type: + /// string. Possible values include: 'Constant', 'Field', 'Unary', + /// 'Binary', 'NAry' + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets value for Constant/Field Type: string. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + /// + /// Gets or sets expression operator value Type: list of strings. + /// + [JsonProperty(PropertyName = "operators")] + public IList Operators { get; set; } + + /// + /// Gets or sets list of nested expressions. + /// + [JsonProperty(PropertyName = "operands")] + public IList Operands { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExpressionV2Type.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExpressionV2Type.cs new file mode 100644 index 000000000000..3f3184eb78c2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExpressionV2Type.cs @@ -0,0 +1,25 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for ExpressionV2Type. + /// + public static class ExpressionV2Type + { + public const string Constant = "Constant"; + public const string Field = "Field"; + public const string Unary = "Unary"; + public const string Binary = "Binary"; + public const string NAry = "NAry"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Factory.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Factory.cs new file mode 100644 index 000000000000..ea41b3d8aa65 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Factory.cs @@ -0,0 +1,179 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Factory resource type. + /// + [Rest.Serialization.JsonTransformation] + public partial class Factory : Resource + { + /// + /// Initializes a new instance of the Factory class. + /// + public Factory() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Factory class. + /// + /// The resource identifier. + /// The resource name. + /// The resource type. + /// The resource location. + /// The resource tags. + /// Etag identifies change in the resource. + /// Unmatched properties from the + /// message are deserialized this collection + /// Managed service identity of the + /// factory. + /// Factory provisioning state, example + /// Succeeded. + /// Time the factory was created in ISO8601 + /// format. + /// Version of the factory. + /// Purview information of the + /// factory. + /// Git repo information of the + /// factory. + /// List of parameters for + /// factory. + /// Properties to enable Customer Managed Key + /// for the factory. + /// Whether or not public network + /// access is allowed for the data factory. Possible values include: + /// 'Enabled', 'Disabled' + public Factory(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string), IDictionary additionalProperties = default(IDictionary), FactoryIdentity identity = default(FactoryIdentity), string provisioningState = default(string), System.DateTime? createTime = default(System.DateTime?), string version = default(string), PurviewConfiguration purviewConfiguration = default(PurviewConfiguration), FactoryRepoConfiguration repoConfiguration = default(FactoryRepoConfiguration), IDictionary globalParameters = default(IDictionary), EncryptionConfiguration encryption = default(EncryptionConfiguration), string publicNetworkAccess = default(string)) + : base(id, name, type, location, tags, eTag) + { + AdditionalProperties = additionalProperties; + Identity = identity; + ProvisioningState = provisioningState; + CreateTime = createTime; + Version = version; + PurviewConfiguration = purviewConfiguration; + RepoConfiguration = repoConfiguration; + GlobalParameters = globalParameters; + Encryption = encryption; + PublicNetworkAccess = publicNetworkAccess; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets managed service identity of the factory. + /// + [JsonProperty(PropertyName = "identity")] + public FactoryIdentity Identity { get; set; } + + /// + /// Gets factory provisioning state, example Succeeded. + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState { get; private set; } + + /// + /// Gets time the factory was created in ISO8601 format. + /// + [JsonProperty(PropertyName = "properties.createTime")] + public System.DateTime? CreateTime { get; private set; } + + /// + /// Gets version of the factory. + /// + [JsonProperty(PropertyName = "properties.version")] + public string Version { get; private set; } + + /// + /// Gets or sets purview information of the factory. + /// + [JsonProperty(PropertyName = "properties.purviewConfiguration")] + public PurviewConfiguration PurviewConfiguration { get; set; } + + /// + /// Gets or sets git repo information of the factory. + /// + [JsonProperty(PropertyName = "properties.repoConfiguration")] + public FactoryRepoConfiguration RepoConfiguration { get; set; } + + /// + /// Gets or sets list of parameters for factory. + /// + [JsonProperty(PropertyName = "properties.globalParameters")] + public IDictionary GlobalParameters { get; set; } + + /// + /// Gets or sets properties to enable Customer Managed Key for the + /// factory. + /// + [JsonProperty(PropertyName = "properties.encryption")] + public EncryptionConfiguration Encryption { get; set; } + + /// + /// Gets or sets whether or not public network access is allowed for + /// the data factory. Possible values include: 'Enabled', 'Disabled' + /// + [JsonProperty(PropertyName = "properties.publicNetworkAccess")] + public string PublicNetworkAccess { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Identity != null) + { + Identity.Validate(); + } + if (RepoConfiguration != null) + { + RepoConfiguration.Validate(); + } + if (GlobalParameters != null) + { + foreach (var valueElement in GlobalParameters.Values) + { + if (valueElement != null) + { + valueElement.Validate(); + } + } + } + if (Encryption != null) + { + Encryption.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FactoryGitHubConfiguration.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FactoryGitHubConfiguration.cs new file mode 100644 index 000000000000..9921f38eac7b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FactoryGitHubConfiguration.cs @@ -0,0 +1,88 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Factory's GitHub repo information. + /// + public partial class FactoryGitHubConfiguration : FactoryRepoConfiguration + { + /// + /// Initializes a new instance of the FactoryGitHubConfiguration class. + /// + public FactoryGitHubConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FactoryGitHubConfiguration class. + /// + /// Account name. + /// Repository name. + /// Collaboration branch. + /// Root folder. + /// Last commit id. + /// Disable manual publish operation in + /// ADF studio to favor automated publish. + /// GitHub Enterprise host name. For example: + /// `https://github.mydomain.com` + /// GitHub bring your own app client id. + /// GitHub bring your own app client secret + /// information. + public FactoryGitHubConfiguration(string accountName, string repositoryName, string collaborationBranch, string rootFolder, string lastCommitId = default(string), bool? disablePublish = default(bool?), string hostName = default(string), string clientId = default(string), GitHubClientSecret clientSecret = default(GitHubClientSecret)) + : base(accountName, repositoryName, collaborationBranch, rootFolder, lastCommitId, disablePublish) + { + HostName = hostName; + ClientId = clientId; + ClientSecret = clientSecret; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets gitHub Enterprise host name. For example: + /// `https://github.mydomain.com` + /// + [JsonProperty(PropertyName = "hostName")] + public string HostName { get; set; } + + /// + /// Gets or sets gitHub bring your own app client id. + /// + [JsonProperty(PropertyName = "clientId")] + public string ClientId { get; set; } + + /// + /// Gets or sets gitHub bring your own app client secret information. + /// + [JsonProperty(PropertyName = "clientSecret")] + public GitHubClientSecret ClientSecret { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FactoryIdentity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FactoryIdentity.cs new file mode 100644 index 000000000000..42580a9f25d6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FactoryIdentity.cs @@ -0,0 +1,96 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Identity properties of the factory resource. + /// + public partial class FactoryIdentity + { + /// + /// Initializes a new instance of the FactoryIdentity class. + /// + public FactoryIdentity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FactoryIdentity class. + /// + /// The identity type. Possible values include: + /// 'SystemAssigned', 'UserAssigned', + /// 'SystemAssigned,UserAssigned' + /// The principal id of the identity. + /// The client tenant id of the + /// identity. + /// List of user assigned + /// identities for the factory. + public FactoryIdentity(string type, System.Guid? principalId = default(System.Guid?), System.Guid? tenantId = default(System.Guid?), IDictionary userAssignedIdentities = default(IDictionary)) + { + Type = type; + PrincipalId = principalId; + TenantId = tenantId; + UserAssignedIdentities = userAssignedIdentities; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the identity type. Possible values include: + /// 'SystemAssigned', 'UserAssigned', 'SystemAssigned,UserAssigned' + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets the principal id of the identity. + /// + [JsonProperty(PropertyName = "principalId")] + public System.Guid? PrincipalId { get; private set; } + + /// + /// Gets the client tenant id of the identity. + /// + [JsonProperty(PropertyName = "tenantId")] + public System.Guid? TenantId { get; private set; } + + /// + /// Gets or sets list of user assigned identities for the factory. + /// + [JsonProperty(PropertyName = "userAssignedIdentities")] + public IDictionary UserAssignedIdentities { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FactoryIdentityType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FactoryIdentityType.cs new file mode 100644 index 000000000000..242d410d0011 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FactoryIdentityType.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for FactoryIdentityType. + /// + public static class FactoryIdentityType + { + public const string SystemAssigned = "SystemAssigned"; + public const string UserAssigned = "UserAssigned"; + public const string SystemAssignedUserAssigned = "SystemAssigned,UserAssigned"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FactoryRepoConfiguration.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FactoryRepoConfiguration.cs new file mode 100644 index 000000000000..f0fe1ac4e56a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FactoryRepoConfiguration.cs @@ -0,0 +1,119 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Factory's git repo information. + /// + public partial class FactoryRepoConfiguration + { + /// + /// Initializes a new instance of the FactoryRepoConfiguration class. + /// + public FactoryRepoConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FactoryRepoConfiguration class. + /// + /// Account name. + /// Repository name. + /// Collaboration branch. + /// Root folder. + /// Last commit id. + /// Disable manual publish operation in + /// ADF studio to favor automated publish. + public FactoryRepoConfiguration(string accountName, string repositoryName, string collaborationBranch, string rootFolder, string lastCommitId = default(string), bool? disablePublish = default(bool?)) + { + AccountName = accountName; + RepositoryName = repositoryName; + CollaborationBranch = collaborationBranch; + RootFolder = rootFolder; + LastCommitId = lastCommitId; + DisablePublish = disablePublish; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets account name. + /// + [JsonProperty(PropertyName = "accountName")] + public string AccountName { get; set; } + + /// + /// Gets or sets repository name. + /// + [JsonProperty(PropertyName = "repositoryName")] + public string RepositoryName { get; set; } + + /// + /// Gets or sets collaboration branch. + /// + [JsonProperty(PropertyName = "collaborationBranch")] + public string CollaborationBranch { get; set; } + + /// + /// Gets or sets root folder. + /// + [JsonProperty(PropertyName = "rootFolder")] + public string RootFolder { get; set; } + + /// + /// Gets or sets last commit id. + /// + [JsonProperty(PropertyName = "lastCommitId")] + public string LastCommitId { get; set; } + + /// + /// Gets or sets disable manual publish operation in ADF studio to + /// favor automated publish. + /// + [JsonProperty(PropertyName = "disablePublish")] + public bool? DisablePublish { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (AccountName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AccountName"); + } + if (RepositoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "RepositoryName"); + } + if (CollaborationBranch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "CollaborationBranch"); + } + if (RootFolder == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "RootFolder"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FactoryRepoUpdate.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FactoryRepoUpdate.cs new file mode 100644 index 000000000000..4fe2f64b0b68 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FactoryRepoUpdate.cs @@ -0,0 +1,73 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Factory's git repo information. + /// + public partial class FactoryRepoUpdate + { + /// + /// Initializes a new instance of the FactoryRepoUpdate class. + /// + public FactoryRepoUpdate() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FactoryRepoUpdate class. + /// + /// The factory resource id. + /// Git repo information of the + /// factory. + public FactoryRepoUpdate(string factoryResourceId = default(string), FactoryRepoConfiguration repoConfiguration = default(FactoryRepoConfiguration)) + { + FactoryResourceId = factoryResourceId; + RepoConfiguration = repoConfiguration; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the factory resource id. + /// + [JsonProperty(PropertyName = "factoryResourceId")] + public string FactoryResourceId { get; set; } + + /// + /// Gets or sets git repo information of the factory. + /// + [JsonProperty(PropertyName = "repoConfiguration")] + public FactoryRepoConfiguration RepoConfiguration { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (RepoConfiguration != null) + { + RepoConfiguration.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FactoryUpdateParameters.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FactoryUpdateParameters.cs new file mode 100644 index 000000000000..6cd911726e6c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FactoryUpdateParameters.cs @@ -0,0 +1,89 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Parameters for updating a factory resource. + /// + [Rest.Serialization.JsonTransformation] + public partial class FactoryUpdateParameters + { + /// + /// Initializes a new instance of the FactoryUpdateParameters class. + /// + public FactoryUpdateParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FactoryUpdateParameters class. + /// + /// The resource tags. + /// Managed service identity of the + /// factory. + /// Whether or not public network + /// access is allowed for the data factory. Possible values include: + /// 'Enabled', 'Disabled' + public FactoryUpdateParameters(IDictionary tags = default(IDictionary), FactoryIdentity identity = default(FactoryIdentity), string publicNetworkAccess = default(string)) + { + Tags = tags; + Identity = identity; + PublicNetworkAccess = publicNetworkAccess; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the resource tags. + /// + [JsonProperty(PropertyName = "tags")] + public IDictionary Tags { get; set; } + + /// + /// Gets or sets managed service identity of the factory. + /// + [JsonProperty(PropertyName = "identity")] + public FactoryIdentity Identity { get; set; } + + /// + /// Gets or sets whether or not public network access is allowed for + /// the data factory. Possible values include: 'Enabled', 'Disabled' + /// + [JsonProperty(PropertyName = "properties.publicNetworkAccess")] + public string PublicNetworkAccess { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Identity != null) + { + Identity.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FactoryVSTSConfiguration.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FactoryVSTSConfiguration.cs new file mode 100644 index 000000000000..62dd94b309db --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FactoryVSTSConfiguration.cs @@ -0,0 +1,82 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Factory's VSTS repo information. + /// + public partial class FactoryVSTSConfiguration : FactoryRepoConfiguration + { + /// + /// Initializes a new instance of the FactoryVSTSConfiguration class. + /// + public FactoryVSTSConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FactoryVSTSConfiguration class. + /// + /// Account name. + /// Repository name. + /// Collaboration branch. + /// Root folder. + /// VSTS project name. + /// Last commit id. + /// Disable manual publish operation in + /// ADF studio to favor automated publish. + /// VSTS tenant id. + public FactoryVSTSConfiguration(string accountName, string repositoryName, string collaborationBranch, string rootFolder, string projectName, string lastCommitId = default(string), bool? disablePublish = default(bool?), string tenantId = default(string)) + : base(accountName, repositoryName, collaborationBranch, rootFolder, lastCommitId, disablePublish) + { + ProjectName = projectName; + TenantId = tenantId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets VSTS project name. + /// + [JsonProperty(PropertyName = "projectName")] + public string ProjectName { get; set; } + + /// + /// Gets or sets VSTS tenant id. + /// + [JsonProperty(PropertyName = "tenantId")] + public string TenantId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ProjectName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ProjectName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FailActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FailActivity.cs new file mode 100644 index 000000000000..d0eb7a303bcf --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FailActivity.cs @@ -0,0 +1,115 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// This activity will fail within its own scope and output a custom error + /// message and error code. The error message and code can provided either + /// as a string literal or as an expression that can be evaluated to a + /// string at runtime. The activity scope can be the whole pipeline or a + /// control activity (e.g. foreach, switch, until), if the fail activity is + /// contained in it. + /// + [Newtonsoft.Json.JsonObject("Fail")] + [Rest.Serialization.JsonTransformation] + public partial class FailActivity : ControlActivity + { + /// + /// Initializes a new instance of the FailActivity class. + /// + public FailActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FailActivity class. + /// + /// Activity name. + /// The error message that surfaced in the Fail + /// activity. It can be dynamic content that's evaluated to a non + /// empty/blank string at runtime. Type: string (or Expression with + /// resultType string). + /// The error code that categorizes the error + /// type of the Fail activity. It can be dynamic content that's + /// evaluated to a non empty/blank string at runtime. Type: string (or + /// Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + public FailActivity(string name, object message, object errorCode, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties) + { + Message = message; + ErrorCode = errorCode; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the error message that surfaced in the Fail activity. + /// It can be dynamic content that's evaluated to a non empty/blank + /// string at runtime. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.message")] + public object Message { get; set; } + + /// + /// Gets or sets the error code that categorizes the error type of the + /// Fail activity. It can be dynamic content that's evaluated to a non + /// empty/blank string at runtime. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.errorCode")] + public object ErrorCode { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Message == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Message"); + } + if (ErrorCode == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ErrorCode"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileServerLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileServerLinkedService.cs new file mode 100644 index 000000000000..58df396eab0b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileServerLinkedService.cs @@ -0,0 +1,112 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// File system linked service. + /// + [Newtonsoft.Json.JsonObject("FileServer")] + [Rest.Serialization.JsonTransformation] + public partial class FileServerLinkedService : LinkedService + { + /// + /// Initializes a new instance of the FileServerLinkedService class. + /// + public FileServerLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FileServerLinkedService class. + /// + /// Host name of the server. Type: string (or + /// Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// User ID to logon the server. Type: string (or + /// Expression with resultType string). + /// Password to logon the server. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public FileServerLinkedService(object host, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object userId = default(object), SecretBase password = default(SecretBase), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Host = host; + UserId = userId; + Password = password; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets host name of the server. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.host")] + public object Host { get; set; } + + /// + /// Gets or sets user ID to logon the server. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userId")] + public object UserId { get; set; } + + /// + /// Gets or sets password to logon the server. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Host == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Host"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileServerLocation.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileServerLocation.cs new file mode 100644 index 000000000000..e841d2fcec83 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileServerLocation.cs @@ -0,0 +1,51 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The location of file server dataset. + /// + public partial class FileServerLocation : DatasetLocation + { + /// + /// Initializes a new instance of the FileServerLocation class. + /// + public FileServerLocation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FileServerLocation class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Specify the folder path of dataset. Type: + /// string (or Expression with resultType string) + /// Specify the file name of dataset. Type: + /// string (or Expression with resultType string). + public FileServerLocation(IDictionary additionalProperties = default(IDictionary), object folderPath = default(object), object fileName = default(object)) + : base(additionalProperties, folderPath, fileName) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileServerReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileServerReadSettings.cs new file mode 100644 index 000000000000..8ee2a01dbbce --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileServerReadSettings.cs @@ -0,0 +1,168 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// File server read settings. + /// + public partial class FileServerReadSettings : StoreReadSettings + { + /// + /// Initializes a new instance of the FileServerReadSettings class. + /// + public FileServerReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FileServerReadSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// If true, files under the folder path will + /// be read recursively. Default is true. Type: boolean (or Expression + /// with resultType boolean). + /// FileServer wildcardFolderPath. + /// Type: string (or Expression with resultType string). + /// FileServer wildcardFileName. Type: + /// string (or Expression with resultType string). + /// Point to a text file that lists each + /// file (relative path to the path configured in the dataset) that you + /// want to copy. Type: string (or Expression with resultType + /// string). + /// Indicates whether to enable + /// partition discovery. Type: boolean (or Expression with resultType + /// boolean). + /// Specify the root path where + /// partition discovery starts from. Type: string (or Expression with + /// resultType string). + /// Indicates whether the + /// source files need to be deleted after copy completion. Default is + /// false. Type: boolean (or Expression with resultType + /// boolean). + /// The start of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + /// The end of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + /// Specify a filter to be used to select a + /// subset of files in the folderPath rather than all files. Type: + /// string (or Expression with resultType string). + public FileServerReadSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object recursive = default(object), object wildcardFolderPath = default(object), object wildcardFileName = default(object), object fileListPath = default(object), object enablePartitionDiscovery = default(object), object partitionRootPath = default(object), object deleteFilesAfterCompletion = default(object), object modifiedDatetimeStart = default(object), object modifiedDatetimeEnd = default(object), object fileFilter = default(object)) + : base(additionalProperties, maxConcurrentConnections, disableMetricsCollection) + { + Recursive = recursive; + WildcardFolderPath = wildcardFolderPath; + WildcardFileName = wildcardFileName; + FileListPath = fileListPath; + EnablePartitionDiscovery = enablePartitionDiscovery; + PartitionRootPath = partitionRootPath; + DeleteFilesAfterCompletion = deleteFilesAfterCompletion; + ModifiedDatetimeStart = modifiedDatetimeStart; + ModifiedDatetimeEnd = modifiedDatetimeEnd; + FileFilter = fileFilter; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets if true, files under the folder path will be read + /// recursively. Default is true. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "recursive")] + public object Recursive { get; set; } + + /// + /// Gets or sets fileServer wildcardFolderPath. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFolderPath")] + public object WildcardFolderPath { get; set; } + + /// + /// Gets or sets fileServer wildcardFileName. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFileName")] + public object WildcardFileName { get; set; } + + /// + /// Gets or sets point to a text file that lists each file (relative + /// path to the path configured in the dataset) that you want to copy. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "fileListPath")] + public object FileListPath { get; set; } + + /// + /// Gets or sets indicates whether to enable partition discovery. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "enablePartitionDiscovery")] + public object EnablePartitionDiscovery { get; set; } + + /// + /// Gets or sets specify the root path where partition discovery starts + /// from. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionRootPath")] + public object PartitionRootPath { get; set; } + + /// + /// Gets or sets indicates whether the source files need to be deleted + /// after copy completion. Default is false. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "deleteFilesAfterCompletion")] + public object DeleteFilesAfterCompletion { get; set; } + + /// + /// Gets or sets the start of file's modified datetime. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "modifiedDatetimeStart")] + public object ModifiedDatetimeStart { get; set; } + + /// + /// Gets or sets the end of file's modified datetime. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "modifiedDatetimeEnd")] + public object ModifiedDatetimeEnd { get; set; } + + /// + /// Gets or sets specify a filter to be used to select a subset of + /// files in the folderPath rather than all files. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "fileFilter")] + public object FileFilter { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileServerWriteSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileServerWriteSettings.cs new file mode 100644 index 000000000000..94e7b87cf565 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileServerWriteSettings.cs @@ -0,0 +1,58 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// File server write settings. + /// + public partial class FileServerWriteSettings : StoreWriteSettings + { + /// + /// Initializes a new instance of the FileServerWriteSettings class. + /// + public FileServerWriteSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FileServerWriteSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The type of copy behavior for copy + /// sink. + /// Specify the custom metadata to be added to + /// sink data. Type: array of objects (or Expression with resultType + /// array of objects). + public FileServerWriteSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object copyBehavior = default(object), IList metadata = default(IList)) + : base(additionalProperties, maxConcurrentConnections, disableMetricsCollection, copyBehavior, metadata) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileShareDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileShareDataset.cs new file mode 100644 index 000000000000..4092839f59cf --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileShareDataset.cs @@ -0,0 +1,151 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// An on-premises file system dataset. + /// + [Newtonsoft.Json.JsonObject("FileShare")] + [Rest.Serialization.JsonTransformation] + public partial class FileShareDataset : Dataset + { + /// + /// Initializes a new instance of the FileShareDataset class. + /// + public FileShareDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the FileShareDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The path of the on-premises file system. + /// Type: string (or Expression with resultType string). + /// The name of the on-premises file system. + /// Type: string (or Expression with resultType string). + /// The start of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + /// The end of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + /// The format of the files. + /// Specify a filter to be used to select a + /// subset of files in the folderPath rather than all files. Type: + /// string (or Expression with resultType string). + /// The data compression method used for the + /// file system. + public FileShareDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object folderPath = default(object), object fileName = default(object), object modifiedDatetimeStart = default(object), object modifiedDatetimeEnd = default(object), DatasetStorageFormat format = default(DatasetStorageFormat), object fileFilter = default(object), DatasetCompression compression = default(DatasetCompression)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + FolderPath = folderPath; + FileName = fileName; + ModifiedDatetimeStart = modifiedDatetimeStart; + ModifiedDatetimeEnd = modifiedDatetimeEnd; + Format = format; + FileFilter = fileFilter; + Compression = compression; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the path of the on-premises file system. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.folderPath")] + public object FolderPath { get; set; } + + /// + /// Gets or sets the name of the on-premises file system. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.fileName")] + public object FileName { get; set; } + + /// + /// Gets or sets the start of file's modified datetime. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.modifiedDatetimeStart")] + public object ModifiedDatetimeStart { get; set; } + + /// + /// Gets or sets the end of file's modified datetime. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.modifiedDatetimeEnd")] + public object ModifiedDatetimeEnd { get; set; } + + /// + /// Gets or sets the format of the files. + /// + [JsonProperty(PropertyName = "typeProperties.format")] + public DatasetStorageFormat Format { get; set; } + + /// + /// Gets or sets specify a filter to be used to select a subset of + /// files in the folderPath rather than all files. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.fileFilter")] + public object FileFilter { get; set; } + + /// + /// Gets or sets the data compression method used for the file system. + /// + [JsonProperty(PropertyName = "typeProperties.compression")] + public DatasetCompression Compression { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Compression != null) + { + Compression.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileSystemSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileSystemSink.cs new file mode 100644 index 000000000000..b18cdf10e7f5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileSystemSink.cs @@ -0,0 +1,73 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity file system sink. + /// + public partial class FileSystemSink : CopySink + { + /// + /// Initializes a new instance of the FileSystemSink class. + /// + public FileSystemSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FileSystemSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The type of copy behavior for copy + /// sink. + public FileSystemSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object copyBehavior = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + CopyBehavior = copyBehavior; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the type of copy behavior for copy sink. + /// + [JsonProperty(PropertyName = "copyBehavior")] + public object CopyBehavior { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileSystemSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileSystemSource.cs new file mode 100644 index 000000000000..74493fedd10f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FileSystemSource.cs @@ -0,0 +1,83 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity file system source. + /// + public partial class FileSystemSource : CopySource + { + /// + /// Initializes a new instance of the FileSystemSource class. + /// + public FileSystemSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FileSystemSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// If true, files under the folder path will + /// be read recursively. Default is true. Type: boolean (or Expression + /// with resultType boolean). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public FileSystemSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object recursive = default(object), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + Recursive = recursive; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets if true, files under the folder path will be read + /// recursively. Default is true. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "recursive")] + public object Recursive { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FilterActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FilterActivity.cs new file mode 100644 index 000000000000..2bdae3b2e84e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FilterActivity.cs @@ -0,0 +1,110 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Filter and return results from input array based on the conditions. + /// + [Newtonsoft.Json.JsonObject("Filter")] + [Rest.Serialization.JsonTransformation] + public partial class FilterActivity : ControlActivity + { + /// + /// Initializes a new instance of the FilterActivity class. + /// + public FilterActivity() + { + Items = new Expression(); + Condition = new Expression(); + CustomInit(); + } + + /// + /// Initializes a new instance of the FilterActivity class. + /// + /// Activity name. + /// Input array on which filter should be + /// applied. + /// Condition to be used for filtering the + /// input. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + public FilterActivity(string name, Expression items, Expression condition, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties) + { + Items = items; + Condition = condition; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets input array on which filter should be applied. + /// + [JsonProperty(PropertyName = "typeProperties.items")] + public Expression Items { get; set; } + + /// + /// Gets or sets condition to be used for filtering the input. + /// + [JsonProperty(PropertyName = "typeProperties.condition")] + public Expression Condition { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Condition == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Condition"); + } + if (Items != null) + { + Items.Validate(); + } + if (Condition != null) + { + Condition.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Flowlet.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Flowlet.cs new file mode 100644 index 000000000000..3d72ef4e17f1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Flowlet.cs @@ -0,0 +1,95 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Data flow flowlet + /// + [Rest.Serialization.JsonTransformation] + public partial class Flowlet : DataFlow + { + /// + /// Initializes a new instance of the Flowlet class. + /// + public Flowlet() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Flowlet class. + /// + /// The description of the data flow. + /// List of tags that can be used for + /// describing the data flow. + /// The folder that this data flow is in. If not + /// specified, Data flow will appear at the root level. + /// List of sources in Flowlet. + /// List of sinks in Flowlet. + /// List of transformations in + /// Flowlet. + /// Flowlet script. + /// Flowlet script lines. + public Flowlet(string description = default(string), IList annotations = default(IList), DataFlowFolder folder = default(DataFlowFolder), IList sources = default(IList), IList sinks = default(IList), IList transformations = default(IList), string script = default(string), IList scriptLines = default(IList)) + : base(description, annotations, folder) + { + Sources = sources; + Sinks = sinks; + Transformations = transformations; + Script = script; + ScriptLines = scriptLines; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of sources in Flowlet. + /// + [JsonProperty(PropertyName = "typeProperties.sources")] + public IList Sources { get; set; } + + /// + /// Gets or sets list of sinks in Flowlet. + /// + [JsonProperty(PropertyName = "typeProperties.sinks")] + public IList Sinks { get; set; } + + /// + /// Gets or sets list of transformations in Flowlet. + /// + [JsonProperty(PropertyName = "typeProperties.transformations")] + public IList Transformations { get; set; } + + /// + /// Gets or sets flowlet script. + /// + [JsonProperty(PropertyName = "typeProperties.script")] + public string Script { get; set; } + + /// + /// Gets or sets flowlet script lines. + /// + [JsonProperty(PropertyName = "typeProperties.scriptLines")] + public IList ScriptLines { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ForEachActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ForEachActivity.cs new file mode 100644 index 000000000000..27b09a3d0e5b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ForEachActivity.cs @@ -0,0 +1,139 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// This activity is used for iterating over a collection and execute given + /// activities. + /// + [Newtonsoft.Json.JsonObject("ForEach")] + [Rest.Serialization.JsonTransformation] + public partial class ForEachActivity : ControlActivity + { + /// + /// Initializes a new instance of the ForEachActivity class. + /// + public ForEachActivity() + { + Items = new Expression(); + CustomInit(); + } + + /// + /// Initializes a new instance of the ForEachActivity class. + /// + /// Activity name. + /// Collection to iterate. + /// List of activities to execute . + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Should the loop be executed in sequence + /// or in parallel (max 50) + /// Batch count to be used for controlling the + /// number of parallel execution (when isSequential is set to + /// false). + public ForEachActivity(string name, Expression items, IList activities, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), bool? isSequential = default(bool?), int? batchCount = default(int?)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties) + { + IsSequential = isSequential; + BatchCount = batchCount; + Items = items; + Activities = activities; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets should the loop be executed in sequence or in parallel + /// (max 50) + /// + [JsonProperty(PropertyName = "typeProperties.isSequential")] + public bool? IsSequential { get; set; } + + /// + /// Gets or sets batch count to be used for controlling the number of + /// parallel execution (when isSequential is set to false). + /// + [JsonProperty(PropertyName = "typeProperties.batchCount")] + public int? BatchCount { get; set; } + + /// + /// Gets or sets collection to iterate. + /// + [JsonProperty(PropertyName = "typeProperties.items")] + public Expression Items { get; set; } + + /// + /// Gets or sets list of activities to execute . + /// + [JsonProperty(PropertyName = "typeProperties.activities")] + public IList Activities { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Items == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Items"); + } + if (Activities == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Activities"); + } + if (BatchCount > 50) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "BatchCount", 50); + } + if (Items != null) + { + Items.Validate(); + } + if (Activities != null) + { + foreach (var element in Activities) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FormatReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FormatReadSettings.cs new file mode 100644 index 000000000000..9cfdb4346aeb --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FormatReadSettings.cs @@ -0,0 +1,55 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Format read settings. + /// + public partial class FormatReadSettings + { + /// + /// Initializes a new instance of the FormatReadSettings class. + /// + public FormatReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FormatReadSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + public FormatReadSettings(IDictionary additionalProperties = default(IDictionary)) + { + AdditionalProperties = additionalProperties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FormatWriteSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FormatWriteSettings.cs new file mode 100644 index 000000000000..e7757b5ebf5c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FormatWriteSettings.cs @@ -0,0 +1,55 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Format write settings. + /// + public partial class FormatWriteSettings + { + /// + /// Initializes a new instance of the FormatWriteSettings class. + /// + public FormatWriteSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FormatWriteSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + public FormatWriteSettings(IDictionary additionalProperties = default(IDictionary)) + { + AdditionalProperties = additionalProperties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FrequencyType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FrequencyType.cs new file mode 100644 index 000000000000..971ae105bae7 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FrequencyType.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for FrequencyType. + /// + public static class FrequencyType + { + public const string Hour = "Hour"; + public const string Minute = "Minute"; + public const string Second = "Second"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FtpAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FtpAuthenticationType.cs new file mode 100644 index 000000000000..067e28034d9a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FtpAuthenticationType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for FtpAuthenticationType. + /// + public static class FtpAuthenticationType + { + public const string Basic = "Basic"; + public const string Anonymous = "Anonymous"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FtpReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FtpReadSettings.cs new file mode 100644 index 000000000000..480a32c3dc52 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FtpReadSettings.cs @@ -0,0 +1,157 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Ftp read settings. + /// + public partial class FtpReadSettings : StoreReadSettings + { + /// + /// Initializes a new instance of the FtpReadSettings class. + /// + public FtpReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FtpReadSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// If true, files under the folder path will + /// be read recursively. Default is true. Type: boolean (or Expression + /// with resultType boolean). + /// Ftp wildcardFolderPath. Type: + /// string (or Expression with resultType string). + /// Ftp wildcardFileName. Type: string + /// (or Expression with resultType string). + /// Indicates whether to enable + /// partition discovery. Type: boolean (or Expression with resultType + /// boolean). + /// Specify the root path where + /// partition discovery starts from. Type: string (or Expression with + /// resultType string). + /// Indicates whether the + /// source files need to be deleted after copy completion. Default is + /// false. Type: boolean (or Expression with resultType + /// boolean). + /// Point to a text file that lists each + /// file (relative path to the path configured in the dataset) that you + /// want to copy. Type: string (or Expression with resultType + /// string). + /// Specify whether to use binary + /// transfer mode for FTP stores. Type: boolean (or Expression with + /// resultType boolean). + /// If true, disable parallel reading + /// within each file. Default is false. Type: boolean (or Expression + /// with resultType boolean). + public FtpReadSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object recursive = default(object), object wildcardFolderPath = default(object), object wildcardFileName = default(object), object enablePartitionDiscovery = default(object), object partitionRootPath = default(object), object deleteFilesAfterCompletion = default(object), object fileListPath = default(object), object useBinaryTransfer = default(object), object disableChunking = default(object)) + : base(additionalProperties, maxConcurrentConnections, disableMetricsCollection) + { + Recursive = recursive; + WildcardFolderPath = wildcardFolderPath; + WildcardFileName = wildcardFileName; + EnablePartitionDiscovery = enablePartitionDiscovery; + PartitionRootPath = partitionRootPath; + DeleteFilesAfterCompletion = deleteFilesAfterCompletion; + FileListPath = fileListPath; + UseBinaryTransfer = useBinaryTransfer; + DisableChunking = disableChunking; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets if true, files under the folder path will be read + /// recursively. Default is true. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "recursive")] + public object Recursive { get; set; } + + /// + /// Gets or sets ftp wildcardFolderPath. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFolderPath")] + public object WildcardFolderPath { get; set; } + + /// + /// Gets or sets ftp wildcardFileName. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "wildcardFileName")] + public object WildcardFileName { get; set; } + + /// + /// Gets or sets indicates whether to enable partition discovery. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "enablePartitionDiscovery")] + public object EnablePartitionDiscovery { get; set; } + + /// + /// Gets or sets specify the root path where partition discovery starts + /// from. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionRootPath")] + public object PartitionRootPath { get; set; } + + /// + /// Gets or sets indicates whether the source files need to be deleted + /// after copy completion. Default is false. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "deleteFilesAfterCompletion")] + public object DeleteFilesAfterCompletion { get; set; } + + /// + /// Gets or sets point to a text file that lists each file (relative + /// path to the path configured in the dataset) that you want to copy. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "fileListPath")] + public object FileListPath { get; set; } + + /// + /// Gets or sets specify whether to use binary transfer mode for FTP + /// stores. Type: boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "useBinaryTransfer")] + public object UseBinaryTransfer { get; set; } + + /// + /// Gets or sets if true, disable parallel reading within each file. + /// Default is false. Type: boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "disableChunking")] + public object DisableChunking { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FtpServerLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FtpServerLinkedService.cs new file mode 100644 index 000000000000..0110bc66ae3f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FtpServerLinkedService.cs @@ -0,0 +1,160 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A FTP server Linked Service. + /// + [Newtonsoft.Json.JsonObject("FtpServer")] + [Rest.Serialization.JsonTransformation] + public partial class FtpServerLinkedService : LinkedService + { + /// + /// Initializes a new instance of the FtpServerLinkedService class. + /// + public FtpServerLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FtpServerLinkedService class. + /// + /// Host name of the FTP server. Type: string (or + /// Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The TCP port number that the FTP server uses to + /// listen for client connections. Default value is 21. Type: integer + /// (or Expression with resultType integer), minimum: 0. + /// The authentication type to be used + /// to connect to the FTP server. Possible values include: 'Basic', + /// 'Anonymous' + /// Username to logon the FTP server. Type: + /// string (or Expression with resultType string). + /// Password to logon the FTP server. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// If true, connect to the FTP server over + /// SSL/TLS channel. Default value is true. Type: boolean (or + /// Expression with resultType boolean). + /// If true, validate + /// the FTP server SSL certificate when connect over SSL/TLS channel. + /// Default value is true. Type: boolean (or Expression with resultType + /// boolean). + public FtpServerLinkedService(object host, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object port = default(object), string authenticationType = default(string), object userName = default(object), SecretBase password = default(SecretBase), string encryptedCredential = default(string), object enableSsl = default(object), object enableServerCertificateValidation = default(object)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Host = host; + Port = port; + AuthenticationType = authenticationType; + UserName = userName; + Password = password; + EncryptedCredential = encryptedCredential; + EnableSsl = enableSsl; + EnableServerCertificateValidation = enableServerCertificateValidation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets host name of the FTP server. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.host")] + public object Host { get; set; } + + /// + /// Gets or sets the TCP port number that the FTP server uses to listen + /// for client connections. Default value is 21. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// + [JsonProperty(PropertyName = "typeProperties.port")] + public object Port { get; set; } + + /// + /// Gets or sets the authentication type to be used to connect to the + /// FTP server. Possible values include: 'Basic', 'Anonymous' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets username to logon the FTP server. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets password to logon the FTP server. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets if true, connect to the FTP server over SSL/TLS + /// channel. Default value is true. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.enableSsl")] + public object EnableSsl { get; set; } + + /// + /// Gets or sets if true, validate the FTP server SSL certificate when + /// connect over SSL/TLS channel. Default value is true. Type: boolean + /// (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.enableServerCertificateValidation")] + public object EnableServerCertificateValidation { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Host == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Host"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FtpServerLocation.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FtpServerLocation.cs new file mode 100644 index 000000000000..fe3cd1708333 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/FtpServerLocation.cs @@ -0,0 +1,51 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The location of ftp server dataset. + /// + public partial class FtpServerLocation : DatasetLocation + { + /// + /// Initializes a new instance of the FtpServerLocation class. + /// + public FtpServerLocation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FtpServerLocation class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Specify the folder path of dataset. Type: + /// string (or Expression with resultType string) + /// Specify the file name of dataset. Type: + /// string (or Expression with resultType string). + public FtpServerLocation(IDictionary additionalProperties = default(IDictionary), object folderPath = default(object), object fileName = default(object)) + : base(additionalProperties, folderPath, fileName) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GetDataFactoryOperationStatusResponse.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GetDataFactoryOperationStatusResponse.cs new file mode 100644 index 000000000000..024f0b4c47eb --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GetDataFactoryOperationStatusResponse.cs @@ -0,0 +1,65 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Response body structure for get data factory operation status. + /// + public partial class GetDataFactoryOperationStatusResponse + { + /// + /// Initializes a new instance of the + /// GetDataFactoryOperationStatusResponse class. + /// + public GetDataFactoryOperationStatusResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// GetDataFactoryOperationStatusResponse class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Status of the operation. + public GetDataFactoryOperationStatusResponse(IDictionary additionalProperties = default(IDictionary), string status = default(string)) + { + AdditionalProperties = additionalProperties; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets status of the operation. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GetMetadataActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GetMetadataActivity.cs new file mode 100644 index 000000000000..393df45ddf9d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GetMetadataActivity.cs @@ -0,0 +1,121 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Activity to get metadata of dataset + /// + [Newtonsoft.Json.JsonObject("GetMetadata")] + [Rest.Serialization.JsonTransformation] + public partial class GetMetadataActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the GetMetadataActivity class. + /// + public GetMetadataActivity() + { + Dataset = new DatasetReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the GetMetadataActivity class. + /// + /// Activity name. + /// GetMetadata activity dataset + /// reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// Fields of metadata to get from + /// dataset. + /// GetMetadata activity store + /// settings. + /// GetMetadata activity format + /// settings. + public GetMetadataActivity(string name, DatasetReference dataset, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), IList fieldList = default(IList), StoreReadSettings storeSettings = default(StoreReadSettings), FormatReadSettings formatSettings = default(FormatReadSettings)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + Dataset = dataset; + FieldList = fieldList; + StoreSettings = storeSettings; + FormatSettings = formatSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets getMetadata activity dataset reference. + /// + [JsonProperty(PropertyName = "typeProperties.dataset")] + public DatasetReference Dataset { get; set; } + + /// + /// Gets or sets fields of metadata to get from dataset. + /// + [JsonProperty(PropertyName = "typeProperties.fieldList")] + public IList FieldList { get; set; } + + /// + /// Gets or sets getMetadata activity store settings. + /// + [JsonProperty(PropertyName = "typeProperties.storeSettings")] + public StoreReadSettings StoreSettings { get; set; } + + /// + /// Gets or sets getMetadata activity format settings. + /// + [JsonProperty(PropertyName = "typeProperties.formatSettings")] + public FormatReadSettings FormatSettings { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Dataset == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Dataset"); + } + if (Dataset != null) + { + Dataset.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GetSsisObjectMetadataRequest.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GetSsisObjectMetadataRequest.cs new file mode 100644 index 000000000000..8105466ecdee --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GetSsisObjectMetadataRequest.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The request payload of get SSIS object metadata. + /// + public partial class GetSsisObjectMetadataRequest + { + /// + /// Initializes a new instance of the GetSsisObjectMetadataRequest + /// class. + /// + public GetSsisObjectMetadataRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GetSsisObjectMetadataRequest + /// class. + /// + /// Metadata path. + public GetSsisObjectMetadataRequest(string metadataPath = default(string)) + { + MetadataPath = metadataPath; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets metadata path. + /// + [JsonProperty(PropertyName = "metadataPath")] + public string MetadataPath { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GitHubAccessTokenRequest.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GitHubAccessTokenRequest.cs new file mode 100644 index 000000000000..3a198ef6ce34 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GitHubAccessTokenRequest.cs @@ -0,0 +1,95 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Get GitHub access token request definition. + /// + public partial class GitHubAccessTokenRequest + { + /// + /// Initializes a new instance of the GitHubAccessTokenRequest class. + /// + public GitHubAccessTokenRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GitHubAccessTokenRequest class. + /// + /// GitHub access code. + /// GitHub access token base + /// URL. + /// GitHub application client ID. + /// GitHub bring your own app client + /// secret information. + public GitHubAccessTokenRequest(string gitHubAccessCode, string gitHubAccessTokenBaseUrl, string gitHubClientId = default(string), GitHubClientSecret gitHubClientSecret = default(GitHubClientSecret)) + { + GitHubAccessCode = gitHubAccessCode; + GitHubClientId = gitHubClientId; + GitHubClientSecret = gitHubClientSecret; + GitHubAccessTokenBaseUrl = gitHubAccessTokenBaseUrl; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets gitHub access code. + /// + [JsonProperty(PropertyName = "gitHubAccessCode")] + public string GitHubAccessCode { get; set; } + + /// + /// Gets or sets gitHub application client ID. + /// + [JsonProperty(PropertyName = "gitHubClientId")] + public string GitHubClientId { get; set; } + + /// + /// Gets or sets gitHub bring your own app client secret information. + /// + [JsonProperty(PropertyName = "gitHubClientSecret")] + public GitHubClientSecret GitHubClientSecret { get; set; } + + /// + /// Gets or sets gitHub access token base URL. + /// + [JsonProperty(PropertyName = "gitHubAccessTokenBaseUrl")] + public string GitHubAccessTokenBaseUrl { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (GitHubAccessCode == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "GitHubAccessCode"); + } + if (GitHubAccessTokenBaseUrl == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "GitHubAccessTokenBaseUrl"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GitHubAccessTokenResponse.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GitHubAccessTokenResponse.cs new file mode 100644 index 000000000000..125ce6735a6b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GitHubAccessTokenResponse.cs @@ -0,0 +1,51 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Get GitHub access token response definition. + /// + public partial class GitHubAccessTokenResponse + { + /// + /// Initializes a new instance of the GitHubAccessTokenResponse class. + /// + public GitHubAccessTokenResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GitHubAccessTokenResponse class. + /// + /// GitHub access token. + public GitHubAccessTokenResponse(string gitHubAccessToken = default(string)) + { + GitHubAccessToken = gitHubAccessToken; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets gitHub access token. + /// + [JsonProperty(PropertyName = "gitHubAccessToken")] + public string GitHubAccessToken { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GitHubClientSecret.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GitHubClientSecret.cs new file mode 100644 index 000000000000..5704f0e681a2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GitHubClientSecret.cs @@ -0,0 +1,62 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Client secret information for factory's bring your own app repository + /// configuration. + /// + public partial class GitHubClientSecret + { + /// + /// Initializes a new instance of the GitHubClientSecret class. + /// + public GitHubClientSecret() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GitHubClientSecret class. + /// + /// Bring your own app client secret AKV + /// URL. + /// Bring your own app client secret name + /// in AKV. + public GitHubClientSecret(string byoaSecretAkvUrl = default(string), string byoaSecretName = default(string)) + { + ByoaSecretAkvUrl = byoaSecretAkvUrl; + ByoaSecretName = byoaSecretName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets bring your own app client secret AKV URL. + /// + [JsonProperty(PropertyName = "byoaSecretAkvUrl")] + public string ByoaSecretAkvUrl { get; set; } + + /// + /// Gets or sets bring your own app client secret name in AKV. + /// + [JsonProperty(PropertyName = "byoaSecretName")] + public string ByoaSecretName { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GlobalParameterResource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GlobalParameterResource.cs new file mode 100644 index 000000000000..0040326aeabb --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GlobalParameterResource.cs @@ -0,0 +1,83 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Global parameters resource type. + /// + public partial class GlobalParameterResource : SubResource + { + /// + /// Initializes a new instance of the GlobalParameterResource class. + /// + public GlobalParameterResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GlobalParameterResource class. + /// + /// Properties of the global + /// parameter. + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + public GlobalParameterResource(IDictionary properties, string id = default(string), string name = default(string), string type = default(string), string etag = default(string)) + : base(id, name, type, etag) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets properties of the global parameter. + /// + [JsonProperty(PropertyName = "properties")] + public IDictionary Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + if (Properties != null) + { + foreach (var valueElement in Properties.Values) + { + if (valueElement != null) + { + valueElement.Validate(); + } + } + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GlobalParameterSpecification.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GlobalParameterSpecification.cs new file mode 100644 index 000000000000..ee56776881c9 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GlobalParameterSpecification.cs @@ -0,0 +1,81 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Definition of a single parameter for an entity. + /// + public partial class GlobalParameterSpecification + { + /// + /// Initializes a new instance of the GlobalParameterSpecification + /// class. + /// + public GlobalParameterSpecification() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GlobalParameterSpecification + /// class. + /// + /// Global Parameter type. Possible values include: + /// 'Object', 'String', 'Int', 'Float', 'Bool', 'Array' + /// Value of parameter. + public GlobalParameterSpecification(string type, object value) + { + Type = type; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets global Parameter type. Possible values include: + /// 'Object', 'String', 'Int', 'Float', 'Bool', 'Array' + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets value of parameter. + /// + [JsonProperty(PropertyName = "value")] + public object Value { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + if (Value == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Value"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GlobalParameterType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GlobalParameterType.cs new file mode 100644 index 000000000000..2c6c78eb35be --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GlobalParameterType.cs @@ -0,0 +1,26 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for GlobalParameterType. + /// + public static class GlobalParameterType + { + public const string Object = "Object"; + public const string String = "String"; + public const string Int = "Int"; + public const string Float = "Float"; + public const string Bool = "Bool"; + public const string Array = "Array"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleAdWordsAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleAdWordsAuthenticationType.cs new file mode 100644 index 000000000000..5570fbd42a49 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleAdWordsAuthenticationType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for GoogleAdWordsAuthenticationType. + /// + public static class GoogleAdWordsAuthenticationType + { + public const string ServiceAuthentication = "ServiceAuthentication"; + public const string UserAuthentication = "UserAuthentication"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleAdWordsLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleAdWordsLinkedService.cs new file mode 100644 index 000000000000..03f2a20eedff --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleAdWordsLinkedService.cs @@ -0,0 +1,273 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Google AdWords service linked service. + /// + [Newtonsoft.Json.JsonObject("GoogleAdWords")] + [Rest.Serialization.JsonTransformation] + public partial class GoogleAdWordsLinkedService : LinkedService + { + /// + /// Initializes a new instance of the GoogleAdWordsLinkedService class. + /// + public GoogleAdWordsLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GoogleAdWordsLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// (Deprecated) Properties used to + /// connect to GoogleAds. It is mutually exclusive with any other + /// properties in the linked service. Type: object. + /// The Client customer ID of the + /// AdWords account that you want to fetch report data for. Type: + /// string (or Expression with resultType string). + /// The developer token associated with + /// the manager account that you use to grant access to the AdWords + /// API. + /// The OAuth 2.0 authentication + /// mechanism used for authentication. ServiceAuthentication can only + /// be used on self-hosted IR. Possible values include: + /// 'ServiceAuthentication', 'UserAuthentication' + /// The refresh token obtained from Google + /// for authorizing access to AdWords for UserAuthentication. + /// The client id of the google application used + /// to acquire the refresh token. Type: string (or Expression with + /// resultType string). + /// The client secret of the google + /// application used to acquire the refresh token. + /// The service account email ID that is used for + /// ServiceAuthentication and can only be used on self-hosted IR. Type: + /// string (or Expression with resultType string). + /// (Deprecated) The full path to the .p12 + /// key file that is used to authenticate the service account email + /// address and can only be used on self-hosted IR. Type: string (or + /// Expression with resultType string). + /// (Deprecated) The full path of the + /// .pem file containing trusted CA certificates for verifying the + /// server when connecting over SSL. This property can only be set when + /// using SSL on self-hosted IR. The default value is the cacerts.pem + /// file installed with the IR. Type: string (or Expression with + /// resultType string). + /// (Deprecated) Specifies whether to + /// use a CA certificate from the system trust store or from a + /// specified PEM file. The default value is false. Type: boolean (or + /// Expression with resultType boolean). + /// The private key that is used to + /// authenticate the service account email address and can only be used + /// on self-hosted IR. + /// The customer ID of the Google Ads + /// Manager account through which you want to fetch report data of + /// specific Customer. Type: string (or Expression with resultType + /// string). + /// The Google Ads API major version + /// such as v14. The supported major versions could be found on + /// https://developers.google.com/google-ads/api/docs/release-notes. + /// Type: string (or Expression with resultType string). + /// Specifies whether to use the + /// legacy data type mappings, which maps float, int32 and int64 from + /// Google to string. Do not set this to true unless you want to keep + /// backward compatibility with legacy driver's data type mappings. + /// Type: boolean (or Expression with resultType boolean). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public GoogleAdWordsLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object connectionProperties = default(object), object clientCustomerID = default(object), SecretBase developerToken = default(SecretBase), string authenticationType = default(string), SecretBase refreshToken = default(SecretBase), object clientId = default(object), SecretBase clientSecret = default(SecretBase), object email = default(object), object keyFilePath = default(object), object trustedCertPath = default(object), object useSystemTrustStore = default(object), SecretBase privateKey = default(SecretBase), object loginCustomerID = default(object), object googleAdsApiVersion = default(object), object supportLegacyDataTypes = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionProperties = connectionProperties; + ClientCustomerID = clientCustomerID; + DeveloperToken = developerToken; + AuthenticationType = authenticationType; + RefreshToken = refreshToken; + ClientId = clientId; + ClientSecret = clientSecret; + Email = email; + KeyFilePath = keyFilePath; + TrustedCertPath = trustedCertPath; + UseSystemTrustStore = useSystemTrustStore; + PrivateKey = privateKey; + LoginCustomerID = loginCustomerID; + GoogleAdsApiVersion = googleAdsApiVersion; + SupportLegacyDataTypes = supportLegacyDataTypes; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets (Deprecated) Properties used to connect to GoogleAds. + /// It is mutually exclusive with any other properties in the linked + /// service. Type: object. + /// + [JsonProperty(PropertyName = "typeProperties.connectionProperties")] + public object ConnectionProperties { get; set; } + + /// + /// Gets or sets the Client customer ID of the AdWords account that you + /// want to fetch report data for. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.clientCustomerID")] + public object ClientCustomerID { get; set; } + + /// + /// Gets or sets the developer token associated with the manager + /// account that you use to grant access to the AdWords API. + /// + [JsonProperty(PropertyName = "typeProperties.developerToken")] + public SecretBase DeveloperToken { get; set; } + + /// + /// Gets or sets the OAuth 2.0 authentication mechanism used for + /// authentication. ServiceAuthentication can only be used on + /// self-hosted IR. Possible values include: 'ServiceAuthentication', + /// 'UserAuthentication' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets the refresh token obtained from Google for authorizing + /// access to AdWords for UserAuthentication. + /// + [JsonProperty(PropertyName = "typeProperties.refreshToken")] + public SecretBase RefreshToken { get; set; } + + /// + /// Gets or sets the client id of the google application used to + /// acquire the refresh token. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.clientId")] + public object ClientId { get; set; } + + /// + /// Gets or sets the client secret of the google application used to + /// acquire the refresh token. + /// + [JsonProperty(PropertyName = "typeProperties.clientSecret")] + public SecretBase ClientSecret { get; set; } + + /// + /// Gets or sets the service account email ID that is used for + /// ServiceAuthentication and can only be used on self-hosted IR. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.email")] + public object Email { get; set; } + + /// + /// Gets or sets (Deprecated) The full path to the .p12 key file that + /// is used to authenticate the service account email address and can + /// only be used on self-hosted IR. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.keyFilePath")] + public object KeyFilePath { get; set; } + + /// + /// Gets or sets (Deprecated) The full path of the .pem file containing + /// trusted CA certificates for verifying the server when connecting + /// over SSL. This property can only be set when using SSL on + /// self-hosted IR. The default value is the cacerts.pem file installed + /// with the IR. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.trustedCertPath")] + public object TrustedCertPath { get; set; } + + /// + /// Gets or sets (Deprecated) Specifies whether to use a CA certificate + /// from the system trust store or from a specified PEM file. The + /// default value is false. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.useSystemTrustStore")] + public object UseSystemTrustStore { get; set; } + + /// + /// Gets or sets the private key that is used to authenticate the + /// service account email address and can only be used on self-hosted + /// IR. + /// + [JsonProperty(PropertyName = "typeProperties.privateKey")] + public SecretBase PrivateKey { get; set; } + + /// + /// Gets or sets the customer ID of the Google Ads Manager account + /// through which you want to fetch report data of specific Customer. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.loginCustomerID")] + public object LoginCustomerID { get; set; } + + /// + /// Gets or sets the Google Ads API major version such as v14. The + /// supported major versions could be found on + /// https://developers.google.com/google-ads/api/docs/release-notes. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.googleAdsApiVersion")] + public object GoogleAdsApiVersion { get; set; } + + /// + /// Gets or sets specifies whether to use the legacy data type + /// mappings, which maps float, int32 and int64 from Google to string. + /// Do not set this to true unless you want to keep backward + /// compatibility with legacy driver's data type mappings. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.supportLegacyDataTypes")] + public object SupportLegacyDataTypes { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleAdWordsObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleAdWordsObjectDataset.cs new file mode 100644 index 000000000000..b5a8e78fc785 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleAdWordsObjectDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Google AdWords service dataset. + /// + [Newtonsoft.Json.JsonObject("GoogleAdWordsObject")] + [Rest.Serialization.JsonTransformation] + public partial class GoogleAdWordsObjectDataset : Dataset + { + /// + /// Initializes a new instance of the GoogleAdWordsObjectDataset class. + /// + public GoogleAdWordsObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the GoogleAdWordsObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name. Type: string (or Expression + /// with resultType string). + public GoogleAdWordsObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleAdWordsSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleAdWordsSource.cs new file mode 100644 index 000000000000..c63f5505b4e4 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleAdWordsSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Google AdWords service source. + /// + public partial class GoogleAdWordsSource : TabularSource + { + /// + /// Initializes a new instance of the GoogleAdWordsSource class. + /// + public GoogleAdWordsSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GoogleAdWordsSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public GoogleAdWordsSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleBigQueryAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleBigQueryAuthenticationType.cs new file mode 100644 index 000000000000..424d911cfc15 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleBigQueryAuthenticationType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for GoogleBigQueryAuthenticationType. + /// + public static class GoogleBigQueryAuthenticationType + { + public const string ServiceAuthentication = "ServiceAuthentication"; + public const string UserAuthentication = "UserAuthentication"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleBigQueryLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleBigQueryLinkedService.cs new file mode 100644 index 000000000000..97a5997ec193 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleBigQueryLinkedService.cs @@ -0,0 +1,230 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Google BigQuery service linked service. + /// + [Newtonsoft.Json.JsonObject("GoogleBigQuery")] + [Rest.Serialization.JsonTransformation] + public partial class GoogleBigQueryLinkedService : LinkedService + { + /// + /// Initializes a new instance of the GoogleBigQueryLinkedService + /// class. + /// + public GoogleBigQueryLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GoogleBigQueryLinkedService + /// class. + /// + /// The default BigQuery project to query + /// against. Type: string (or Expression with resultType + /// string). + /// The OAuth 2.0 authentication + /// mechanism used for authentication. ServiceAuthentication can only + /// be used on self-hosted IR. Possible values include: + /// 'ServiceAuthentication', 'UserAuthentication' + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// A comma-separated list of public + /// BigQuery projects to access. Type: string (or Expression with + /// resultType string). + /// Whether to request access to + /// Google Drive. Allowing Google Drive access enables support for + /// federated tables that combine BigQuery data with data from Google + /// Drive. The default value is false. Type: string (or Expression with + /// resultType string). + /// The refresh token obtained from Google + /// for authorizing access to BigQuery for UserAuthentication. + /// The client id of the google application used + /// to acquire the refresh token. Type: string (or Expression with + /// resultType string). + /// The client secret of the google + /// application used to acquire the refresh token. + /// The service account email ID that is used for + /// ServiceAuthentication and can only be used on self-hosted IR. Type: + /// string (or Expression with resultType string). + /// The full path to the .p12 key file that + /// is used to authenticate the service account email address and can + /// only be used on self-hosted IR. Type: string (or Expression with + /// resultType string). + /// The full path of the .pem file + /// containing trusted CA certificates for verifying the server when + /// connecting over SSL. This property can only be set when using SSL + /// on self-hosted IR. The default value is the cacerts.pem file + /// installed with the IR. Type: string (or Expression with resultType + /// string). + /// Specifies whether to use a CA + /// certificate from the system trust store or from a specified PEM + /// file. The default value is false.Type: boolean (or Expression with + /// resultType boolean). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public GoogleBigQueryLinkedService(object project, string authenticationType, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object additionalProjects = default(object), object requestGoogleDriveScope = default(object), SecretBase refreshToken = default(SecretBase), object clientId = default(object), SecretBase clientSecret = default(SecretBase), object email = default(object), object keyFilePath = default(object), object trustedCertPath = default(object), object useSystemTrustStore = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Project = project; + AdditionalProjects = additionalProjects; + RequestGoogleDriveScope = requestGoogleDriveScope; + AuthenticationType = authenticationType; + RefreshToken = refreshToken; + ClientId = clientId; + ClientSecret = clientSecret; + Email = email; + KeyFilePath = keyFilePath; + TrustedCertPath = trustedCertPath; + UseSystemTrustStore = useSystemTrustStore; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the default BigQuery project to query against. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.project")] + public object Project { get; set; } + + /// + /// Gets or sets a comma-separated list of public BigQuery projects to + /// access. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.additionalProjects")] + public object AdditionalProjects { get; set; } + + /// + /// Gets or sets whether to request access to Google Drive. Allowing + /// Google Drive access enables support for federated tables that + /// combine BigQuery data with data from Google Drive. The default + /// value is false. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.requestGoogleDriveScope")] + public object RequestGoogleDriveScope { get; set; } + + /// + /// Gets or sets the OAuth 2.0 authentication mechanism used for + /// authentication. ServiceAuthentication can only be used on + /// self-hosted IR. Possible values include: 'ServiceAuthentication', + /// 'UserAuthentication' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets the refresh token obtained from Google for authorizing + /// access to BigQuery for UserAuthentication. + /// + [JsonProperty(PropertyName = "typeProperties.refreshToken")] + public SecretBase RefreshToken { get; set; } + + /// + /// Gets or sets the client id of the google application used to + /// acquire the refresh token. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.clientId")] + public object ClientId { get; set; } + + /// + /// Gets or sets the client secret of the google application used to + /// acquire the refresh token. + /// + [JsonProperty(PropertyName = "typeProperties.clientSecret")] + public SecretBase ClientSecret { get; set; } + + /// + /// Gets or sets the service account email ID that is used for + /// ServiceAuthentication and can only be used on self-hosted IR. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.email")] + public object Email { get; set; } + + /// + /// Gets or sets the full path to the .p12 key file that is used to + /// authenticate the service account email address and can only be used + /// on self-hosted IR. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.keyFilePath")] + public object KeyFilePath { get; set; } + + /// + /// Gets or sets the full path of the .pem file containing trusted CA + /// certificates for verifying the server when connecting over SSL. + /// This property can only be set when using SSL on self-hosted IR. The + /// default value is the cacerts.pem file installed with the IR. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.trustedCertPath")] + public object TrustedCertPath { get; set; } + + /// + /// Gets or sets specifies whether to use a CA certificate from the + /// system trust store or from a specified PEM file. The default value + /// is false.Type: boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.useSystemTrustStore")] + public object UseSystemTrustStore { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Project == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Project"); + } + if (AuthenticationType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AuthenticationType"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleBigQueryObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleBigQueryObjectDataset.cs new file mode 100644 index 000000000000..aec9d067109c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleBigQueryObjectDataset.cs @@ -0,0 +1,108 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Google BigQuery service dataset. + /// + [Newtonsoft.Json.JsonObject("GoogleBigQueryObject")] + [Rest.Serialization.JsonTransformation] + public partial class GoogleBigQueryObjectDataset : Dataset + { + /// + /// Initializes a new instance of the GoogleBigQueryObjectDataset + /// class. + /// + public GoogleBigQueryObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the GoogleBigQueryObjectDataset + /// class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// This property will be retired. Please + /// consider using database + table properties instead. + /// The table name of the Google BigQuery. Type: + /// string (or Expression with resultType string). + /// The database name of the Google BigQuery. + /// Type: string (or Expression with resultType string). + public GoogleBigQueryObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object), object table = default(object), object dataset = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + Table = table; + Dataset = dataset; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property will be retired. Please consider using + /// database + table properties instead. + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Gets or sets the table name of the Google BigQuery. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Gets or sets the database name of the Google BigQuery. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.dataset")] + public object Dataset { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleBigQuerySource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleBigQuerySource.cs new file mode 100644 index 000000000000..4f492f40a276 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleBigQuerySource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Google BigQuery service source. + /// + public partial class GoogleBigQuerySource : TabularSource + { + /// + /// Initializes a new instance of the GoogleBigQuerySource class. + /// + public GoogleBigQuerySource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GoogleBigQuerySource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public GoogleBigQuerySource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleBigQueryV2AuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleBigQueryV2AuthenticationType.cs new file mode 100644 index 000000000000..29e04cab3d9f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleBigQueryV2AuthenticationType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for GoogleBigQueryV2AuthenticationType. + /// + public static class GoogleBigQueryV2AuthenticationType + { + public const string ServiceAuthentication = "ServiceAuthentication"; + public const string UserAuthentication = "UserAuthentication"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleBigQueryV2LinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleBigQueryV2LinkedService.cs new file mode 100644 index 000000000000..df61a1a78069 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleBigQueryV2LinkedService.cs @@ -0,0 +1,157 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Google BigQuery service linked service. + /// + [Newtonsoft.Json.JsonObject("GoogleBigQueryV2")] + [Rest.Serialization.JsonTransformation] + public partial class GoogleBigQueryV2LinkedService : LinkedService + { + /// + /// Initializes a new instance of the GoogleBigQueryV2LinkedService + /// class. + /// + public GoogleBigQueryV2LinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GoogleBigQueryV2LinkedService + /// class. + /// + /// The default BigQuery project id to query + /// against. Type: string (or Expression with resultType + /// string). + /// The OAuth 2.0 authentication + /// mechanism used for authentication. Possible values include: + /// 'ServiceAuthentication', 'UserAuthentication' + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The client id of the google application used + /// to acquire the refresh token. Type: string (or Expression with + /// resultType string). + /// The client secret of the google + /// application used to acquire the refresh token. + /// The refresh token obtained from Google + /// for authorizing access to BigQuery for UserAuthentication. + /// The content of the .json key file that + /// is used to authenticate the service account. Type: string (or + /// Expression with resultType string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public GoogleBigQueryV2LinkedService(object projectId, string authenticationType, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object clientId = default(object), SecretBase clientSecret = default(SecretBase), SecretBase refreshToken = default(SecretBase), SecretBase keyFileContent = default(SecretBase), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ProjectId = projectId; + AuthenticationType = authenticationType; + ClientId = clientId; + ClientSecret = clientSecret; + RefreshToken = refreshToken; + KeyFileContent = keyFileContent; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the default BigQuery project id to query against. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.projectId")] + public object ProjectId { get; set; } + + /// + /// Gets or sets the OAuth 2.0 authentication mechanism used for + /// authentication. Possible values include: 'ServiceAuthentication', + /// 'UserAuthentication' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets the client id of the google application used to + /// acquire the refresh token. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.clientId")] + public object ClientId { get; set; } + + /// + /// Gets or sets the client secret of the google application used to + /// acquire the refresh token. + /// + [JsonProperty(PropertyName = "typeProperties.clientSecret")] + public SecretBase ClientSecret { get; set; } + + /// + /// Gets or sets the refresh token obtained from Google for authorizing + /// access to BigQuery for UserAuthentication. + /// + [JsonProperty(PropertyName = "typeProperties.refreshToken")] + public SecretBase RefreshToken { get; set; } + + /// + /// Gets or sets the content of the .json key file that is used to + /// authenticate the service account. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.keyFileContent")] + public SecretBase KeyFileContent { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ProjectId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ProjectId"); + } + if (AuthenticationType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AuthenticationType"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleBigQueryV2ObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleBigQueryV2ObjectDataset.cs new file mode 100644 index 000000000000..ca962ba5094a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleBigQueryV2ObjectDataset.cs @@ -0,0 +1,98 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Google BigQuery service dataset. + /// + [Newtonsoft.Json.JsonObject("GoogleBigQueryV2Object")] + [Rest.Serialization.JsonTransformation] + public partial class GoogleBigQueryV2ObjectDataset : Dataset + { + /// + /// Initializes a new instance of the GoogleBigQueryV2ObjectDataset + /// class. + /// + public GoogleBigQueryV2ObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the GoogleBigQueryV2ObjectDataset + /// class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name of the Google BigQuery. Type: + /// string (or Expression with resultType string). + /// The database name of the Google BigQuery. + /// Type: string (or Expression with resultType string). + public GoogleBigQueryV2ObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object table = default(object), object dataset = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Table = table; + Dataset = dataset; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name of the Google BigQuery. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Gets or sets the database name of the Google BigQuery. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.dataset")] + public object Dataset { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleBigQueryV2Source.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleBigQueryV2Source.cs new file mode 100644 index 000000000000..42bb38ab34b3 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleBigQueryV2Source.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Google BigQuery service source. + /// + public partial class GoogleBigQueryV2Source : TabularSource + { + /// + /// Initializes a new instance of the GoogleBigQueryV2Source class. + /// + public GoogleBigQueryV2Source() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GoogleBigQueryV2Source class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public GoogleBigQueryV2Source(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleCloudStorageLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleCloudStorageLinkedService.cs new file mode 100644 index 000000000000..90f029411e4b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleCloudStorageLinkedService.cs @@ -0,0 +1,120 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for Google Cloud Storage. + /// + [Newtonsoft.Json.JsonObject("GoogleCloudStorage")] + [Rest.Serialization.JsonTransformation] + public partial class GoogleCloudStorageLinkedService : LinkedService + { + /// + /// Initializes a new instance of the GoogleCloudStorageLinkedService + /// class. + /// + public GoogleCloudStorageLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GoogleCloudStorageLinkedService + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The access key identifier of the Google + /// Cloud Storage Identity and Access Management (IAM) user. Type: + /// string (or Expression with resultType string). + /// The secret access key of the Google + /// Cloud Storage Identity and Access Management (IAM) user. + /// This value specifies the endpoint to + /// access with the Google Cloud Storage Connector. This is an optional + /// property; change it only if you want to try a different service + /// endpoint or want to switch between https and http. Type: string (or + /// Expression with resultType string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public GoogleCloudStorageLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object accessKeyId = default(object), SecretBase secretAccessKey = default(SecretBase), object serviceUrl = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + AccessKeyId = accessKeyId; + SecretAccessKey = secretAccessKey; + ServiceUrl = serviceUrl; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the access key identifier of the Google Cloud Storage + /// Identity and Access Management (IAM) user. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.accessKeyId")] + public object AccessKeyId { get; set; } + + /// + /// Gets or sets the secret access key of the Google Cloud Storage + /// Identity and Access Management (IAM) user. + /// + [JsonProperty(PropertyName = "typeProperties.secretAccessKey")] + public SecretBase SecretAccessKey { get; set; } + + /// + /// Gets or sets this value specifies the endpoint to access with the + /// Google Cloud Storage Connector. This is an optional property; + /// change it only if you want to try a different service endpoint or + /// want to switch between https and http. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.serviceUrl")] + public object ServiceUrl { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleCloudStorageLocation.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleCloudStorageLocation.cs new file mode 100644 index 000000000000..ea04ad299b74 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleCloudStorageLocation.cs @@ -0,0 +1,73 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The location of Google Cloud Storage dataset. + /// + public partial class GoogleCloudStorageLocation : DatasetLocation + { + /// + /// Initializes a new instance of the GoogleCloudStorageLocation class. + /// + public GoogleCloudStorageLocation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GoogleCloudStorageLocation class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Specify the folder path of dataset. Type: + /// string (or Expression with resultType string) + /// Specify the file name of dataset. Type: + /// string (or Expression with resultType string). + /// Specify the bucketName of Google Cloud + /// Storage. Type: string (or Expression with resultType + /// string) + /// Specify the version of Google Cloud Storage. + /// Type: string (or Expression with resultType string). + public GoogleCloudStorageLocation(IDictionary additionalProperties = default(IDictionary), object folderPath = default(object), object fileName = default(object), object bucketName = default(object), object version = default(object)) + : base(additionalProperties, folderPath, fileName) + { + BucketName = bucketName; + Version = version; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specify the bucketName of Google Cloud Storage. Type: + /// string (or Expression with resultType string) + /// + [JsonProperty(PropertyName = "bucketName")] + public object BucketName { get; set; } + + /// + /// Gets or sets specify the version of Google Cloud Storage. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "version")] + public object Version { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleCloudStorageReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleCloudStorageReadSettings.cs new file mode 100644 index 000000000000..a98d6447c8af --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleCloudStorageReadSettings.cs @@ -0,0 +1,171 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Google Cloud Storage read settings. + /// + public partial class GoogleCloudStorageReadSettings : StoreReadSettings + { + /// + /// Initializes a new instance of the GoogleCloudStorageReadSettings + /// class. + /// + public GoogleCloudStorageReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GoogleCloudStorageReadSettings + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// If true, files under the folder path will + /// be read recursively. Default is true. Type: boolean (or Expression + /// with resultType boolean). + /// Google Cloud Storage + /// wildcardFolderPath. Type: string (or Expression with resultType + /// string). + /// Google Cloud Storage + /// wildcardFileName. Type: string (or Expression with resultType + /// string). + /// The prefix filter for the Google Cloud Storage + /// object name. Type: string (or Expression with resultType + /// string). + /// Point to a text file that lists each + /// file (relative path to the path configured in the dataset) that you + /// want to copy. Type: string (or Expression with resultType + /// string). + /// Indicates whether to enable + /// partition discovery. Type: boolean (or Expression with resultType + /// boolean). + /// Specify the root path where + /// partition discovery starts from. Type: string (or Expression with + /// resultType string). + /// Indicates whether the + /// source files need to be deleted after copy completion. Default is + /// false. Type: boolean (or Expression with resultType + /// boolean). + /// The start of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + /// The end of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + public GoogleCloudStorageReadSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object recursive = default(object), object wildcardFolderPath = default(object), object wildcardFileName = default(object), object prefix = default(object), object fileListPath = default(object), object enablePartitionDiscovery = default(object), object partitionRootPath = default(object), object deleteFilesAfterCompletion = default(object), object modifiedDatetimeStart = default(object), object modifiedDatetimeEnd = default(object)) + : base(additionalProperties, maxConcurrentConnections, disableMetricsCollection) + { + Recursive = recursive; + WildcardFolderPath = wildcardFolderPath; + WildcardFileName = wildcardFileName; + Prefix = prefix; + FileListPath = fileListPath; + EnablePartitionDiscovery = enablePartitionDiscovery; + PartitionRootPath = partitionRootPath; + DeleteFilesAfterCompletion = deleteFilesAfterCompletion; + ModifiedDatetimeStart = modifiedDatetimeStart; + ModifiedDatetimeEnd = modifiedDatetimeEnd; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets if true, files under the folder path will be read + /// recursively. Default is true. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "recursive")] + public object Recursive { get; set; } + + /// + /// Gets or sets google Cloud Storage wildcardFolderPath. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFolderPath")] + public object WildcardFolderPath { get; set; } + + /// + /// Gets or sets google Cloud Storage wildcardFileName. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFileName")] + public object WildcardFileName { get; set; } + + /// + /// Gets or sets the prefix filter for the Google Cloud Storage object + /// name. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "prefix")] + public object Prefix { get; set; } + + /// + /// Gets or sets point to a text file that lists each file (relative + /// path to the path configured in the dataset) that you want to copy. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "fileListPath")] + public object FileListPath { get; set; } + + /// + /// Gets or sets indicates whether to enable partition discovery. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "enablePartitionDiscovery")] + public object EnablePartitionDiscovery { get; set; } + + /// + /// Gets or sets specify the root path where partition discovery starts + /// from. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionRootPath")] + public object PartitionRootPath { get; set; } + + /// + /// Gets or sets indicates whether the source files need to be deleted + /// after copy completion. Default is false. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "deleteFilesAfterCompletion")] + public object DeleteFilesAfterCompletion { get; set; } + + /// + /// Gets or sets the start of file's modified datetime. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "modifiedDatetimeStart")] + public object ModifiedDatetimeStart { get; set; } + + /// + /// Gets or sets the end of file's modified datetime. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "modifiedDatetimeEnd")] + public object ModifiedDatetimeEnd { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleSheetsLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleSheetsLinkedService.cs new file mode 100644 index 000000000000..436a1e2c60ff --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GoogleSheetsLinkedService.cs @@ -0,0 +1,93 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for GoogleSheets. + /// + [Newtonsoft.Json.JsonObject("GoogleSheets")] + [Rest.Serialization.JsonTransformation] + public partial class GoogleSheetsLinkedService : LinkedService + { + /// + /// Initializes a new instance of the GoogleSheetsLinkedService class. + /// + public GoogleSheetsLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GoogleSheetsLinkedService class. + /// + /// The api token for the GoogleSheets + /// source. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public GoogleSheetsLinkedService(SecretBase apiToken, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ApiToken = apiToken; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the api token for the GoogleSheets source. + /// + [JsonProperty(PropertyName = "typeProperties.apiToken")] + public SecretBase ApiToken { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ApiToken == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ApiToken"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GreenplumLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GreenplumLinkedService.cs new file mode 100644 index 000000000000..08f2c5da7b37 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GreenplumLinkedService.cs @@ -0,0 +1,104 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Greenplum Database linked service. + /// + [Newtonsoft.Json.JsonObject("Greenplum")] + [Rest.Serialization.JsonTransformation] + public partial class GreenplumLinkedService : LinkedService + { + /// + /// Initializes a new instance of the GreenplumLinkedService class. + /// + public GreenplumLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GreenplumLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// An ODBC connection string. Type: + /// string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of password + /// in connection string. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public GreenplumLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object connectionString = default(object), AzureKeyVaultSecretReference pwd = default(AzureKeyVaultSecretReference), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionString = connectionString; + Pwd = pwd; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets an ODBC connection string. Type: string, SecureString + /// or AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of password in + /// connection string. + /// + [JsonProperty(PropertyName = "typeProperties.pwd")] + public AzureKeyVaultSecretReference Pwd { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Pwd != null) + { + Pwd.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GreenplumSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GreenplumSource.cs new file mode 100644 index 000000000000..a11ac5c141a5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GreenplumSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Greenplum Database source. + /// + public partial class GreenplumSource : TabularSource + { + /// + /// Initializes a new instance of the GreenplumSource class. + /// + public GreenplumSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GreenplumSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public GreenplumSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GreenplumTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GreenplumTableDataset.cs new file mode 100644 index 000000000000..542f6bd43eb5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GreenplumTableDataset.cs @@ -0,0 +1,107 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Greenplum Database dataset. + /// + [Newtonsoft.Json.JsonObject("GreenplumTable")] + [Rest.Serialization.JsonTransformation] + public partial class GreenplumTableDataset : Dataset + { + /// + /// Initializes a new instance of the GreenplumTableDataset class. + /// + public GreenplumTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the GreenplumTableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// This property will be retired. Please + /// consider using schema + table properties instead. + /// The table name of Greenplum. Type: string (or + /// Expression with resultType string). + /// The schema name of + /// Greenplum. Type: string (or Expression with resultType + /// string). + public GreenplumTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object), object table = default(object), object greenplumTableDatasetSchema = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + Table = table; + GreenplumTableDatasetSchema = greenplumTableDatasetSchema; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property will be retired. Please consider using + /// schema + table properties instead. + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Gets or sets the table name of Greenplum. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Gets or sets the schema name of Greenplum. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object GreenplumTableDatasetSchema { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HBaseAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HBaseAuthenticationType.cs new file mode 100644 index 000000000000..67523840e7b4 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HBaseAuthenticationType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for HBaseAuthenticationType. + /// + public static class HBaseAuthenticationType + { + public const string Anonymous = "Anonymous"; + public const string Basic = "Basic"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HBaseLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HBaseLinkedService.cs new file mode 100644 index 000000000000..caff8cfd943a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HBaseLinkedService.cs @@ -0,0 +1,196 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// HBase server linked service. + /// + [Newtonsoft.Json.JsonObject("HBase")] + [Rest.Serialization.JsonTransformation] + public partial class HBaseLinkedService : LinkedService + { + /// + /// Initializes a new instance of the HBaseLinkedService class. + /// + public HBaseLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HBaseLinkedService class. + /// + /// The IP address or host name of the HBase server. + /// (i.e. 192.168.222.160) + /// The authentication mechanism to + /// use to connect to the HBase server. Possible values include: + /// 'Anonymous', 'Basic' + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The TCP port that the HBase instance uses to + /// listen for client connections. The default value is 9090. + /// The partial URL corresponding to the HBase + /// server. (i.e. /gateway/sandbox/hbase/version) + /// The user name used to connect to the HBase + /// instance. + /// The password corresponding to the user + /// name. + /// Specifies whether the connections to the + /// server are encrypted using SSL. The default value is false. + /// The full path of the .pem file + /// containing trusted CA certificates for verifying the server when + /// connecting over SSL. This property can only be set when using SSL + /// on self-hosted IR. The default value is the cacerts.pem file + /// installed with the IR. + /// Specifies whether to require + /// a CA-issued SSL certificate name to match the host name of the + /// server when connecting over SSL. The default value is + /// false. + /// Specifies whether to allow + /// self-signed certificates from the server. The default value is + /// false. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public HBaseLinkedService(object host, string authenticationType, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object port = default(object), object httpPath = default(object), object username = default(object), SecretBase password = default(SecretBase), object enableSsl = default(object), object trustedCertPath = default(object), object allowHostNameCNMismatch = default(object), object allowSelfSignedServerCert = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Host = host; + Port = port; + HttpPath = httpPath; + AuthenticationType = authenticationType; + Username = username; + Password = password; + EnableSsl = enableSsl; + TrustedCertPath = trustedCertPath; + AllowHostNameCNMismatch = allowHostNameCNMismatch; + AllowSelfSignedServerCert = allowSelfSignedServerCert; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the IP address or host name of the HBase server. (i.e. + /// 192.168.222.160) + /// + [JsonProperty(PropertyName = "typeProperties.host")] + public object Host { get; set; } + + /// + /// Gets or sets the TCP port that the HBase instance uses to listen + /// for client connections. The default value is 9090. + /// + [JsonProperty(PropertyName = "typeProperties.port")] + public object Port { get; set; } + + /// + /// Gets or sets the partial URL corresponding to the HBase server. + /// (i.e. /gateway/sandbox/hbase/version) + /// + [JsonProperty(PropertyName = "typeProperties.httpPath")] + public object HttpPath { get; set; } + + /// + /// Gets or sets the authentication mechanism to use to connect to the + /// HBase server. Possible values include: 'Anonymous', 'Basic' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets the user name used to connect to the HBase instance. + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets the password corresponding to the user name. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets specifies whether the connections to the server are + /// encrypted using SSL. The default value is false. + /// + [JsonProperty(PropertyName = "typeProperties.enableSsl")] + public object EnableSsl { get; set; } + + /// + /// Gets or sets the full path of the .pem file containing trusted CA + /// certificates for verifying the server when connecting over SSL. + /// This property can only be set when using SSL on self-hosted IR. The + /// default value is the cacerts.pem file installed with the IR. + /// + [JsonProperty(PropertyName = "typeProperties.trustedCertPath")] + public object TrustedCertPath { get; set; } + + /// + /// Gets or sets specifies whether to require a CA-issued SSL + /// certificate name to match the host name of the server when + /// connecting over SSL. The default value is false. + /// + [JsonProperty(PropertyName = "typeProperties.allowHostNameCNMismatch")] + public object AllowHostNameCNMismatch { get; set; } + + /// + /// Gets or sets specifies whether to allow self-signed certificates + /// from the server. The default value is false. + /// + [JsonProperty(PropertyName = "typeProperties.allowSelfSignedServerCert")] + public object AllowSelfSignedServerCert { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Host == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Host"); + } + if (AuthenticationType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AuthenticationType"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HBaseObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HBaseObjectDataset.cs new file mode 100644 index 000000000000..9105803ab5dd --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HBaseObjectDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// HBase server dataset. + /// + [Newtonsoft.Json.JsonObject("HBaseObject")] + [Rest.Serialization.JsonTransformation] + public partial class HBaseObjectDataset : Dataset + { + /// + /// Initializes a new instance of the HBaseObjectDataset class. + /// + public HBaseObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the HBaseObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name. Type: string (or Expression + /// with resultType string). + public HBaseObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HBaseSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HBaseSource.cs new file mode 100644 index 000000000000..3b1d8a471a35 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HBaseSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity HBase server source. + /// + public partial class HBaseSource : TabularSource + { + /// + /// Initializes a new instance of the HBaseSource class. + /// + public HBaseSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HBaseSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public HBaseSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HDInsightActivityDebugInfoOption.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HDInsightActivityDebugInfoOption.cs new file mode 100644 index 000000000000..6b75439fb177 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HDInsightActivityDebugInfoOption.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for HDInsightActivityDebugInfoOption. + /// + public static class HDInsightActivityDebugInfoOption + { + public const string None = "None"; + public const string Always = "Always"; + public const string Failure = "Failure"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HDInsightHiveActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HDInsightHiveActivity.cs new file mode 100644 index 000000000000..2adca58641a5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HDInsightHiveActivity.cs @@ -0,0 +1,166 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// HDInsight Hive activity type. + /// + [Newtonsoft.Json.JsonObject("HDInsightHive")] + [Rest.Serialization.JsonTransformation] + public partial class HDInsightHiveActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the HDInsightHiveActivity class. + /// + public HDInsightHiveActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HDInsightHiveActivity class. + /// + /// Activity name. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// Storage linked service + /// references. + /// User specified arguments to + /// HDInsightActivity. + /// Debug info option. Possible values + /// include: 'None', 'Always', 'Failure' + /// Script path. Type: string (or Expression + /// with resultType string). + /// Script linked service + /// reference. + /// Allows user to specify defines for Hive job + /// request. + /// User specified arguments under hivevar + /// namespace. + /// Query timeout value (in minutes). + /// Effective when the HDInsight cluster is with ESP (Enterprise + /// Security Package) + public HDInsightHiveActivity(string name, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), IList storageLinkedServices = default(IList), IList arguments = default(IList), string getDebugInfo = default(string), object scriptPath = default(object), LinkedServiceReference scriptLinkedService = default(LinkedServiceReference), IDictionary defines = default(IDictionary), IDictionary variables = default(IDictionary), int? queryTimeout = default(int?)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + StorageLinkedServices = storageLinkedServices; + Arguments = arguments; + GetDebugInfo = getDebugInfo; + ScriptPath = scriptPath; + ScriptLinkedService = scriptLinkedService; + Defines = defines; + Variables = variables; + QueryTimeout = queryTimeout; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets storage linked service references. + /// + [JsonProperty(PropertyName = "typeProperties.storageLinkedServices")] + public IList StorageLinkedServices { get; set; } + + /// + /// Gets or sets user specified arguments to HDInsightActivity. + /// + [JsonProperty(PropertyName = "typeProperties.arguments")] + public IList Arguments { get; set; } + + /// + /// Gets or sets debug info option. Possible values include: 'None', + /// 'Always', 'Failure' + /// + [JsonProperty(PropertyName = "typeProperties.getDebugInfo")] + public string GetDebugInfo { get; set; } + + /// + /// Gets or sets script path. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.scriptPath")] + public object ScriptPath { get; set; } + + /// + /// Gets or sets script linked service reference. + /// + [JsonProperty(PropertyName = "typeProperties.scriptLinkedService")] + public LinkedServiceReference ScriptLinkedService { get; set; } + + /// + /// Gets or sets allows user to specify defines for Hive job request. + /// + [JsonProperty(PropertyName = "typeProperties.defines")] + public IDictionary Defines { get; set; } + + /// + /// Gets or sets user specified arguments under hivevar namespace. + /// + [JsonProperty(PropertyName = "typeProperties.variables")] + public IDictionary Variables { get; set; } + + /// + /// Gets or sets query timeout value (in minutes). Effective when the + /// HDInsight cluster is with ESP (Enterprise Security Package) + /// + [JsonProperty(PropertyName = "typeProperties.queryTimeout")] + public int? QueryTimeout { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (StorageLinkedServices != null) + { + foreach (var element in StorageLinkedServices) + { + if (element != null) + { + element.Validate(); + } + } + } + if (ScriptLinkedService != null) + { + ScriptLinkedService.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HDInsightLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HDInsightLinkedService.cs new file mode 100644 index 000000000000..da7268ee5fe4 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HDInsightLinkedService.cs @@ -0,0 +1,161 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// HDInsight linked service. + /// + [Newtonsoft.Json.JsonObject("HDInsight")] + [Rest.Serialization.JsonTransformation] + public partial class HDInsightLinkedService : LinkedService + { + /// + /// Initializes a new instance of the HDInsightLinkedService class. + /// + public HDInsightLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HDInsightLinkedService class. + /// + /// HDInsight cluster URI. Type: string (or + /// Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// HDInsight cluster user name. Type: string + /// (or Expression with resultType string). + /// HDInsight cluster password. + /// The Azure Storage linked service + /// reference. + /// A reference to the Azure + /// SQL linked service that points to the HCatalog database. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// Specify if the HDInsight is created with + /// ESP (Enterprise Security Package). Type: Boolean. + /// Specify the FileSystem if the main storage + /// for the HDInsight is ADLS Gen2. Type: string (or Expression with + /// resultType string). + public HDInsightLinkedService(object clusterUri, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object userName = default(object), SecretBase password = default(SecretBase), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), LinkedServiceReference hcatalogLinkedServiceName = default(LinkedServiceReference), string encryptedCredential = default(string), object isEspEnabled = default(object), object fileSystem = default(object)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ClusterUri = clusterUri; + UserName = userName; + Password = password; + LinkedServiceName = linkedServiceName; + HcatalogLinkedServiceName = hcatalogLinkedServiceName; + EncryptedCredential = encryptedCredential; + IsEspEnabled = isEspEnabled; + FileSystem = fileSystem; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets hDInsight cluster URI. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.clusterUri")] + public object ClusterUri { get; set; } + + /// + /// Gets or sets hDInsight cluster user name. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets hDInsight cluster password. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the Azure Storage linked service reference. + /// + [JsonProperty(PropertyName = "typeProperties.linkedServiceName")] + public LinkedServiceReference LinkedServiceName { get; set; } + + /// + /// Gets or sets a reference to the Azure SQL linked service that + /// points to the HCatalog database. + /// + [JsonProperty(PropertyName = "typeProperties.hcatalogLinkedServiceName")] + public LinkedServiceReference HcatalogLinkedServiceName { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets specify if the HDInsight is created with ESP + /// (Enterprise Security Package). Type: Boolean. + /// + [JsonProperty(PropertyName = "typeProperties.isEspEnabled")] + public object IsEspEnabled { get; set; } + + /// + /// Gets or sets specify the FileSystem if the main storage for the + /// HDInsight is ADLS Gen2. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.fileSystem")] + public object FileSystem { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ClusterUri == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ClusterUri"); + } + if (LinkedServiceName != null) + { + LinkedServiceName.Validate(); + } + if (HcatalogLinkedServiceName != null) + { + HcatalogLinkedServiceName.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HDInsightMapReduceActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HDInsightMapReduceActivity.cs new file mode 100644 index 000000000000..6242b5366f4c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HDInsightMapReduceActivity.cs @@ -0,0 +1,173 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// HDInsight MapReduce activity type. + /// + [Newtonsoft.Json.JsonObject("HDInsightMapReduce")] + [Rest.Serialization.JsonTransformation] + public partial class HDInsightMapReduceActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the HDInsightMapReduceActivity class. + /// + public HDInsightMapReduceActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HDInsightMapReduceActivity class. + /// + /// Activity name. + /// Class name. Type: string (or Expression + /// with resultType string). + /// Jar path. Type: string (or Expression + /// with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// Storage linked service + /// references. + /// User specified arguments to + /// HDInsightActivity. + /// Debug info option. Possible values + /// include: 'None', 'Always', 'Failure' + /// Jar linked service + /// reference. + /// Jar libs. + /// Allows user to specify defines for the + /// MapReduce job request. + public HDInsightMapReduceActivity(string name, object className, object jarFilePath, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), IList storageLinkedServices = default(IList), IList arguments = default(IList), string getDebugInfo = default(string), LinkedServiceReference jarLinkedService = default(LinkedServiceReference), IList jarLibs = default(IList), IDictionary defines = default(IDictionary)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + StorageLinkedServices = storageLinkedServices; + Arguments = arguments; + GetDebugInfo = getDebugInfo; + ClassName = className; + JarFilePath = jarFilePath; + JarLinkedService = jarLinkedService; + JarLibs = jarLibs; + Defines = defines; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets storage linked service references. + /// + [JsonProperty(PropertyName = "typeProperties.storageLinkedServices")] + public IList StorageLinkedServices { get; set; } + + /// + /// Gets or sets user specified arguments to HDInsightActivity. + /// + [JsonProperty(PropertyName = "typeProperties.arguments")] + public IList Arguments { get; set; } + + /// + /// Gets or sets debug info option. Possible values include: 'None', + /// 'Always', 'Failure' + /// + [JsonProperty(PropertyName = "typeProperties.getDebugInfo")] + public string GetDebugInfo { get; set; } + + /// + /// Gets or sets class name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.className")] + public object ClassName { get; set; } + + /// + /// Gets or sets jar path. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.jarFilePath")] + public object JarFilePath { get; set; } + + /// + /// Gets or sets jar linked service reference. + /// + [JsonProperty(PropertyName = "typeProperties.jarLinkedService")] + public LinkedServiceReference JarLinkedService { get; set; } + + /// + /// Gets or sets jar libs. + /// + [JsonProperty(PropertyName = "typeProperties.jarLibs")] + public IList JarLibs { get; set; } + + /// + /// Gets or sets allows user to specify defines for the MapReduce job + /// request. + /// + [JsonProperty(PropertyName = "typeProperties.defines")] + public IDictionary Defines { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ClassName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ClassName"); + } + if (JarFilePath == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "JarFilePath"); + } + if (StorageLinkedServices != null) + { + foreach (var element in StorageLinkedServices) + { + if (element != null) + { + element.Validate(); + } + } + } + if (JarLinkedService != null) + { + JarLinkedService.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HDInsightOnDemandLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HDInsightOnDemandLinkedService.cs new file mode 100644 index 000000000000..c13957def0cc --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HDInsightOnDemandLinkedService.cs @@ -0,0 +1,502 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// HDInsight ondemand linked service. + /// + [Newtonsoft.Json.JsonObject("HDInsightOnDemand")] + [Rest.Serialization.JsonTransformation] + public partial class HDInsightOnDemandLinkedService : LinkedService + { + /// + /// Initializes a new instance of the HDInsightOnDemandLinkedService + /// class. + /// + public HDInsightOnDemandLinkedService() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the HDInsightOnDemandLinkedService + /// class. + /// + /// Number of worker/data nodes in the + /// cluster. Suggestion value: 4. Type: int (or Expression with + /// resultType int). + /// The allowed idle time for the on-demand + /// HDInsight cluster. Specifies how long the on-demand HDInsight + /// cluster stays alive after completion of an activity run if there + /// are no other active jobs in the cluster. The minimum value is 5 + /// mins. Type: string (or Expression with resultType string). + /// Version of the + /// HDInsight cluster.  Type: string (or Expression with resultType + /// string). + /// Azure Storage linked service to be + /// used by the on-demand cluster for storing and processing + /// data. + /// The customer’s subscription to + /// host the cluster. Type: string (or Expression with resultType + /// string). + /// The Tenant id/name to which the service + /// principal belongs. Type: string (or Expression with resultType + /// string). + /// The resource group where the + /// cluster belongs. Type: string (or Expression with resultType + /// string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The service principal id for the + /// hostSubscriptionId. Type: string (or Expression with resultType + /// string). + /// The key for the service principal + /// id. + /// The prefix of cluster name, postfix + /// will be distinct with timestamp. Type: string (or Expression with + /// resultType string). + /// The username to access the cluster. + /// Type: string (or Expression with resultType string). + /// The password to access the + /// cluster. + /// The username to SSH remotely + /// connect to cluster’s node (for Linux). Type: string (or Expression + /// with resultType string). + /// The password to SSH remotely + /// connect cluster’s node (for Linux). + /// Specifies additional + /// storage accounts for the HDInsight linked service so that the Data + /// Factory service can register them on your behalf. + /// The name of Azure SQL + /// linked service that point to the HCatalog database. The on-demand + /// HDInsight cluster is created by using the Azure SQL database as the + /// metastore. + /// The cluster type. Type: string (or + /// Expression with resultType string). + /// The version of spark if the cluster type + /// is 'spark'. Type: string (or Expression with resultType + /// string). + /// Specifies the core configuration + /// parameters (as in core-site.xml) for the HDInsight cluster to be + /// created. + /// Specifies the HBase configuration + /// parameters (hbase-site.xml) for the HDInsight cluster. + /// Specifies the HDFS configuration + /// parameters (hdfs-site.xml) for the HDInsight cluster. + /// Specifies the hive configuration + /// parameters (hive-site.xml) for the HDInsight cluster. + /// Specifies the MapReduce + /// configuration parameters (mapred-site.xml) for the HDInsight + /// cluster. + /// Specifies the Oozie configuration + /// parameters (oozie-site.xml) for the HDInsight cluster. + /// Specifies the Storm configuration + /// parameters (storm-site.xml) for the HDInsight cluster. + /// Specifies the Yarn configuration + /// parameters (yarn-site.xml) for the HDInsight cluster. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// Specifies the size of the head node for + /// the HDInsight cluster. + /// Specifies the size of the data node for + /// the HDInsight cluster. + /// Specifies the size of the Zoo + /// Keeper node for the HDInsight cluster. + /// Custom script actions to run on HDI + /// ondemand cluster once it's up. Please refer to + /// https://docs.microsoft.com/en-us/azure/hdinsight/hdinsight-hadoop-customize-cluster-linux?toc=%2Fen-us%2Fazure%2Fhdinsight%2Fr-server%2FTOC.json&bc=%2Fen-us%2Fazure%2Fbread%2Ftoc.json#understanding-script-actions. + /// The ARM resource ID for the vNet to + /// which the cluster should be joined after creation. Type: string (or + /// Expression with resultType string). + /// The ARM resource ID for the subnet in the + /// vNet. If virtualNetworkId was specified, then this property is + /// required. Type: string (or Expression with resultType + /// string). + /// The credential reference containing + /// authentication information. + public HDInsightOnDemandLinkedService(object clusterSize, object timeToLive, object hDInsightOnDemandLinkedServiceVersion, LinkedServiceReference linkedServiceName, object hostSubscriptionId, object tenant, object clusterResourceGroup, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object servicePrincipalId = default(object), SecretBase servicePrincipalKey = default(SecretBase), object clusterNamePrefix = default(object), object clusterUserName = default(object), SecretBase clusterPassword = default(SecretBase), object clusterSshUserName = default(object), SecretBase clusterSshPassword = default(SecretBase), IList additionalLinkedServiceNames = default(IList), LinkedServiceReference hcatalogLinkedServiceName = default(LinkedServiceReference), object clusterType = default(object), object sparkVersion = default(object), object coreConfiguration = default(object), object hBaseConfiguration = default(object), object hdfsConfiguration = default(object), object hiveConfiguration = default(object), object mapReduceConfiguration = default(object), object oozieConfiguration = default(object), object stormConfiguration = default(object), object yarnConfiguration = default(object), string encryptedCredential = default(string), object headNodeSize = default(object), object dataNodeSize = default(object), object zookeeperNodeSize = default(object), IList scriptActions = default(IList), object virtualNetworkId = default(object), object subnetName = default(object), CredentialReference credential = default(CredentialReference)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ClusterSize = clusterSize; + TimeToLive = timeToLive; + HDInsightOnDemandLinkedServiceVersion = hDInsightOnDemandLinkedServiceVersion; + LinkedServiceName = linkedServiceName; + HostSubscriptionId = hostSubscriptionId; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + ClusterResourceGroup = clusterResourceGroup; + ClusterNamePrefix = clusterNamePrefix; + ClusterUserName = clusterUserName; + ClusterPassword = clusterPassword; + ClusterSshUserName = clusterSshUserName; + ClusterSshPassword = clusterSshPassword; + AdditionalLinkedServiceNames = additionalLinkedServiceNames; + HcatalogLinkedServiceName = hcatalogLinkedServiceName; + ClusterType = clusterType; + SparkVersion = sparkVersion; + CoreConfiguration = coreConfiguration; + HBaseConfiguration = hBaseConfiguration; + HdfsConfiguration = hdfsConfiguration; + HiveConfiguration = hiveConfiguration; + MapReduceConfiguration = mapReduceConfiguration; + OozieConfiguration = oozieConfiguration; + StormConfiguration = stormConfiguration; + YarnConfiguration = yarnConfiguration; + EncryptedCredential = encryptedCredential; + HeadNodeSize = headNodeSize; + DataNodeSize = dataNodeSize; + ZookeeperNodeSize = zookeeperNodeSize; + ScriptActions = scriptActions; + VirtualNetworkId = virtualNetworkId; + SubnetName = subnetName; + Credential = credential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets number of worker/data nodes in the cluster. Suggestion + /// value: 4. Type: int (or Expression with resultType int). + /// + [JsonProperty(PropertyName = "typeProperties.clusterSize")] + public object ClusterSize { get; set; } + + /// + /// Gets or sets the allowed idle time for the on-demand HDInsight + /// cluster. Specifies how long the on-demand HDInsight cluster stays + /// alive after completion of an activity run if there are no other + /// active jobs in the cluster. The minimum value is 5 mins. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.timeToLive")] + public object TimeToLive { get; set; } + + /// + /// Gets or sets version of the HDInsight cluster.  Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.version")] + public object HDInsightOnDemandLinkedServiceVersion { get; set; } + + /// + /// Gets or sets azure Storage linked service to be used by the + /// on-demand cluster for storing and processing data. + /// + [JsonProperty(PropertyName = "typeProperties.linkedServiceName")] + public LinkedServiceReference LinkedServiceName { get; set; } + + /// + /// Gets or sets the customer’s subscription to host the cluster. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.hostSubscriptionId")] + public object HostSubscriptionId { get; set; } + + /// + /// Gets or sets the service principal id for the hostSubscriptionId. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalId")] + public object ServicePrincipalId { get; set; } + + /// + /// Gets or sets the key for the service principal id. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalKey")] + public SecretBase ServicePrincipalKey { get; set; } + + /// + /// Gets or sets the Tenant id/name to which the service principal + /// belongs. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tenant")] + public object Tenant { get; set; } + + /// + /// Gets or sets the resource group where the cluster belongs. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.clusterResourceGroup")] + public object ClusterResourceGroup { get; set; } + + /// + /// Gets or sets the prefix of cluster name, postfix will be distinct + /// with timestamp. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.clusterNamePrefix")] + public object ClusterNamePrefix { get; set; } + + /// + /// Gets or sets the username to access the cluster. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.clusterUserName")] + public object ClusterUserName { get; set; } + + /// + /// Gets or sets the password to access the cluster. + /// + [JsonProperty(PropertyName = "typeProperties.clusterPassword")] + public SecretBase ClusterPassword { get; set; } + + /// + /// Gets or sets the username to SSH remotely connect to cluster’s node + /// (for Linux). Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.clusterSshUserName")] + public object ClusterSshUserName { get; set; } + + /// + /// Gets or sets the password to SSH remotely connect cluster’s node + /// (for Linux). + /// + [JsonProperty(PropertyName = "typeProperties.clusterSshPassword")] + public SecretBase ClusterSshPassword { get; set; } + + /// + /// Gets or sets specifies additional storage accounts for the + /// HDInsight linked service so that the Data Factory service can + /// register them on your behalf. + /// + [JsonProperty(PropertyName = "typeProperties.additionalLinkedServiceNames")] + public IList AdditionalLinkedServiceNames { get; set; } + + /// + /// Gets or sets the name of Azure SQL linked service that point to the + /// HCatalog database. The on-demand HDInsight cluster is created by + /// using the Azure SQL database as the metastore. + /// + [JsonProperty(PropertyName = "typeProperties.hcatalogLinkedServiceName")] + public LinkedServiceReference HcatalogLinkedServiceName { get; set; } + + /// + /// Gets or sets the cluster type. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.clusterType")] + public object ClusterType { get; set; } + + /// + /// Gets or sets the version of spark if the cluster type is 'spark'. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.sparkVersion")] + public object SparkVersion { get; set; } + + /// + /// Gets or sets specifies the core configuration parameters (as in + /// core-site.xml) for the HDInsight cluster to be created. + /// + [JsonProperty(PropertyName = "typeProperties.coreConfiguration")] + public object CoreConfiguration { get; set; } + + /// + /// Gets or sets specifies the HBase configuration parameters + /// (hbase-site.xml) for the HDInsight cluster. + /// + [JsonProperty(PropertyName = "typeProperties.hBaseConfiguration")] + public object HBaseConfiguration { get; set; } + + /// + /// Gets or sets specifies the HDFS configuration parameters + /// (hdfs-site.xml) for the HDInsight cluster. + /// + [JsonProperty(PropertyName = "typeProperties.hdfsConfiguration")] + public object HdfsConfiguration { get; set; } + + /// + /// Gets or sets specifies the hive configuration parameters + /// (hive-site.xml) for the HDInsight cluster. + /// + [JsonProperty(PropertyName = "typeProperties.hiveConfiguration")] + public object HiveConfiguration { get; set; } + + /// + /// Gets or sets specifies the MapReduce configuration parameters + /// (mapred-site.xml) for the HDInsight cluster. + /// + [JsonProperty(PropertyName = "typeProperties.mapReduceConfiguration")] + public object MapReduceConfiguration { get; set; } + + /// + /// Gets or sets specifies the Oozie configuration parameters + /// (oozie-site.xml) for the HDInsight cluster. + /// + [JsonProperty(PropertyName = "typeProperties.oozieConfiguration")] + public object OozieConfiguration { get; set; } + + /// + /// Gets or sets specifies the Storm configuration parameters + /// (storm-site.xml) for the HDInsight cluster. + /// + [JsonProperty(PropertyName = "typeProperties.stormConfiguration")] + public object StormConfiguration { get; set; } + + /// + /// Gets or sets specifies the Yarn configuration parameters + /// (yarn-site.xml) for the HDInsight cluster. + /// + [JsonProperty(PropertyName = "typeProperties.yarnConfiguration")] + public object YarnConfiguration { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets specifies the size of the head node for the HDInsight + /// cluster. + /// + [JsonProperty(PropertyName = "typeProperties.headNodeSize")] + public object HeadNodeSize { get; set; } + + /// + /// Gets or sets specifies the size of the data node for the HDInsight + /// cluster. + /// + [JsonProperty(PropertyName = "typeProperties.dataNodeSize")] + public object DataNodeSize { get; set; } + + /// + /// Gets or sets specifies the size of the Zoo Keeper node for the + /// HDInsight cluster. + /// + [JsonProperty(PropertyName = "typeProperties.zookeeperNodeSize")] + public object ZookeeperNodeSize { get; set; } + + /// + /// Gets or sets custom script actions to run on HDI ondemand cluster + /// once it's up. Please refer to + /// https://docs.microsoft.com/en-us/azure/hdinsight/hdinsight-hadoop-customize-cluster-linux?toc=%2Fen-us%2Fazure%2Fhdinsight%2Fr-server%2FTOC.json&amp;bc=%2Fen-us%2Fazure%2Fbread%2Ftoc.json#understanding-script-actions. + /// + [JsonProperty(PropertyName = "typeProperties.scriptActions")] + public IList ScriptActions { get; set; } + + /// + /// Gets or sets the ARM resource ID for the vNet to which the cluster + /// should be joined after creation. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.virtualNetworkId")] + public object VirtualNetworkId { get; set; } + + /// + /// Gets or sets the ARM resource ID for the subnet in the vNet. If + /// virtualNetworkId was specified, then this property is required. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.subnetName")] + public object SubnetName { get; set; } + + /// + /// Gets or sets the credential reference containing authentication + /// information. + /// + [JsonProperty(PropertyName = "typeProperties.credential")] + public CredentialReference Credential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ClusterSize == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ClusterSize"); + } + if (TimeToLive == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TimeToLive"); + } + if (HDInsightOnDemandLinkedServiceVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "HDInsightOnDemandLinkedServiceVersion"); + } + if (LinkedServiceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "LinkedServiceName"); + } + if (HostSubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "HostSubscriptionId"); + } + if (Tenant == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Tenant"); + } + if (ClusterResourceGroup == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ClusterResourceGroup"); + } + if (LinkedServiceName != null) + { + LinkedServiceName.Validate(); + } + if (AdditionalLinkedServiceNames != null) + { + foreach (var element in AdditionalLinkedServiceNames) + { + if (element != null) + { + element.Validate(); + } + } + } + if (HcatalogLinkedServiceName != null) + { + HcatalogLinkedServiceName.Validate(); + } + if (ScriptActions != null) + { + foreach (var element1 in ScriptActions) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + if (Credential != null) + { + Credential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HDInsightPigActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HDInsightPigActivity.cs new file mode 100644 index 000000000000..c9bbc0234361 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HDInsightPigActivity.cs @@ -0,0 +1,148 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// HDInsight Pig activity type. + /// + [Newtonsoft.Json.JsonObject("HDInsightPig")] + [Rest.Serialization.JsonTransformation] + public partial class HDInsightPigActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the HDInsightPigActivity class. + /// + public HDInsightPigActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HDInsightPigActivity class. + /// + /// Activity name. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// Storage linked service + /// references. + /// User specified arguments to + /// HDInsightActivity. Type: array (or Expression with resultType + /// array). + /// Debug info option. Possible values + /// include: 'None', 'Always', 'Failure' + /// Script path. Type: string (or Expression + /// with resultType string). + /// Script linked service + /// reference. + /// Allows user to specify defines for Pig job + /// request. + public HDInsightPigActivity(string name, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), IList storageLinkedServices = default(IList), object arguments = default(object), string getDebugInfo = default(string), object scriptPath = default(object), LinkedServiceReference scriptLinkedService = default(LinkedServiceReference), IDictionary defines = default(IDictionary)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + StorageLinkedServices = storageLinkedServices; + Arguments = arguments; + GetDebugInfo = getDebugInfo; + ScriptPath = scriptPath; + ScriptLinkedService = scriptLinkedService; + Defines = defines; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets storage linked service references. + /// + [JsonProperty(PropertyName = "typeProperties.storageLinkedServices")] + public IList StorageLinkedServices { get; set; } + + /// + /// Gets or sets user specified arguments to HDInsightActivity. Type: + /// array (or Expression with resultType array). + /// + [JsonProperty(PropertyName = "typeProperties.arguments")] + public object Arguments { get; set; } + + /// + /// Gets or sets debug info option. Possible values include: 'None', + /// 'Always', 'Failure' + /// + [JsonProperty(PropertyName = "typeProperties.getDebugInfo")] + public string GetDebugInfo { get; set; } + + /// + /// Gets or sets script path. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.scriptPath")] + public object ScriptPath { get; set; } + + /// + /// Gets or sets script linked service reference. + /// + [JsonProperty(PropertyName = "typeProperties.scriptLinkedService")] + public LinkedServiceReference ScriptLinkedService { get; set; } + + /// + /// Gets or sets allows user to specify defines for Pig job request. + /// + [JsonProperty(PropertyName = "typeProperties.defines")] + public IDictionary Defines { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (StorageLinkedServices != null) + { + foreach (var element in StorageLinkedServices) + { + if (element != null) + { + element.Validate(); + } + } + } + if (ScriptLinkedService != null) + { + ScriptLinkedService.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HDInsightSparkActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HDInsightSparkActivity.cs new file mode 100644 index 000000000000..00cfe9d7f4cc --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HDInsightSparkActivity.cs @@ -0,0 +1,170 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// HDInsight Spark activity. + /// + [Newtonsoft.Json.JsonObject("HDInsightSpark")] + [Rest.Serialization.JsonTransformation] + public partial class HDInsightSparkActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the HDInsightSparkActivity class. + /// + public HDInsightSparkActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HDInsightSparkActivity class. + /// + /// Activity name. + /// The root path in 'sparkJobLinkedService' for + /// all the job’s files. Type: string (or Expression with resultType + /// string). + /// The relative path to the root folder of + /// the code/package to be executed. Type: string (or Expression with + /// resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// The user-specified arguments to + /// HDInsightSparkActivity. + /// Debug info option. Possible values + /// include: 'None', 'Always', 'Failure' + /// The storage linked service for + /// uploading the entry file and dependencies, and for receiving + /// logs. + /// The application's Java/Spark main + /// class. + /// The user to impersonate that will execute + /// the job. Type: string (or Expression with resultType + /// string). + /// Spark configuration property. + public HDInsightSparkActivity(string name, object rootPath, object entryFilePath, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), IList arguments = default(IList), string getDebugInfo = default(string), LinkedServiceReference sparkJobLinkedService = default(LinkedServiceReference), string className = default(string), object proxyUser = default(object), IDictionary sparkConfig = default(IDictionary)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + RootPath = rootPath; + EntryFilePath = entryFilePath; + Arguments = arguments; + GetDebugInfo = getDebugInfo; + SparkJobLinkedService = sparkJobLinkedService; + ClassName = className; + ProxyUser = proxyUser; + SparkConfig = sparkConfig; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the root path in 'sparkJobLinkedService' for all the + /// job’s files. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.rootPath")] + public object RootPath { get; set; } + + /// + /// Gets or sets the relative path to the root folder of the + /// code/package to be executed. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.entryFilePath")] + public object EntryFilePath { get; set; } + + /// + /// Gets or sets the user-specified arguments to + /// HDInsightSparkActivity. + /// + [JsonProperty(PropertyName = "typeProperties.arguments")] + public IList Arguments { get; set; } + + /// + /// Gets or sets debug info option. Possible values include: 'None', + /// 'Always', 'Failure' + /// + [JsonProperty(PropertyName = "typeProperties.getDebugInfo")] + public string GetDebugInfo { get; set; } + + /// + /// Gets or sets the storage linked service for uploading the entry + /// file and dependencies, and for receiving logs. + /// + [JsonProperty(PropertyName = "typeProperties.sparkJobLinkedService")] + public LinkedServiceReference SparkJobLinkedService { get; set; } + + /// + /// Gets or sets the application's Java/Spark main class. + /// + [JsonProperty(PropertyName = "typeProperties.className")] + public string ClassName { get; set; } + + /// + /// Gets or sets the user to impersonate that will execute the job. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.proxyUser")] + public object ProxyUser { get; set; } + + /// + /// Gets or sets spark configuration property. + /// + [JsonProperty(PropertyName = "typeProperties.sparkConfig")] + public IDictionary SparkConfig { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (RootPath == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "RootPath"); + } + if (EntryFilePath == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "EntryFilePath"); + } + if (SparkJobLinkedService != null) + { + SparkJobLinkedService.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HDInsightStreamingActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HDInsightStreamingActivity.cs new file mode 100644 index 000000000000..39facc0d779a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HDInsightStreamingActivity.cs @@ -0,0 +1,225 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// HDInsight streaming activity type. + /// + [Newtonsoft.Json.JsonObject("HDInsightStreaming")] + [Rest.Serialization.JsonTransformation] + public partial class HDInsightStreamingActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the HDInsightStreamingActivity class. + /// + public HDInsightStreamingActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HDInsightStreamingActivity class. + /// + /// Activity name. + /// Mapper executable name. Type: string (or + /// Expression with resultType string). + /// Reducer executable name. Type: string (or + /// Expression with resultType string). + /// Input blob path. Type: string (or Expression + /// with resultType string). + /// Output blob path. Type: string (or Expression + /// with resultType string). + /// Paths to streaming job files. Can be + /// directories. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// Storage linked service + /// references. + /// User specified arguments to + /// HDInsightActivity. + /// Debug info option. Possible values + /// include: 'None', 'Always', 'Failure' + /// Linked service reference where the + /// files are located. + /// Combiner executable name. Type: string (or + /// Expression with resultType string). + /// Command line environment + /// values. + /// Allows user to specify defines for streaming + /// job request. + public HDInsightStreamingActivity(string name, object mapper, object reducer, object input, object output, IList filePaths, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), IList storageLinkedServices = default(IList), IList arguments = default(IList), string getDebugInfo = default(string), LinkedServiceReference fileLinkedService = default(LinkedServiceReference), object combiner = default(object), IList commandEnvironment = default(IList), IDictionary defines = default(IDictionary)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + StorageLinkedServices = storageLinkedServices; + Arguments = arguments; + GetDebugInfo = getDebugInfo; + Mapper = mapper; + Reducer = reducer; + Input = input; + Output = output; + FilePaths = filePaths; + FileLinkedService = fileLinkedService; + Combiner = combiner; + CommandEnvironment = commandEnvironment; + Defines = defines; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets storage linked service references. + /// + [JsonProperty(PropertyName = "typeProperties.storageLinkedServices")] + public IList StorageLinkedServices { get; set; } + + /// + /// Gets or sets user specified arguments to HDInsightActivity. + /// + [JsonProperty(PropertyName = "typeProperties.arguments")] + public IList Arguments { get; set; } + + /// + /// Gets or sets debug info option. Possible values include: 'None', + /// 'Always', 'Failure' + /// + [JsonProperty(PropertyName = "typeProperties.getDebugInfo")] + public string GetDebugInfo { get; set; } + + /// + /// Gets or sets mapper executable name. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.mapper")] + public object Mapper { get; set; } + + /// + /// Gets or sets reducer executable name. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.reducer")] + public object Reducer { get; set; } + + /// + /// Gets or sets input blob path. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.input")] + public object Input { get; set; } + + /// + /// Gets or sets output blob path. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.output")] + public object Output { get; set; } + + /// + /// Gets or sets paths to streaming job files. Can be directories. + /// + [JsonProperty(PropertyName = "typeProperties.filePaths")] + public IList FilePaths { get; set; } + + /// + /// Gets or sets linked service reference where the files are located. + /// + [JsonProperty(PropertyName = "typeProperties.fileLinkedService")] + public LinkedServiceReference FileLinkedService { get; set; } + + /// + /// Gets or sets combiner executable name. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.combiner")] + public object Combiner { get; set; } + + /// + /// Gets or sets command line environment values. + /// + [JsonProperty(PropertyName = "typeProperties.commandEnvironment")] + public IList CommandEnvironment { get; set; } + + /// + /// Gets or sets allows user to specify defines for streaming job + /// request. + /// + [JsonProperty(PropertyName = "typeProperties.defines")] + public IDictionary Defines { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Mapper == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Mapper"); + } + if (Reducer == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Reducer"); + } + if (Input == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Input"); + } + if (Output == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Output"); + } + if (FilePaths == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "FilePaths"); + } + if (StorageLinkedServices != null) + { + foreach (var element in StorageLinkedServices) + { + if (element != null) + { + element.Validate(); + } + } + } + if (FileLinkedService != null) + { + FileLinkedService.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HdfsLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HdfsLinkedService.cs new file mode 100644 index 000000000000..e9516ecf019c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HdfsLinkedService.cs @@ -0,0 +1,126 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Hadoop Distributed File System (HDFS) linked service. + /// + [Newtonsoft.Json.JsonObject("Hdfs")] + [Rest.Serialization.JsonTransformation] + public partial class HdfsLinkedService : LinkedService + { + /// + /// Initializes a new instance of the HdfsLinkedService class. + /// + public HdfsLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HdfsLinkedService class. + /// + /// The URL of the HDFS service endpoint, e.g. + /// http://myhostname:50070/webhdfs/v1 . Type: string (or Expression + /// with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Type of authentication used to + /// connect to the HDFS. Possible values are: Anonymous and Windows. + /// Type: string (or Expression with resultType string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// User name for Windows authentication. Type: + /// string (or Expression with resultType string). + /// Password for Windows authentication. + public HdfsLinkedService(object url, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object authenticationType = default(object), string encryptedCredential = default(string), object userName = default(object), SecretBase password = default(SecretBase)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Url = url; + AuthenticationType = authenticationType; + EncryptedCredential = encryptedCredential; + UserName = userName; + Password = password; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the URL of the HDFS service endpoint, e.g. + /// http://myhostname:50070/webhdfs/v1 . Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.url")] + public object Url { get; set; } + + /// + /// Gets or sets type of authentication used to connect to the HDFS. + /// Possible values are: Anonymous and Windows. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public object AuthenticationType { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets user name for Windows authentication. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets password for Windows authentication. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Url == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Url"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HdfsLocation.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HdfsLocation.cs new file mode 100644 index 000000000000..0ce08f97e490 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HdfsLocation.cs @@ -0,0 +1,51 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The location of HDFS. + /// + public partial class HdfsLocation : DatasetLocation + { + /// + /// Initializes a new instance of the HdfsLocation class. + /// + public HdfsLocation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HdfsLocation class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Specify the folder path of dataset. Type: + /// string (or Expression with resultType string) + /// Specify the file name of dataset. Type: + /// string (or Expression with resultType string). + public HdfsLocation(IDictionary additionalProperties = default(IDictionary), object folderPath = default(object), object fileName = default(object)) + : base(additionalProperties, folderPath, fileName) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HdfsReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HdfsReadSettings.cs new file mode 100644 index 000000000000..9be71c4753b2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HdfsReadSettings.cs @@ -0,0 +1,178 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// HDFS read settings. + /// + public partial class HdfsReadSettings : StoreReadSettings + { + /// + /// Initializes a new instance of the HdfsReadSettings class. + /// + public HdfsReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HdfsReadSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// If true, files under the folder path will + /// be read recursively. Default is true. Type: boolean (or Expression + /// with resultType boolean). + /// HDFS wildcardFolderPath. Type: + /// string (or Expression with resultType string). + /// HDFS wildcardFileName. Type: string + /// (or Expression with resultType string). + /// Point to a text file that lists each + /// file (relative path to the path configured in the dataset) that you + /// want to copy. Type: string (or Expression with resultType + /// string). + /// Indicates whether to enable + /// partition discovery. Type: boolean (or Expression with resultType + /// boolean). + /// Specify the root path where + /// partition discovery starts from. Type: string (or Expression with + /// resultType string). + /// The start of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + /// The end of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + /// Specifies Distcp-related + /// settings. + /// Indicates whether the + /// source files need to be deleted after copy completion. Default is + /// false. Type: boolean (or Expression with resultType + /// boolean). + public HdfsReadSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object recursive = default(object), object wildcardFolderPath = default(object), object wildcardFileName = default(object), object fileListPath = default(object), object enablePartitionDiscovery = default(object), object partitionRootPath = default(object), object modifiedDatetimeStart = default(object), object modifiedDatetimeEnd = default(object), DistcpSettings distcpSettings = default(DistcpSettings), object deleteFilesAfterCompletion = default(object)) + : base(additionalProperties, maxConcurrentConnections, disableMetricsCollection) + { + Recursive = recursive; + WildcardFolderPath = wildcardFolderPath; + WildcardFileName = wildcardFileName; + FileListPath = fileListPath; + EnablePartitionDiscovery = enablePartitionDiscovery; + PartitionRootPath = partitionRootPath; + ModifiedDatetimeStart = modifiedDatetimeStart; + ModifiedDatetimeEnd = modifiedDatetimeEnd; + DistcpSettings = distcpSettings; + DeleteFilesAfterCompletion = deleteFilesAfterCompletion; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets if true, files under the folder path will be read + /// recursively. Default is true. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "recursive")] + public object Recursive { get; set; } + + /// + /// Gets or sets HDFS wildcardFolderPath. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFolderPath")] + public object WildcardFolderPath { get; set; } + + /// + /// Gets or sets HDFS wildcardFileName. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFileName")] + public object WildcardFileName { get; set; } + + /// + /// Gets or sets point to a text file that lists each file (relative + /// path to the path configured in the dataset) that you want to copy. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "fileListPath")] + public object FileListPath { get; set; } + + /// + /// Gets or sets indicates whether to enable partition discovery. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "enablePartitionDiscovery")] + public object EnablePartitionDiscovery { get; set; } + + /// + /// Gets or sets specify the root path where partition discovery starts + /// from. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionRootPath")] + public object PartitionRootPath { get; set; } + + /// + /// Gets or sets the start of file's modified datetime. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "modifiedDatetimeStart")] + public object ModifiedDatetimeStart { get; set; } + + /// + /// Gets or sets the end of file's modified datetime. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "modifiedDatetimeEnd")] + public object ModifiedDatetimeEnd { get; set; } + + /// + /// Gets or sets specifies Distcp-related settings. + /// + [JsonProperty(PropertyName = "distcpSettings")] + public DistcpSettings DistcpSettings { get; set; } + + /// + /// Gets or sets indicates whether the source files need to be deleted + /// after copy completion. Default is false. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "deleteFilesAfterCompletion")] + public object DeleteFilesAfterCompletion { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (DistcpSettings != null) + { + DistcpSettings.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HdfsSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HdfsSource.cs new file mode 100644 index 000000000000..3b88649aa44f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HdfsSource.cs @@ -0,0 +1,93 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity HDFS source. + /// + public partial class HdfsSource : CopySource + { + /// + /// Initializes a new instance of the HdfsSource class. + /// + public HdfsSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HdfsSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// If true, files under the folder path will + /// be read recursively. Default is true. Type: boolean (or Expression + /// with resultType boolean). + /// Specifies Distcp-related + /// settings. + public HdfsSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object recursive = default(object), DistcpSettings distcpSettings = default(DistcpSettings)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + Recursive = recursive; + DistcpSettings = distcpSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets if true, files under the folder path will be read + /// recursively. Default is true. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "recursive")] + public object Recursive { get; set; } + + /// + /// Gets or sets specifies Distcp-related settings. + /// + [JsonProperty(PropertyName = "distcpSettings")] + public DistcpSettings DistcpSettings { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (DistcpSettings != null) + { + DistcpSettings.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HdiNodeTypes.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HdiNodeTypes.cs new file mode 100644 index 000000000000..5b1c90d85016 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HdiNodeTypes.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for HdiNodeTypes. + /// + public static class HdiNodeTypes + { + public const string Headnode = "Headnode"; + public const string Workernode = "Workernode"; + public const string Zookeeper = "Zookeeper"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HiveAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HiveAuthenticationType.cs new file mode 100644 index 000000000000..9fd38bd5adcf --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HiveAuthenticationType.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for HiveAuthenticationType. + /// + public static class HiveAuthenticationType + { + public const string Anonymous = "Anonymous"; + public const string Username = "Username"; + public const string UsernameAndPassword = "UsernameAndPassword"; + public const string WindowsAzureHDInsightService = "WindowsAzureHDInsightService"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HiveLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HiveLinkedService.cs new file mode 100644 index 000000000000..0c6f4337fb7e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HiveLinkedService.cs @@ -0,0 +1,264 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Hive Server linked service. + /// + [Newtonsoft.Json.JsonObject("Hive")] + [Rest.Serialization.JsonTransformation] + public partial class HiveLinkedService : LinkedService + { + /// + /// Initializes a new instance of the HiveLinkedService class. + /// + public HiveLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HiveLinkedService class. + /// + /// IP address or host name of the Hive server, + /// separated by ';' for multiple hosts (only when serviceDiscoveryMode + /// is enable). + /// The authentication method used to + /// access the Hive server. Possible values include: 'Anonymous', + /// 'Username', 'UsernameAndPassword', + /// 'WindowsAzureHDInsightService' + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The TCP port that the Hive server uses to listen + /// for client connections. + /// The type of Hive server. Possible values + /// include: 'HiveServer1', 'HiveServer2', 'HiveThriftServer' + /// The transport protocol to use + /// in the Thrift layer. Possible values include: 'Binary', 'SASL', + /// 'HTTP ' + /// true to indicate using the + /// ZooKeeper service, false not. + /// The namespace on ZooKeeper under + /// which Hive Server 2 nodes are added. + /// Specifies whether the driver uses + /// native HiveQL queries,or converts them into an equivalent form in + /// HiveQL. + /// The user name that you use to access Hive + /// Server. + /// The password corresponding to the user name + /// that you provided in the Username field + /// The partial URL corresponding to the Hive + /// server. + /// Specifies whether the connections to the + /// server are encrypted using SSL. The default value is false. + /// The full path of the .pem file + /// containing trusted CA certificates for verifying the server when + /// connecting over SSL. This property can only be set when using SSL + /// on self-hosted IR. The default value is the cacerts.pem file + /// installed with the IR. + /// Specifies whether to use a CA + /// certificate from the system trust store or from a specified PEM + /// file. The default value is false. + /// Specifies whether to require + /// a CA-issued SSL certificate name to match the host name of the + /// server when connecting over SSL. The default value is + /// false. + /// Specifies whether to allow + /// self-signed certificates from the server. The default value is + /// false. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public HiveLinkedService(object host, string authenticationType, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object port = default(object), string serverType = default(string), string thriftTransportProtocol = default(string), object serviceDiscoveryMode = default(object), object zooKeeperNameSpace = default(object), object useNativeQuery = default(object), object username = default(object), SecretBase password = default(SecretBase), object httpPath = default(object), object enableSsl = default(object), object trustedCertPath = default(object), object useSystemTrustStore = default(object), object allowHostNameCNMismatch = default(object), object allowSelfSignedServerCert = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Host = host; + Port = port; + ServerType = serverType; + ThriftTransportProtocol = thriftTransportProtocol; + AuthenticationType = authenticationType; + ServiceDiscoveryMode = serviceDiscoveryMode; + ZooKeeperNameSpace = zooKeeperNameSpace; + UseNativeQuery = useNativeQuery; + Username = username; + Password = password; + HttpPath = httpPath; + EnableSsl = enableSsl; + TrustedCertPath = trustedCertPath; + UseSystemTrustStore = useSystemTrustStore; + AllowHostNameCNMismatch = allowHostNameCNMismatch; + AllowSelfSignedServerCert = allowSelfSignedServerCert; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets IP address or host name of the Hive server, separated + /// by ';' for multiple hosts (only when serviceDiscoveryMode is + /// enable). + /// + [JsonProperty(PropertyName = "typeProperties.host")] + public object Host { get; set; } + + /// + /// Gets or sets the TCP port that the Hive server uses to listen for + /// client connections. + /// + [JsonProperty(PropertyName = "typeProperties.port")] + public object Port { get; set; } + + /// + /// Gets or sets the type of Hive server. Possible values include: + /// 'HiveServer1', 'HiveServer2', 'HiveThriftServer' + /// + [JsonProperty(PropertyName = "typeProperties.serverType")] + public string ServerType { get; set; } + + /// + /// Gets or sets the transport protocol to use in the Thrift layer. + /// Possible values include: 'Binary', 'SASL', 'HTTP ' + /// + [JsonProperty(PropertyName = "typeProperties.thriftTransportProtocol")] + public string ThriftTransportProtocol { get; set; } + + /// + /// Gets or sets the authentication method used to access the Hive + /// server. Possible values include: 'Anonymous', 'Username', + /// 'UsernameAndPassword', 'WindowsAzureHDInsightService' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets true to indicate using the ZooKeeper service, false + /// not. + /// + [JsonProperty(PropertyName = "typeProperties.serviceDiscoveryMode")] + public object ServiceDiscoveryMode { get; set; } + + /// + /// Gets or sets the namespace on ZooKeeper under which Hive Server 2 + /// nodes are added. + /// + [JsonProperty(PropertyName = "typeProperties.zooKeeperNameSpace")] + public object ZooKeeperNameSpace { get; set; } + + /// + /// Gets or sets specifies whether the driver uses native HiveQL + /// queries,or converts them into an equivalent form in HiveQL. + /// + [JsonProperty(PropertyName = "typeProperties.useNativeQuery")] + public object UseNativeQuery { get; set; } + + /// + /// Gets or sets the user name that you use to access Hive Server. + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets the password corresponding to the user name that you + /// provided in the Username field + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the partial URL corresponding to the Hive server. + /// + [JsonProperty(PropertyName = "typeProperties.httpPath")] + public object HttpPath { get; set; } + + /// + /// Gets or sets specifies whether the connections to the server are + /// encrypted using SSL. The default value is false. + /// + [JsonProperty(PropertyName = "typeProperties.enableSsl")] + public object EnableSsl { get; set; } + + /// + /// Gets or sets the full path of the .pem file containing trusted CA + /// certificates for verifying the server when connecting over SSL. + /// This property can only be set when using SSL on self-hosted IR. The + /// default value is the cacerts.pem file installed with the IR. + /// + [JsonProperty(PropertyName = "typeProperties.trustedCertPath")] + public object TrustedCertPath { get; set; } + + /// + /// Gets or sets specifies whether to use a CA certificate from the + /// system trust store or from a specified PEM file. The default value + /// is false. + /// + [JsonProperty(PropertyName = "typeProperties.useSystemTrustStore")] + public object UseSystemTrustStore { get; set; } + + /// + /// Gets or sets specifies whether to require a CA-issued SSL + /// certificate name to match the host name of the server when + /// connecting over SSL. The default value is false. + /// + [JsonProperty(PropertyName = "typeProperties.allowHostNameCNMismatch")] + public object AllowHostNameCNMismatch { get; set; } + + /// + /// Gets or sets specifies whether to allow self-signed certificates + /// from the server. The default value is false. + /// + [JsonProperty(PropertyName = "typeProperties.allowSelfSignedServerCert")] + public object AllowSelfSignedServerCert { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Host == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Host"); + } + if (AuthenticationType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AuthenticationType"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HiveObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HiveObjectDataset.cs new file mode 100644 index 000000000000..d4051b1d6846 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HiveObjectDataset.cs @@ -0,0 +1,106 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Hive Server dataset. + /// + [Newtonsoft.Json.JsonObject("HiveObject")] + [Rest.Serialization.JsonTransformation] + public partial class HiveObjectDataset : Dataset + { + /// + /// Initializes a new instance of the HiveObjectDataset class. + /// + public HiveObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the HiveObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// This property will be retired. Please + /// consider using schema + table properties instead. + /// The table name of the Hive. Type: string (or + /// Expression with resultType string). + /// The schema name of the Hive. + /// Type: string (or Expression with resultType string). + public HiveObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object), object table = default(object), object hiveObjectDatasetSchema = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + Table = table; + HiveObjectDatasetSchema = hiveObjectDatasetSchema; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property will be retired. Please consider using + /// schema + table properties instead. + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Gets or sets the table name of the Hive. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Gets or sets the schema name of the Hive. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object HiveObjectDatasetSchema { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HiveServerType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HiveServerType.cs new file mode 100644 index 000000000000..9b946af73a4b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HiveServerType.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for HiveServerType. + /// + public static class HiveServerType + { + public const string HiveServer1 = "HiveServer1"; + public const string HiveServer2 = "HiveServer2"; + public const string HiveThriftServer = "HiveThriftServer"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HiveSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HiveSource.cs new file mode 100644 index 000000000000..176208751d00 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HiveSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Hive Server source. + /// + public partial class HiveSource : TabularSource + { + /// + /// Initializes a new instance of the HiveSource class. + /// + public HiveSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HiveSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public HiveSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HiveThriftTransportProtocol.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HiveThriftTransportProtocol.cs new file mode 100644 index 000000000000..3feb563a97c4 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HiveThriftTransportProtocol.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for HiveThriftTransportProtocol. + /// + public static class HiveThriftTransportProtocol + { + public const string Binary = "Binary"; + public const string SASL = "SASL"; + public const string HTTP = "HTTP "; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HttpAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HttpAuthenticationType.cs new file mode 100644 index 000000000000..43953e86e64e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HttpAuthenticationType.cs @@ -0,0 +1,25 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for HttpAuthenticationType. + /// + public static class HttpAuthenticationType + { + public const string Basic = "Basic"; + public const string Anonymous = "Anonymous"; + public const string Digest = "Digest"; + public const string Windows = "Windows"; + public const string ClientCertificate = "ClientCertificate"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HttpDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HttpDataset.cs new file mode 100644 index 000000000000..52fe8c10b74b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HttpDataset.cs @@ -0,0 +1,145 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A file in an HTTP web server. + /// + [Newtonsoft.Json.JsonObject("HttpFile")] + [Rest.Serialization.JsonTransformation] + public partial class HttpDataset : Dataset + { + /// + /// Initializes a new instance of the HttpDataset class. + /// + public HttpDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the HttpDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The relative URL based on the URL in the + /// HttpLinkedService refers to an HTTP file Type: string (or + /// Expression with resultType string). + /// The HTTP method for the HTTP request. + /// Type: string (or Expression with resultType string). + /// The body for the HTTP request. Type: + /// string (or Expression with resultType string). + /// The headers for the HTTP Request. + /// e.g. request-header-name-1:request-header-value-1 + /// ... + /// request-header-name-n:request-header-value-n Type: string (or + /// Expression with resultType string). + /// The format of files. + /// The data compression method used on + /// files. + public HttpDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object relativeUrl = default(object), object requestMethod = default(object), object requestBody = default(object), object additionalHeaders = default(object), DatasetStorageFormat format = default(DatasetStorageFormat), DatasetCompression compression = default(DatasetCompression)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + RelativeUrl = relativeUrl; + RequestMethod = requestMethod; + RequestBody = requestBody; + AdditionalHeaders = additionalHeaders; + Format = format; + Compression = compression; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the relative URL based on the URL in the + /// HttpLinkedService refers to an HTTP file Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.relativeUrl")] + public object RelativeUrl { get; set; } + + /// + /// Gets or sets the HTTP method for the HTTP request. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.requestMethod")] + public object RequestMethod { get; set; } + + /// + /// Gets or sets the body for the HTTP request. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.requestBody")] + public object RequestBody { get; set; } + + /// + /// Gets or sets the headers for the HTTP Request. e.g. + /// request-header-name-1:request-header-value-1 + /// ... + /// request-header-name-n:request-header-value-n Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.additionalHeaders")] + public object AdditionalHeaders { get; set; } + + /// + /// Gets or sets the format of files. + /// + [JsonProperty(PropertyName = "typeProperties.format")] + public DatasetStorageFormat Format { get; set; } + + /// + /// Gets or sets the data compression method used on files. + /// + [JsonProperty(PropertyName = "typeProperties.compression")] + public DatasetCompression Compression { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Compression != null) + { + Compression.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HttpLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HttpLinkedService.cs new file mode 100644 index 000000000000..7cd917d70db1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HttpLinkedService.cs @@ -0,0 +1,186 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for an HTTP source. + /// + [Newtonsoft.Json.JsonObject("HttpServer")] + [Rest.Serialization.JsonTransformation] + public partial class HttpLinkedService : LinkedService + { + /// + /// Initializes a new instance of the HttpLinkedService class. + /// + public HttpLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HttpLinkedService class. + /// + /// The base URL of the HTTP endpoint, e.g. + /// https://www.microsoft.com. Type: string (or Expression with + /// resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The authentication type to be used + /// to connect to the HTTP server. Possible values include: 'Basic', + /// 'Anonymous', 'Digest', 'Windows', 'ClientCertificate' + /// User name for Basic, Digest, or Windows + /// authentication. Type: string (or Expression with resultType + /// string). + /// Password for Basic, Digest, Windows, or + /// ClientCertificate with EmbeddedCertData authentication. + /// The additional HTTP headers in the + /// request to RESTful API used for authorization. Type: key value + /// pairs (value should be string type). + /// Base64 encoded certificate data for + /// ClientCertificate authentication. For on-premises copy with + /// ClientCertificate authentication, either CertThumbprint or + /// EmbeddedCertData/Password should be specified. Type: string (or + /// Expression with resultType string). + /// Thumbprint of certificate for + /// ClientCertificate authentication. Only valid for on-premises copy. + /// For on-premises copy with ClientCertificate authentication, either + /// CertThumbprint or EmbeddedCertData/Password should be specified. + /// Type: string (or Expression with resultType string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// If true, validate + /// the HTTPS server SSL certificate. Default value is true. Type: + /// boolean (or Expression with resultType boolean). + public HttpLinkedService(object url, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), string authenticationType = default(string), object userName = default(object), SecretBase password = default(SecretBase), object authHeaders = default(object), object embeddedCertData = default(object), object certThumbprint = default(object), string encryptedCredential = default(string), object enableServerCertificateValidation = default(object)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Url = url; + AuthenticationType = authenticationType; + UserName = userName; + Password = password; + AuthHeaders = authHeaders; + EmbeddedCertData = embeddedCertData; + CertThumbprint = certThumbprint; + EncryptedCredential = encryptedCredential; + EnableServerCertificateValidation = enableServerCertificateValidation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the base URL of the HTTP endpoint, e.g. + /// https://www.microsoft.com. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.url")] + public object Url { get; set; } + + /// + /// Gets or sets the authentication type to be used to connect to the + /// HTTP server. Possible values include: 'Basic', 'Anonymous', + /// 'Digest', 'Windows', 'ClientCertificate' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets user name for Basic, Digest, or Windows + /// authentication. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets password for Basic, Digest, Windows, or + /// ClientCertificate with EmbeddedCertData authentication. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the additional HTTP headers in the request to RESTful + /// API used for authorization. Type: key value pairs (value should be + /// string type). + /// + [JsonProperty(PropertyName = "typeProperties.authHeaders")] + public object AuthHeaders { get; set; } + + /// + /// Gets or sets base64 encoded certificate data for ClientCertificate + /// authentication. For on-premises copy with ClientCertificate + /// authentication, either CertThumbprint or EmbeddedCertData/Password + /// should be specified. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.embeddedCertData")] + public object EmbeddedCertData { get; set; } + + /// + /// Gets or sets thumbprint of certificate for ClientCertificate + /// authentication. Only valid for on-premises copy. For on-premises + /// copy with ClientCertificate authentication, either CertThumbprint + /// or EmbeddedCertData/Password should be specified. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.certThumbprint")] + public object CertThumbprint { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets if true, validate the HTTPS server SSL certificate. + /// Default value is true. Type: boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "typeProperties.enableServerCertificateValidation")] + public object EnableServerCertificateValidation { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Url == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Url"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HttpReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HttpReadSettings.cs new file mode 100644 index 000000000000..871940b456cb --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HttpReadSettings.cs @@ -0,0 +1,113 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Http read settings. + /// + public partial class HttpReadSettings : StoreReadSettings + { + /// + /// Initializes a new instance of the HttpReadSettings class. + /// + public HttpReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HttpReadSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The HTTP method used to call the + /// RESTful API. The default is GET. Type: string (or Expression with + /// resultType string). + /// The HTTP request body to the RESTful API + /// if requestMethod is POST. Type: string (or Expression with + /// resultType string). + /// The additional HTTP headers in the + /// request to the RESTful API. Type: string (or Expression with + /// resultType string). + /// Specifies the timeout for a HTTP + /// client to get HTTP response from HTTP server. Type: string (or + /// Expression with resultType string). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public HttpReadSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object requestMethod = default(object), object requestBody = default(object), object additionalHeaders = default(object), object requestTimeout = default(object), object additionalColumns = default(object)) + : base(additionalProperties, maxConcurrentConnections, disableMetricsCollection) + { + RequestMethod = requestMethod; + RequestBody = requestBody; + AdditionalHeaders = additionalHeaders; + RequestTimeout = requestTimeout; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the HTTP method used to call the RESTful API. The + /// default is GET. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "requestMethod")] + public object RequestMethod { get; set; } + + /// + /// Gets or sets the HTTP request body to the RESTful API if + /// requestMethod is POST. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "requestBody")] + public object RequestBody { get; set; } + + /// + /// Gets or sets the additional HTTP headers in the request to the + /// RESTful API. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "additionalHeaders")] + public object AdditionalHeaders { get; set; } + + /// + /// Gets or sets specifies the timeout for a HTTP client to get HTTP + /// response from HTTP server. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "requestTimeout")] + public object RequestTimeout { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HttpServerLocation.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HttpServerLocation.cs new file mode 100644 index 000000000000..7191d425c23a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HttpServerLocation.cs @@ -0,0 +1,62 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The location of http server. + /// + public partial class HttpServerLocation : DatasetLocation + { + /// + /// Initializes a new instance of the HttpServerLocation class. + /// + public HttpServerLocation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HttpServerLocation class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Specify the folder path of dataset. Type: + /// string (or Expression with resultType string) + /// Specify the file name of dataset. Type: + /// string (or Expression with resultType string). + /// Specify the relativeUrl of http server. + /// Type: string (or Expression with resultType string) + public HttpServerLocation(IDictionary additionalProperties = default(IDictionary), object folderPath = default(object), object fileName = default(object), object relativeUrl = default(object)) + : base(additionalProperties, folderPath, fileName) + { + RelativeUrl = relativeUrl; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specify the relativeUrl of http server. Type: string + /// (or Expression with resultType string) + /// + [JsonProperty(PropertyName = "relativeUrl")] + public object RelativeUrl { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HttpSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HttpSource.cs new file mode 100644 index 000000000000..1cafe57e2cf5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HttpSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for an HTTP file. + /// + public partial class HttpSource : CopySource + { + /// + /// Initializes a new instance of the HttpSource class. + /// + public HttpSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HttpSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Specifies the timeout for a HTTP + /// client to get HTTP response from HTTP server. The default value is + /// equivalent to System.Net.HttpWebRequest.Timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + public HttpSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object httpRequestTimeout = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + HttpRequestTimeout = httpRequestTimeout; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies the timeout for a HTTP client to get HTTP + /// response from HTTP server. The default value is equivalent to + /// System.Net.HttpWebRequest.Timeout. Type: string (or Expression with + /// resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "httpRequestTimeout")] + public object HttpRequestTimeout { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HubspotLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HubspotLinkedService.cs new file mode 100644 index 000000000000..72b52e38eb40 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HubspotLinkedService.cs @@ -0,0 +1,158 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Hubspot Service linked service. + /// + [Newtonsoft.Json.JsonObject("Hubspot")] + [Rest.Serialization.JsonTransformation] + public partial class HubspotLinkedService : LinkedService + { + /// + /// Initializes a new instance of the HubspotLinkedService class. + /// + public HubspotLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HubspotLinkedService class. + /// + /// The client ID associated with your Hubspot + /// application. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The client secret associated with your + /// Hubspot application. + /// The access token obtained when initially + /// authenticating your OAuth integration. + /// The refresh token obtained when + /// initially authenticating your OAuth integration. + /// Specifies whether the data + /// source endpoints are encrypted using HTTPS. The default value is + /// true. + /// Specifies whether to require the + /// host name in the server's certificate to match the host name of the + /// server when connecting over SSL. The default value is true. + /// Specifies whether to verify the + /// identity of the server when connecting over SSL. The default value + /// is true. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public HubspotLinkedService(object clientId, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), SecretBase clientSecret = default(SecretBase), SecretBase accessToken = default(SecretBase), SecretBase refreshToken = default(SecretBase), object useEncryptedEndpoints = default(object), object useHostVerification = default(object), object usePeerVerification = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ClientId = clientId; + ClientSecret = clientSecret; + AccessToken = accessToken; + RefreshToken = refreshToken; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the client ID associated with your Hubspot + /// application. + /// + [JsonProperty(PropertyName = "typeProperties.clientId")] + public object ClientId { get; set; } + + /// + /// Gets or sets the client secret associated with your Hubspot + /// application. + /// + [JsonProperty(PropertyName = "typeProperties.clientSecret")] + public SecretBase ClientSecret { get; set; } + + /// + /// Gets or sets the access token obtained when initially + /// authenticating your OAuth integration. + /// + [JsonProperty(PropertyName = "typeProperties.accessToken")] + public SecretBase AccessToken { get; set; } + + /// + /// Gets or sets the refresh token obtained when initially + /// authenticating your OAuth integration. + /// + [JsonProperty(PropertyName = "typeProperties.refreshToken")] + public SecretBase RefreshToken { get; set; } + + /// + /// Gets or sets specifies whether the data source endpoints are + /// encrypted using HTTPS. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useEncryptedEndpoints")] + public object UseEncryptedEndpoints { get; set; } + + /// + /// Gets or sets specifies whether to require the host name in the + /// server's certificate to match the host name of the server when + /// connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useHostVerification")] + public object UseHostVerification { get; set; } + + /// + /// Gets or sets specifies whether to verify the identity of the server + /// when connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.usePeerVerification")] + public object UsePeerVerification { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ClientId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ClientId"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HubspotObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HubspotObjectDataset.cs new file mode 100644 index 000000000000..7c69672c9f90 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HubspotObjectDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Hubspot Service dataset. + /// + [Newtonsoft.Json.JsonObject("HubspotObject")] + [Rest.Serialization.JsonTransformation] + public partial class HubspotObjectDataset : Dataset + { + /// + /// Initializes a new instance of the HubspotObjectDataset class. + /// + public HubspotObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the HubspotObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name. Type: string (or Expression + /// with resultType string). + public HubspotObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HubspotSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HubspotSource.cs new file mode 100644 index 000000000000..a28c2e528e8c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/HubspotSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Hubspot Service source. + /// + public partial class HubspotSource : TabularSource + { + /// + /// Initializes a new instance of the HubspotSource class. + /// + public HubspotSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the HubspotSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public HubspotSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IcebergDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IcebergDataset.cs new file mode 100644 index 000000000000..b88af0256a84 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IcebergDataset.cs @@ -0,0 +1,90 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Iceberg dataset. + /// + [Newtonsoft.Json.JsonObject("Iceberg")] + [Rest.Serialization.JsonTransformation] + public partial class IcebergDataset : Dataset + { + /// + /// Initializes a new instance of the IcebergDataset class. + /// + public IcebergDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the IcebergDataset class. + /// + /// Linked service reference. + /// The location of the iceberg storage. Setting + /// a file name is not allowed for iceberg format. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + public IcebergDataset(LinkedServiceReference linkedServiceName, DatasetLocation location, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the location of the iceberg storage. Setting a file + /// name is not allowed for iceberg format. + /// + [JsonProperty(PropertyName = "typeProperties.location")] + public DatasetLocation Location { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Location"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IcebergSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IcebergSink.cs new file mode 100644 index 000000000000..6cc29c20e118 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IcebergSink.cs @@ -0,0 +1,80 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Iceberg sink. + /// + public partial class IcebergSink : CopySink + { + /// + /// Initializes a new instance of the IcebergSink class. + /// + public IcebergSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IcebergSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Iceberg store settings. + /// Iceberg format settings. + public IcebergSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), StoreWriteSettings storeSettings = default(StoreWriteSettings), IcebergWriteSettings formatSettings = default(IcebergWriteSettings)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + StoreSettings = storeSettings; + FormatSettings = formatSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets iceberg store settings. + /// + [JsonProperty(PropertyName = "storeSettings")] + public StoreWriteSettings StoreSettings { get; set; } + + /// + /// Gets or sets iceberg format settings. + /// + [JsonProperty(PropertyName = "formatSettings")] + public IcebergWriteSettings FormatSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IcebergWriteSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IcebergWriteSettings.cs new file mode 100644 index 000000000000..9ed6e41b8a3b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IcebergWriteSettings.cs @@ -0,0 +1,47 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Iceberg write settings. + /// + public partial class IcebergWriteSettings : FormatWriteSettings + { + /// + /// Initializes a new instance of the IcebergWriteSettings class. + /// + public IcebergWriteSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IcebergWriteSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + public IcebergWriteSettings(IDictionary additionalProperties = default(IDictionary)) + : base(additionalProperties) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IfConditionActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IfConditionActivity.cs new file mode 100644 index 000000000000..37360d643de0 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IfConditionActivity.cs @@ -0,0 +1,142 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// This activity evaluates a boolean expression and executes either the + /// activities under the ifTrueActivities property or the ifFalseActivities + /// property depending on the result of the expression. + /// + [Newtonsoft.Json.JsonObject("IfCondition")] + [Rest.Serialization.JsonTransformation] + public partial class IfConditionActivity : ControlActivity + { + /// + /// Initializes a new instance of the IfConditionActivity class. + /// + public IfConditionActivity() + { + Expression = new Expression(); + CustomInit(); + } + + /// + /// Initializes a new instance of the IfConditionActivity class. + /// + /// Activity name. + /// An expression that would evaluate to + /// Boolean. This is used to determine the block of activities + /// (ifTrueActivities or ifFalseActivities) that will be + /// executed. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// List of activities to execute if + /// expression is evaluated to true. This is an optional property and + /// if not provided, the activity will exit without any action. + /// List of activities to execute if + /// expression is evaluated to false. This is an optional property and + /// if not provided, the activity will exit without any action. + public IfConditionActivity(string name, Expression expression, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), IList ifTrueActivities = default(IList), IList ifFalseActivities = default(IList)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties) + { + Expression = expression; + IfTrueActivities = ifTrueActivities; + IfFalseActivities = ifFalseActivities; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets an expression that would evaluate to Boolean. This is + /// used to determine the block of activities (ifTrueActivities or + /// ifFalseActivities) that will be executed. + /// + [JsonProperty(PropertyName = "typeProperties.expression")] + public Expression Expression { get; set; } + + /// + /// Gets or sets list of activities to execute if expression is + /// evaluated to true. This is an optional property and if not + /// provided, the activity will exit without any action. + /// + [JsonProperty(PropertyName = "typeProperties.ifTrueActivities")] + public IList IfTrueActivities { get; set; } + + /// + /// Gets or sets list of activities to execute if expression is + /// evaluated to false. This is an optional property and if not + /// provided, the activity will exit without any action. + /// + [JsonProperty(PropertyName = "typeProperties.ifFalseActivities")] + public IList IfFalseActivities { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Expression == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Expression"); + } + if (Expression != null) + { + Expression.Validate(); + } + if (IfTrueActivities != null) + { + foreach (var element in IfTrueActivities) + { + if (element != null) + { + element.Validate(); + } + } + } + if (IfFalseActivities != null) + { + foreach (var element1 in IfFalseActivities) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ImpalaAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ImpalaAuthenticationType.cs new file mode 100644 index 000000000000..bf0ff7a6737a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ImpalaAuthenticationType.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for ImpalaAuthenticationType. + /// + public static class ImpalaAuthenticationType + { + public const string Anonymous = "Anonymous"; + public const string SASLUsername = "SASLUsername"; + public const string UsernameAndPassword = "UsernameAndPassword"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ImpalaLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ImpalaLinkedService.cs new file mode 100644 index 000000000000..b3046fdc269e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ImpalaLinkedService.cs @@ -0,0 +1,201 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Impala server linked service. + /// + [Newtonsoft.Json.JsonObject("Impala")] + [Rest.Serialization.JsonTransformation] + public partial class ImpalaLinkedService : LinkedService + { + /// + /// Initializes a new instance of the ImpalaLinkedService class. + /// + public ImpalaLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ImpalaLinkedService class. + /// + /// The IP address or host name of the Impala + /// server. (i.e. 192.168.222.160) + /// The authentication type to use. + /// Possible values include: 'Anonymous', 'SASLUsername', + /// 'UsernameAndPassword' + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The TCP port that the Impala server uses to + /// listen for client connections. The default value is 21050. + /// The user name used to access the Impala + /// server. The default value is anonymous when using + /// SASLUsername. + /// The password corresponding to the user name + /// when using UsernameAndPassword. + /// Specifies whether the connections to the + /// server are encrypted using SSL. The default value is false. + /// The full path of the .pem file + /// containing trusted CA certificates for verifying the server when + /// connecting over SSL. This property can only be set when using SSL + /// on self-hosted IR. The default value is the cacerts.pem file + /// installed with the IR. + /// Specifies whether to use a CA + /// certificate from the system trust store or from a specified PEM + /// file. The default value is false. + /// Specifies whether to require + /// a CA-issued SSL certificate name to match the host name of the + /// server when connecting over SSL. The default value is + /// false. + /// Specifies whether to allow + /// self-signed certificates from the server. The default value is + /// false. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public ImpalaLinkedService(object host, string authenticationType, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object port = default(object), object username = default(object), SecretBase password = default(SecretBase), object enableSsl = default(object), object trustedCertPath = default(object), object useSystemTrustStore = default(object), object allowHostNameCNMismatch = default(object), object allowSelfSignedServerCert = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Host = host; + Port = port; + AuthenticationType = authenticationType; + Username = username; + Password = password; + EnableSsl = enableSsl; + TrustedCertPath = trustedCertPath; + UseSystemTrustStore = useSystemTrustStore; + AllowHostNameCNMismatch = allowHostNameCNMismatch; + AllowSelfSignedServerCert = allowSelfSignedServerCert; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the IP address or host name of the Impala server. + /// (i.e. 192.168.222.160) + /// + [JsonProperty(PropertyName = "typeProperties.host")] + public object Host { get; set; } + + /// + /// Gets or sets the TCP port that the Impala server uses to listen for + /// client connections. The default value is 21050. + /// + [JsonProperty(PropertyName = "typeProperties.port")] + public object Port { get; set; } + + /// + /// Gets or sets the authentication type to use. Possible values + /// include: 'Anonymous', 'SASLUsername', 'UsernameAndPassword' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets the user name used to access the Impala server. The + /// default value is anonymous when using SASLUsername. + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets the password corresponding to the user name when using + /// UsernameAndPassword. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets specifies whether the connections to the server are + /// encrypted using SSL. The default value is false. + /// + [JsonProperty(PropertyName = "typeProperties.enableSsl")] + public object EnableSsl { get; set; } + + /// + /// Gets or sets the full path of the .pem file containing trusted CA + /// certificates for verifying the server when connecting over SSL. + /// This property can only be set when using SSL on self-hosted IR. The + /// default value is the cacerts.pem file installed with the IR. + /// + [JsonProperty(PropertyName = "typeProperties.trustedCertPath")] + public object TrustedCertPath { get; set; } + + /// + /// Gets or sets specifies whether to use a CA certificate from the + /// system trust store or from a specified PEM file. The default value + /// is false. + /// + [JsonProperty(PropertyName = "typeProperties.useSystemTrustStore")] + public object UseSystemTrustStore { get; set; } + + /// + /// Gets or sets specifies whether to require a CA-issued SSL + /// certificate name to match the host name of the server when + /// connecting over SSL. The default value is false. + /// + [JsonProperty(PropertyName = "typeProperties.allowHostNameCNMismatch")] + public object AllowHostNameCNMismatch { get; set; } + + /// + /// Gets or sets specifies whether to allow self-signed certificates + /// from the server. The default value is false. + /// + [JsonProperty(PropertyName = "typeProperties.allowSelfSignedServerCert")] + public object AllowSelfSignedServerCert { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Host == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Host"); + } + if (AuthenticationType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AuthenticationType"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ImpalaObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ImpalaObjectDataset.cs new file mode 100644 index 000000000000..ade66660746a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ImpalaObjectDataset.cs @@ -0,0 +1,107 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Impala server dataset. + /// + [Newtonsoft.Json.JsonObject("ImpalaObject")] + [Rest.Serialization.JsonTransformation] + public partial class ImpalaObjectDataset : Dataset + { + /// + /// Initializes a new instance of the ImpalaObjectDataset class. + /// + public ImpalaObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the ImpalaObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// This property will be retired. Please + /// consider using schema + table properties instead. + /// The table name of the Impala. Type: string (or + /// Expression with resultType string). + /// The schema name of the + /// Impala. Type: string (or Expression with resultType + /// string). + public ImpalaObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object), object table = default(object), object impalaObjectDatasetSchema = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + Table = table; + ImpalaObjectDatasetSchema = impalaObjectDatasetSchema; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property will be retired. Please consider using + /// schema + table properties instead. + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Gets or sets the table name of the Impala. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Gets or sets the schema name of the Impala. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object ImpalaObjectDatasetSchema { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ImpalaSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ImpalaSource.cs new file mode 100644 index 000000000000..016d1a16513a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ImpalaSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Impala server source. + /// + public partial class ImpalaSource : TabularSource + { + /// + /// Initializes a new instance of the ImpalaSource class. + /// + public ImpalaSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ImpalaSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public ImpalaSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ImportSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ImportSettings.cs new file mode 100644 index 000000000000..675dbe68f59c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ImportSettings.cs @@ -0,0 +1,55 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Import command settings. + /// + public partial class ImportSettings + { + /// + /// Initializes a new instance of the ImportSettings class. + /// + public ImportSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ImportSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + public ImportSettings(IDictionary additionalProperties = default(IDictionary)) + { + AdditionalProperties = additionalProperties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/InformixLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/InformixLinkedService.cs new file mode 100644 index 000000000000..ffe3e0a17182 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/InformixLinkedService.cs @@ -0,0 +1,140 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Informix linked service. + /// + [Newtonsoft.Json.JsonObject("Informix")] + [Rest.Serialization.JsonTransformation] + public partial class InformixLinkedService : LinkedService + { + /// + /// Initializes a new instance of the InformixLinkedService class. + /// + public InformixLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InformixLinkedService class. + /// + /// The non-access credential portion of + /// the connection string as well as an optional encrypted credential. + /// Type: string, or SecureString, or AzureKeyVaultSecretReference, or + /// Expression with resultType string. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Type of authentication used to + /// connect to the Informix as ODBC data store. Possible values are: + /// Anonymous and Basic. Type: string (or Expression with resultType + /// string). + /// The access credential portion of the + /// connection string specified in driver-specific property-value + /// format. + /// User name for Basic authentication. Type: + /// string (or Expression with resultType string). + /// Password for Basic authentication. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public InformixLinkedService(object connectionString, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object authenticationType = default(object), SecretBase credential = default(SecretBase), object userName = default(object), SecretBase password = default(SecretBase), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionString = connectionString; + AuthenticationType = authenticationType; + Credential = credential; + UserName = userName; + Password = password; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the non-access credential portion of the connection + /// string as well as an optional encrypted credential. Type: string, + /// or SecureString, or AzureKeyVaultSecretReference, or Expression + /// with resultType string. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets type of authentication used to connect to the Informix + /// as ODBC data store. Possible values are: Anonymous and Basic. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public object AuthenticationType { get; set; } + + /// + /// Gets or sets the access credential portion of the connection string + /// specified in driver-specific property-value format. + /// + [JsonProperty(PropertyName = "typeProperties.credential")] + public SecretBase Credential { get; set; } + + /// + /// Gets or sets user name for Basic authentication. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets password for Basic authentication. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ConnectionString == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ConnectionString"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/InformixSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/InformixSink.cs new file mode 100644 index 000000000000..8afc55916d0d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/InformixSink.cs @@ -0,0 +1,74 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Informix sink. + /// + public partial class InformixSink : CopySink + { + /// + /// Initializes a new instance of the InformixSink class. + /// + public InformixSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InformixSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// A query to execute before starting the + /// copy. Type: string (or Expression with resultType string). + public InformixSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object preCopyScript = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + PreCopyScript = preCopyScript; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to execute before starting the copy. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "preCopyScript")] + public object PreCopyScript { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/InformixSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/InformixSource.cs new file mode 100644 index 000000000000..c9494ae670a8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/InformixSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for Informix. + /// + public partial class InformixSource : TabularSource + { + /// + /// Initializes a new instance of the InformixSource class. + /// + public InformixSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the InformixSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// Database query. Type: string (or Expression + /// with resultType string). + public InformixSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets database query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/InformixTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/InformixTableDataset.cs new file mode 100644 index 000000000000..9c340ee55b3c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/InformixTableDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Informix table dataset. + /// + [Newtonsoft.Json.JsonObject("InformixTable")] + [Rest.Serialization.JsonTransformation] + public partial class InformixTableDataset : Dataset + { + /// + /// Initializes a new instance of the InformixTableDataset class. + /// + public InformixTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the InformixTableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The Informix table name. Type: string (or + /// Expression with resultType string). + public InformixTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Informix table name. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntime.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntime.cs new file mode 100644 index 000000000000..258558e59854 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntime.cs @@ -0,0 +1,64 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure Data Factory nested object which serves as a compute resource for + /// activities. + /// + public partial class IntegrationRuntime + { + /// + /// Initializes a new instance of the IntegrationRuntime class. + /// + public IntegrationRuntime() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationRuntime class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Integration runtime description. + public IntegrationRuntime(IDictionary additionalProperties = default(IDictionary), string description = default(string)) + { + AdditionalProperties = additionalProperties; + Description = description; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets integration runtime description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeAuthKeyName.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeAuthKeyName.cs new file mode 100644 index 000000000000..64f800566d41 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeAuthKeyName.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for IntegrationRuntimeAuthKeyName. + /// + public static class IntegrationRuntimeAuthKeyName + { + public const string AuthKey1 = "authKey1"; + public const string AuthKey2 = "authKey2"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeAuthKeys.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeAuthKeys.cs new file mode 100644 index 000000000000..195aef7cce62 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeAuthKeys.cs @@ -0,0 +1,61 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The integration runtime authentication keys. + /// + public partial class IntegrationRuntimeAuthKeys + { + /// + /// Initializes a new instance of the IntegrationRuntimeAuthKeys class. + /// + public IntegrationRuntimeAuthKeys() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationRuntimeAuthKeys class. + /// + /// The primary integration runtime + /// authentication key. + /// The secondary integration runtime + /// authentication key. + public IntegrationRuntimeAuthKeys(string authKey1 = default(string), string authKey2 = default(string)) + { + AuthKey1 = authKey1; + AuthKey2 = authKey2; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the primary integration runtime authentication key. + /// + [JsonProperty(PropertyName = "authKey1")] + public string AuthKey1 { get; set; } + + /// + /// Gets or sets the secondary integration runtime authentication key. + /// + [JsonProperty(PropertyName = "authKey2")] + public string AuthKey2 { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeAutoUpdate.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeAutoUpdate.cs new file mode 100644 index 000000000000..bd39a3d52389 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeAutoUpdate.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for IntegrationRuntimeAutoUpdate. + /// + public static class IntegrationRuntimeAutoUpdate + { + public const string On = "On"; + public const string Off = "Off"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeComputeProperties.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeComputeProperties.cs new file mode 100644 index 000000000000..edb9da5bc1a1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeComputeProperties.cs @@ -0,0 +1,168 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The compute resource properties for managed integration runtime. + /// + public partial class IntegrationRuntimeComputeProperties + { + /// + /// Initializes a new instance of the + /// IntegrationRuntimeComputeProperties class. + /// + public IntegrationRuntimeComputeProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// IntegrationRuntimeComputeProperties class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The location for managed integration + /// runtime. The supported regions could be found on + /// https://docs.microsoft.com/en-us/azure/data-factory/data-factory-data-movement-activities + /// The node size requirement to managed + /// integration runtime. + /// The required number of nodes for + /// managed integration runtime. + /// Maximum parallel + /// executions count per node for managed integration runtime. + /// Data flow properties for managed + /// integration runtime. + /// VNet properties for managed + /// integration runtime. + /// CopyComputeScale + /// properties for managed integration runtime. + /// PipelineExternalComputeScale + /// properties for managed integration runtime. + public IntegrationRuntimeComputeProperties(IDictionary additionalProperties = default(IDictionary), string location = default(string), string nodeSize = default(string), int? numberOfNodes = default(int?), int? maxParallelExecutionsPerNode = default(int?), IntegrationRuntimeDataFlowProperties dataFlowProperties = default(IntegrationRuntimeDataFlowProperties), IntegrationRuntimeVNetProperties vNetProperties = default(IntegrationRuntimeVNetProperties), CopyComputeScaleProperties copyComputeScaleProperties = default(CopyComputeScaleProperties), PipelineExternalComputeScaleProperties pipelineExternalComputeScaleProperties = default(PipelineExternalComputeScaleProperties)) + { + AdditionalProperties = additionalProperties; + Location = location; + NodeSize = nodeSize; + NumberOfNodes = numberOfNodes; + MaxParallelExecutionsPerNode = maxParallelExecutionsPerNode; + DataFlowProperties = dataFlowProperties; + VNetProperties = vNetProperties; + CopyComputeScaleProperties = copyComputeScaleProperties; + PipelineExternalComputeScaleProperties = pipelineExternalComputeScaleProperties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets the location for managed integration runtime. The + /// supported regions could be found on + /// https://docs.microsoft.com/en-us/azure/data-factory/data-factory-data-movement-activities + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + + /// + /// Gets or sets the node size requirement to managed integration + /// runtime. + /// + [JsonProperty(PropertyName = "nodeSize")] + public string NodeSize { get; set; } + + /// + /// Gets or sets the required number of nodes for managed integration + /// runtime. + /// + [JsonProperty(PropertyName = "numberOfNodes")] + public int? NumberOfNodes { get; set; } + + /// + /// Gets or sets maximum parallel executions count per node for managed + /// integration runtime. + /// + [JsonProperty(PropertyName = "maxParallelExecutionsPerNode")] + public int? MaxParallelExecutionsPerNode { get; set; } + + /// + /// Gets or sets data flow properties for managed integration runtime. + /// + [JsonProperty(PropertyName = "dataFlowProperties")] + public IntegrationRuntimeDataFlowProperties DataFlowProperties { get; set; } + + /// + /// Gets or sets vNet properties for managed integration runtime. + /// + [JsonProperty(PropertyName = "vNetProperties")] + public IntegrationRuntimeVNetProperties VNetProperties { get; set; } + + /// + /// Gets or sets copyComputeScale properties for managed integration + /// runtime. + /// + [JsonProperty(PropertyName = "copyComputeScaleProperties")] + public CopyComputeScaleProperties CopyComputeScaleProperties { get; set; } + + /// + /// Gets or sets pipelineExternalComputeScale properties for managed + /// integration runtime. + /// + [JsonProperty(PropertyName = "pipelineExternalComputeScaleProperties")] + public PipelineExternalComputeScaleProperties PipelineExternalComputeScaleProperties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (NumberOfNodes < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "NumberOfNodes", 1); + } + if (MaxParallelExecutionsPerNode < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "MaxParallelExecutionsPerNode", 1); + } + if (DataFlowProperties != null) + { + DataFlowProperties.Validate(); + } + if (CopyComputeScaleProperties != null) + { + CopyComputeScaleProperties.Validate(); + } + if (PipelineExternalComputeScaleProperties != null) + { + PipelineExternalComputeScaleProperties.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeConnectionInfo.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeConnectionInfo.cs new file mode 100644 index 000000000000..6b5cfcb31f14 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeConnectionInfo.cs @@ -0,0 +1,116 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Connection information for encrypting the on-premises data source + /// credentials. + /// + public partial class IntegrationRuntimeConnectionInfo + { + /// + /// Initializes a new instance of the IntegrationRuntimeConnectionInfo + /// class. + /// + public IntegrationRuntimeConnectionInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationRuntimeConnectionInfo + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The token generated in service. Callers + /// use this token to authenticate to integration runtime. + /// The integration runtime SSL + /// certificate thumbprint. Click-Once application uses it to do server + /// validation. + /// The on-premises integration runtime + /// host URL. + /// The integration runtime version. + /// The public key for encrypting a credential + /// when transferring the credential to the integration + /// runtime. + /// Whether the identity + /// certificate is expired. + public IntegrationRuntimeConnectionInfo(IDictionary additionalProperties = default(IDictionary), string serviceToken = default(string), string identityCertThumbprint = default(string), string hostServiceUri = default(string), string version = default(string), string publicKey = default(string), bool? isIdentityCertExprired = default(bool?)) + { + AdditionalProperties = additionalProperties; + ServiceToken = serviceToken; + IdentityCertThumbprint = identityCertThumbprint; + HostServiceUri = hostServiceUri; + Version = version; + PublicKey = publicKey; + IsIdentityCertExprired = isIdentityCertExprired; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets the token generated in service. Callers use this token to + /// authenticate to integration runtime. + /// + [JsonProperty(PropertyName = "serviceToken")] + public string ServiceToken { get; private set; } + + /// + /// Gets the integration runtime SSL certificate thumbprint. Click-Once + /// application uses it to do server validation. + /// + [JsonProperty(PropertyName = "identityCertThumbprint")] + public string IdentityCertThumbprint { get; private set; } + + /// + /// Gets the on-premises integration runtime host URL. + /// + [JsonProperty(PropertyName = "hostServiceUri")] + public string HostServiceUri { get; private set; } + + /// + /// Gets the integration runtime version. + /// + [JsonProperty(PropertyName = "version")] + public string Version { get; private set; } + + /// + /// Gets the public key for encrypting a credential when transferring + /// the credential to the integration runtime. + /// + [JsonProperty(PropertyName = "publicKey")] + public string PublicKey { get; private set; } + + /// + /// Gets whether the identity certificate is expired. + /// + [JsonProperty(PropertyName = "isIdentityCertExprired")] + public bool? IsIdentityCertExprired { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeCustomSetupScriptProperties.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeCustomSetupScriptProperties.cs new file mode 100644 index 000000000000..aff83da1bb78 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeCustomSetupScriptProperties.cs @@ -0,0 +1,78 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Custom setup script properties for a managed dedicated integration + /// runtime. + /// + public partial class IntegrationRuntimeCustomSetupScriptProperties + { + /// + /// Initializes a new instance of the + /// IntegrationRuntimeCustomSetupScriptProperties class. + /// + public IntegrationRuntimeCustomSetupScriptProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// IntegrationRuntimeCustomSetupScriptProperties class. + /// + /// The URI of the Azure blob container + /// that contains the custom setup script. + /// The SAS token of the Azure blob + /// container. + public IntegrationRuntimeCustomSetupScriptProperties(string blobContainerUri = default(string), SecureString sasToken = default(SecureString)) + { + BlobContainerUri = blobContainerUri; + SasToken = sasToken; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the URI of the Azure blob container that contains the + /// custom setup script. + /// + [JsonProperty(PropertyName = "blobContainerUri")] + public string BlobContainerUri { get; set; } + + /// + /// Gets or sets the SAS token of the Azure blob container. + /// + [JsonProperty(PropertyName = "sasToken")] + public SecureString SasToken { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (SasToken != null) + { + SasToken.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeCustomerVirtualNetwork.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeCustomerVirtualNetwork.cs new file mode 100644 index 000000000000..3525920e7512 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeCustomerVirtualNetwork.cs @@ -0,0 +1,56 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The definition and properties of virtual network to which Azure-SSIS + /// integration runtime will join. + /// + public partial class IntegrationRuntimeCustomerVirtualNetwork + { + /// + /// Initializes a new instance of the + /// IntegrationRuntimeCustomerVirtualNetwork class. + /// + public IntegrationRuntimeCustomerVirtualNetwork() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// IntegrationRuntimeCustomerVirtualNetwork class. + /// + /// The ID of subnet to which Azure-SSIS + /// integration runtime will join. + public IntegrationRuntimeCustomerVirtualNetwork(string subnetId = default(string)) + { + SubnetId = subnetId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the ID of subnet to which Azure-SSIS integration + /// runtime will join. + /// + [JsonProperty(PropertyName = "subnetId")] + public string SubnetId { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeDataFlowProperties.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeDataFlowProperties.cs new file mode 100644 index 000000000000..e04d538c0613 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeDataFlowProperties.cs @@ -0,0 +1,126 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Data flow properties for managed integration runtime. + /// + public partial class IntegrationRuntimeDataFlowProperties + { + /// + /// Initializes a new instance of the + /// IntegrationRuntimeDataFlowProperties class. + /// + public IntegrationRuntimeDataFlowProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// IntegrationRuntimeDataFlowProperties class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Compute type of the cluster which will + /// execute data flow job. Possible values include: 'General', + /// 'MemoryOptimized', 'ComputeOptimized' + /// Core count of the cluster which will + /// execute data flow job. Supported values are: 8, 16, 32, 48, 80, 144 + /// and 272. + /// Time to live (in minutes) setting of the + /// cluster which will execute data flow job. + /// Cluster will not be recycled and it will be + /// used in next data flow activity run until TTL (time to live) is + /// reached if this is set as false. Default is true. + /// Custom properties are used to tune + /// the data flow runtime performance. + public IntegrationRuntimeDataFlowProperties(IDictionary additionalProperties = default(IDictionary), string computeType = default(string), int? coreCount = default(int?), int? timeToLive = default(int?), bool? cleanup = default(bool?), IList customProperties = default(IList)) + { + AdditionalProperties = additionalProperties; + ComputeType = computeType; + CoreCount = coreCount; + TimeToLive = timeToLive; + Cleanup = cleanup; + CustomProperties = customProperties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets compute type of the cluster which will execute data + /// flow job. Possible values include: 'General', 'MemoryOptimized', + /// 'ComputeOptimized' + /// + [JsonProperty(PropertyName = "computeType")] + public string ComputeType { get; set; } + + /// + /// Gets or sets core count of the cluster which will execute data flow + /// job. Supported values are: 8, 16, 32, 48, 80, 144 and 272. + /// + [JsonProperty(PropertyName = "coreCount")] + public int? CoreCount { get; set; } + + /// + /// Gets or sets time to live (in minutes) setting of the cluster which + /// will execute data flow job. + /// + [JsonProperty(PropertyName = "timeToLive")] + public int? TimeToLive { get; set; } + + /// + /// Gets or sets cluster will not be recycled and it will be used in + /// next data flow activity run until TTL (time to live) is reached if + /// this is set as false. Default is true. + /// + [JsonProperty(PropertyName = "cleanup")] + public bool? Cleanup { get; set; } + + /// + /// Gets or sets custom properties are used to tune the data flow + /// runtime performance. + /// + [JsonProperty(PropertyName = "customProperties")] + public IList CustomProperties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (TimeToLive < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "TimeToLive", 0); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeDataFlowPropertiesCustomPropertiesItem.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeDataFlowPropertiesCustomPropertiesItem.cs new file mode 100644 index 000000000000..0a57f4abdcff --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeDataFlowPropertiesCustomPropertiesItem.cs @@ -0,0 +1,58 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class IntegrationRuntimeDataFlowPropertiesCustomPropertiesItem + { + /// + /// Initializes a new instance of the + /// IntegrationRuntimeDataFlowPropertiesCustomPropertiesItem class. + /// + public IntegrationRuntimeDataFlowPropertiesCustomPropertiesItem() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// IntegrationRuntimeDataFlowPropertiesCustomPropertiesItem class. + /// + /// Name of custom property. + /// Value of custom property. + public IntegrationRuntimeDataFlowPropertiesCustomPropertiesItem(string name = default(string), string value = default(string)) + { + Name = name; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of custom property. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets value of custom property. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeDataProxyProperties.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeDataProxyProperties.cs new file mode 100644 index 000000000000..78519c75b0e9 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeDataProxyProperties.cs @@ -0,0 +1,73 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Data proxy properties for a managed dedicated integration runtime. + /// + public partial class IntegrationRuntimeDataProxyProperties + { + /// + /// Initializes a new instance of the + /// IntegrationRuntimeDataProxyProperties class. + /// + public IntegrationRuntimeDataProxyProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// IntegrationRuntimeDataProxyProperties class. + /// + /// The self-hosted integration runtime + /// reference. + /// The staging linked service + /// reference. + /// The path to contain the staged data in the Blob + /// storage. + public IntegrationRuntimeDataProxyProperties(EntityReference connectVia = default(EntityReference), EntityReference stagingLinkedService = default(EntityReference), string path = default(string)) + { + ConnectVia = connectVia; + StagingLinkedService = stagingLinkedService; + Path = path; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the self-hosted integration runtime reference. + /// + [JsonProperty(PropertyName = "connectVia")] + public EntityReference ConnectVia { get; set; } + + /// + /// Gets or sets the staging linked service reference. + /// + [JsonProperty(PropertyName = "stagingLinkedService")] + public EntityReference StagingLinkedService { get; set; } + + /// + /// Gets or sets the path to contain the staged data in the Blob + /// storage. + /// + [JsonProperty(PropertyName = "path")] + public string Path { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeDebugResource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeDebugResource.cs new file mode 100644 index 000000000000..25f6a768839f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeDebugResource.cs @@ -0,0 +1,69 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Integration runtime debug resource. + /// + public partial class IntegrationRuntimeDebugResource : SubResourceDebugResource + { + /// + /// Initializes a new instance of the IntegrationRuntimeDebugResource + /// class. + /// + public IntegrationRuntimeDebugResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationRuntimeDebugResource + /// class. + /// + /// Integration runtime properties. + /// The resource name. + public IntegrationRuntimeDebugResource(IntegrationRuntime properties, string name = default(string)) + : base(name) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets integration runtime properties. + /// + [JsonProperty(PropertyName = "properties")] + public IntegrationRuntime Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeEdition.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeEdition.cs new file mode 100644 index 000000000000..1e815992d2c2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeEdition.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for IntegrationRuntimeEdition. + /// + public static class IntegrationRuntimeEdition + { + public const string Standard = "Standard"; + public const string Enterprise = "Enterprise"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeEntityReferenceType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeEntityReferenceType.cs new file mode 100644 index 000000000000..590bfe94be08 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeEntityReferenceType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for IntegrationRuntimeEntityReferenceType. + /// + public static class IntegrationRuntimeEntityReferenceType + { + public const string IntegrationRuntimeReference = "IntegrationRuntimeReference"; + public const string LinkedServiceReference = "LinkedServiceReference"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeInternalChannelEncryptionMode.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeInternalChannelEncryptionMode.cs new file mode 100644 index 000000000000..493973da893b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeInternalChannelEncryptionMode.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for IntegrationRuntimeInternalChannelEncryptionMode. + /// + public static class IntegrationRuntimeInternalChannelEncryptionMode + { + public const string NotSet = "NotSet"; + public const string SslEncrypted = "SslEncrypted"; + public const string NotEncrypted = "NotEncrypted"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeLicenseType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeLicenseType.cs new file mode 100644 index 000000000000..b5c3e1722f41 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeLicenseType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for IntegrationRuntimeLicenseType. + /// + public static class IntegrationRuntimeLicenseType + { + public const string BasePrice = "BasePrice"; + public const string LicenseIncluded = "LicenseIncluded"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeMonitoringData.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeMonitoringData.cs new file mode 100644 index 000000000000..7684035c423d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeMonitoringData.cs @@ -0,0 +1,64 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Get monitoring data response. + /// + public partial class IntegrationRuntimeMonitoringData + { + /// + /// Initializes a new instance of the IntegrationRuntimeMonitoringData + /// class. + /// + public IntegrationRuntimeMonitoringData() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationRuntimeMonitoringData + /// class. + /// + /// Integration runtime name. + /// Integration runtime node monitoring + /// data. + public IntegrationRuntimeMonitoringData(string name = default(string), IList nodes = default(IList)) + { + Name = name; + Nodes = nodes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets integration runtime name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets integration runtime node monitoring data. + /// + [JsonProperty(PropertyName = "nodes")] + public IList Nodes { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeNodeIpAddress.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeNodeIpAddress.cs new file mode 100644 index 000000000000..ceb4c471b232 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeNodeIpAddress.cs @@ -0,0 +1,54 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The IP address of self-hosted integration runtime node. + /// + public partial class IntegrationRuntimeNodeIpAddress + { + /// + /// Initializes a new instance of the IntegrationRuntimeNodeIpAddress + /// class. + /// + public IntegrationRuntimeNodeIpAddress() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationRuntimeNodeIpAddress + /// class. + /// + /// The IP address of self-hosted integration + /// runtime node. + public IntegrationRuntimeNodeIpAddress(string ipAddress = default(string)) + { + IpAddress = ipAddress; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the IP address of self-hosted integration runtime node. + /// + [JsonProperty(PropertyName = "ipAddress")] + public string IpAddress { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeNodeMonitoringData.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeNodeMonitoringData.cs new file mode 100644 index 000000000000..d99852ec79a2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeNodeMonitoringData.cs @@ -0,0 +1,130 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Monitoring data for integration runtime node. + /// + public partial class IntegrationRuntimeNodeMonitoringData + { + /// + /// Initializes a new instance of the + /// IntegrationRuntimeNodeMonitoringData class. + /// + public IntegrationRuntimeNodeMonitoringData() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// IntegrationRuntimeNodeMonitoringData class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Name of the integration runtime + /// node. + /// Available memory (MB) on the + /// integration runtime node. + /// CPU percentage on the integration + /// runtime node. + /// Maximum concurrent jobs on the + /// integration runtime node. + /// The number of jobs currently + /// running on the integration runtime node. + /// The maximum concurrent jobs in this + /// integration runtime. + /// Sent bytes on the integration runtime + /// node. + /// Received bytes on the integration + /// runtime node. + public IntegrationRuntimeNodeMonitoringData(IDictionary additionalProperties = default(IDictionary), string nodeName = default(string), int? availableMemoryInMB = default(int?), int? cpuUtilization = default(int?), int? concurrentJobsLimit = default(int?), int? concurrentJobsRunning = default(int?), int? maxConcurrentJobs = default(int?), double? sentBytes = default(double?), double? receivedBytes = default(double?)) + { + AdditionalProperties = additionalProperties; + NodeName = nodeName; + AvailableMemoryInMB = availableMemoryInMB; + CpuUtilization = cpuUtilization; + ConcurrentJobsLimit = concurrentJobsLimit; + ConcurrentJobsRunning = concurrentJobsRunning; + MaxConcurrentJobs = maxConcurrentJobs; + SentBytes = sentBytes; + ReceivedBytes = receivedBytes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets name of the integration runtime node. + /// + [JsonProperty(PropertyName = "nodeName")] + public string NodeName { get; private set; } + + /// + /// Gets available memory (MB) on the integration runtime node. + /// + [JsonProperty(PropertyName = "availableMemoryInMB")] + public int? AvailableMemoryInMB { get; private set; } + + /// + /// Gets CPU percentage on the integration runtime node. + /// + [JsonProperty(PropertyName = "cpuUtilization")] + public int? CpuUtilization { get; private set; } + + /// + /// Gets maximum concurrent jobs on the integration runtime node. + /// + [JsonProperty(PropertyName = "concurrentJobsLimit")] + public int? ConcurrentJobsLimit { get; private set; } + + /// + /// Gets the number of jobs currently running on the integration + /// runtime node. + /// + [JsonProperty(PropertyName = "concurrentJobsRunning")] + public int? ConcurrentJobsRunning { get; private set; } + + /// + /// Gets the maximum concurrent jobs in this integration runtime. + /// + [JsonProperty(PropertyName = "maxConcurrentJobs")] + public int? MaxConcurrentJobs { get; private set; } + + /// + /// Gets sent bytes on the integration runtime node. + /// + [JsonProperty(PropertyName = "sentBytes")] + public double? SentBytes { get; private set; } + + /// + /// Gets received bytes on the integration runtime node. + /// + [JsonProperty(PropertyName = "receivedBytes")] + public double? ReceivedBytes { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint.cs new file mode 100644 index 000000000000..04b6030ad69b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint.cs @@ -0,0 +1,68 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure-SSIS integration runtime outbound network dependency endpoints + /// for one category. + /// + public partial class IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint + { + /// + /// Initializes a new instance of the + /// IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint + /// class. + /// + public IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint + /// class. + /// + /// The category of outbound network + /// dependency. + /// The endpoints for outbound network + /// dependency. + public IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint(string category = default(string), IList endpoints = default(IList)) + { + Category = category; + Endpoints = endpoints; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the category of outbound network dependency. + /// + [JsonProperty(PropertyName = "category")] + public string Category { get; set; } + + /// + /// Gets or sets the endpoints for outbound network dependency. + /// + [JsonProperty(PropertyName = "endpoints")] + public IList Endpoints { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesEndpoint.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesEndpoint.cs new file mode 100644 index 000000000000..41d5439283f8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesEndpoint.cs @@ -0,0 +1,64 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The endpoint for Azure-SSIS integration runtime outbound network + /// dependency. + /// + public partial class IntegrationRuntimeOutboundNetworkDependenciesEndpoint + { + /// + /// Initializes a new instance of the + /// IntegrationRuntimeOutboundNetworkDependenciesEndpoint class. + /// + public IntegrationRuntimeOutboundNetworkDependenciesEndpoint() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// IntegrationRuntimeOutboundNetworkDependenciesEndpoint class. + /// + /// The domain name of endpoint. + /// The details of endpoint. + public IntegrationRuntimeOutboundNetworkDependenciesEndpoint(string domainName = default(string), IList endpointDetails = default(IList)) + { + DomainName = domainName; + EndpointDetails = endpointDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the domain name of endpoint. + /// + [JsonProperty(PropertyName = "domainName")] + public string DomainName { get; set; } + + /// + /// Gets or sets the details of endpoint. + /// + [JsonProperty(PropertyName = "endpointDetails")] + public IList EndpointDetails { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails.cs new file mode 100644 index 000000000000..7bc4b46901b1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails.cs @@ -0,0 +1,54 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The details of Azure-SSIS integration runtime outbound network + /// dependency endpoint. + /// + public partial class IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails + { + /// + /// Initializes a new instance of the + /// IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails class. + /// + public IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails class. + /// + /// The port of endpoint. + public IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails(int? port = default(int?)) + { + Port = port; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the port of endpoint. + /// + [JsonProperty(PropertyName = "port")] + public int? Port { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse.cs new file mode 100644 index 000000000000..1b14fcb5a89f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse.cs @@ -0,0 +1,58 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure-SSIS integration runtime outbound network dependency endpoints. + /// + public partial class IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse + { + /// + /// Initializes a new instance of the + /// IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse + /// class. + /// + public IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse + /// class. + /// + /// The list of outbound network dependency + /// endpoints. + public IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse(IList value = default(IList)) + { + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the list of outbound network dependency endpoints. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeReference.cs new file mode 100644 index 000000000000..37ab74c4cec2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeReference.cs @@ -0,0 +1,91 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Integration runtime reference type. + /// + public partial class IntegrationRuntimeReference + { + /// + /// Initializes a new instance of the IntegrationRuntimeReference + /// class. + /// + public IntegrationRuntimeReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationRuntimeReference + /// class. + /// + /// Reference integration runtime + /// name. + /// Arguments for integration runtime. + public IntegrationRuntimeReference(string referenceName, IDictionary parameters = default(IDictionary)) + { + ReferenceName = referenceName; + Parameters = parameters; + CustomInit(); + } + /// + /// Static constructor for IntegrationRuntimeReference class. + /// + static IntegrationRuntimeReference() + { + Type = "IntegrationRuntimeReference"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets reference integration runtime name. + /// + [JsonProperty(PropertyName = "referenceName")] + public string ReferenceName { get; set; } + + /// + /// Gets or sets arguments for integration runtime. + /// + [JsonProperty(PropertyName = "parameters")] + public IDictionary Parameters { get; set; } + + /// + /// Type of integration runtime. + /// + [JsonProperty(PropertyName = "type")] + public static string Type { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ReferenceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ReferenceName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeRegenerateKeyParameters.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeRegenerateKeyParameters.cs new file mode 100644 index 000000000000..d34a239af1bc --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeRegenerateKeyParameters.cs @@ -0,0 +1,55 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Parameters to regenerate the authentication key. + /// + public partial class IntegrationRuntimeRegenerateKeyParameters + { + /// + /// Initializes a new instance of the + /// IntegrationRuntimeRegenerateKeyParameters class. + /// + public IntegrationRuntimeRegenerateKeyParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// IntegrationRuntimeRegenerateKeyParameters class. + /// + /// The name of the authentication key to + /// regenerate. Possible values include: 'authKey1', 'authKey2' + public IntegrationRuntimeRegenerateKeyParameters(string keyName = default(string)) + { + KeyName = keyName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the authentication key to regenerate. + /// Possible values include: 'authKey1', 'authKey2' + /// + [JsonProperty(PropertyName = "keyName")] + public string KeyName { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeResource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeResource.cs new file mode 100644 index 000000000000..729139d2a175 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeResource.cs @@ -0,0 +1,70 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Integration runtime resource type. + /// + public partial class IntegrationRuntimeResource : SubResource + { + /// + /// Initializes a new instance of the IntegrationRuntimeResource class. + /// + public IntegrationRuntimeResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationRuntimeResource class. + /// + /// Integration runtime properties. + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + public IntegrationRuntimeResource(IntegrationRuntime properties, string id = default(string), string name = default(string), string type = default(string), string etag = default(string)) + : base(id, name, type, etag) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets integration runtime properties. + /// + [JsonProperty(PropertyName = "properties")] + public IntegrationRuntime Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeSsisCatalogInfo.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeSsisCatalogInfo.cs new file mode 100644 index 000000000000..34725741a873 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeSsisCatalogInfo.cs @@ -0,0 +1,136 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Catalog information for managed dedicated integration runtime. + /// + public partial class IntegrationRuntimeSsisCatalogInfo + { + /// + /// Initializes a new instance of the IntegrationRuntimeSsisCatalogInfo + /// class. + /// + public IntegrationRuntimeSsisCatalogInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationRuntimeSsisCatalogInfo + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The catalog database server + /// URL. + /// The administrator user name of + /// catalog database. + /// The password of the + /// administrator user account of the catalog database. + /// The pricing tier for the catalog + /// database. The valid values could be found in + /// https://azure.microsoft.com/en-us/pricing/details/sql-database/. + /// Possible values include: 'Basic', 'Standard', 'Premium', + /// 'PremiumRS' + /// The dual standby pair name of + /// Azure-SSIS Integration Runtimes to support SSISDB failover. + public IntegrationRuntimeSsisCatalogInfo(IDictionary additionalProperties = default(IDictionary), string catalogServerEndpoint = default(string), string catalogAdminUserName = default(string), SecureString catalogAdminPassword = default(SecureString), string catalogPricingTier = default(string), string dualStandbyPairName = default(string)) + { + AdditionalProperties = additionalProperties; + CatalogServerEndpoint = catalogServerEndpoint; + CatalogAdminUserName = catalogAdminUserName; + CatalogAdminPassword = catalogAdminPassword; + CatalogPricingTier = catalogPricingTier; + DualStandbyPairName = dualStandbyPairName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets the catalog database server URL. + /// + [JsonProperty(PropertyName = "catalogServerEndpoint")] + public string CatalogServerEndpoint { get; set; } + + /// + /// Gets or sets the administrator user name of catalog database. + /// + [JsonProperty(PropertyName = "catalogAdminUserName")] + public string CatalogAdminUserName { get; set; } + + /// + /// Gets or sets the password of the administrator user account of the + /// catalog database. + /// + [JsonProperty(PropertyName = "catalogAdminPassword")] + public SecureString CatalogAdminPassword { get; set; } + + /// + /// Gets or sets the pricing tier for the catalog database. The valid + /// values could be found in + /// https://azure.microsoft.com/en-us/pricing/details/sql-database/. + /// Possible values include: 'Basic', 'Standard', 'Premium', + /// 'PremiumRS' + /// + [JsonProperty(PropertyName = "catalogPricingTier")] + public string CatalogPricingTier { get; set; } + + /// + /// Gets or sets the dual standby pair name of Azure-SSIS Integration + /// Runtimes to support SSISDB failover. + /// + [JsonProperty(PropertyName = "dualStandbyPairName")] + public string DualStandbyPairName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (CatalogAdminUserName != null) + { + if (CatalogAdminUserName.Length > 128) + { + throw new ValidationException(ValidationRules.MaxLength, "CatalogAdminUserName", 128); + } + if (CatalogAdminUserName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "CatalogAdminUserName", 1); + } + } + if (CatalogAdminPassword != null) + { + CatalogAdminPassword.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeSsisCatalogPricingTier.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeSsisCatalogPricingTier.cs new file mode 100644 index 000000000000..6cd3a5a32af8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeSsisCatalogPricingTier.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for IntegrationRuntimeSsisCatalogPricingTier. + /// + public static class IntegrationRuntimeSsisCatalogPricingTier + { + public const string Basic = "Basic"; + public const string Standard = "Standard"; + public const string Premium = "Premium"; + public const string PremiumRS = "PremiumRS"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeSsisProperties.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeSsisProperties.cs new file mode 100644 index 000000000000..a59d25d20f92 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeSsisProperties.cs @@ -0,0 +1,168 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// SSIS properties for managed integration runtime. + /// + public partial class IntegrationRuntimeSsisProperties + { + /// + /// Initializes a new instance of the IntegrationRuntimeSsisProperties + /// class. + /// + public IntegrationRuntimeSsisProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationRuntimeSsisProperties + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Catalog information for managed dedicated + /// integration runtime. + /// License type for bringing your own + /// license scenario. Possible values include: 'BasePrice', + /// 'LicenseIncluded' + /// Custom setup script + /// properties for a managed dedicated integration runtime. + /// Data proxy properties for a + /// managed dedicated integration runtime. + /// The edition for the SSIS Integration Runtime. + /// Possible values include: 'Standard', 'Enterprise' + /// Custom setup without + /// script properties for a SSIS integration runtime. + /// Package stores for the SSIS Integration + /// Runtime. + /// The credential reference containing + /// authentication information. + public IntegrationRuntimeSsisProperties(IDictionary additionalProperties = default(IDictionary), IntegrationRuntimeSsisCatalogInfo catalogInfo = default(IntegrationRuntimeSsisCatalogInfo), string licenseType = default(string), IntegrationRuntimeCustomSetupScriptProperties customSetupScriptProperties = default(IntegrationRuntimeCustomSetupScriptProperties), IntegrationRuntimeDataProxyProperties dataProxyProperties = default(IntegrationRuntimeDataProxyProperties), string edition = default(string), IList expressCustomSetupProperties = default(IList), IList packageStores = default(IList), CredentialReference credential = default(CredentialReference)) + { + AdditionalProperties = additionalProperties; + CatalogInfo = catalogInfo; + LicenseType = licenseType; + CustomSetupScriptProperties = customSetupScriptProperties; + DataProxyProperties = dataProxyProperties; + Edition = edition; + ExpressCustomSetupProperties = expressCustomSetupProperties; + PackageStores = packageStores; + Credential = credential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets catalog information for managed dedicated integration + /// runtime. + /// + [JsonProperty(PropertyName = "catalogInfo")] + public IntegrationRuntimeSsisCatalogInfo CatalogInfo { get; set; } + + /// + /// Gets or sets license type for bringing your own license scenario. + /// Possible values include: 'BasePrice', 'LicenseIncluded' + /// + [JsonProperty(PropertyName = "licenseType")] + public string LicenseType { get; set; } + + /// + /// Gets or sets custom setup script properties for a managed dedicated + /// integration runtime. + /// + [JsonProperty(PropertyName = "customSetupScriptProperties")] + public IntegrationRuntimeCustomSetupScriptProperties CustomSetupScriptProperties { get; set; } + + /// + /// Gets or sets data proxy properties for a managed dedicated + /// integration runtime. + /// + [JsonProperty(PropertyName = "dataProxyProperties")] + public IntegrationRuntimeDataProxyProperties DataProxyProperties { get; set; } + + /// + /// Gets or sets the edition for the SSIS Integration Runtime. Possible + /// values include: 'Standard', 'Enterprise' + /// + [JsonProperty(PropertyName = "edition")] + public string Edition { get; set; } + + /// + /// Gets or sets custom setup without script properties for a SSIS + /// integration runtime. + /// + [JsonProperty(PropertyName = "expressCustomSetupProperties")] + public IList ExpressCustomSetupProperties { get; set; } + + /// + /// Gets or sets package stores for the SSIS Integration Runtime. + /// + [JsonProperty(PropertyName = "packageStores")] + public IList PackageStores { get; set; } + + /// + /// Gets or sets the credential reference containing authentication + /// information. + /// + [JsonProperty(PropertyName = "credential")] + public CredentialReference Credential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (CatalogInfo != null) + { + CatalogInfo.Validate(); + } + if (CustomSetupScriptProperties != null) + { + CustomSetupScriptProperties.Validate(); + } + if (PackageStores != null) + { + foreach (var element in PackageStores) + { + if (element != null) + { + element.Validate(); + } + } + } + if (Credential != null) + { + Credential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeState.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeState.cs new file mode 100644 index 000000000000..e50d8cea0048 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeState.cs @@ -0,0 +1,30 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for IntegrationRuntimeState. + /// + public static class IntegrationRuntimeState + { + public const string Initial = "Initial"; + public const string Stopped = "Stopped"; + public const string Started = "Started"; + public const string Starting = "Starting"; + public const string Stopping = "Stopping"; + public const string NeedRegistration = "NeedRegistration"; + public const string Online = "Online"; + public const string Limited = "Limited"; + public const string Offline = "Offline"; + public const string AccessDenied = "AccessDenied"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeStatus.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeStatus.cs new file mode 100644 index 000000000000..b6f38456bf47 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeStatus.cs @@ -0,0 +1,77 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Integration runtime status. + /// + public partial class IntegrationRuntimeStatus + { + /// + /// Initializes a new instance of the IntegrationRuntimeStatus class. + /// + public IntegrationRuntimeStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationRuntimeStatus class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The data factory name which the + /// integration runtime belong to. + /// The state of integration runtime. Possible + /// values include: 'Initial', 'Stopped', 'Started', 'Starting', + /// 'Stopping', 'NeedRegistration', 'Online', 'Limited', 'Offline', + /// 'AccessDenied' + public IntegrationRuntimeStatus(IDictionary additionalProperties = default(IDictionary), string dataFactoryName = default(string), string state = default(string)) + { + AdditionalProperties = additionalProperties; + DataFactoryName = dataFactoryName; + State = state; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets the data factory name which the integration runtime belong to. + /// + [JsonProperty(PropertyName = "dataFactoryName")] + public string DataFactoryName { get; private set; } + + /// + /// Gets the state of integration runtime. Possible values include: + /// 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', + /// 'NeedRegistration', 'Online', 'Limited', 'Offline', 'AccessDenied' + /// + [JsonProperty(PropertyName = "state")] + public string State { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeStatusListResponse.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeStatusListResponse.cs new file mode 100644 index 000000000000..68d606b00ede --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeStatusListResponse.cs @@ -0,0 +1,89 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A list of integration runtime status. + /// + public partial class IntegrationRuntimeStatusListResponse + { + /// + /// Initializes a new instance of the + /// IntegrationRuntimeStatusListResponse class. + /// + public IntegrationRuntimeStatusListResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// IntegrationRuntimeStatusListResponse class. + /// + /// List of integration runtime status. + /// The link to the next page of results, if any + /// remaining results exist. + public IntegrationRuntimeStatusListResponse(IList value, string nextLink = default(string)) + { + Value = value; + NextLink = nextLink; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of integration runtime status. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + /// + /// Gets or sets the link to the next page of results, if any remaining + /// results exist. + /// + [JsonProperty(PropertyName = "nextLink")] + public string NextLink { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Value == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Value"); + } + if (Value != null) + { + foreach (var element in Value) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeStatusResponse.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeStatusResponse.cs new file mode 100644 index 000000000000..d8783bdff399 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeStatusResponse.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Integration runtime status response. + /// + public partial class IntegrationRuntimeStatusResponse + { + /// + /// Initializes a new instance of the IntegrationRuntimeStatusResponse + /// class. + /// + public IntegrationRuntimeStatusResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationRuntimeStatusResponse + /// class. + /// + /// Integration runtime properties. + /// The integration runtime name. + public IntegrationRuntimeStatusResponse(IntegrationRuntimeStatus properties, string name = default(string)) + { + Name = name; + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the integration runtime name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets or sets integration runtime properties. + /// + [JsonProperty(PropertyName = "properties")] + public IntegrationRuntimeStatus Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeType.cs new file mode 100644 index 000000000000..7249623ee8c0 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for IntegrationRuntimeType. + /// + public static class IntegrationRuntimeType + { + public const string Managed = "Managed"; + public const string SelfHosted = "SelfHosted"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeUpdateResult.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeUpdateResult.cs new file mode 100644 index 000000000000..86c22f539002 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeUpdateResult.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for IntegrationRuntimeUpdateResult. + /// + public static class IntegrationRuntimeUpdateResult + { + public const string None = "None"; + public const string Succeed = "Succeed"; + public const string Fail = "Fail"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeVNetProperties.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeVNetProperties.cs new file mode 100644 index 000000000000..e07d87fc9d0a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/IntegrationRuntimeVNetProperties.cs @@ -0,0 +1,97 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// VNet properties for managed integration runtime. + /// + public partial class IntegrationRuntimeVNetProperties + { + /// + /// Initializes a new instance of the IntegrationRuntimeVNetProperties + /// class. + /// + public IntegrationRuntimeVNetProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IntegrationRuntimeVNetProperties + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The ID of the VNet that this integration + /// runtime will join. + /// The name of the subnet this integration + /// runtime will join. + /// Resource IDs of the public IP addresses + /// that this integration runtime will use. + /// The ID of subnet, to which this Azure-SSIS + /// integration runtime will be joined. + public IntegrationRuntimeVNetProperties(IDictionary additionalProperties = default(IDictionary), string vNetId = default(string), string subnet = default(string), IList publicIPs = default(IList), string subnetId = default(string)) + { + AdditionalProperties = additionalProperties; + VNetId = vNetId; + Subnet = subnet; + PublicIPs = publicIPs; + SubnetId = subnetId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets the ID of the VNet that this integration runtime will + /// join. + /// + [JsonProperty(PropertyName = "vNetId")] + public string VNetId { get; set; } + + /// + /// Gets or sets the name of the subnet this integration runtime will + /// join. + /// + [JsonProperty(PropertyName = "subnet")] + public string Subnet { get; set; } + + /// + /// Gets or sets resource IDs of the public IP addresses that this + /// integration runtime will use. + /// + [JsonProperty(PropertyName = "publicIPs")] + public IList PublicIPs { get; set; } + + /// + /// Gets or sets the ID of subnet, to which this Azure-SSIS integration + /// runtime will be joined. + /// + [JsonProperty(PropertyName = "subnetId")] + public string SubnetId { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JiraLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JiraLinkedService.cs new file mode 100644 index 000000000000..f9e051fe18b4 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JiraLinkedService.cs @@ -0,0 +1,163 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Jira Service linked service. + /// + [Newtonsoft.Json.JsonObject("Jira")] + [Rest.Serialization.JsonTransformation] + public partial class JiraLinkedService : LinkedService + { + /// + /// Initializes a new instance of the JiraLinkedService class. + /// + public JiraLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JiraLinkedService class. + /// + /// The IP address or host name of the Jira service. + /// (e.g. jira.example.com) + /// The user name that you use to access Jira + /// Service. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The TCP port that the Jira server uses to listen + /// for client connections. The default value is 443 if connecting + /// through HTTPS, or 8080 if connecting through HTTP. + /// The password corresponding to the user name + /// that you provided in the username field. + /// Specifies whether the data + /// source endpoints are encrypted using HTTPS. The default value is + /// true. + /// Specifies whether to require the + /// host name in the server's certificate to match the host name of the + /// server when connecting over SSL. The default value is true. + /// Specifies whether to verify the + /// identity of the server when connecting over SSL. The default value + /// is true. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public JiraLinkedService(object host, object username, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object port = default(object), SecretBase password = default(SecretBase), object useEncryptedEndpoints = default(object), object useHostVerification = default(object), object usePeerVerification = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Host = host; + Port = port; + Username = username; + Password = password; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the IP address or host name of the Jira service. (e.g. + /// jira.example.com) + /// + [JsonProperty(PropertyName = "typeProperties.host")] + public object Host { get; set; } + + /// + /// Gets or sets the TCP port that the Jira server uses to listen for + /// client connections. The default value is 443 if connecting through + /// HTTPS, or 8080 if connecting through HTTP. + /// + [JsonProperty(PropertyName = "typeProperties.port")] + public object Port { get; set; } + + /// + /// Gets or sets the user name that you use to access Jira Service. + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets the password corresponding to the user name that you + /// provided in the username field. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets specifies whether the data source endpoints are + /// encrypted using HTTPS. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useEncryptedEndpoints")] + public object UseEncryptedEndpoints { get; set; } + + /// + /// Gets or sets specifies whether to require the host name in the + /// server's certificate to match the host name of the server when + /// connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useHostVerification")] + public object UseHostVerification { get; set; } + + /// + /// Gets or sets specifies whether to verify the identity of the server + /// when connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.usePeerVerification")] + public object UsePeerVerification { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Host == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Host"); + } + if (Username == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Username"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JiraObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JiraObjectDataset.cs new file mode 100644 index 000000000000..951f47c0616c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JiraObjectDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Jira Service dataset. + /// + [Newtonsoft.Json.JsonObject("JiraObject")] + [Rest.Serialization.JsonTransformation] + public partial class JiraObjectDataset : Dataset + { + /// + /// Initializes a new instance of the JiraObjectDataset class. + /// + public JiraObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the JiraObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name. Type: string (or Expression + /// with resultType string). + public JiraObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JiraSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JiraSource.cs new file mode 100644 index 000000000000..ede2a9f68c60 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JiraSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Jira Service source. + /// + public partial class JiraSource : TabularSource + { + /// + /// Initializes a new instance of the JiraSource class. + /// + public JiraSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JiraSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public JiraSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonDataset.cs new file mode 100644 index 000000000000..70ac15dc9f38 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonDataset.cs @@ -0,0 +1,120 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Json dataset. + /// + [Newtonsoft.Json.JsonObject("Json")] + [Rest.Serialization.JsonTransformation] + public partial class JsonDataset : Dataset + { + /// + /// Initializes a new instance of the JsonDataset class. + /// + public JsonDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the JsonDataset class. + /// + /// Linked service reference. + /// The location of the json data + /// storage. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The code page name of the preferred + /// encoding. If not specified, the default value is UTF-8, unless BOM + /// denotes another Unicode encoding. Refer to the name column of the + /// table in the following link to set supported values: + /// https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: + /// string (or Expression with resultType string). + /// The data compression method used for the + /// json dataset. + public JsonDataset(LinkedServiceReference linkedServiceName, DatasetLocation location, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object encodingName = default(object), DatasetCompression compression = default(DatasetCompression)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Location = location; + EncodingName = encodingName; + Compression = compression; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the location of the json data storage. + /// + [JsonProperty(PropertyName = "typeProperties.location")] + public DatasetLocation Location { get; set; } + + /// + /// Gets or sets the code page name of the preferred encoding. If not + /// specified, the default value is UTF-8, unless BOM denotes another + /// Unicode encoding. Refer to the name column of the table in the + /// following link to set supported values: + /// https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.encodingName")] + public object EncodingName { get; set; } + + /// + /// Gets or sets the data compression method used for the json dataset. + /// + [JsonProperty(PropertyName = "typeProperties.compression")] + public DatasetCompression Compression { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Location"); + } + if (Compression != null) + { + Compression.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonFormat.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonFormat.cs new file mode 100644 index 000000000000..2dd88e7b2f54 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonFormat.cs @@ -0,0 +1,128 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The data stored in JSON format. + /// + public partial class JsonFormat : DatasetStorageFormat + { + /// + /// Initializes a new instance of the JsonFormat class. + /// + public JsonFormat() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JsonFormat class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Serializer. Type: string (or Expression + /// with resultType string). + /// Deserializer. Type: string (or + /// Expression with resultType string). + /// File pattern of JSON. To be more + /// specific, the way of separating a collection of JSON objects. The + /// default value is 'setOfObjects'. It is case-sensitive. + /// The character used to separate + /// nesting levels. Default value is '.' (dot). Type: string (or + /// Expression with resultType string). + /// The code page name of the preferred + /// encoding. If not provided, the default value is 'utf-8', unless the + /// byte order mark (BOM) denotes another Unicode encoding. The full + /// list of supported values can be found in the 'Name' column of the + /// table of encodings in the following reference: + /// https://go.microsoft.com/fwlink/?linkid=861078. Type: string (or + /// Expression with resultType string). + /// The JSONPath of the JSON array + /// element to be flattened. Example: "$.ArrayPath". Type: string (or + /// Expression with resultType string). + /// The JSONPath definition for each + /// column mapping with a customized column name to extract data from + /// JSON file. For fields under root object, start with "$"; for fields + /// inside the array chosen by jsonNodeReference property, start from + /// the array element. Example: {"Column1": "$.Column1Path", "Column2": + /// "Column2PathInArray"}. Type: object (or Expression with resultType + /// object). + public JsonFormat(IDictionary additionalProperties = default(IDictionary), object serializer = default(object), object deserializer = default(object), object filePattern = default(object), object nestingSeparator = default(object), object encodingName = default(object), object jsonNodeReference = default(object), object jsonPathDefinition = default(object)) + : base(additionalProperties, serializer, deserializer) + { + FilePattern = filePattern; + NestingSeparator = nestingSeparator; + EncodingName = encodingName; + JsonNodeReference = jsonNodeReference; + JsonPathDefinition = jsonPathDefinition; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets file pattern of JSON. To be more specific, the way of + /// separating a collection of JSON objects. The default value is + /// 'setOfObjects'. It is case-sensitive. + /// + [JsonProperty(PropertyName = "filePattern")] + public object FilePattern { get; set; } + + /// + /// Gets or sets the character used to separate nesting levels. Default + /// value is '.' (dot). Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "nestingSeparator")] + public object NestingSeparator { get; set; } + + /// + /// Gets or sets the code page name of the preferred encoding. If not + /// provided, the default value is 'utf-8', unless the byte order mark + /// (BOM) denotes another Unicode encoding. The full list of supported + /// values can be found in the 'Name' column of the table of encodings + /// in the following reference: + /// https://go.microsoft.com/fwlink/?linkid=861078. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "encodingName")] + public object EncodingName { get; set; } + + /// + /// Gets or sets the JSONPath of the JSON array element to be + /// flattened. Example: "$.ArrayPath". Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "jsonNodeReference")] + public object JsonNodeReference { get; set; } + + /// + /// Gets or sets the JSONPath definition for each column mapping with a + /// customized column name to extract data from JSON file. For fields + /// under root object, start with "$"; for fields inside the array + /// chosen by jsonNodeReference property, start from the array element. + /// Example: {"Column1": "$.Column1Path", "Column2": + /// "Column2PathInArray"}. Type: object (or Expression with resultType + /// object). + /// + [JsonProperty(PropertyName = "jsonPathDefinition")] + public object JsonPathDefinition { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonFormatFilePattern.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonFormatFilePattern.cs new file mode 100644 index 000000000000..823c3f01573c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonFormatFilePattern.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for JsonFormatFilePattern. + /// + public static class JsonFormatFilePattern + { + public const string SetOfObjects = "setOfObjects"; + public const string ArrayOfObjects = "arrayOfObjects"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonReadSettings.cs new file mode 100644 index 000000000000..2adf88c2ccaa --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonReadSettings.cs @@ -0,0 +1,56 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Json read settings. + /// + public partial class JsonReadSettings : FormatReadSettings + { + /// + /// Initializes a new instance of the JsonReadSettings class. + /// + public JsonReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JsonReadSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Compression settings. + public JsonReadSettings(IDictionary additionalProperties = default(IDictionary), CompressionReadSettings compressionProperties = default(CompressionReadSettings)) + : base(additionalProperties) + { + CompressionProperties = compressionProperties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets compression settings. + /// + [JsonProperty(PropertyName = "compressionProperties")] + public CompressionReadSettings CompressionProperties { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonSink.cs new file mode 100644 index 000000000000..580785f1237e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonSink.cs @@ -0,0 +1,80 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Json sink. + /// + public partial class JsonSink : CopySink + { + /// + /// Initializes a new instance of the JsonSink class. + /// + public JsonSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JsonSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Json store settings. + /// Json format settings. + public JsonSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), StoreWriteSettings storeSettings = default(StoreWriteSettings), JsonWriteSettings formatSettings = default(JsonWriteSettings)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + StoreSettings = storeSettings; + FormatSettings = formatSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets json store settings. + /// + [JsonProperty(PropertyName = "storeSettings")] + public StoreWriteSettings StoreSettings { get; set; } + + /// + /// Gets or sets json format settings. + /// + [JsonProperty(PropertyName = "formatSettings")] + public JsonWriteSettings FormatSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonSource.cs new file mode 100644 index 000000000000..f31d1cfa99b1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonSource.cs @@ -0,0 +1,87 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Json source. + /// + public partial class JsonSource : CopySource + { + /// + /// Initializes a new instance of the JsonSource class. + /// + public JsonSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JsonSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Json store settings. + /// Json format settings. + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public JsonSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), StoreReadSettings storeSettings = default(StoreReadSettings), JsonReadSettings formatSettings = default(JsonReadSettings), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + StoreSettings = storeSettings; + FormatSettings = formatSettings; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets json store settings. + /// + [JsonProperty(PropertyName = "storeSettings")] + public StoreReadSettings StoreSettings { get; set; } + + /// + /// Gets or sets json format settings. + /// + [JsonProperty(PropertyName = "formatSettings")] + public JsonReadSettings FormatSettings { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonWriteFilePattern.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonWriteFilePattern.cs new file mode 100644 index 000000000000..124f33ec1a7f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonWriteFilePattern.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for JsonWriteFilePattern. + /// + public static class JsonWriteFilePattern + { + public const string SetOfObjects = "setOfObjects"; + public const string ArrayOfObjects = "arrayOfObjects"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonWriteSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonWriteSettings.cs new file mode 100644 index 000000000000..def366580c13 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/JsonWriteSettings.cs @@ -0,0 +1,60 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Json write settings. + /// + public partial class JsonWriteSettings : FormatWriteSettings + { + /// + /// Initializes a new instance of the JsonWriteSettings class. + /// + public JsonWriteSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JsonWriteSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// File pattern of JSON. This setting + /// controls the way a collection of JSON objects will be treated. The + /// default value is 'setOfObjects'. It is case-sensitive. + public JsonWriteSettings(IDictionary additionalProperties = default(IDictionary), object filePattern = default(object)) + : base(additionalProperties) + { + FilePattern = filePattern; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets file pattern of JSON. This setting controls the way a + /// collection of JSON objects will be treated. The default value is + /// 'setOfObjects'. It is case-sensitive. + /// + [JsonProperty(PropertyName = "filePattern")] + public object FilePattern { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LakeHouseLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LakeHouseLinkedService.cs new file mode 100644 index 000000000000..e9be5ee08ae7 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LakeHouseLinkedService.cs @@ -0,0 +1,170 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Microsoft Fabric LakeHouse linked service. + /// + [Newtonsoft.Json.JsonObject("LakeHouse")] + [Rest.Serialization.JsonTransformation] + public partial class LakeHouseLinkedService : LinkedService + { + /// + /// Initializes a new instance of the LakeHouseLinkedService class. + /// + public LakeHouseLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LakeHouseLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The ID of Microsoft Fabric workspace. + /// Type: string (or Expression with resultType string). + /// The ID of Microsoft Fabric LakeHouse + /// artifact. Type: string (or Expression with resultType + /// string). + /// The ID of the application used to + /// authenticate against Microsoft Fabric LakeHouse. Type: string (or + /// Expression with resultType string). + /// The Key of the application used + /// to authenticate against Microsoft Fabric LakeHouse. + /// The name or ID of the tenant to which the + /// service principal belongs. Type: string (or Expression with + /// resultType string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// The service principal + /// credential type to use in Server-To-Server authentication. + /// 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for + /// certificate. Type: string (or Expression with resultType + /// string). + /// The credential of the + /// service principal object in Azure Active Directory. If + /// servicePrincipalCredentialType is 'ServicePrincipalKey', + /// servicePrincipalCredential can be SecureString or + /// AzureKeyVaultSecretReference. If servicePrincipalCredentialType is + /// 'ServicePrincipalCert', servicePrincipalCredential can only be + /// AzureKeyVaultSecretReference. + public LakeHouseLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object workspaceId = default(object), object artifactId = default(object), object servicePrincipalId = default(object), SecretBase servicePrincipalKey = default(SecretBase), object tenant = default(object), string encryptedCredential = default(string), object servicePrincipalCredentialType = default(object), SecretBase servicePrincipalCredential = default(SecretBase)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + WorkspaceId = workspaceId; + ArtifactId = artifactId; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + EncryptedCredential = encryptedCredential; + ServicePrincipalCredentialType = servicePrincipalCredentialType; + ServicePrincipalCredential = servicePrincipalCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the ID of Microsoft Fabric workspace. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.workspaceId")] + public object WorkspaceId { get; set; } + + /// + /// Gets or sets the ID of Microsoft Fabric LakeHouse artifact. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.artifactId")] + public object ArtifactId { get; set; } + + /// + /// Gets or sets the ID of the application used to authenticate against + /// Microsoft Fabric LakeHouse. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalId")] + public object ServicePrincipalId { get; set; } + + /// + /// Gets or sets the Key of the application used to authenticate + /// against Microsoft Fabric LakeHouse. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalKey")] + public SecretBase ServicePrincipalKey { get; set; } + + /// + /// Gets or sets the name or ID of the tenant to which the service + /// principal belongs. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.tenant")] + public object Tenant { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets the service principal credential type to use in + /// Server-To-Server authentication. 'ServicePrincipalKey' for + /// key/secret, 'ServicePrincipalCert' for certificate. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalCredentialType")] + public object ServicePrincipalCredentialType { get; set; } + + /// + /// Gets or sets the credential of the service principal object in + /// Azure Active Directory. If servicePrincipalCredentialType is + /// 'ServicePrincipalKey', servicePrincipalCredential can be + /// SecureString or AzureKeyVaultSecretReference. If + /// servicePrincipalCredentialType is 'ServicePrincipalCert', + /// servicePrincipalCredential can only be + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalCredential")] + public SecretBase ServicePrincipalCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LakeHouseLocation.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LakeHouseLocation.cs new file mode 100644 index 000000000000..6d3bb5e5bddc --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LakeHouseLocation.cs @@ -0,0 +1,51 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The location of Microsoft Fabric LakeHouse Files dataset. + /// + public partial class LakeHouseLocation : DatasetLocation + { + /// + /// Initializes a new instance of the LakeHouseLocation class. + /// + public LakeHouseLocation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LakeHouseLocation class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Specify the folder path of dataset. Type: + /// string (or Expression with resultType string) + /// Specify the file name of dataset. Type: + /// string (or Expression with resultType string). + public LakeHouseLocation(IDictionary additionalProperties = default(IDictionary), object folderPath = default(object), object fileName = default(object)) + : base(additionalProperties, folderPath, fileName) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LakeHouseReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LakeHouseReadSettings.cs new file mode 100644 index 000000000000..71fb3156dc31 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LakeHouseReadSettings.cs @@ -0,0 +1,158 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Microsoft Fabric LakeHouse Files read settings. + /// + public partial class LakeHouseReadSettings : StoreReadSettings + { + /// + /// Initializes a new instance of the LakeHouseReadSettings class. + /// + public LakeHouseReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LakeHouseReadSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// If true, files under the folder path will + /// be read recursively. Default is true. Type: boolean (or Expression + /// with resultType boolean). + /// Microsoft Fabric LakeHouse Files + /// wildcardFolderPath. Type: string (or Expression with resultType + /// string). + /// Microsoft Fabric LakeHouse Files + /// wildcardFileName. Type: string (or Expression with resultType + /// string). + /// Point to a text file that lists each + /// file (relative path to the path configured in the dataset) that you + /// want to copy. Type: string (or Expression with resultType + /// string). + /// Indicates whether to enable + /// partition discovery. Type: boolean (or Expression with resultType + /// boolean). + /// Specify the root path where + /// partition discovery starts from. Type: string (or Expression with + /// resultType string). + /// Indicates whether the + /// source files need to be deleted after copy completion. Default is + /// false. Type: boolean (or Expression with resultType + /// boolean). + /// The start of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + /// The end of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + public LakeHouseReadSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object recursive = default(object), object wildcardFolderPath = default(object), object wildcardFileName = default(object), object fileListPath = default(object), object enablePartitionDiscovery = default(object), object partitionRootPath = default(object), object deleteFilesAfterCompletion = default(object), object modifiedDatetimeStart = default(object), object modifiedDatetimeEnd = default(object)) + : base(additionalProperties, maxConcurrentConnections, disableMetricsCollection) + { + Recursive = recursive; + WildcardFolderPath = wildcardFolderPath; + WildcardFileName = wildcardFileName; + FileListPath = fileListPath; + EnablePartitionDiscovery = enablePartitionDiscovery; + PartitionRootPath = partitionRootPath; + DeleteFilesAfterCompletion = deleteFilesAfterCompletion; + ModifiedDatetimeStart = modifiedDatetimeStart; + ModifiedDatetimeEnd = modifiedDatetimeEnd; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets if true, files under the folder path will be read + /// recursively. Default is true. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "recursive")] + public object Recursive { get; set; } + + /// + /// Gets or sets microsoft Fabric LakeHouse Files wildcardFolderPath. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFolderPath")] + public object WildcardFolderPath { get; set; } + + /// + /// Gets or sets microsoft Fabric LakeHouse Files wildcardFileName. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFileName")] + public object WildcardFileName { get; set; } + + /// + /// Gets or sets point to a text file that lists each file (relative + /// path to the path configured in the dataset) that you want to copy. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "fileListPath")] + public object FileListPath { get; set; } + + /// + /// Gets or sets indicates whether to enable partition discovery. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "enablePartitionDiscovery")] + public object EnablePartitionDiscovery { get; set; } + + /// + /// Gets or sets specify the root path where partition discovery starts + /// from. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionRootPath")] + public object PartitionRootPath { get; set; } + + /// + /// Gets or sets indicates whether the source files need to be deleted + /// after copy completion. Default is false. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "deleteFilesAfterCompletion")] + public object DeleteFilesAfterCompletion { get; set; } + + /// + /// Gets or sets the start of file's modified datetime. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "modifiedDatetimeStart")] + public object ModifiedDatetimeStart { get; set; } + + /// + /// Gets or sets the end of file's modified datetime. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "modifiedDatetimeEnd")] + public object ModifiedDatetimeEnd { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LakeHouseTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LakeHouseTableDataset.cs new file mode 100644 index 000000000000..fc32da4a61df --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LakeHouseTableDataset.cs @@ -0,0 +1,97 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Microsoft Fabric LakeHouse Table. + /// + [Newtonsoft.Json.JsonObject("LakeHouseTable")] + [Rest.Serialization.JsonTransformation] + public partial class LakeHouseTableDataset : Dataset + { + /// + /// Initializes a new instance of the LakeHouseTableDataset class. + /// + public LakeHouseTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the LakeHouseTableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The schema name of + /// Microsoft Fabric LakeHouse Table. Type: string (or Expression with + /// resultType string). + /// The name of Microsoft Fabric LakeHouse Table. + /// Type: string (or Expression with resultType string). + public LakeHouseTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object lakeHouseTableDatasetSchema = default(object), object table = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + LakeHouseTableDatasetSchema = lakeHouseTableDatasetSchema; + Table = table; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the schema name of Microsoft Fabric LakeHouse Table. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object LakeHouseTableDatasetSchema { get; set; } + + /// + /// Gets or sets the name of Microsoft Fabric LakeHouse Table. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LakeHouseTableSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LakeHouseTableSink.cs new file mode 100644 index 000000000000..22e348e90de1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LakeHouseTableSink.cs @@ -0,0 +1,100 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity for Microsoft Fabric LakeHouse Table sink. + /// + public partial class LakeHouseTableSink : CopySink + { + /// + /// Initializes a new instance of the LakeHouseTableSink class. + /// + public LakeHouseTableSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LakeHouseTableSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The type of table action for + /// LakeHouse Table sink. Possible values include: "None", "Append", + /// "Overwrite". + /// Create partitions in folder structure + /// based on one or multiple columns. Each distinct column value (pair) + /// will be a new partition. Possible values include: "None", + /// "PartitionByKey". + /// Specify the partition column names + /// from sink columns. Type: array of objects (or Expression with + /// resultType array of objects). + public LakeHouseTableSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object tableActionOption = default(object), object partitionOption = default(object), object partitionNameList = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + TableActionOption = tableActionOption; + PartitionOption = partitionOption; + PartitionNameList = partitionNameList; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the type of table action for LakeHouse Table sink. + /// Possible values include: "None", "Append", "Overwrite". + /// + [JsonProperty(PropertyName = "tableActionOption")] + public object TableActionOption { get; set; } + + /// + /// Gets or sets create partitions in folder structure based on one or + /// multiple columns. Each distinct column value (pair) will be a new + /// partition. Possible values include: "None", "PartitionByKey". + /// + [JsonProperty(PropertyName = "partitionOption")] + public object PartitionOption { get; set; } + + /// + /// Gets or sets specify the partition column names from sink columns. + /// Type: array of objects (or Expression with resultType array of + /// objects). + /// + [JsonProperty(PropertyName = "partitionNameList")] + public object PartitionNameList { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LakeHouseTableSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LakeHouseTableSource.cs new file mode 100644 index 000000000000..1b72eb8c9a0c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LakeHouseTableSource.cs @@ -0,0 +1,91 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for Microsoft Fabric LakeHouse Table. + /// + public partial class LakeHouseTableSource : CopySource + { + /// + /// Initializes a new instance of the LakeHouseTableSource class. + /// + public LakeHouseTableSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LakeHouseTableSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query an older snapshot by timestamp. + /// Type: string (or Expression with resultType string). + /// Query an older snapshot by version. Type: + /// integer (or Expression with resultType integer). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public LakeHouseTableSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object timestampAsOf = default(object), object versionAsOf = default(object), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + TimestampAsOf = timestampAsOf; + VersionAsOf = versionAsOf; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets query an older snapshot by timestamp. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "timestampAsOf")] + public object TimestampAsOf { get; set; } + + /// + /// Gets or sets query an older snapshot by version. Type: integer (or + /// Expression with resultType integer). + /// + [JsonProperty(PropertyName = "versionAsOf")] + public object VersionAsOf { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LakeHouseWriteSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LakeHouseWriteSettings.cs new file mode 100644 index 000000000000..b40d25a6edc7 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LakeHouseWriteSettings.cs @@ -0,0 +1,58 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Microsoft Fabric LakeHouse Files write settings. + /// + public partial class LakeHouseWriteSettings : StoreWriteSettings + { + /// + /// Initializes a new instance of the LakeHouseWriteSettings class. + /// + public LakeHouseWriteSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LakeHouseWriteSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The type of copy behavior for copy + /// sink. + /// Specify the custom metadata to be added to + /// sink data. Type: array of objects (or Expression with resultType + /// array of objects). + public LakeHouseWriteSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object copyBehavior = default(object), IList metadata = default(IList)) + : base(additionalProperties, maxConcurrentConnections, disableMetricsCollection, copyBehavior, metadata) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedIntegrationRuntime.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedIntegrationRuntime.cs new file mode 100644 index 000000000000..4ec7da81daf2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedIntegrationRuntime.cs @@ -0,0 +1,91 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The linked integration runtime information. + /// + public partial class LinkedIntegrationRuntime + { + /// + /// Initializes a new instance of the LinkedIntegrationRuntime class. + /// + public LinkedIntegrationRuntime() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LinkedIntegrationRuntime class. + /// + /// The name of the linked integration + /// runtime. + /// The subscription ID for which the + /// linked integration runtime belong to. + /// The name of the data factory for + /// which the linked integration runtime belong to. + /// The location of the data factory + /// for which the linked integration runtime belong to. + /// The creating time of the linked + /// integration runtime. + public LinkedIntegrationRuntime(string name = default(string), string subscriptionId = default(string), string dataFactoryName = default(string), string dataFactoryLocation = default(string), System.DateTime? createTime = default(System.DateTime?)) + { + Name = name; + SubscriptionId = subscriptionId; + DataFactoryName = dataFactoryName; + DataFactoryLocation = dataFactoryLocation; + CreateTime = createTime; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the name of the linked integration runtime. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets the subscription ID for which the linked integration runtime + /// belong to. + /// + [JsonProperty(PropertyName = "subscriptionId")] + public string SubscriptionId { get; private set; } + + /// + /// Gets the name of the data factory for which the linked integration + /// runtime belong to. + /// + [JsonProperty(PropertyName = "dataFactoryName")] + public string DataFactoryName { get; private set; } + + /// + /// Gets the location of the data factory for which the linked + /// integration runtime belong to. + /// + [JsonProperty(PropertyName = "dataFactoryLocation")] + public string DataFactoryLocation { get; private set; } + + /// + /// Gets the creating time of the linked integration runtime. + /// + [JsonProperty(PropertyName = "createTime")] + public System.DateTime? CreateTime { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedIntegrationRuntimeKeyAuthorization.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedIntegrationRuntimeKeyAuthorization.cs new file mode 100644 index 000000000000..294dd42f3db7 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedIntegrationRuntimeKeyAuthorization.cs @@ -0,0 +1,72 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The key authorization type integration runtime. + /// + [Newtonsoft.Json.JsonObject("Key")] + public partial class LinkedIntegrationRuntimeKeyAuthorization : LinkedIntegrationRuntimeType + { + /// + /// Initializes a new instance of the + /// LinkedIntegrationRuntimeKeyAuthorization class. + /// + public LinkedIntegrationRuntimeKeyAuthorization() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// LinkedIntegrationRuntimeKeyAuthorization class. + /// + /// The key used for authorization. + public LinkedIntegrationRuntimeKeyAuthorization(SecureString key) + { + Key = key; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the key used for authorization. + /// + [JsonProperty(PropertyName = "key")] + public SecureString Key { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Key == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Key"); + } + if (Key != null) + { + Key.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedIntegrationRuntimeRbacAuthorization.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedIntegrationRuntimeRbacAuthorization.cs new file mode 100644 index 000000000000..2296f23be6dc --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedIntegrationRuntimeRbacAuthorization.cs @@ -0,0 +1,85 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The role based access control (RBAC) authorization type integration + /// runtime. + /// + [Newtonsoft.Json.JsonObject("RBAC")] + public partial class LinkedIntegrationRuntimeRbacAuthorization : LinkedIntegrationRuntimeType + { + /// + /// Initializes a new instance of the + /// LinkedIntegrationRuntimeRbacAuthorization class. + /// + public LinkedIntegrationRuntimeRbacAuthorization() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// LinkedIntegrationRuntimeRbacAuthorization class. + /// + /// The resource identifier of the integration + /// runtime to be shared. + /// The credential reference containing + /// authentication information. + public LinkedIntegrationRuntimeRbacAuthorization(string resourceId, CredentialReference credential = default(CredentialReference)) + { + ResourceId = resourceId; + Credential = credential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the resource identifier of the integration runtime to + /// be shared. + /// + [JsonProperty(PropertyName = "resourceId")] + public string ResourceId { get; set; } + + /// + /// Gets or sets the credential reference containing authentication + /// information. + /// + [JsonProperty(PropertyName = "credential")] + public CredentialReference Credential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ResourceId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ResourceId"); + } + if (Credential != null) + { + Credential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedIntegrationRuntimeRequest.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedIntegrationRuntimeRequest.cs new file mode 100644 index 000000000000..edcb98b3c079 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedIntegrationRuntimeRequest.cs @@ -0,0 +1,68 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Data factory name for linked integration runtime request. + /// + public partial class LinkedIntegrationRuntimeRequest + { + /// + /// Initializes a new instance of the LinkedIntegrationRuntimeRequest + /// class. + /// + public LinkedIntegrationRuntimeRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LinkedIntegrationRuntimeRequest + /// class. + /// + /// The data factory name for linked + /// integration runtime. + public LinkedIntegrationRuntimeRequest(string linkedFactoryName) + { + LinkedFactoryName = linkedFactoryName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the data factory name for linked integration runtime. + /// + [JsonProperty(PropertyName = "factoryName")] + public string LinkedFactoryName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (LinkedFactoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "LinkedFactoryName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedIntegrationRuntimeType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedIntegrationRuntimeType.cs new file mode 100644 index 000000000000..5bbd862a10d4 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedIntegrationRuntimeType.cs @@ -0,0 +1,36 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using System.Linq; + + /// + /// The base definition of a linked integration runtime. + /// + public partial class LinkedIntegrationRuntimeType + { + /// + /// Initializes a new instance of the LinkedIntegrationRuntimeType + /// class. + /// + public LinkedIntegrationRuntimeType() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedService.cs new file mode 100644 index 000000000000..87259c003053 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedService.cs @@ -0,0 +1,121 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The nested object which contains the information and credential which + /// can be used to connect with related store or compute resource. + /// + public partial class LinkedService + { + /// + /// Initializes a new instance of the LinkedService class. + /// + public LinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + public LinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList)) + { + AdditionalProperties = additionalProperties; + Version = version; + ConnectVia = connectVia; + Description = description; + Parameters = parameters; + Annotations = annotations; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets version of the linked service. + /// + [JsonProperty(PropertyName = "version")] + public string Version { get; set; } + + /// + /// Gets or sets the integration runtime reference. + /// + [JsonProperty(PropertyName = "connectVia")] + public IntegrationRuntimeReference ConnectVia { get; set; } + + /// + /// Gets or sets linked service description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets parameters for linked service. + /// + [JsonProperty(PropertyName = "parameters")] + public IDictionary Parameters { get; set; } + + /// + /// Gets or sets list of tags that can be used for describing the + /// linked service. + /// + [JsonProperty(PropertyName = "annotations")] + public IList Annotations { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ConnectVia != null) + { + ConnectVia.Validate(); + } + if (Parameters != null) + { + foreach (var valueElement in Parameters.Values) + { + if (valueElement != null) + { + valueElement.Validate(); + } + } + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedServiceDebugResource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedServiceDebugResource.cs new file mode 100644 index 000000000000..4ec8efb088fc --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedServiceDebugResource.cs @@ -0,0 +1,72 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Linked service debug resource. + /// + public partial class LinkedServiceDebugResource : SubResourceDebugResource + { + /// + /// Initializes a new instance of the LinkedServiceDebugResource class. + /// + public LinkedServiceDebugResource() + { + Properties = new LinkedService(); + CustomInit(); + } + + /// + /// Initializes a new instance of the LinkedServiceDebugResource class. + /// + /// Properties of linked service. + /// The resource name. + public LinkedServiceDebugResource(LinkedService properties, string name = default(string)) + : base(name) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets properties of linked service. + /// + [JsonProperty(PropertyName = "properties")] + public LinkedService Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + if (Properties != null) + { + Properties.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedServiceReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedServiceReference.cs new file mode 100644 index 000000000000..4b492eb75a74 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedServiceReference.cs @@ -0,0 +1,88 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service reference type. + /// + public partial class LinkedServiceReference + { + /// + /// Initializes a new instance of the LinkedServiceReference class. + /// + public LinkedServiceReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LinkedServiceReference class. + /// + /// Reference LinkedService name. + /// Arguments for LinkedService. + public LinkedServiceReference(string referenceName, IDictionary parameters = default(IDictionary)) + { + ReferenceName = referenceName; + Parameters = parameters; + CustomInit(); + } + /// + /// Static constructor for LinkedServiceReference class. + /// + static LinkedServiceReference() + { + Type = "LinkedServiceReference"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets reference LinkedService name. + /// + [JsonProperty(PropertyName = "referenceName")] + public string ReferenceName { get; set; } + + /// + /// Gets or sets arguments for LinkedService. + /// + [JsonProperty(PropertyName = "parameters")] + public IDictionary Parameters { get; set; } + + /// + /// Linked service reference type. + /// + [JsonProperty(PropertyName = "type")] + public static string Type { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ReferenceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ReferenceName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedServiceResource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedServiceResource.cs new file mode 100644 index 000000000000..1b71dee2d005 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LinkedServiceResource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Linked service resource type. + /// + public partial class LinkedServiceResource : SubResource + { + /// + /// Initializes a new instance of the LinkedServiceResource class. + /// + public LinkedServiceResource() + { + Properties = new LinkedService(); + CustomInit(); + } + + /// + /// Initializes a new instance of the LinkedServiceResource class. + /// + /// Properties of linked service. + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + public LinkedServiceResource(LinkedService properties, string id = default(string), string name = default(string), string type = default(string), string etag = default(string)) + : base(id, name, type, etag) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets properties of linked service. + /// + [JsonProperty(PropertyName = "properties")] + public LinkedService Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + if (Properties != null) + { + Properties.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LogLocationSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LogLocationSettings.cs new file mode 100644 index 000000000000..e8af925646c8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LogLocationSettings.cs @@ -0,0 +1,83 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Log location settings. + /// + public partial class LogLocationSettings + { + /// + /// Initializes a new instance of the LogLocationSettings class. + /// + public LogLocationSettings() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the LogLocationSettings class. + /// + /// Log storage linked service + /// reference. + /// The path to storage for storing detailed logs of + /// activity execution. Type: string (or Expression with resultType + /// string). + public LogLocationSettings(LinkedServiceReference linkedServiceName, object path = default(object)) + { + LinkedServiceName = linkedServiceName; + Path = path; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets log storage linked service reference. + /// + [JsonProperty(PropertyName = "linkedServiceName")] + public LinkedServiceReference LinkedServiceName { get; set; } + + /// + /// Gets or sets the path to storage for storing detailed logs of + /// activity execution. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "path")] + public object Path { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (LinkedServiceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "LinkedServiceName"); + } + if (LinkedServiceName != null) + { + LinkedServiceName.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LogSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LogSettings.cs new file mode 100644 index 000000000000..be026f31fb96 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LogSettings.cs @@ -0,0 +1,92 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Log settings. + /// + public partial class LogSettings + { + /// + /// Initializes a new instance of the LogSettings class. + /// + public LogSettings() + { + LogLocationSettings = new LogLocationSettings(); + CustomInit(); + } + + /// + /// Initializes a new instance of the LogSettings class. + /// + /// Log location settings customer + /// needs to provide when enabling log. + /// Specifies whether to enable + /// copy activity log. Type: boolean (or Expression with resultType + /// boolean). + /// Specifies settings for copy + /// activity log. + public LogSettings(LogLocationSettings logLocationSettings, object enableCopyActivityLog = default(object), CopyActivityLogSettings copyActivityLogSettings = default(CopyActivityLogSettings)) + { + EnableCopyActivityLog = enableCopyActivityLog; + CopyActivityLogSettings = copyActivityLogSettings; + LogLocationSettings = logLocationSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies whether to enable copy activity log. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "enableCopyActivityLog")] + public object EnableCopyActivityLog { get; set; } + + /// + /// Gets or sets specifies settings for copy activity log. + /// + [JsonProperty(PropertyName = "copyActivityLogSettings")] + public CopyActivityLogSettings CopyActivityLogSettings { get; set; } + + /// + /// Gets or sets log location settings customer needs to provide when + /// enabling log. + /// + [JsonProperty(PropertyName = "logLocationSettings")] + public LogLocationSettings LogLocationSettings { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (LogLocationSettings == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "LogLocationSettings"); + } + if (LogLocationSettings != null) + { + LogLocationSettings.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LogStorageSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LogStorageSettings.cs new file mode 100644 index 000000000000..92ae1462a169 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LogStorageSettings.cs @@ -0,0 +1,117 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// (Deprecated. Please use LogSettings) Log storage settings. + /// + public partial class LogStorageSettings + { + /// + /// Initializes a new instance of the LogStorageSettings class. + /// + public LogStorageSettings() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the LogStorageSettings class. + /// + /// Log storage linked service + /// reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// The path to storage for storing detailed logs of + /// activity execution. Type: string (or Expression with resultType + /// string). + /// Gets or sets the log level, support: Info, + /// Warning. Type: string (or Expression with resultType + /// string). + /// Specifies whether to enable + /// reliable logging. Type: boolean (or Expression with resultType + /// boolean). + public LogStorageSettings(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), object path = default(object), object logLevel = default(object), object enableReliableLogging = default(object)) + { + AdditionalProperties = additionalProperties; + LinkedServiceName = linkedServiceName; + Path = path; + LogLevel = logLevel; + EnableReliableLogging = enableReliableLogging; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets log storage linked service reference. + /// + [JsonProperty(PropertyName = "linkedServiceName")] + public LinkedServiceReference LinkedServiceName { get; set; } + + /// + /// Gets or sets the path to storage for storing detailed logs of + /// activity execution. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "path")] + public object Path { get; set; } + + /// + /// Gets or sets the log level, support: Info, Warning. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "logLevel")] + public object LogLevel { get; set; } + + /// + /// Gets or sets specifies whether to enable reliable logging. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "enableReliableLogging")] + public object EnableReliableLogging { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (LinkedServiceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "LinkedServiceName"); + } + if (LinkedServiceName != null) + { + LinkedServiceName.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LookupActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LookupActivity.cs new file mode 100644 index 000000000000..7f6a49f96d5c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/LookupActivity.cs @@ -0,0 +1,118 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Lookup activity. + /// + [Newtonsoft.Json.JsonObject("Lookup")] + [Rest.Serialization.JsonTransformation] + public partial class LookupActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the LookupActivity class. + /// + public LookupActivity() + { + Dataset = new DatasetReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the LookupActivity class. + /// + /// Activity name. + /// Dataset-specific source properties, same as + /// copy activity source. + /// Lookup activity dataset reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// Whether to return first row or all rows. + /// Default value is true. Type: boolean (or Expression with resultType + /// boolean). + public LookupActivity(string name, CopySource source, DatasetReference dataset, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), object firstRowOnly = default(object)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + Source = source; + Dataset = dataset; + FirstRowOnly = firstRowOnly; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets dataset-specific source properties, same as copy + /// activity source. + /// + [JsonProperty(PropertyName = "typeProperties.source")] + public CopySource Source { get; set; } + + /// + /// Gets or sets lookup activity dataset reference. + /// + [JsonProperty(PropertyName = "typeProperties.dataset")] + public DatasetReference Dataset { get; set; } + + /// + /// Gets or sets whether to return first row or all rows. Default value + /// is true. Type: boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.firstRowOnly")] + public object FirstRowOnly { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Source == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Source"); + } + if (Dataset == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Dataset"); + } + if (Dataset != null) + { + Dataset.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MagentoLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MagentoLinkedService.cs new file mode 100644 index 000000000000..29000e10c75b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MagentoLinkedService.cs @@ -0,0 +1,136 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Magento server linked service. + /// + [Newtonsoft.Json.JsonObject("Magento")] + [Rest.Serialization.JsonTransformation] + public partial class MagentoLinkedService : LinkedService + { + /// + /// Initializes a new instance of the MagentoLinkedService class. + /// + public MagentoLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MagentoLinkedService class. + /// + /// The URL of the Magento instance. (i.e. + /// 192.168.222.110/magento3) + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The access token from Magento. + /// Specifies whether the data + /// source endpoints are encrypted using HTTPS. The default value is + /// true. + /// Specifies whether to require the + /// host name in the server's certificate to match the host name of the + /// server when connecting over SSL. The default value is true. + /// Specifies whether to verify the + /// identity of the server when connecting over SSL. The default value + /// is true. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public MagentoLinkedService(object host, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), SecretBase accessToken = default(SecretBase), object useEncryptedEndpoints = default(object), object useHostVerification = default(object), object usePeerVerification = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Host = host; + AccessToken = accessToken; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the URL of the Magento instance. (i.e. + /// 192.168.222.110/magento3) + /// + [JsonProperty(PropertyName = "typeProperties.host")] + public object Host { get; set; } + + /// + /// Gets or sets the access token from Magento. + /// + [JsonProperty(PropertyName = "typeProperties.accessToken")] + public SecretBase AccessToken { get; set; } + + /// + /// Gets or sets specifies whether the data source endpoints are + /// encrypted using HTTPS. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useEncryptedEndpoints")] + public object UseEncryptedEndpoints { get; set; } + + /// + /// Gets or sets specifies whether to require the host name in the + /// server's certificate to match the host name of the server when + /// connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useHostVerification")] + public object UseHostVerification { get; set; } + + /// + /// Gets or sets specifies whether to verify the identity of the server + /// when connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.usePeerVerification")] + public object UsePeerVerification { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Host == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Host"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MagentoObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MagentoObjectDataset.cs new file mode 100644 index 000000000000..0590d18f849c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MagentoObjectDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Magento server dataset. + /// + [Newtonsoft.Json.JsonObject("MagentoObject")] + [Rest.Serialization.JsonTransformation] + public partial class MagentoObjectDataset : Dataset + { + /// + /// Initializes a new instance of the MagentoObjectDataset class. + /// + public MagentoObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the MagentoObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name. Type: string (or Expression + /// with resultType string). + public MagentoObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MagentoSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MagentoSource.cs new file mode 100644 index 000000000000..8f894abe7d34 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MagentoSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Magento server source. + /// + public partial class MagentoSource : TabularSource + { + /// + /// Initializes a new instance of the MagentoSource class. + /// + public MagentoSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MagentoSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public MagentoSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedIdentityCredential.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedIdentityCredential.cs new file mode 100644 index 000000000000..d926ee473306 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedIdentityCredential.cs @@ -0,0 +1,64 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Managed identity credential. + /// + [Newtonsoft.Json.JsonObject("ManagedIdentity")] + [Rest.Serialization.JsonTransformation] + public partial class ManagedIdentityCredential : Credential + { + /// + /// Initializes a new instance of the ManagedIdentityCredential class. + /// + public ManagedIdentityCredential() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedIdentityCredential class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Credential description. + /// List of tags that can be used for + /// describing the Credential. + /// The resource id of user assigned managed + /// identity + public ManagedIdentityCredential(IDictionary additionalProperties = default(IDictionary), string description = default(string), IList annotations = default(IList), string resourceId = default(string)) + : base(additionalProperties, description, annotations) + { + ResourceId = resourceId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the resource id of user assigned managed identity + /// + [JsonProperty(PropertyName = "typeProperties.resourceId")] + public string ResourceId { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedIntegrationRuntime.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedIntegrationRuntime.cs new file mode 100644 index 000000000000..d5f38bda3768 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedIntegrationRuntime.cs @@ -0,0 +1,127 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Managed integration runtime, including managed elastic and managed + /// dedicated integration runtimes. + /// + [Newtonsoft.Json.JsonObject("Managed")] + [Rest.Serialization.JsonTransformation] + public partial class ManagedIntegrationRuntime : IntegrationRuntime + { + /// + /// Initializes a new instance of the ManagedIntegrationRuntime class. + /// + public ManagedIntegrationRuntime() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedIntegrationRuntime class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Integration runtime description. + /// Integration runtime state, only valid for + /// managed dedicated integration runtime. Possible values include: + /// 'Initial', 'Stopped', 'Started', 'Starting', 'Stopping', + /// 'NeedRegistration', 'Online', 'Limited', 'Offline', + /// 'AccessDenied' + /// The compute resource for managed + /// integration runtime. + /// SSIS properties for managed + /// integration runtime. + /// The name of virtual network to + /// which Azure-SSIS integration runtime will join + /// Managed Virtual Network + /// reference. + public ManagedIntegrationRuntime(IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), IntegrationRuntimeComputeProperties computeProperties = default(IntegrationRuntimeComputeProperties), IntegrationRuntimeSsisProperties ssisProperties = default(IntegrationRuntimeSsisProperties), IntegrationRuntimeCustomerVirtualNetwork customerVirtualNetwork = default(IntegrationRuntimeCustomerVirtualNetwork), ManagedVirtualNetworkReference managedVirtualNetwork = default(ManagedVirtualNetworkReference)) + : base(additionalProperties, description) + { + State = state; + ComputeProperties = computeProperties; + SsisProperties = ssisProperties; + CustomerVirtualNetwork = customerVirtualNetwork; + ManagedVirtualNetwork = managedVirtualNetwork; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets integration runtime state, only valid for managed dedicated + /// integration runtime. Possible values include: 'Initial', 'Stopped', + /// 'Started', 'Starting', 'Stopping', 'NeedRegistration', 'Online', + /// 'Limited', 'Offline', 'AccessDenied' + /// + [JsonProperty(PropertyName = "state")] + public string State { get; private set; } + + /// + /// Gets or sets the compute resource for managed integration runtime. + /// + [JsonProperty(PropertyName = "typeProperties.computeProperties")] + public IntegrationRuntimeComputeProperties ComputeProperties { get; set; } + + /// + /// Gets or sets SSIS properties for managed integration runtime. + /// + [JsonProperty(PropertyName = "typeProperties.ssisProperties")] + public IntegrationRuntimeSsisProperties SsisProperties { get; set; } + + /// + /// Gets or sets the name of virtual network to which Azure-SSIS + /// integration runtime will join + /// + [JsonProperty(PropertyName = "typeProperties.customerVirtualNetwork")] + public IntegrationRuntimeCustomerVirtualNetwork CustomerVirtualNetwork { get; set; } + + /// + /// Gets or sets managed Virtual Network reference. + /// + [JsonProperty(PropertyName = "managedVirtualNetwork")] + public ManagedVirtualNetworkReference ManagedVirtualNetwork { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ComputeProperties != null) + { + ComputeProperties.Validate(); + } + if (SsisProperties != null) + { + SsisProperties.Validate(); + } + if (ManagedVirtualNetwork != null) + { + ManagedVirtualNetwork.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedIntegrationRuntimeError.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedIntegrationRuntimeError.cs new file mode 100644 index 000000000000..db47d9bfe8f0 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedIntegrationRuntimeError.cs @@ -0,0 +1,90 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Error definition for managed integration runtime. + /// + public partial class ManagedIntegrationRuntimeError + { + /// + /// Initializes a new instance of the ManagedIntegrationRuntimeError + /// class. + /// + public ManagedIntegrationRuntimeError() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedIntegrationRuntimeError + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The time when the error occurred. + /// Error code. + /// Managed integration runtime error + /// parameters. + /// Error message. + public ManagedIntegrationRuntimeError(IDictionary additionalProperties = default(IDictionary), System.DateTime? time = default(System.DateTime?), string code = default(string), IList parameters = default(IList), string message = default(string)) + { + AdditionalProperties = additionalProperties; + Time = time; + Code = code; + Parameters = parameters; + Message = message; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets the time when the error occurred. + /// + [JsonProperty(PropertyName = "time")] + public System.DateTime? Time { get; private set; } + + /// + /// Gets error code. + /// + [JsonProperty(PropertyName = "code")] + public string Code { get; private set; } + + /// + /// Gets managed integration runtime error parameters. + /// + [JsonProperty(PropertyName = "parameters")] + public IList Parameters { get; private set; } + + /// + /// Gets error message. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedIntegrationRuntimeNode.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedIntegrationRuntimeNode.cs new file mode 100644 index 000000000000..4eef1f7a7b56 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedIntegrationRuntimeNode.cs @@ -0,0 +1,87 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Properties of integration runtime node. + /// + public partial class ManagedIntegrationRuntimeNode + { + /// + /// Initializes a new instance of the ManagedIntegrationRuntimeNode + /// class. + /// + public ManagedIntegrationRuntimeNode() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedIntegrationRuntimeNode + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The managed integration runtime node + /// id. + /// The managed integration runtime node status. + /// Possible values include: 'Starting', 'Available', 'Recycling', + /// 'Unavailable' + /// The errors that occurred on this integration + /// runtime node. + public ManagedIntegrationRuntimeNode(IDictionary additionalProperties = default(IDictionary), string nodeId = default(string), string status = default(string), IList errors = default(IList)) + { + AdditionalProperties = additionalProperties; + NodeId = nodeId; + Status = status; + Errors = errors; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets the managed integration runtime node id. + /// + [JsonProperty(PropertyName = "nodeId")] + public string NodeId { get; private set; } + + /// + /// Gets the managed integration runtime node status. Possible values + /// include: 'Starting', 'Available', 'Recycling', 'Unavailable' + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; private set; } + + /// + /// Gets or sets the errors that occurred on this integration runtime + /// node. + /// + [JsonProperty(PropertyName = "errors")] + public IList Errors { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedIntegrationRuntimeNodeStatus.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedIntegrationRuntimeNodeStatus.cs new file mode 100644 index 000000000000..1266ab4951cd --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedIntegrationRuntimeNodeStatus.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for ManagedIntegrationRuntimeNodeStatus. + /// + public static class ManagedIntegrationRuntimeNodeStatus + { + public const string Starting = "Starting"; + public const string Available = "Available"; + public const string Recycling = "Recycling"; + public const string Unavailable = "Unavailable"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedIntegrationRuntimeOperationResult.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedIntegrationRuntimeOperationResult.cs new file mode 100644 index 000000000000..6fb9f01eaa4b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedIntegrationRuntimeOperationResult.cs @@ -0,0 +1,108 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Properties of managed integration runtime operation result. + /// + public partial class ManagedIntegrationRuntimeOperationResult + { + /// + /// Initializes a new instance of the + /// ManagedIntegrationRuntimeOperationResult class. + /// + public ManagedIntegrationRuntimeOperationResult() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ManagedIntegrationRuntimeOperationResult class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The operation type. Could be start or + /// stop. + /// The start time of the operation. + /// The operation result. + /// The error code. + /// Managed integration runtime error + /// parameters. + /// The activity id for the operation + /// request. + public ManagedIntegrationRuntimeOperationResult(IDictionary additionalProperties = default(IDictionary), string type = default(string), System.DateTime? startTime = default(System.DateTime?), string result = default(string), string errorCode = default(string), IList parameters = default(IList), string activityId = default(string)) + { + AdditionalProperties = additionalProperties; + Type = type; + StartTime = startTime; + Result = result; + ErrorCode = errorCode; + Parameters = parameters; + ActivityId = activityId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets the operation type. Could be start or stop. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets the start time of the operation. + /// + [JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime { get; private set; } + + /// + /// Gets the operation result. + /// + [JsonProperty(PropertyName = "result")] + public string Result { get; private set; } + + /// + /// Gets the error code. + /// + [JsonProperty(PropertyName = "errorCode")] + public string ErrorCode { get; private set; } + + /// + /// Gets managed integration runtime error parameters. + /// + [JsonProperty(PropertyName = "parameters")] + public IList Parameters { get; private set; } + + /// + /// Gets the activity id for the operation request. + /// + [JsonProperty(PropertyName = "activityId")] + public string ActivityId { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedIntegrationRuntimeStatus.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedIntegrationRuntimeStatus.cs new file mode 100644 index 000000000000..c85df1ee76e0 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedIntegrationRuntimeStatus.cs @@ -0,0 +1,98 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Managed integration runtime status. + /// + [Newtonsoft.Json.JsonObject("Managed")] + [Rest.Serialization.JsonTransformation] + public partial class ManagedIntegrationRuntimeStatus : IntegrationRuntimeStatus + { + /// + /// Initializes a new instance of the ManagedIntegrationRuntimeStatus + /// class. + /// + public ManagedIntegrationRuntimeStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedIntegrationRuntimeStatus + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The data factory name which the + /// integration runtime belong to. + /// The state of integration runtime. Possible + /// values include: 'Initial', 'Stopped', 'Started', 'Starting', + /// 'Stopping', 'NeedRegistration', 'Online', 'Limited', 'Offline', + /// 'AccessDenied' + /// The time at which the integration runtime + /// was created, in ISO8601 format. + /// The list of nodes for managed integration + /// runtime. + /// The errors that occurred on this + /// integration runtime. + /// The last operation result that occurred + /// on this integration runtime. + public ManagedIntegrationRuntimeStatus(IDictionary additionalProperties = default(IDictionary), string dataFactoryName = default(string), string state = default(string), System.DateTime? createTime = default(System.DateTime?), IList nodes = default(IList), IList otherErrors = default(IList), ManagedIntegrationRuntimeOperationResult lastOperation = default(ManagedIntegrationRuntimeOperationResult)) + : base(additionalProperties, dataFactoryName, state) + { + CreateTime = createTime; + Nodes = nodes; + OtherErrors = otherErrors; + LastOperation = lastOperation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the time at which the integration runtime was created, in + /// ISO8601 format. + /// + [JsonProperty(PropertyName = "typeProperties.createTime")] + public System.DateTime? CreateTime { get; private set; } + + /// + /// Gets the list of nodes for managed integration runtime. + /// + [JsonProperty(PropertyName = "typeProperties.nodes")] + public IList Nodes { get; private set; } + + /// + /// Gets the errors that occurred on this integration runtime. + /// + [JsonProperty(PropertyName = "typeProperties.otherErrors")] + public IList OtherErrors { get; private set; } + + /// + /// Gets the last operation result that occurred on this integration + /// runtime. + /// + [JsonProperty(PropertyName = "typeProperties.lastOperation")] + public ManagedIntegrationRuntimeOperationResult LastOperation { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedPrivateEndpoint.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedPrivateEndpoint.cs new file mode 100644 index 000000000000..72a03af2f080 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedPrivateEndpoint.cs @@ -0,0 +1,110 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Properties of a managed private endpoint + /// + public partial class ManagedPrivateEndpoint + { + /// + /// Initializes a new instance of the ManagedPrivateEndpoint class. + /// + public ManagedPrivateEndpoint() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedPrivateEndpoint class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The managed private endpoint + /// connection state + /// Fully qualified domain names + /// The groupId to which the managed private + /// endpoint is created + /// Denotes whether the managed private + /// endpoint is reserved + /// The ARM resource ID of the + /// resource to which the managed private endpoint is created + /// The managed private endpoint + /// provisioning state + public ManagedPrivateEndpoint(IDictionary additionalProperties = default(IDictionary), ConnectionStateProperties connectionState = default(ConnectionStateProperties), IList fqdns = default(IList), string groupId = default(string), bool? isReserved = default(bool?), string privateLinkResourceId = default(string), string provisioningState = default(string)) + { + AdditionalProperties = additionalProperties; + ConnectionState = connectionState; + Fqdns = fqdns; + GroupId = groupId; + IsReserved = isReserved; + PrivateLinkResourceId = privateLinkResourceId; + ProvisioningState = provisioningState; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets the managed private endpoint connection state + /// + [JsonProperty(PropertyName = "connectionState")] + public ConnectionStateProperties ConnectionState { get; set; } + + /// + /// Gets or sets fully qualified domain names + /// + [JsonProperty(PropertyName = "fqdns")] + public IList Fqdns { get; set; } + + /// + /// Gets or sets the groupId to which the managed private endpoint is + /// created + /// + [JsonProperty(PropertyName = "groupId")] + public string GroupId { get; set; } + + /// + /// Gets denotes whether the managed private endpoint is reserved + /// + [JsonProperty(PropertyName = "isReserved")] + public bool? IsReserved { get; private set; } + + /// + /// Gets or sets the ARM resource ID of the resource to which the + /// managed private endpoint is created + /// + [JsonProperty(PropertyName = "privateLinkResourceId")] + public string PrivateLinkResourceId { get; set; } + + /// + /// Gets the managed private endpoint provisioning state + /// + [JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedPrivateEndpointResource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedPrivateEndpointResource.cs new file mode 100644 index 000000000000..4b2023aa4b89 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedPrivateEndpointResource.cs @@ -0,0 +1,73 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Managed private endpoint resource type. + /// + public partial class ManagedPrivateEndpointResource : SubResource + { + /// + /// Initializes a new instance of the ManagedPrivateEndpointResource + /// class. + /// + public ManagedPrivateEndpointResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedPrivateEndpointResource + /// class. + /// + /// Managed private endpoint + /// properties. + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + public ManagedPrivateEndpointResource(ManagedPrivateEndpoint properties, string id = default(string), string name = default(string), string type = default(string), string etag = default(string)) + : base(id, name, type, etag) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets managed private endpoint properties. + /// + [JsonProperty(PropertyName = "properties")] + public ManagedPrivateEndpoint Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedVirtualNetwork.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedVirtualNetwork.cs new file mode 100644 index 000000000000..43d8aa7af74f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedVirtualNetwork.cs @@ -0,0 +1,71 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A managed Virtual Network associated with the Azure Data Factory + /// + public partial class ManagedVirtualNetwork + { + /// + /// Initializes a new instance of the ManagedVirtualNetwork class. + /// + public ManagedVirtualNetwork() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedVirtualNetwork class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Managed Virtual Network ID. + /// Managed Virtual Network alias. + public ManagedVirtualNetwork(IDictionary additionalProperties = default(IDictionary), string vNetId = default(string), string alias = default(string)) + { + AdditionalProperties = additionalProperties; + VNetId = vNetId; + Alias = alias; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets managed Virtual Network ID. + /// + [JsonProperty(PropertyName = "vNetId")] + public string VNetId { get; private set; } + + /// + /// Gets managed Virtual Network alias. + /// + [JsonProperty(PropertyName = "alias")] + public string Alias { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedVirtualNetworkReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedVirtualNetworkReference.cs new file mode 100644 index 000000000000..f57c069b4c0a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedVirtualNetworkReference.cs @@ -0,0 +1,81 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Managed Virtual Network reference type. + /// + public partial class ManagedVirtualNetworkReference + { + /// + /// Initializes a new instance of the ManagedVirtualNetworkReference + /// class. + /// + public ManagedVirtualNetworkReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedVirtualNetworkReference + /// class. + /// + /// Reference ManagedVirtualNetwork + /// name. + public ManagedVirtualNetworkReference(string referenceName) + { + ReferenceName = referenceName; + CustomInit(); + } + /// + /// Static constructor for ManagedVirtualNetworkReference class. + /// + static ManagedVirtualNetworkReference() + { + Type = "ManagedVirtualNetworkReference"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets reference ManagedVirtualNetwork name. + /// + [JsonProperty(PropertyName = "referenceName")] + public string ReferenceName { get; set; } + + /// + /// Managed Virtual Network reference type. + /// + [JsonProperty(PropertyName = "type")] + public static string Type { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ReferenceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ReferenceName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedVirtualNetworkResource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedVirtualNetworkResource.cs new file mode 100644 index 000000000000..20120707daaf --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedVirtualNetworkResource.cs @@ -0,0 +1,73 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Managed Virtual Network resource type. + /// + public partial class ManagedVirtualNetworkResource : SubResource + { + /// + /// Initializes a new instance of the ManagedVirtualNetworkResource + /// class. + /// + public ManagedVirtualNetworkResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedVirtualNetworkResource + /// class. + /// + /// Managed Virtual Network + /// properties. + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + public ManagedVirtualNetworkResource(ManagedVirtualNetwork properties, string id = default(string), string name = default(string), string type = default(string), string etag = default(string)) + : base(id, name, type, etag) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets managed Virtual Network properties. + /// + [JsonProperty(PropertyName = "properties")] + public ManagedVirtualNetwork Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperAttributeMapping.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperAttributeMapping.cs new file mode 100644 index 000000000000..274e35244384 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperAttributeMapping.cs @@ -0,0 +1,107 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Source and target column mapping details. + /// + public partial class MapperAttributeMapping + { + /// + /// Initializes a new instance of the MapperAttributeMapping class. + /// + public MapperAttributeMapping() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MapperAttributeMapping class. + /// + /// Name of the target column. + /// Type of the CDC attribute mapping. Note: + /// 'Advanced' mapping type is also saved as 'Derived'. Possible values + /// include: 'Direct', 'Derived', 'Aggregate' + /// Name of the function used for + /// 'Aggregate' and 'Derived' (except 'Advanced') type mapping. + /// Expression used for 'Aggregate' and + /// 'Derived' type mapping. + /// Reference of the source column + /// used in the mapping. It is used for 'Direct' mapping type + /// only. + /// List of references for source + /// columns. It is used for 'Derived' and 'Aggregate' type mappings + /// only. + public MapperAttributeMapping(string name = default(string), string type = default(string), string functionName = default(string), string expression = default(string), MapperAttributeReference attributeReference = default(MapperAttributeReference), IList attributeReferences = default(IList)) + { + Name = name; + Type = type; + FunctionName = functionName; + Expression = expression; + AttributeReference = attributeReference; + AttributeReferences = attributeReferences; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the target column. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets type of the CDC attribute mapping. Note: 'Advanced' + /// mapping type is also saved as 'Derived'. Possible values include: + /// 'Direct', 'Derived', 'Aggregate' + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets name of the function used for 'Aggregate' and + /// 'Derived' (except 'Advanced') type mapping. + /// + [JsonProperty(PropertyName = "functionName")] + public string FunctionName { get; set; } + + /// + /// Gets or sets expression used for 'Aggregate' and 'Derived' type + /// mapping. + /// + [JsonProperty(PropertyName = "expression")] + public string Expression { get; set; } + + /// + /// Gets or sets reference of the source column used in the mapping. It + /// is used for 'Direct' mapping type only. + /// + [JsonProperty(PropertyName = "attributeReference")] + public MapperAttributeReference AttributeReference { get; set; } + + /// + /// Gets or sets list of references for source columns. It is used for + /// 'Derived' and 'Aggregate' type mappings only. + /// + [JsonProperty(PropertyName = "attributeReferences")] + public IList AttributeReferences { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperAttributeMappings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperAttributeMappings.cs new file mode 100644 index 000000000000..b1a7474a28c6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperAttributeMappings.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Attribute mapping details. + /// + public partial class MapperAttributeMappings + { + /// + /// Initializes a new instance of the MapperAttributeMappings class. + /// + public MapperAttributeMappings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MapperAttributeMappings class. + /// + /// List of attribute mappings. + public MapperAttributeMappings(IList attributeMappings = default(IList)) + { + AttributeMappings = attributeMappings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of attribute mappings. + /// + [JsonProperty(PropertyName = "attributeMappings")] + public IList AttributeMappings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperAttributeReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperAttributeReference.cs new file mode 100644 index 000000000000..5bfd660c3e9e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperAttributeReference.cs @@ -0,0 +1,68 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Attribute reference details for the referred column. + /// + public partial class MapperAttributeReference + { + /// + /// Initializes a new instance of the MapperAttributeReference class. + /// + public MapperAttributeReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MapperAttributeReference class. + /// + /// Name of the column. + /// Name of the table. + /// The connection reference + /// for the connection. + public MapperAttributeReference(string name = default(string), string entity = default(string), MapperConnectionReference entityConnectionReference = default(MapperConnectionReference)) + { + Name = name; + Entity = entity; + EntityConnectionReference = entityConnectionReference; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the column. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets name of the table. + /// + [JsonProperty(PropertyName = "entity")] + public string Entity { get; set; } + + /// + /// Gets or sets the connection reference for the connection. + /// + [JsonProperty(PropertyName = "entityConnectionReference")] + public MapperConnectionReference EntityConnectionReference { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperConnection.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperConnection.cs new file mode 100644 index 000000000000..90708654c531 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperConnection.cs @@ -0,0 +1,108 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Source connection details. + /// + public partial class MapperConnection + { + /// + /// Initializes a new instance of the MapperConnection class. + /// + public MapperConnection() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MapperConnection class. + /// + /// Linked service reference. + /// Type of the linked service e.g.: + /// AzureBlobFS. + /// A boolean indicating whether linked + /// service is of type inline dataset. Currently only inline datasets + /// are supported. + /// List of name/value pairs + /// for connection properties. + public MapperConnection(LinkedServiceReference linkedService = default(LinkedServiceReference), string linkedServiceType = default(string), bool? isInlineDataset = default(bool?), IList commonDslConnectorProperties = default(IList)) + { + LinkedService = linkedService; + LinkedServiceType = linkedServiceType; + IsInlineDataset = isInlineDataset; + CommonDslConnectorProperties = commonDslConnectorProperties; + CustomInit(); + } + /// + /// Static constructor for MapperConnection class. + /// + static MapperConnection() + { + Type = "linkedservicetype"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets linked service reference. + /// + [JsonProperty(PropertyName = "linkedService")] + public LinkedServiceReference LinkedService { get; set; } + + /// + /// Gets or sets type of the linked service e.g.: AzureBlobFS. + /// + [JsonProperty(PropertyName = "linkedServiceType")] + public string LinkedServiceType { get; set; } + + /// + /// Gets or sets a boolean indicating whether linked service is of type + /// inline dataset. Currently only inline datasets are supported. + /// + [JsonProperty(PropertyName = "isInlineDataset")] + public bool? IsInlineDataset { get; set; } + + /// + /// Gets or sets list of name/value pairs for connection properties. + /// + [JsonProperty(PropertyName = "commonDslConnectorProperties")] + public IList CommonDslConnectorProperties { get; set; } + + /// + /// Type of connection via linked service or dataset. + /// + [JsonProperty(PropertyName = "type")] + public static string Type { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (LinkedService != null) + { + LinkedService.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperConnectionReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperConnectionReference.cs new file mode 100644 index 000000000000..572ada18e93c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperConnectionReference.cs @@ -0,0 +1,61 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Source or target connection reference details. + /// + public partial class MapperConnectionReference + { + /// + /// Initializes a new instance of the MapperConnectionReference class. + /// + public MapperConnectionReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MapperConnectionReference class. + /// + /// Name of the connection + /// Type of connection via linked service or + /// dataset. Possible values include: 'linkedservicetype' + public MapperConnectionReference(string connectionName = default(string), string type = default(string)) + { + ConnectionName = connectionName; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the connection + /// + [JsonProperty(PropertyName = "connectionName")] + public string ConnectionName { get; set; } + + /// + /// Gets or sets type of connection via linked service or dataset. + /// Possible values include: 'linkedservicetype' + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperDslConnectorProperties.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperDslConnectorProperties.cs new file mode 100644 index 000000000000..160217b1825c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperDslConnectorProperties.cs @@ -0,0 +1,61 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Connector properties of a CDC table in terms of name / value pairs. + /// + public partial class MapperDslConnectorProperties + { + /// + /// Initializes a new instance of the MapperDslConnectorProperties + /// class. + /// + public MapperDslConnectorProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MapperDslConnectorProperties + /// class. + /// + /// Name of the property. + /// Value of the property. + public MapperDslConnectorProperties(string name = default(string), object value = default(object)) + { + Name = name; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the property. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets value of the property. + /// + [JsonProperty(PropertyName = "value")] + public object Value { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperPolicy.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperPolicy.cs new file mode 100644 index 000000000000..db2a3919f112 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperPolicy.cs @@ -0,0 +1,62 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// CDC Policy. + /// + public partial class MapperPolicy + { + /// + /// Initializes a new instance of the MapperPolicy class. + /// + public MapperPolicy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MapperPolicy class. + /// + /// Mode of running the CDC: batch vs + /// continuous. + /// Defines the frequency and interval for + /// running the CDC for batch mode. + public MapperPolicy(string mode = default(string), MapperPolicyRecurrence recurrence = default(MapperPolicyRecurrence)) + { + Mode = mode; + Recurrence = recurrence; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets mode of running the CDC: batch vs continuous. + /// + [JsonProperty(PropertyName = "mode")] + public string Mode { get; set; } + + /// + /// Gets or sets defines the frequency and interval for running the CDC + /// for batch mode. + /// + [JsonProperty(PropertyName = "recurrence")] + public MapperPolicyRecurrence Recurrence { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperPolicyRecurrence.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperPolicyRecurrence.cs new file mode 100644 index 000000000000..aff42e5c03fc --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperPolicyRecurrence.cs @@ -0,0 +1,63 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// CDC policy recurrence details. + /// + public partial class MapperPolicyRecurrence + { + /// + /// Initializes a new instance of the MapperPolicyRecurrence class. + /// + public MapperPolicyRecurrence() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MapperPolicyRecurrence class. + /// + /// Frequency of period in terms of 'Hour', + /// 'Minute' or 'Second'. Possible values include: 'Hour', 'Minute', + /// 'Second' + /// Actual interval value as per chosen + /// frequency. + public MapperPolicyRecurrence(string frequency = default(string), int? interval = default(int?)) + { + Frequency = frequency; + Interval = interval; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets frequency of period in terms of 'Hour', 'Minute' or + /// 'Second'. Possible values include: 'Hour', 'Minute', 'Second' + /// + [JsonProperty(PropertyName = "frequency")] + public string Frequency { get; set; } + + /// + /// Gets or sets actual interval value as per chosen frequency. + /// + [JsonProperty(PropertyName = "interval")] + public int? Interval { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperSourceConnectionsInfo.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperSourceConnectionsInfo.cs new file mode 100644 index 000000000000..d2cc247a08da --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperSourceConnectionsInfo.cs @@ -0,0 +1,76 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A object which contains list of tables and connection details for a + /// source connection. + /// + public partial class MapperSourceConnectionsInfo + { + /// + /// Initializes a new instance of the MapperSourceConnectionsInfo + /// class. + /// + public MapperSourceConnectionsInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MapperSourceConnectionsInfo + /// class. + /// + /// List of source tables for a source + /// connection. + public MapperSourceConnectionsInfo(IList sourceEntities = default(IList), MapperConnection connection = default(MapperConnection)) + { + SourceEntities = sourceEntities; + Connection = connection; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of source tables for a source connection. + /// + [JsonProperty(PropertyName = "sourceEntities")] + public IList SourceEntities { get; set; } + + /// + /// + [JsonProperty(PropertyName = "connection")] + public MapperConnection Connection { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Connection != null) + { + Connection.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperTable.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperTable.cs new file mode 100644 index 000000000000..f76783a18c22 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperTable.cs @@ -0,0 +1,73 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// CDC table details. + /// + [Rest.Serialization.JsonTransformation] + public partial class MapperTable + { + /// + /// Initializes a new instance of the MapperTable class. + /// + public MapperTable() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MapperTable class. + /// + /// Name of the table. + /// List of columns for the source table. + /// List of name/value pairs for + /// connection properties. + public MapperTable(string name = default(string), IList schema = default(IList), IList dslConnectorProperties = default(IList)) + { + Name = name; + Schema = schema; + DslConnectorProperties = dslConnectorProperties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the table. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets list of columns for the source table. + /// + [JsonProperty(PropertyName = "properties.schema")] + public IList Schema { get; set; } + + /// + /// Gets or sets list of name/value pairs for connection properties. + /// + [JsonProperty(PropertyName = "properties.dslConnectorProperties")] + public IList DslConnectorProperties { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperTableSchema.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperTableSchema.cs new file mode 100644 index 000000000000..6176c3743af0 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperTableSchema.cs @@ -0,0 +1,60 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Schema of a CDC table in terms of column names and their corresponding + /// data types. + /// + public partial class MapperTableSchema + { + /// + /// Initializes a new instance of the MapperTableSchema class. + /// + public MapperTableSchema() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MapperTableSchema class. + /// + /// Name of the column. + /// Data type of the column. + public MapperTableSchema(string name = default(string), string dataType = default(string)) + { + Name = name; + DataType = dataType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the column. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets data type of the column. + /// + [JsonProperty(PropertyName = "dataType")] + public string DataType { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperTargetConnectionsInfo.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperTargetConnectionsInfo.cs new file mode 100644 index 000000000000..1db68a09cc83 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MapperTargetConnectionsInfo.cs @@ -0,0 +1,93 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A object which contains list of tables and connection details for a + /// target connection. + /// + public partial class MapperTargetConnectionsInfo + { + /// + /// Initializes a new instance of the MapperTargetConnectionsInfo + /// class. + /// + public MapperTargetConnectionsInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MapperTargetConnectionsInfo + /// class. + /// + /// List of source tables for a target + /// connection. + /// List of table mappings. + /// List of relationship info among the + /// tables. + public MapperTargetConnectionsInfo(IList targetEntities = default(IList), MapperConnection connection = default(MapperConnection), IList dataMapperMappings = default(IList), IList relationships = default(IList)) + { + TargetEntities = targetEntities; + Connection = connection; + DataMapperMappings = dataMapperMappings; + Relationships = relationships; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of source tables for a target connection. + /// + [JsonProperty(PropertyName = "targetEntities")] + public IList TargetEntities { get; set; } + + /// + /// + [JsonProperty(PropertyName = "connection")] + public MapperConnection Connection { get; set; } + + /// + /// Gets or sets list of table mappings. + /// + [JsonProperty(PropertyName = "dataMapperMappings")] + public IList DataMapperMappings { get; set; } + + /// + /// Gets or sets list of relationship info among the tables. + /// + [JsonProperty(PropertyName = "relationships")] + public IList Relationships { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Connection != null) + { + Connection.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MappingDataFlow.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MappingDataFlow.cs new file mode 100644 index 000000000000..3c9753de681a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MappingDataFlow.cs @@ -0,0 +1,95 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Mapping data flow. + /// + [Rest.Serialization.JsonTransformation] + public partial class MappingDataFlow : DataFlow + { + /// + /// Initializes a new instance of the MappingDataFlow class. + /// + public MappingDataFlow() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MappingDataFlow class. + /// + /// The description of the data flow. + /// List of tags that can be used for + /// describing the data flow. + /// The folder that this data flow is in. If not + /// specified, Data flow will appear at the root level. + /// List of sources in data flow. + /// List of sinks in data flow. + /// List of transformations in data + /// flow. + /// DataFlow script. + /// Data flow script lines. + public MappingDataFlow(string description = default(string), IList annotations = default(IList), DataFlowFolder folder = default(DataFlowFolder), IList sources = default(IList), IList sinks = default(IList), IList transformations = default(IList), string script = default(string), IList scriptLines = default(IList)) + : base(description, annotations, folder) + { + Sources = sources; + Sinks = sinks; + Transformations = transformations; + Script = script; + ScriptLines = scriptLines; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of sources in data flow. + /// + [JsonProperty(PropertyName = "typeProperties.sources")] + public IList Sources { get; set; } + + /// + /// Gets or sets list of sinks in data flow. + /// + [JsonProperty(PropertyName = "typeProperties.sinks")] + public IList Sinks { get; set; } + + /// + /// Gets or sets list of transformations in data flow. + /// + [JsonProperty(PropertyName = "typeProperties.transformations")] + public IList Transformations { get; set; } + + /// + /// Gets or sets dataFlow script. + /// + [JsonProperty(PropertyName = "typeProperties.script")] + public string Script { get; set; } + + /// + /// Gets or sets data flow script lines. + /// + [JsonProperty(PropertyName = "typeProperties.scriptLines")] + public IList ScriptLines { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MappingType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MappingType.cs new file mode 100644 index 000000000000..4fa23d0a419d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MappingType.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for MappingType. + /// + public static class MappingType + { + public const string Direct = "Direct"; + public const string Derived = "Derived"; + public const string Aggregate = "Aggregate"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MariaDBLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MariaDBLinkedService.cs new file mode 100644 index 000000000000..aec23c5172cc --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MariaDBLinkedService.cs @@ -0,0 +1,188 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// MariaDB server linked service. + /// + [Newtonsoft.Json.JsonObject("MariaDB")] + [Rest.Serialization.JsonTransformation] + public partial class MariaDBLinkedService : LinkedService + { + /// + /// Initializes a new instance of the MariaDBLinkedService class. + /// + public MariaDBLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MariaDBLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The version of the MariaDB driver. + /// Type: string. V1 or empty for legacy driver, V2 for new driver. V1 + /// can support connection string and property bag, V2 can only support + /// connection string. The legacy driver is scheduled for deprecation + /// by October 2024. + /// An ODBC connection string. Type: + /// string, SecureString or AzureKeyVaultSecretReference. + /// Server name for connection. Type: + /// string. + /// The port for the connection. Type: + /// integer. + /// Username for authentication. Type: + /// string. + /// Database name for connection. Type: + /// string. + /// This option specifies whether the driver uses + /// TLS encryption and verification when connecting to MariaDB. E.g., + /// SSLMode=<0/1/2/3/4>. Options: DISABLED (0) / PREFERRED (1) + /// (Default) / REQUIRED (2) / VERIFY_CA (3) / VERIFY_IDENTITY (4), + /// REQUIRED (2) is recommended to only allow connections encrypted + /// with SSL/TLS. + /// This option specifies whether to + /// use a CA certificate from the system trust store, or from a + /// specified PEM file. E.g. UseSystemTrustStore=<0/1>; Options: + /// Enabled (1) / Disabled (0) (Default) + /// The Azure key vault secret reference of + /// password in connection string. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public MariaDBLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object driverVersion = default(object), object connectionString = default(object), object server = default(object), object port = default(object), object username = default(object), object database = default(object), object sslMode = default(object), object useSystemTrustStore = default(object), AzureKeyVaultSecretReference password = default(AzureKeyVaultSecretReference), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + DriverVersion = driverVersion; + ConnectionString = connectionString; + Server = server; + Port = port; + Username = username; + Database = database; + SslMode = sslMode; + UseSystemTrustStore = useSystemTrustStore; + Password = password; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the version of the MariaDB driver. Type: string. V1 or + /// empty for legacy driver, V2 for new driver. V1 can support + /// connection string and property bag, V2 can only support connection + /// string. The legacy driver is scheduled for deprecation by October + /// 2024. + /// + [JsonProperty(PropertyName = "typeProperties.driverVersion")] + public object DriverVersion { get; set; } + + /// + /// Gets or sets an ODBC connection string. Type: string, SecureString + /// or AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets server name for connection. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.server")] + public object Server { get; set; } + + /// + /// Gets or sets the port for the connection. Type: integer. + /// + [JsonProperty(PropertyName = "typeProperties.port")] + public object Port { get; set; } + + /// + /// Gets or sets username for authentication. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets database name for connection. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.database")] + public object Database { get; set; } + + /// + /// Gets or sets this option specifies whether the driver uses TLS + /// encryption and verification when connecting to MariaDB. E.g., + /// SSLMode=&lt;0/1/2/3/4&gt;. Options: DISABLED (0) / + /// PREFERRED (1) (Default) / REQUIRED (2) / VERIFY_CA (3) / + /// VERIFY_IDENTITY (4), REQUIRED (2) is recommended to only allow + /// connections encrypted with SSL/TLS. + /// + [JsonProperty(PropertyName = "typeProperties.sslMode")] + public object SslMode { get; set; } + + /// + /// Gets or sets this option specifies whether to use a CA certificate + /// from the system trust store, or from a specified PEM file. E.g. + /// UseSystemTrustStore=&lt;0/1&gt;; Options: Enabled (1) / + /// Disabled (0) (Default) + /// + [JsonProperty(PropertyName = "typeProperties.useSystemTrustStore")] + public object UseSystemTrustStore { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of password in + /// connection string. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public AzureKeyVaultSecretReference Password { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Password != null) + { + Password.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MariaDBSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MariaDBSource.cs new file mode 100644 index 000000000000..e24f98de1ed8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MariaDBSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity MariaDB server source. + /// + public partial class MariaDBSource : TabularSource + { + /// + /// Initializes a new instance of the MariaDBSource class. + /// + public MariaDBSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MariaDBSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public MariaDBSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MariaDBTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MariaDBTableDataset.cs new file mode 100644 index 000000000000..0f4ea4f985ad --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MariaDBTableDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// MariaDB server dataset. + /// + [Newtonsoft.Json.JsonObject("MariaDBTable")] + [Rest.Serialization.JsonTransformation] + public partial class MariaDBTableDataset : Dataset + { + /// + /// Initializes a new instance of the MariaDBTableDataset class. + /// + public MariaDBTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the MariaDBTableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name. Type: string (or Expression + /// with resultType string). + public MariaDBTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MarketoLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MarketoLinkedService.cs new file mode 100644 index 000000000000..d52f7ef87aea --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MarketoLinkedService.cs @@ -0,0 +1,150 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Marketo server linked service. + /// + [Newtonsoft.Json.JsonObject("Marketo")] + [Rest.Serialization.JsonTransformation] + public partial class MarketoLinkedService : LinkedService + { + /// + /// Initializes a new instance of the MarketoLinkedService class. + /// + public MarketoLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MarketoLinkedService class. + /// + /// The endpoint of the Marketo server. (i.e. + /// 123-ABC-321.mktorest.com) + /// The client Id of your Marketo + /// service. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The client secret of your Marketo + /// service. + /// Specifies whether the data + /// source endpoints are encrypted using HTTPS. The default value is + /// true. + /// Specifies whether to require the + /// host name in the server's certificate to match the host name of the + /// server when connecting over SSL. The default value is true. + /// Specifies whether to verify the + /// identity of the server when connecting over SSL. The default value + /// is true. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public MarketoLinkedService(object endpoint, object clientId, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), SecretBase clientSecret = default(SecretBase), object useEncryptedEndpoints = default(object), object useHostVerification = default(object), object usePeerVerification = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Endpoint = endpoint; + ClientId = clientId; + ClientSecret = clientSecret; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the endpoint of the Marketo server. (i.e. + /// 123-ABC-321.mktorest.com) + /// + [JsonProperty(PropertyName = "typeProperties.endpoint")] + public object Endpoint { get; set; } + + /// + /// Gets or sets the client Id of your Marketo service. + /// + [JsonProperty(PropertyName = "typeProperties.clientId")] + public object ClientId { get; set; } + + /// + /// Gets or sets the client secret of your Marketo service. + /// + [JsonProperty(PropertyName = "typeProperties.clientSecret")] + public SecretBase ClientSecret { get; set; } + + /// + /// Gets or sets specifies whether the data source endpoints are + /// encrypted using HTTPS. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useEncryptedEndpoints")] + public object UseEncryptedEndpoints { get; set; } + + /// + /// Gets or sets specifies whether to require the host name in the + /// server's certificate to match the host name of the server when + /// connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useHostVerification")] + public object UseHostVerification { get; set; } + + /// + /// Gets or sets specifies whether to verify the identity of the server + /// when connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.usePeerVerification")] + public object UsePeerVerification { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Endpoint == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Endpoint"); + } + if (ClientId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ClientId"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MarketoObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MarketoObjectDataset.cs new file mode 100644 index 000000000000..4e278cec1585 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MarketoObjectDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Marketo server dataset. + /// + [Newtonsoft.Json.JsonObject("MarketoObject")] + [Rest.Serialization.JsonTransformation] + public partial class MarketoObjectDataset : Dataset + { + /// + /// Initializes a new instance of the MarketoObjectDataset class. + /// + public MarketoObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the MarketoObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name. Type: string (or Expression + /// with resultType string). + public MarketoObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MarketoSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MarketoSource.cs new file mode 100644 index 000000000000..8c3e2eed09f6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MarketoSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Marketo server source. + /// + public partial class MarketoSource : TabularSource + { + /// + /// Initializes a new instance of the MarketoSource class. + /// + public MarketoSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MarketoSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public MarketoSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MetadataItem.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MetadataItem.cs new file mode 100644 index 000000000000..995d9608fe62 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MetadataItem.cs @@ -0,0 +1,63 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Specify the name and value of custom metadata item. + /// + public partial class MetadataItem + { + /// + /// Initializes a new instance of the MetadataItem class. + /// + public MetadataItem() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MetadataItem class. + /// + /// Metadata item key name. Type: string (or + /// Expression with resultType string). + /// Metadata item value. Type: string (or + /// Expression with resultType string). + public MetadataItem(object name = default(object), object value = default(object)) + { + Name = name; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets metadata item key name. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "name")] + public object Name { get; set; } + + /// + /// Gets or sets metadata item value. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "value")] + public object Value { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MicrosoftAccessLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MicrosoftAccessLinkedService.cs new file mode 100644 index 000000000000..159abc31629b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MicrosoftAccessLinkedService.cs @@ -0,0 +1,142 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Microsoft Access linked service. + /// + [Newtonsoft.Json.JsonObject("MicrosoftAccess")] + [Rest.Serialization.JsonTransformation] + public partial class MicrosoftAccessLinkedService : LinkedService + { + /// + /// Initializes a new instance of the MicrosoftAccessLinkedService + /// class. + /// + public MicrosoftAccessLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MicrosoftAccessLinkedService + /// class. + /// + /// The non-access credential portion of + /// the connection string as well as an optional encrypted credential. + /// Type: string, or SecureString, or AzureKeyVaultSecretReference, or + /// Expression with resultType string. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Type of authentication used to + /// connect to the Microsoft Access as ODBC data store. Possible values + /// are: Anonymous and Basic. Type: string (or Expression with + /// resultType string). + /// The access credential portion of the + /// connection string specified in driver-specific property-value + /// format. + /// User name for Basic authentication. Type: + /// string (or Expression with resultType string). + /// Password for Basic authentication. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public MicrosoftAccessLinkedService(object connectionString, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object authenticationType = default(object), SecretBase credential = default(SecretBase), object userName = default(object), SecretBase password = default(SecretBase), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionString = connectionString; + AuthenticationType = authenticationType; + Credential = credential; + UserName = userName; + Password = password; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the non-access credential portion of the connection + /// string as well as an optional encrypted credential. Type: string, + /// or SecureString, or AzureKeyVaultSecretReference, or Expression + /// with resultType string. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets type of authentication used to connect to the + /// Microsoft Access as ODBC data store. Possible values are: Anonymous + /// and Basic. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public object AuthenticationType { get; set; } + + /// + /// Gets or sets the access credential portion of the connection string + /// specified in driver-specific property-value format. + /// + [JsonProperty(PropertyName = "typeProperties.credential")] + public SecretBase Credential { get; set; } + + /// + /// Gets or sets user name for Basic authentication. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets password for Basic authentication. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ConnectionString == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ConnectionString"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MicrosoftAccessSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MicrosoftAccessSink.cs new file mode 100644 index 000000000000..39213d3c280e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MicrosoftAccessSink.cs @@ -0,0 +1,74 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Microsoft Access sink. + /// + public partial class MicrosoftAccessSink : CopySink + { + /// + /// Initializes a new instance of the MicrosoftAccessSink class. + /// + public MicrosoftAccessSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MicrosoftAccessSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// A query to execute before starting the + /// copy. Type: string (or Expression with resultType string). + public MicrosoftAccessSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object preCopyScript = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + PreCopyScript = preCopyScript; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to execute before starting the copy. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "preCopyScript")] + public object PreCopyScript { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MicrosoftAccessSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MicrosoftAccessSource.cs new file mode 100644 index 000000000000..458e1054e09c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MicrosoftAccessSource.cs @@ -0,0 +1,81 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for Microsoft Access. + /// + public partial class MicrosoftAccessSource : CopySource + { + /// + /// Initializes a new instance of the MicrosoftAccessSource class. + /// + public MicrosoftAccessSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MicrosoftAccessSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Database query. Type: string (or Expression + /// with resultType string). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public MicrosoftAccessSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object query = default(object), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + Query = query; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets database query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MicrosoftAccessTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MicrosoftAccessTableDataset.cs new file mode 100644 index 000000000000..474f6818939d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MicrosoftAccessTableDataset.cs @@ -0,0 +1,88 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Microsoft Access table dataset. + /// + [Newtonsoft.Json.JsonObject("MicrosoftAccessTable")] + [Rest.Serialization.JsonTransformation] + public partial class MicrosoftAccessTableDataset : Dataset + { + /// + /// Initializes a new instance of the MicrosoftAccessTableDataset + /// class. + /// + public MicrosoftAccessTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the MicrosoftAccessTableDataset + /// class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The Microsoft Access table name. Type: + /// string (or Expression with resultType string). + public MicrosoftAccessTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Microsoft Access table name. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbAtlasCollectionDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbAtlasCollectionDataset.cs new file mode 100644 index 000000000000..538a4f2bd585 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbAtlasCollectionDataset.cs @@ -0,0 +1,93 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The MongoDB Atlas database dataset. + /// + [Newtonsoft.Json.JsonObject("MongoDbAtlasCollection")] + [Rest.Serialization.JsonTransformation] + public partial class MongoDbAtlasCollectionDataset : Dataset + { + /// + /// Initializes a new instance of the MongoDbAtlasCollectionDataset + /// class. + /// + public MongoDbAtlasCollectionDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the MongoDbAtlasCollectionDataset + /// class. + /// + /// Linked service reference. + /// The collection name of the MongoDB Atlas + /// database. Type: string (or Expression with resultType + /// string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + public MongoDbAtlasCollectionDataset(LinkedServiceReference linkedServiceName, object collection, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Collection = collection; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the collection name of the MongoDB Atlas database. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.collection")] + public object Collection { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Collection == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Collection"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbAtlasLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbAtlasLinkedService.cs new file mode 100644 index 000000000000..0d9c4961ac0a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbAtlasLinkedService.cs @@ -0,0 +1,111 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for MongoDB Atlas data source. + /// + [Newtonsoft.Json.JsonObject("MongoDbAtlas")] + [Rest.Serialization.JsonTransformation] + public partial class MongoDbAtlasLinkedService : LinkedService + { + /// + /// Initializes a new instance of the MongoDbAtlasLinkedService class. + /// + public MongoDbAtlasLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MongoDbAtlasLinkedService class. + /// + /// The MongoDB Atlas connection string. + /// Type: string, SecureString or AzureKeyVaultSecretReference. Type: + /// string, SecureString or AzureKeyVaultSecretReference. + /// The name of the MongoDB Atlas database that + /// you want to access. Type: string (or Expression with resultType + /// string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The driver version that you want to + /// choose. Allowed value are v1 and v2. Type: string (or Expression + /// with resultType string). + public MongoDbAtlasLinkedService(object connectionString, object database, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object driverVersion = default(object)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionString = connectionString; + Database = database; + DriverVersion = driverVersion; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the MongoDB Atlas connection string. Type: string, + /// SecureString or AzureKeyVaultSecretReference. Type: string, + /// SecureString or AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets the name of the MongoDB Atlas database that you want + /// to access. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.database")] + public object Database { get; set; } + + /// + /// Gets or sets the driver version that you want to choose. Allowed + /// value are v1 and v2. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.driverVersion")] + public object DriverVersion { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ConnectionString == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ConnectionString"); + } + if (Database == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Database"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbAtlasSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbAtlasSink.cs new file mode 100644 index 000000000000..7e246db71c5a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbAtlasSink.cs @@ -0,0 +1,80 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity MongoDB Atlas sink. + /// + public partial class MongoDbAtlasSink : CopySink + { + /// + /// Initializes a new instance of the MongoDbAtlasSink class. + /// + public MongoDbAtlasSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MongoDbAtlasSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Specifies whether the document with + /// same key to be overwritten (upsert) rather than throw exception + /// (insert). The default value is "insert". Type: string (or + /// Expression with resultType string). Type: string (or Expression + /// with resultType string). + public MongoDbAtlasSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object writeBehavior = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + WriteBehavior = writeBehavior; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies whether the document with same key to be + /// overwritten (upsert) rather than throw exception (insert). The + /// default value is "insert". Type: string (or Expression with + /// resultType string). Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "writeBehavior")] + public object WriteBehavior { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbAtlasSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbAtlasSource.cs new file mode 100644 index 000000000000..03b529784935 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbAtlasSource.cs @@ -0,0 +1,124 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for a MongoDB Atlas database. + /// + public partial class MongoDbAtlasSource : CopySource + { + /// + /// Initializes a new instance of the MongoDbAtlasSource class. + /// + public MongoDbAtlasSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MongoDbAtlasSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Specifies selection filter using query + /// operators. To return all documents in a collection, omit this + /// parameter or pass an empty document ({}). Type: string (or + /// Expression with resultType string). + /// Cursor methods for Mongodb + /// query + /// Specifies the number of documents to return + /// in each batch of the response from MongoDB Atlas instance. In most + /// cases, modifying the batch size will not affect the user or the + /// application. This property's main purpose is to avoid hit the + /// limitation of response size. Type: integer (or Expression with + /// resultType integer). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public MongoDbAtlasSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object filter = default(object), MongoDbCursorMethodsProperties cursorMethods = default(MongoDbCursorMethodsProperties), object batchSize = default(object), object queryTimeout = default(object), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + Filter = filter; + CursorMethods = cursorMethods; + BatchSize = batchSize; + QueryTimeout = queryTimeout; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies selection filter using query operators. To + /// return all documents in a collection, omit this parameter or pass + /// an empty document ({}). Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "filter")] + public object Filter { get; set; } + + /// + /// Gets or sets cursor methods for Mongodb query + /// + [JsonProperty(PropertyName = "cursorMethods")] + public MongoDbCursorMethodsProperties CursorMethods { get; set; } + + /// + /// Gets or sets specifies the number of documents to return in each + /// batch of the response from MongoDB Atlas instance. In most cases, + /// modifying the batch size will not affect the user or the + /// application. This property's main purpose is to avoid hit the + /// limitation of response size. Type: integer (or Expression with + /// resultType integer). + /// + [JsonProperty(PropertyName = "batchSize")] + public object BatchSize { get; set; } + + /// + /// Gets or sets query timeout. Type: string (or Expression with + /// resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "queryTimeout")] + public object QueryTimeout { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbAuthenticationType.cs new file mode 100644 index 000000000000..2223b135c4d3 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbAuthenticationType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for MongoDbAuthenticationType. + /// + public static class MongoDbAuthenticationType + { + public const string Basic = "Basic"; + public const string Anonymous = "Anonymous"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbCollectionDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbCollectionDataset.cs new file mode 100644 index 000000000000..d1808c7a0d47 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbCollectionDataset.cs @@ -0,0 +1,91 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The MongoDB database dataset. + /// + [Newtonsoft.Json.JsonObject("MongoDbCollection")] + [Rest.Serialization.JsonTransformation] + public partial class MongoDbCollectionDataset : Dataset + { + /// + /// Initializes a new instance of the MongoDbCollectionDataset class. + /// + public MongoDbCollectionDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the MongoDbCollectionDataset class. + /// + /// Linked service reference. + /// The table name of the MongoDB + /// database. Type: string (or Expression with resultType + /// string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + public MongoDbCollectionDataset(LinkedServiceReference linkedServiceName, object collectionName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + CollectionName = collectionName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name of the MongoDB database. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.collectionName")] + public object CollectionName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (CollectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "CollectionName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbCursorMethodsProperties.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbCursorMethodsProperties.cs new file mode 100644 index 000000000000..ca9ede94d3ec --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbCursorMethodsProperties.cs @@ -0,0 +1,111 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Cursor methods for Mongodb query + /// + public partial class MongoDbCursorMethodsProperties + { + /// + /// Initializes a new instance of the MongoDbCursorMethodsProperties + /// class. + /// + public MongoDbCursorMethodsProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MongoDbCursorMethodsProperties + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Specifies the fields to return in the + /// documents that match the query filter. To return all fields in the + /// matching documents, omit this parameter. Type: string (or + /// Expression with resultType string). + /// Specifies the order in which the query returns + /// matching documents. Type: string (or Expression with resultType + /// string). Type: string (or Expression with resultType + /// string). + /// Specifies the how many documents skipped and + /// where MongoDB begins returning results. This approach may be useful + /// in implementing paginated results. Type: integer (or Expression + /// with resultType integer). + /// Specifies the maximum number of documents the + /// server returns. limit() is analogous to the LIMIT statement in a + /// SQL database. Type: integer (or Expression with resultType + /// integer). + public MongoDbCursorMethodsProperties(IDictionary additionalProperties = default(IDictionary), object project = default(object), object sort = default(object), object skip = default(object), object limit = default(object)) + { + AdditionalProperties = additionalProperties; + Project = project; + Sort = sort; + Skip = skip; + Limit = limit; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets specifies the fields to return in the documents that + /// match the query filter. To return all fields in the matching + /// documents, omit this parameter. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "project")] + public object Project { get; set; } + + /// + /// Gets or sets specifies the order in which the query returns + /// matching documents. Type: string (or Expression with resultType + /// string). Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "sort")] + public object Sort { get; set; } + + /// + /// Gets or sets specifies the how many documents skipped and where + /// MongoDB begins returning results. This approach may be useful in + /// implementing paginated results. Type: integer (or Expression with + /// resultType integer). + /// + [JsonProperty(PropertyName = "skip")] + public object Skip { get; set; } + + /// + /// Gets or sets specifies the maximum number of documents the server + /// returns. limit() is analogous to the LIMIT statement in a SQL + /// database. Type: integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "limit")] + public object Limit { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbLinkedService.cs new file mode 100644 index 000000000000..46f9898e7901 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbLinkedService.cs @@ -0,0 +1,188 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for MongoDb data source. + /// + [Newtonsoft.Json.JsonObject("MongoDb")] + [Rest.Serialization.JsonTransformation] + public partial class MongoDbLinkedService : LinkedService + { + /// + /// Initializes a new instance of the MongoDbLinkedService class. + /// + public MongoDbLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MongoDbLinkedService class. + /// + /// The IP address or server name of the MongoDB + /// server. Type: string (or Expression with resultType + /// string). + /// The name of the MongoDB database that + /// you want to access. Type: string (or Expression with resultType + /// string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The authentication type to be used + /// to connect to the MongoDB database. Possible values include: + /// 'Basic', 'Anonymous' + /// Username for authentication. Type: string + /// (or Expression with resultType string). + /// Password for authentication. + /// Database to verify the username and + /// password. Type: string (or Expression with resultType + /// string). + /// The TCP port number that the MongoDB server uses + /// to listen for client connections. The default value is 27017. Type: + /// integer (or Expression with resultType integer), minimum: + /// 0. + /// Specifies whether the connections to the + /// server are encrypted using SSL. The default value is false. Type: + /// boolean (or Expression with resultType boolean). + /// Specifies whether to allow + /// self-signed certificates from the server. The default value is + /// false. Type: boolean (or Expression with resultType + /// boolean). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public MongoDbLinkedService(object server, object databaseName, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), string authenticationType = default(string), object username = default(object), SecretBase password = default(SecretBase), object authSource = default(object), object port = default(object), object enableSsl = default(object), object allowSelfSignedServerCert = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Server = server; + AuthenticationType = authenticationType; + DatabaseName = databaseName; + Username = username; + Password = password; + AuthSource = authSource; + Port = port; + EnableSsl = enableSsl; + AllowSelfSignedServerCert = allowSelfSignedServerCert; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the IP address or server name of the MongoDB server. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.server")] + public object Server { get; set; } + + /// + /// Gets or sets the authentication type to be used to connect to the + /// MongoDB database. Possible values include: 'Basic', 'Anonymous' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets the name of the MongoDB database that you want to + /// access. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.databaseName")] + public object DatabaseName { get; set; } + + /// + /// Gets or sets username for authentication. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets password for authentication. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets database to verify the username and password. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.authSource")] + public object AuthSource { get; set; } + + /// + /// Gets or sets the TCP port number that the MongoDB server uses to + /// listen for client connections. The default value is 27017. Type: + /// integer (or Expression with resultType integer), minimum: 0. + /// + [JsonProperty(PropertyName = "typeProperties.port")] + public object Port { get; set; } + + /// + /// Gets or sets specifies whether the connections to the server are + /// encrypted using SSL. The default value is false. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.enableSsl")] + public object EnableSsl { get; set; } + + /// + /// Gets or sets specifies whether to allow self-signed certificates + /// from the server. The default value is false. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.allowSelfSignedServerCert")] + public object AllowSelfSignedServerCert { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Server == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Server"); + } + if (DatabaseName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DatabaseName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbSource.cs new file mode 100644 index 000000000000..25e4382032dd --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbSource.cs @@ -0,0 +1,82 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for a MongoDB database. + /// + public partial class MongoDbSource : CopySource + { + /// + /// Initializes a new instance of the MongoDbSource class. + /// + public MongoDbSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MongoDbSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Database query. Should be a SQL-92 query + /// expression. Type: string (or Expression with resultType + /// string). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public MongoDbSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object query = default(object), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + Query = query; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets database query. Should be a SQL-92 query expression. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbV2CollectionDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbV2CollectionDataset.cs new file mode 100644 index 000000000000..4f9111c65ce2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbV2CollectionDataset.cs @@ -0,0 +1,91 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The MongoDB database dataset. + /// + [Newtonsoft.Json.JsonObject("MongoDbV2Collection")] + [Rest.Serialization.JsonTransformation] + public partial class MongoDbV2CollectionDataset : Dataset + { + /// + /// Initializes a new instance of the MongoDbV2CollectionDataset class. + /// + public MongoDbV2CollectionDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the MongoDbV2CollectionDataset class. + /// + /// Linked service reference. + /// The collection name of the MongoDB + /// database. Type: string (or Expression with resultType + /// string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + public MongoDbV2CollectionDataset(LinkedServiceReference linkedServiceName, object collection, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Collection = collection; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the collection name of the MongoDB database. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.collection")] + public object Collection { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Collection == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Collection"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbV2LinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbV2LinkedService.cs new file mode 100644 index 000000000000..4e5e3a70bc56 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbV2LinkedService.cs @@ -0,0 +1,99 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for MongoDB data source. + /// + [Newtonsoft.Json.JsonObject("MongoDbV2")] + [Rest.Serialization.JsonTransformation] + public partial class MongoDbV2LinkedService : LinkedService + { + /// + /// Initializes a new instance of the MongoDbV2LinkedService class. + /// + public MongoDbV2LinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MongoDbV2LinkedService class. + /// + /// The MongoDB connection string. Type: + /// string, SecureString or AzureKeyVaultSecretReference. Type: string, + /// SecureString or AzureKeyVaultSecretReference. + /// The name of the MongoDB database that you + /// want to access. Type: string (or Expression with resultType + /// string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + public MongoDbV2LinkedService(object connectionString, object database, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionString = connectionString; + Database = database; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the MongoDB connection string. Type: string, + /// SecureString or AzureKeyVaultSecretReference. Type: string, + /// SecureString or AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets the name of the MongoDB database that you want to + /// access. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.database")] + public object Database { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ConnectionString == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ConnectionString"); + } + if (Database == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Database"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbV2Sink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbV2Sink.cs new file mode 100644 index 000000000000..20d9ce5d8c46 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbV2Sink.cs @@ -0,0 +1,80 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity MongoDB sink. + /// + public partial class MongoDbV2Sink : CopySink + { + /// + /// Initializes a new instance of the MongoDbV2Sink class. + /// + public MongoDbV2Sink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MongoDbV2Sink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Specifies whether the document with + /// same key to be overwritten (upsert) rather than throw exception + /// (insert). The default value is "insert". Type: string (or + /// Expression with resultType string). Type: string (or Expression + /// with resultType string). + public MongoDbV2Sink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object writeBehavior = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + WriteBehavior = writeBehavior; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies whether the document with same key to be + /// overwritten (upsert) rather than throw exception (insert). The + /// default value is "insert". Type: string (or Expression with + /// resultType string). Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "writeBehavior")] + public object WriteBehavior { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbV2Source.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbV2Source.cs new file mode 100644 index 000000000000..ad132d6bd64e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MongoDbV2Source.cs @@ -0,0 +1,124 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for a MongoDB database. + /// + public partial class MongoDbV2Source : CopySource + { + /// + /// Initializes a new instance of the MongoDbV2Source class. + /// + public MongoDbV2Source() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MongoDbV2Source class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Specifies selection filter using query + /// operators. To return all documents in a collection, omit this + /// parameter or pass an empty document ({}). Type: string (or + /// Expression with resultType string). + /// Cursor methods for Mongodb + /// query + /// Specifies the number of documents to return + /// in each batch of the response from MongoDB instance. In most cases, + /// modifying the batch size will not affect the user or the + /// application. This property's main purpose is to avoid hit the + /// limitation of response size. Type: integer (or Expression with + /// resultType integer). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public MongoDbV2Source(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object filter = default(object), MongoDbCursorMethodsProperties cursorMethods = default(MongoDbCursorMethodsProperties), object batchSize = default(object), object queryTimeout = default(object), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + Filter = filter; + CursorMethods = cursorMethods; + BatchSize = batchSize; + QueryTimeout = queryTimeout; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies selection filter using query operators. To + /// return all documents in a collection, omit this parameter or pass + /// an empty document ({}). Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "filter")] + public object Filter { get; set; } + + /// + /// Gets or sets cursor methods for Mongodb query + /// + [JsonProperty(PropertyName = "cursorMethods")] + public MongoDbCursorMethodsProperties CursorMethods { get; set; } + + /// + /// Gets or sets specifies the number of documents to return in each + /// batch of the response from MongoDB instance. In most cases, + /// modifying the batch size will not affect the user or the + /// application. This property's main purpose is to avoid hit the + /// limitation of response size. Type: integer (or Expression with + /// resultType integer). + /// + [JsonProperty(PropertyName = "batchSize")] + public object BatchSize { get; set; } + + /// + /// Gets or sets query timeout. Type: string (or Expression with + /// resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "queryTimeout")] + public object QueryTimeout { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MultiplePipelineTrigger.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MultiplePipelineTrigger.cs new file mode 100644 index 000000000000..8508ac6bd536 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MultiplePipelineTrigger.cs @@ -0,0 +1,63 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Base class for all triggers that support one to many model for trigger + /// to pipeline. + /// + public partial class MultiplePipelineTrigger : Trigger + { + /// + /// Initializes a new instance of the MultiplePipelineTrigger class. + /// + public MultiplePipelineTrigger() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MultiplePipelineTrigger class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Trigger description. + /// Indicates if trigger is running or not. + /// Updated when Start/Stop APIs are called on the Trigger. Possible + /// values include: 'Started', 'Stopped', 'Disabled' + /// List of tags that can be used for + /// describing the trigger. + /// Pipelines that need to be started. + public MultiplePipelineTrigger(IDictionary additionalProperties = default(IDictionary), string description = default(string), string runtimeState = default(string), IList annotations = default(IList), IList pipelines = default(IList)) + : base(additionalProperties, description, runtimeState, annotations) + { + Pipelines = pipelines; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets pipelines that need to be started. + /// + [JsonProperty(PropertyName = "pipelines")] + public IList Pipelines { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MySqlLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MySqlLinkedService.cs new file mode 100644 index 000000000000..09bfb367103f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MySqlLinkedService.cs @@ -0,0 +1,254 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for MySQL data source. + /// + [Newtonsoft.Json.JsonObject("MySql")] + [Rest.Serialization.JsonTransformation] + public partial class MySqlLinkedService : LinkedService + { + /// + /// Initializes a new instance of the MySqlLinkedService class. + /// + public MySqlLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MySqlLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The version of the MySQL driver. Type: + /// string. V1 or empty for legacy driver, V2 for new driver. V1 can + /// support connection string and property bag, V2 can only support + /// connection string. + /// The connection string. Type: string, + /// SecureString or AzureKeyVaultSecretReference. + /// Server name for connection. Type: + /// string. + /// The port for the connection. Type: + /// integer. + /// Username for authentication. Type: + /// string. + /// Database name for connection. Type: + /// string. + /// SSL mode for connection. Type: integer. 0: + /// disable, 1: prefer, 2: require, 3: verify-ca, 4: + /// verify-full. + /// Use system trust store for + /// connection. Type: integer. 0: enable, 1: disable. + /// The Azure key vault secret reference of + /// password in connection string. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// This allows the special “zero” date + /// value 0000-00-00 to be retrieved from the database. Type: + /// boolean. + /// The length of time (in seconds) to + /// wait for a connection to the server before terminating the attempt + /// and generating an error. Type: integer. + /// True to return DateTime.MinValue + /// for date or datetime columns that have disallowed values. Type: + /// boolean. + /// Determines which column type (if any) + /// should be read as a GUID. Type: string. None: No column types are + /// automatically read as a Guid; Char36: All CHAR(36) columns are + /// read/written as a Guid using lowercase hex with hyphens, which + /// matches UUID. + /// The path to the client’s SSL certificate file + /// in PEM format. SslKey must also be specified. Type: string. + /// The path to the client’s SSL private key in + /// PEM format. SslCert must also be specified. Type: string. + /// When set to true, TINYINT(1) + /// values are returned as booleans. Type: bool. + public MySqlLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object driverVersion = default(object), object connectionString = default(object), object server = default(object), object port = default(object), object username = default(object), object database = default(object), object sslMode = default(object), object useSystemTrustStore = default(object), AzureKeyVaultSecretReference password = default(AzureKeyVaultSecretReference), string encryptedCredential = default(string), object allowZeroDateTime = default(object), object connectionTimeout = default(object), object convertZeroDateTime = default(object), object guidFormat = default(object), object sslCert = default(object), object sslKey = default(object), object treatTinyAsBoolean = default(object)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + DriverVersion = driverVersion; + ConnectionString = connectionString; + Server = server; + Port = port; + Username = username; + Database = database; + SslMode = sslMode; + UseSystemTrustStore = useSystemTrustStore; + Password = password; + EncryptedCredential = encryptedCredential; + AllowZeroDateTime = allowZeroDateTime; + ConnectionTimeout = connectionTimeout; + ConvertZeroDateTime = convertZeroDateTime; + GuidFormat = guidFormat; + SslCert = sslCert; + SslKey = sslKey; + TreatTinyAsBoolean = treatTinyAsBoolean; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the version of the MySQL driver. Type: string. V1 or + /// empty for legacy driver, V2 for new driver. V1 can support + /// connection string and property bag, V2 can only support connection + /// string. + /// + [JsonProperty(PropertyName = "typeProperties.driverVersion")] + public object DriverVersion { get; set; } + + /// + /// Gets or sets the connection string. Type: string, SecureString or + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets server name for connection. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.server")] + public object Server { get; set; } + + /// + /// Gets or sets the port for the connection. Type: integer. + /// + [JsonProperty(PropertyName = "typeProperties.port")] + public object Port { get; set; } + + /// + /// Gets or sets username for authentication. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets database name for connection. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.database")] + public object Database { get; set; } + + /// + /// Gets or sets SSL mode for connection. Type: integer. 0: disable, 1: + /// prefer, 2: require, 3: verify-ca, 4: verify-full. + /// + [JsonProperty(PropertyName = "typeProperties.sslMode")] + public object SslMode { get; set; } + + /// + /// Gets or sets use system trust store for connection. Type: integer. + /// 0: enable, 1: disable. + /// + [JsonProperty(PropertyName = "typeProperties.useSystemTrustStore")] + public object UseSystemTrustStore { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of password in + /// connection string. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public AzureKeyVaultSecretReference Password { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets this allows the special “zero” date value 0000-00-00 + /// to be retrieved from the database. Type: boolean. + /// + [JsonProperty(PropertyName = "typeProperties.allowZeroDateTime")] + public object AllowZeroDateTime { get; set; } + + /// + /// Gets or sets the length of time (in seconds) to wait for a + /// connection to the server before terminating the attempt and + /// generating an error. Type: integer. + /// + [JsonProperty(PropertyName = "typeProperties.connectionTimeout")] + public object ConnectionTimeout { get; set; } + + /// + /// Gets or sets true to return DateTime.MinValue for date or datetime + /// columns that have disallowed values. Type: boolean. + /// + [JsonProperty(PropertyName = "typeProperties.convertZeroDateTime")] + public object ConvertZeroDateTime { get; set; } + + /// + /// Gets or sets determines which column type (if any) should be read + /// as a GUID. Type: string. None: No column types are automatically + /// read as a Guid; Char36: All CHAR(36) columns are read/written as a + /// Guid using lowercase hex with hyphens, which matches UUID. + /// + [JsonProperty(PropertyName = "typeProperties.guidFormat")] + public object GuidFormat { get; set; } + + /// + /// Gets or sets the path to the client’s SSL certificate file in PEM + /// format. SslKey must also be specified. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.sslCert")] + public object SslCert { get; set; } + + /// + /// Gets or sets the path to the client’s SSL private key in PEM + /// format. SslCert must also be specified. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.sslKey")] + public object SslKey { get; set; } + + /// + /// Gets or sets when set to true, TINYINT(1) values are returned as + /// booleans. Type: bool. + /// + [JsonProperty(PropertyName = "typeProperties.treatTinyAsBoolean")] + public object TreatTinyAsBoolean { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Password != null) + { + Password.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MySqlSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MySqlSource.cs new file mode 100644 index 000000000000..5e5c99e3baaa --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MySqlSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for MySQL databases. + /// + public partial class MySqlSource : TabularSource + { + /// + /// Initializes a new instance of the MySqlSource class. + /// + public MySqlSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MySqlSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// Database query. Type: string (or Expression + /// with resultType string). + public MySqlSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets database query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MySqlTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MySqlTableDataset.cs new file mode 100644 index 000000000000..7a49a8989ecb --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MySqlTableDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The MySQL table dataset. + /// + [Newtonsoft.Json.JsonObject("MySqlTable")] + [Rest.Serialization.JsonTransformation] + public partial class MySqlTableDataset : Dataset + { + /// + /// Initializes a new instance of the MySqlTableDataset class. + /// + public MySqlTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the MySqlTableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The MySQL table name. Type: string (or + /// Expression with resultType string). + public MySqlTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the MySQL table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NetezzaLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NetezzaLinkedService.cs new file mode 100644 index 000000000000..37cf42f1a5ba --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NetezzaLinkedService.cs @@ -0,0 +1,104 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Netezza linked service. + /// + [Newtonsoft.Json.JsonObject("Netezza")] + [Rest.Serialization.JsonTransformation] + public partial class NetezzaLinkedService : LinkedService + { + /// + /// Initializes a new instance of the NetezzaLinkedService class. + /// + public NetezzaLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the NetezzaLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// An ODBC connection string. Type: + /// string, SecureString or AzureKeyVaultSecretReference. + /// The Azure key vault secret reference of password + /// in connection string. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public NetezzaLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object connectionString = default(object), AzureKeyVaultSecretReference pwd = default(AzureKeyVaultSecretReference), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionString = connectionString; + Pwd = pwd; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets an ODBC connection string. Type: string, SecureString + /// or AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of password in + /// connection string. + /// + [JsonProperty(PropertyName = "typeProperties.pwd")] + public AzureKeyVaultSecretReference Pwd { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Pwd != null) + { + Pwd.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NetezzaPartitionOption.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NetezzaPartitionOption.cs new file mode 100644 index 000000000000..5e73e2448eb2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NetezzaPartitionOption.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for NetezzaPartitionOption. + /// + public static class NetezzaPartitionOption + { + public const string None = "None"; + public const string DataSlice = "DataSlice"; + public const string DynamicRange = "DynamicRange"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NetezzaPartitionSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NetezzaPartitionSettings.cs new file mode 100644 index 000000000000..7dd219fd5c4f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NetezzaPartitionSettings.cs @@ -0,0 +1,81 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The settings that will be leveraged for Netezza source partitioning. + /// + public partial class NetezzaPartitionSettings + { + /// + /// Initializes a new instance of the NetezzaPartitionSettings class. + /// + public NetezzaPartitionSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the NetezzaPartitionSettings class. + /// + /// The name of the column in integer + /// type that will be used for proceeding range partitioning. Type: + /// string (or Expression with resultType string). + /// The maximum value of column + /// specified in partitionColumnName that will be used for proceeding + /// range partitioning. Type: string (or Expression with resultType + /// string). + /// The minimum value of column + /// specified in partitionColumnName that will be used for proceeding + /// range partitioning. Type: string (or Expression with resultType + /// string). + public NetezzaPartitionSettings(object partitionColumnName = default(object), object partitionUpperBound = default(object), object partitionLowerBound = default(object)) + { + PartitionColumnName = partitionColumnName; + PartitionUpperBound = partitionUpperBound; + PartitionLowerBound = partitionLowerBound; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the column in integer type that will be + /// used for proceeding range partitioning. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "partitionColumnName")] + public object PartitionColumnName { get; set; } + + /// + /// Gets or sets the maximum value of column specified in + /// partitionColumnName that will be used for proceeding range + /// partitioning. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionUpperBound")] + public object PartitionUpperBound { get; set; } + + /// + /// Gets or sets the minimum value of column specified in + /// partitionColumnName that will be used for proceeding range + /// partitioning. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionLowerBound")] + public object PartitionLowerBound { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NetezzaSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NetezzaSource.cs new file mode 100644 index 000000000000..b0fb1c1ddcdd --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NetezzaSource.cs @@ -0,0 +1,97 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Netezza source. + /// + public partial class NetezzaSource : TabularSource + { + /// + /// Initializes a new instance of the NetezzaSource class. + /// + public NetezzaSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the NetezzaSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + /// The partition mechanism that will be + /// used for Netezza read in parallel. Possible values include: "None", + /// "DataSlice", "DynamicRange". + /// The settings that will be leveraged + /// for Netezza source partitioning. + public NetezzaSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object), object partitionOption = default(object), NetezzaPartitionSettings partitionSettings = default(NetezzaPartitionSettings)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + PartitionOption = partitionOption; + PartitionSettings = partitionSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets the partition mechanism that will be used for Netezza + /// read in parallel. Possible values include: "None", "DataSlice", + /// "DynamicRange". + /// + [JsonProperty(PropertyName = "partitionOption")] + public object PartitionOption { get; set; } + + /// + /// Gets or sets the settings that will be leveraged for Netezza source + /// partitioning. + /// + [JsonProperty(PropertyName = "partitionSettings")] + public NetezzaPartitionSettings PartitionSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NetezzaTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NetezzaTableDataset.cs new file mode 100644 index 000000000000..6d7938fb2b52 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NetezzaTableDataset.cs @@ -0,0 +1,107 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Netezza dataset. + /// + [Newtonsoft.Json.JsonObject("NetezzaTable")] + [Rest.Serialization.JsonTransformation] + public partial class NetezzaTableDataset : Dataset + { + /// + /// Initializes a new instance of the NetezzaTableDataset class. + /// + public NetezzaTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the NetezzaTableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// This property will be retired. Please + /// consider using schema + table properties instead. + /// The table name of the Netezza. Type: string (or + /// Expression with resultType string). + /// The schema name of the + /// Netezza. Type: string (or Expression with resultType + /// string). + public NetezzaTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object), object table = default(object), object netezzaTableDatasetSchema = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + Table = table; + NetezzaTableDatasetSchema = netezzaTableDatasetSchema; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property will be retired. Please consider using + /// schema + table properties instead. + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Gets or sets the table name of the Netezza. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Gets or sets the schema name of the Netezza. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object NetezzaTableDatasetSchema { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NotebookParameter.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NotebookParameter.cs new file mode 100644 index 000000000000..a19bd2572cbd --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NotebookParameter.cs @@ -0,0 +1,63 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Notebook parameter. + /// + public partial class NotebookParameter + { + /// + /// Initializes a new instance of the NotebookParameter class. + /// + public NotebookParameter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the NotebookParameter class. + /// + /// Notebook parameter value. Type: string (or + /// Expression with resultType string). + /// Notebook parameter type. Possible values + /// include: 'string', 'int', 'float', 'bool' + public NotebookParameter(object value = default(object), string type = default(string)) + { + Value = value; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets notebook parameter value. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "value")] + public object Value { get; set; } + + /// + /// Gets or sets notebook parameter type. Possible values include: + /// 'string', 'int', 'float', 'bool' + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NotebookParameterType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NotebookParameterType.cs new file mode 100644 index 000000000000..6ecdf6de7c15 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/NotebookParameterType.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for NotebookParameterType. + /// + public static class NotebookParameterType + { + public const string String = "string"; + public const string Int = "int"; + public const string Float = "float"; + public const string Bool = "bool"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ODataAadServicePrincipalCredentialType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ODataAadServicePrincipalCredentialType.cs new file mode 100644 index 000000000000..7bff21f3cbc7 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ODataAadServicePrincipalCredentialType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for ODataAadServicePrincipalCredentialType. + /// + public static class ODataAadServicePrincipalCredentialType + { + public const string ServicePrincipalKey = "ServicePrincipalKey"; + public const string ServicePrincipalCert = "ServicePrincipalCert"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ODataAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ODataAuthenticationType.cs new file mode 100644 index 000000000000..5ed49168fe52 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ODataAuthenticationType.cs @@ -0,0 +1,25 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for ODataAuthenticationType. + /// + public static class ODataAuthenticationType + { + public const string Basic = "Basic"; + public const string Anonymous = "Anonymous"; + public const string Windows = "Windows"; + public const string AadServicePrincipal = "AadServicePrincipal"; + public const string ManagedServiceIdentity = "ManagedServiceIdentity"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ODataLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ODataLinkedService.cs new file mode 100644 index 000000000000..25a73863498e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ODataLinkedService.cs @@ -0,0 +1,241 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Open Data Protocol (OData) linked service. + /// + [Newtonsoft.Json.JsonObject("OData")] + [Rest.Serialization.JsonTransformation] + public partial class ODataLinkedService : LinkedService + { + /// + /// Initializes a new instance of the ODataLinkedService class. + /// + public ODataLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ODataLinkedService class. + /// + /// The URL of the OData service endpoint. Type: + /// string (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Type of authentication used to + /// connect to the OData service. Possible values include: 'Basic', + /// 'Anonymous', 'Windows', 'AadServicePrincipal', + /// 'ManagedServiceIdentity' + /// User name of the OData service. Type: string + /// (or Expression with resultType string). + /// Password of the OData service. + /// The additional HTTP headers in the + /// request to RESTful API used for authorization. Type: key value + /// pairs (value should be string type). + /// Specify the tenant information (domain name or + /// tenant ID) under which your application resides. Type: string (or + /// Expression with resultType string). + /// Specify the application id of your + /// application registered in Azure Active Directory. Type: string (or + /// Expression with resultType string). + /// Indicates the azure cloud type of the + /// service principle auth. Allowed values are AzurePublic, AzureChina, + /// AzureUsGovernment, AzureGermany. Default value is the data factory + /// regions’ cloud type. Type: string (or Expression with resultType + /// string). + /// Specify the resource you are requesting + /// authorization to use Directory. Type: string (or Expression with + /// resultType string). + /// Specify the + /// credential type (key or cert) is used for service principal. + /// Possible values include: 'ServicePrincipalKey', + /// 'ServicePrincipalCert' + /// Specify the secret of your + /// application registered in Azure Active Directory. Type: string (or + /// Expression with resultType string). + /// Specify the base64 + /// encoded certificate of your application registered in Azure Active + /// Directory. Type: string (or Expression with resultType + /// string). + /// Specify the + /// password of your certificate if your certificate has a password and + /// you are using AadServicePrincipal authentication. Type: string (or + /// Expression with resultType string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public ODataLinkedService(object url, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), string authenticationType = default(string), object userName = default(object), SecretBase password = default(SecretBase), object authHeaders = default(object), object tenant = default(object), object servicePrincipalId = default(object), object azureCloudType = default(object), object aadResourceId = default(object), string aadServicePrincipalCredentialType = default(string), SecretBase servicePrincipalKey = default(SecretBase), SecretBase servicePrincipalEmbeddedCert = default(SecretBase), SecretBase servicePrincipalEmbeddedCertPassword = default(SecretBase), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Url = url; + AuthenticationType = authenticationType; + UserName = userName; + Password = password; + AuthHeaders = authHeaders; + Tenant = tenant; + ServicePrincipalId = servicePrincipalId; + AzureCloudType = azureCloudType; + AadResourceId = aadResourceId; + AadServicePrincipalCredentialType = aadServicePrincipalCredentialType; + ServicePrincipalKey = servicePrincipalKey; + ServicePrincipalEmbeddedCert = servicePrincipalEmbeddedCert; + ServicePrincipalEmbeddedCertPassword = servicePrincipalEmbeddedCertPassword; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the URL of the OData service endpoint. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.url")] + public object Url { get; set; } + + /// + /// Gets or sets type of authentication used to connect to the OData + /// service. Possible values include: 'Basic', 'Anonymous', 'Windows', + /// 'AadServicePrincipal', 'ManagedServiceIdentity' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets user name of the OData service. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets password of the OData service. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the additional HTTP headers in the request to RESTful + /// API used for authorization. Type: key value pairs (value should be + /// string type). + /// + [JsonProperty(PropertyName = "typeProperties.authHeaders")] + public object AuthHeaders { get; set; } + + /// + /// Gets or sets specify the tenant information (domain name or tenant + /// ID) under which your application resides. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tenant")] + public object Tenant { get; set; } + + /// + /// Gets or sets specify the application id of your application + /// registered in Azure Active Directory. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalId")] + public object ServicePrincipalId { get; set; } + + /// + /// Gets or sets indicates the azure cloud type of the service + /// principle auth. Allowed values are AzurePublic, AzureChina, + /// AzureUsGovernment, AzureGermany. Default value is the data factory + /// regions’ cloud type. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.azureCloudType")] + public object AzureCloudType { get; set; } + + /// + /// Gets or sets specify the resource you are requesting authorization + /// to use Directory. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.aadResourceId")] + public object AadResourceId { get; set; } + + /// + /// Gets or sets specify the credential type (key or cert) is used for + /// service principal. Possible values include: 'ServicePrincipalKey', + /// 'ServicePrincipalCert' + /// + [JsonProperty(PropertyName = "typeProperties.aadServicePrincipalCredentialType")] + public string AadServicePrincipalCredentialType { get; set; } + + /// + /// Gets or sets specify the secret of your application registered in + /// Azure Active Directory. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalKey")] + public SecretBase ServicePrincipalKey { get; set; } + + /// + /// Gets or sets specify the base64 encoded certificate of your + /// application registered in Azure Active Directory. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalEmbeddedCert")] + public SecretBase ServicePrincipalEmbeddedCert { get; set; } + + /// + /// Gets or sets specify the password of your certificate if your + /// certificate has a password and you are using AadServicePrincipal + /// authentication. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalEmbeddedCertPassword")] + public SecretBase ServicePrincipalEmbeddedCertPassword { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Url == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Url"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ODataResourceDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ODataResourceDataset.cs new file mode 100644 index 000000000000..77d534f07fcb --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ODataResourceDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Open Data Protocol (OData) resource dataset. + /// + [Newtonsoft.Json.JsonObject("ODataResource")] + [Rest.Serialization.JsonTransformation] + public partial class ODataResourceDataset : Dataset + { + /// + /// Initializes a new instance of the ODataResourceDataset class. + /// + public ODataResourceDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the ODataResourceDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The OData resource path. Type: string (or + /// Expression with resultType string). + public ODataResourceDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object path = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Path = path; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the OData resource path. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.path")] + public object Path { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ODataSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ODataSource.cs new file mode 100644 index 000000000000..bd164edef32c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ODataSource.cs @@ -0,0 +1,97 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for OData source. + /// + public partial class ODataSource : CopySource + { + /// + /// Initializes a new instance of the ODataSource class. + /// + public ODataSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ODataSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// OData query. For example, "$top=1". Type: + /// string (or Expression with resultType string). + /// The timeout (TimeSpan) to get an + /// HTTP response. It is the timeout to get a response, not the timeout + /// to read response data. Default value: 00:05:00. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public ODataSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object query = default(object), object httpRequestTimeout = default(object), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + Query = query; + HttpRequestTimeout = httpRequestTimeout; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets oData query. For example, "$top=1". Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets the timeout (TimeSpan) to get an HTTP response. It is + /// the timeout to get a response, not the timeout to read response + /// data. Default value: 00:05:00. Type: string (or Expression with + /// resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "httpRequestTimeout")] + public object HttpRequestTimeout { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OdbcLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OdbcLinkedService.cs new file mode 100644 index 000000000000..7a3ad2869bd1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OdbcLinkedService.cs @@ -0,0 +1,139 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Open Database Connectivity (ODBC) linked service. + /// + [Newtonsoft.Json.JsonObject("Odbc")] + [Rest.Serialization.JsonTransformation] + public partial class OdbcLinkedService : LinkedService + { + /// + /// Initializes a new instance of the OdbcLinkedService class. + /// + public OdbcLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OdbcLinkedService class. + /// + /// The non-access credential portion of + /// the connection string as well as an optional encrypted credential. + /// Type: string, or SecureString, or AzureKeyVaultSecretReference, or + /// Expression with resultType string. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Type of authentication used to + /// connect to the ODBC data store. Possible values are: Anonymous and + /// Basic. Type: string (or Expression with resultType string). + /// The access credential portion of the + /// connection string specified in driver-specific property-value + /// format. + /// User name for Basic authentication. Type: + /// string (or Expression with resultType string). + /// Password for Basic authentication. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public OdbcLinkedService(object connectionString, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object authenticationType = default(object), SecretBase credential = default(SecretBase), object userName = default(object), SecretBase password = default(SecretBase), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionString = connectionString; + AuthenticationType = authenticationType; + Credential = credential; + UserName = userName; + Password = password; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the non-access credential portion of the connection + /// string as well as an optional encrypted credential. Type: string, + /// or SecureString, or AzureKeyVaultSecretReference, or Expression + /// with resultType string. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets type of authentication used to connect to the ODBC + /// data store. Possible values are: Anonymous and Basic. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public object AuthenticationType { get; set; } + + /// + /// Gets or sets the access credential portion of the connection string + /// specified in driver-specific property-value format. + /// + [JsonProperty(PropertyName = "typeProperties.credential")] + public SecretBase Credential { get; set; } + + /// + /// Gets or sets user name for Basic authentication. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets password for Basic authentication. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ConnectionString == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ConnectionString"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OdbcSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OdbcSink.cs new file mode 100644 index 000000000000..4b38395c8d42 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OdbcSink.cs @@ -0,0 +1,74 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity ODBC sink. + /// + public partial class OdbcSink : CopySink + { + /// + /// Initializes a new instance of the OdbcSink class. + /// + public OdbcSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OdbcSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// A query to execute before starting the + /// copy. Type: string (or Expression with resultType string). + public OdbcSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object preCopyScript = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + PreCopyScript = preCopyScript; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to execute before starting the copy. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "preCopyScript")] + public object PreCopyScript { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OdbcSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OdbcSource.cs new file mode 100644 index 000000000000..bed308f9a0e9 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OdbcSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for ODBC databases. + /// + public partial class OdbcSource : TabularSource + { + /// + /// Initializes a new instance of the OdbcSource class. + /// + public OdbcSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OdbcSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// Database query. Type: string (or Expression + /// with resultType string). + public OdbcSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets database query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OdbcTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OdbcTableDataset.cs new file mode 100644 index 000000000000..c86afef7707b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OdbcTableDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The ODBC table dataset. + /// + [Newtonsoft.Json.JsonObject("OdbcTable")] + [Rest.Serialization.JsonTransformation] + public partial class OdbcTableDataset : Dataset + { + /// + /// Initializes a new instance of the OdbcTableDataset class. + /// + public OdbcTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the OdbcTableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The ODBC table name. Type: string (or + /// Expression with resultType string). + public OdbcTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the ODBC table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Office365Dataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Office365Dataset.cs new file mode 100644 index 000000000000..2ca3b8697335 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Office365Dataset.cs @@ -0,0 +1,102 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Office365 account. + /// + [Newtonsoft.Json.JsonObject("Office365Table")] + [Rest.Serialization.JsonTransformation] + public partial class Office365Dataset : Dataset + { + /// + /// Initializes a new instance of the Office365Dataset class. + /// + public Office365Dataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the Office365Dataset class. + /// + /// Linked service reference. + /// Name of the dataset to extract from Office + /// 365. Type: string (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// A predicate expression that can be used to + /// filter the specific rows to extract from Office 365. Type: string + /// (or Expression with resultType string). + public Office365Dataset(LinkedServiceReference linkedServiceName, object tableName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object predicate = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + Predicate = predicate; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the dataset to extract from Office 365. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Gets or sets a predicate expression that can be used to filter the + /// specific rows to extract from Office 365. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.predicate")] + public object Predicate { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (TableName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TableName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Office365LinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Office365LinkedService.cs new file mode 100644 index 000000000000..2364a2121572 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Office365LinkedService.cs @@ -0,0 +1,138 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Office365 linked service. + /// + [Newtonsoft.Json.JsonObject("Office365")] + [Rest.Serialization.JsonTransformation] + public partial class Office365LinkedService : LinkedService + { + /// + /// Initializes a new instance of the Office365LinkedService class. + /// + public Office365LinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Office365LinkedService class. + /// + /// Azure tenant ID to which the Office + /// 365 account belongs. Type: string (or Expression with resultType + /// string). + /// Specify the tenant + /// information under which your Azure AD web application resides. + /// Type: string (or Expression with resultType string). + /// Specify the application's client + /// ID. Type: string (or Expression with resultType string). + /// Specify the application's + /// key. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public Office365LinkedService(object office365TenantId, object servicePrincipalTenantId, object servicePrincipalId, SecretBase servicePrincipalKey, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Office365TenantId = office365TenantId; + ServicePrincipalTenantId = servicePrincipalTenantId; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets azure tenant ID to which the Office 365 account + /// belongs. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.office365TenantId")] + public object Office365TenantId { get; set; } + + /// + /// Gets or sets specify the tenant information under which your Azure + /// AD web application resides. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalTenantId")] + public object ServicePrincipalTenantId { get; set; } + + /// + /// Gets or sets specify the application's client ID. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalId")] + public object ServicePrincipalId { get; set; } + + /// + /// Gets or sets specify the application's key. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalKey")] + public SecretBase ServicePrincipalKey { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Office365TenantId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Office365TenantId"); + } + if (ServicePrincipalTenantId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ServicePrincipalTenantId"); + } + if (ServicePrincipalId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ServicePrincipalId"); + } + if (ServicePrincipalKey == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ServicePrincipalKey"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Office365Source.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Office365Source.cs new file mode 100644 index 000000000000..f4ab13ab0c80 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Office365Source.cs @@ -0,0 +1,129 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for an Office 365 service. + /// + public partial class Office365Source : CopySource + { + /// + /// Initializes a new instance of the Office365Source class. + /// + public Office365Source() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Office365Source class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The groups containing all the users. + /// Type: array of strings (or Expression with resultType array of + /// strings). + /// The user scope uri. Type: string + /// (or Expression with resultType string). + /// The Column to apply the <paramref + /// name="StartTime"/> and <paramref name="EndTime"/>. Type: + /// string (or Expression with resultType string). + /// Start time of the requested range for this + /// dataset. Type: string (or Expression with resultType + /// string). + /// End time of the requested range for this + /// dataset. Type: string (or Expression with resultType + /// string). + /// The columns to be read out from the + /// Office 365 table. Type: array of objects (or Expression with + /// resultType array of objects). itemType: OutputColumn. Example: [ { + /// "name": "Id" }, { "name": "CreatedDateTime" } ] + public Office365Source(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object allowedGroups = default(object), object userScopeFilterUri = default(object), object dateFilterColumn = default(object), object startTime = default(object), object endTime = default(object), object outputColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + AllowedGroups = allowedGroups; + UserScopeFilterUri = userScopeFilterUri; + DateFilterColumn = dateFilterColumn; + StartTime = startTime; + EndTime = endTime; + OutputColumns = outputColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the groups containing all the users. Type: array of + /// strings (or Expression with resultType array of strings). + /// + [JsonProperty(PropertyName = "allowedGroups")] + public object AllowedGroups { get; set; } + + /// + /// Gets or sets the user scope uri. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "userScopeFilterUri")] + public object UserScopeFilterUri { get; set; } + + /// + /// Gets or sets the Column to apply the &lt;paramref + /// name="StartTime"/&gt; and &lt;paramref + /// name="EndTime"/&gt;. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "dateFilterColumn")] + public object DateFilterColumn { get; set; } + + /// + /// Gets or sets start time of the requested range for this dataset. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "startTime")] + public object StartTime { get; set; } + + /// + /// Gets or sets end time of the requested range for this dataset. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "endTime")] + public object EndTime { get; set; } + + /// + /// Gets or sets the columns to be read out from the Office 365 table. + /// Type: array of objects (or Expression with resultType array of + /// objects). itemType: OutputColumn. Example: [ { "name": "Id" }, { + /// "name": "CreatedDateTime" } ] + /// + [JsonProperty(PropertyName = "outputColumns")] + public object OutputColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Operation.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Operation.cs new file mode 100644 index 000000000000..18255b93840f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Operation.cs @@ -0,0 +1,82 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Azure Data Factory API operation definition. + /// + [Rest.Serialization.JsonTransformation] + public partial class Operation + { + /// + /// Initializes a new instance of the Operation class. + /// + public Operation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Operation class. + /// + /// Operation name: + /// {provider}/{resource}/{operation} + /// The intended executor of the + /// operation. + /// Metadata associated with the + /// operation. + /// Details about a service + /// operation. + public Operation(string name = default(string), string origin = default(string), OperationDisplay display = default(OperationDisplay), OperationServiceSpecification serviceSpecification = default(OperationServiceSpecification)) + { + Name = name; + Origin = origin; + Display = display; + ServiceSpecification = serviceSpecification; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets operation name: {provider}/{resource}/{operation} + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the intended executor of the operation. + /// + [JsonProperty(PropertyName = "origin")] + public string Origin { get; set; } + + /// + /// Gets or sets metadata associated with the operation. + /// + [JsonProperty(PropertyName = "display")] + public OperationDisplay Display { get; set; } + + /// + /// Gets or sets details about a service operation. + /// + [JsonProperty(PropertyName = "properties.serviceSpecification")] + public OperationServiceSpecification ServiceSpecification { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OperationDisplay.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OperationDisplay.cs new file mode 100644 index 000000000000..85a5df2fa391 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OperationDisplay.cs @@ -0,0 +1,78 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Metadata associated with the operation. + /// + public partial class OperationDisplay + { + /// + /// Initializes a new instance of the OperationDisplay class. + /// + public OperationDisplay() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OperationDisplay class. + /// + /// The description of the operation. + /// The name of the provider. + /// The name of the resource type on which the + /// operation is performed. + /// The type of operation: get, read, delete, + /// etc. + public OperationDisplay(string description = default(string), string provider = default(string), string resource = default(string), string operation = default(string)) + { + Description = description; + Provider = provider; + Resource = resource; + Operation = operation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the description of the operation. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets the name of the provider. + /// + [JsonProperty(PropertyName = "provider")] + public string Provider { get; set; } + + /// + /// Gets or sets the name of the resource type on which the operation + /// is performed. + /// + [JsonProperty(PropertyName = "resource")] + public string Resource { get; set; } + + /// + /// Gets or sets the type of operation: get, read, delete, etc. + /// + [JsonProperty(PropertyName = "operation")] + public string Operation { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OperationLogSpecification.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OperationLogSpecification.cs new file mode 100644 index 000000000000..24aff41f0a8e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OperationLogSpecification.cs @@ -0,0 +1,69 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Details about an operation related to logs. + /// + public partial class OperationLogSpecification + { + /// + /// Initializes a new instance of the OperationLogSpecification class. + /// + public OperationLogSpecification() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OperationLogSpecification class. + /// + /// The name of the log category. + /// Localized display name. + /// Blobs created in the customer storage + /// account, per hour. + public OperationLogSpecification(string name = default(string), string displayName = default(string), string blobDuration = default(string)) + { + Name = name; + DisplayName = displayName; + BlobDuration = blobDuration; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the log category. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets localized display name. + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets blobs created in the customer storage account, per + /// hour. + /// + [JsonProperty(PropertyName = "blobDuration")] + public string BlobDuration { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OperationMetricAvailability.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OperationMetricAvailability.cs new file mode 100644 index 000000000000..b3d24b145459 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OperationMetricAvailability.cs @@ -0,0 +1,63 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines how often data for a metric becomes available. + /// + public partial class OperationMetricAvailability + { + /// + /// Initializes a new instance of the OperationMetricAvailability + /// class. + /// + public OperationMetricAvailability() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OperationMetricAvailability + /// class. + /// + /// The granularity for the metric. + /// Blob created in the customer storage + /// account, per hour. + public OperationMetricAvailability(string timeGrain = default(string), string blobDuration = default(string)) + { + TimeGrain = timeGrain; + BlobDuration = blobDuration; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the granularity for the metric. + /// + [JsonProperty(PropertyName = "timeGrain")] + public string TimeGrain { get; set; } + + /// + /// Gets or sets blob created in the customer storage account, per + /// hour. + /// + [JsonProperty(PropertyName = "blobDuration")] + public string BlobDuration { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OperationMetricDimension.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OperationMetricDimension.cs new file mode 100644 index 000000000000..d05a043e1ccc --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OperationMetricDimension.cs @@ -0,0 +1,71 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines the metric dimension. + /// + public partial class OperationMetricDimension + { + /// + /// Initializes a new instance of the OperationMetricDimension class. + /// + public OperationMetricDimension() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OperationMetricDimension class. + /// + /// The name of the dimension for the + /// metric. + /// The display name of the metric + /// dimension. + /// Whether the dimension should + /// be exported to Azure Monitor. + public OperationMetricDimension(string name = default(string), string displayName = default(string), bool? toBeExportedForShoebox = default(bool?)) + { + Name = name; + DisplayName = displayName; + ToBeExportedForShoebox = toBeExportedForShoebox; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the dimension for the metric. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the display name of the metric dimension. + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets whether the dimension should be exported to Azure + /// Monitor. + /// + [JsonProperty(PropertyName = "toBeExportedForShoebox")] + public bool? ToBeExportedForShoebox { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OperationMetricSpecification.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OperationMetricSpecification.cs new file mode 100644 index 000000000000..dafde584839c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OperationMetricSpecification.cs @@ -0,0 +1,134 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Details about an operation related to metrics. + /// + public partial class OperationMetricSpecification + { + /// + /// Initializes a new instance of the OperationMetricSpecification + /// class. + /// + public OperationMetricSpecification() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OperationMetricSpecification + /// class. + /// + /// The name of the metric. + /// Localized display name of the + /// metric. + /// The description of the + /// metric. + /// The unit that the metric is measured in. + /// The type of metric + /// aggregation. + /// Whether or not the service + /// is using regional MDM accounts. + /// The name of the MDM account. + /// The name of the MDM + /// namespace. + /// Defines how often data for metrics + /// becomes available. + /// Defines the metric dimension. + public OperationMetricSpecification(string name = default(string), string displayName = default(string), string displayDescription = default(string), string unit = default(string), string aggregationType = default(string), string enableRegionalMdmAccount = default(string), string sourceMdmAccount = default(string), string sourceMdmNamespace = default(string), IList availabilities = default(IList), IList dimensions = default(IList)) + { + Name = name; + DisplayName = displayName; + DisplayDescription = displayDescription; + Unit = unit; + AggregationType = aggregationType; + EnableRegionalMdmAccount = enableRegionalMdmAccount; + SourceMdmAccount = sourceMdmAccount; + SourceMdmNamespace = sourceMdmNamespace; + Availabilities = availabilities; + Dimensions = dimensions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the metric. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets localized display name of the metric. + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; set; } + + /// + /// Gets or sets the description of the metric. + /// + [JsonProperty(PropertyName = "displayDescription")] + public string DisplayDescription { get; set; } + + /// + /// Gets or sets the unit that the metric is measured in. + /// + [JsonProperty(PropertyName = "unit")] + public string Unit { get; set; } + + /// + /// Gets or sets the type of metric aggregation. + /// + [JsonProperty(PropertyName = "aggregationType")] + public string AggregationType { get; set; } + + /// + /// Gets or sets whether or not the service is using regional MDM + /// accounts. + /// + [JsonProperty(PropertyName = "enableRegionalMdmAccount")] + public string EnableRegionalMdmAccount { get; set; } + + /// + /// Gets or sets the name of the MDM account. + /// + [JsonProperty(PropertyName = "sourceMdmAccount")] + public string SourceMdmAccount { get; set; } + + /// + /// Gets or sets the name of the MDM namespace. + /// + [JsonProperty(PropertyName = "sourceMdmNamespace")] + public string SourceMdmNamespace { get; set; } + + /// + /// Gets or sets defines how often data for metrics becomes available. + /// + [JsonProperty(PropertyName = "availabilities")] + public IList Availabilities { get; set; } + + /// + /// Gets or sets defines the metric dimension. + /// + [JsonProperty(PropertyName = "dimensions")] + public IList Dimensions { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OperationServiceSpecification.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OperationServiceSpecification.cs new file mode 100644 index 000000000000..ec5839f534db --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OperationServiceSpecification.cs @@ -0,0 +1,65 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Details about a service operation. + /// + public partial class OperationServiceSpecification + { + /// + /// Initializes a new instance of the OperationServiceSpecification + /// class. + /// + public OperationServiceSpecification() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OperationServiceSpecification + /// class. + /// + /// Details about operations related to + /// logs. + /// Details about operations related + /// to metrics. + public OperationServiceSpecification(IList logSpecifications = default(IList), IList metricSpecifications = default(IList)) + { + LogSpecifications = logSpecifications; + MetricSpecifications = metricSpecifications; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets details about operations related to logs. + /// + [JsonProperty(PropertyName = "logSpecifications")] + public IList LogSpecifications { get; set; } + + /// + /// Gets or sets details about operations related to metrics. + /// + [JsonProperty(PropertyName = "metricSpecifications")] + public IList MetricSpecifications { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleCloudStorageLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleCloudStorageLinkedService.cs new file mode 100644 index 000000000000..5608f8100020 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleCloudStorageLinkedService.cs @@ -0,0 +1,120 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for Oracle Cloud Storage. + /// + [Newtonsoft.Json.JsonObject("OracleCloudStorage")] + [Rest.Serialization.JsonTransformation] + public partial class OracleCloudStorageLinkedService : LinkedService + { + /// + /// Initializes a new instance of the OracleCloudStorageLinkedService + /// class. + /// + public OracleCloudStorageLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OracleCloudStorageLinkedService + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The access key identifier of the Oracle + /// Cloud Storage Identity and Access Management (IAM) user. Type: + /// string (or Expression with resultType string). + /// The secret access key of the Oracle + /// Cloud Storage Identity and Access Management (IAM) user. + /// This value specifies the endpoint to + /// access with the Oracle Cloud Storage Connector. This is an optional + /// property; change it only if you want to try a different service + /// endpoint or want to switch between https and http. Type: string (or + /// Expression with resultType string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public OracleCloudStorageLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object accessKeyId = default(object), SecretBase secretAccessKey = default(SecretBase), object serviceUrl = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + AccessKeyId = accessKeyId; + SecretAccessKey = secretAccessKey; + ServiceUrl = serviceUrl; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the access key identifier of the Oracle Cloud Storage + /// Identity and Access Management (IAM) user. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.accessKeyId")] + public object AccessKeyId { get; set; } + + /// + /// Gets or sets the secret access key of the Oracle Cloud Storage + /// Identity and Access Management (IAM) user. + /// + [JsonProperty(PropertyName = "typeProperties.secretAccessKey")] + public SecretBase SecretAccessKey { get; set; } + + /// + /// Gets or sets this value specifies the endpoint to access with the + /// Oracle Cloud Storage Connector. This is an optional property; + /// change it only if you want to try a different service endpoint or + /// want to switch between https and http. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.serviceUrl")] + public object ServiceUrl { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleCloudStorageLocation.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleCloudStorageLocation.cs new file mode 100644 index 000000000000..a78781df7ec7 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleCloudStorageLocation.cs @@ -0,0 +1,73 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The location of Oracle Cloud Storage dataset. + /// + public partial class OracleCloudStorageLocation : DatasetLocation + { + /// + /// Initializes a new instance of the OracleCloudStorageLocation class. + /// + public OracleCloudStorageLocation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OracleCloudStorageLocation class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Specify the folder path of dataset. Type: + /// string (or Expression with resultType string) + /// Specify the file name of dataset. Type: + /// string (or Expression with resultType string). + /// Specify the bucketName of Oracle Cloud + /// Storage. Type: string (or Expression with resultType + /// string) + /// Specify the version of Oracle Cloud Storage. + /// Type: string (or Expression with resultType string). + public OracleCloudStorageLocation(IDictionary additionalProperties = default(IDictionary), object folderPath = default(object), object fileName = default(object), object bucketName = default(object), object version = default(object)) + : base(additionalProperties, folderPath, fileName) + { + BucketName = bucketName; + Version = version; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specify the bucketName of Oracle Cloud Storage. Type: + /// string (or Expression with resultType string) + /// + [JsonProperty(PropertyName = "bucketName")] + public object BucketName { get; set; } + + /// + /// Gets or sets specify the version of Oracle Cloud Storage. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "version")] + public object Version { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleCloudStorageReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleCloudStorageReadSettings.cs new file mode 100644 index 000000000000..6a9a72e52339 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleCloudStorageReadSettings.cs @@ -0,0 +1,171 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Oracle Cloud Storage read settings. + /// + public partial class OracleCloudStorageReadSettings : StoreReadSettings + { + /// + /// Initializes a new instance of the OracleCloudStorageReadSettings + /// class. + /// + public OracleCloudStorageReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OracleCloudStorageReadSettings + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// If true, files under the folder path will + /// be read recursively. Default is true. Type: boolean (or Expression + /// with resultType boolean). + /// Oracle Cloud Storage + /// wildcardFolderPath. Type: string (or Expression with resultType + /// string). + /// Oracle Cloud Storage + /// wildcardFileName. Type: string (or Expression with resultType + /// string). + /// The prefix filter for the Oracle Cloud Storage + /// object name. Type: string (or Expression with resultType + /// string). + /// Point to a text file that lists each + /// file (relative path to the path configured in the dataset) that you + /// want to copy. Type: string (or Expression with resultType + /// string). + /// Indicates whether to enable + /// partition discovery. Type: boolean (or Expression with resultType + /// boolean). + /// Specify the root path where + /// partition discovery starts from. Type: string (or Expression with + /// resultType string). + /// Indicates whether the + /// source files need to be deleted after copy completion. Default is + /// false. Type: boolean (or Expression with resultType + /// boolean). + /// The start of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + /// The end of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + public OracleCloudStorageReadSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object recursive = default(object), object wildcardFolderPath = default(object), object wildcardFileName = default(object), object prefix = default(object), object fileListPath = default(object), object enablePartitionDiscovery = default(object), object partitionRootPath = default(object), object deleteFilesAfterCompletion = default(object), object modifiedDatetimeStart = default(object), object modifiedDatetimeEnd = default(object)) + : base(additionalProperties, maxConcurrentConnections, disableMetricsCollection) + { + Recursive = recursive; + WildcardFolderPath = wildcardFolderPath; + WildcardFileName = wildcardFileName; + Prefix = prefix; + FileListPath = fileListPath; + EnablePartitionDiscovery = enablePartitionDiscovery; + PartitionRootPath = partitionRootPath; + DeleteFilesAfterCompletion = deleteFilesAfterCompletion; + ModifiedDatetimeStart = modifiedDatetimeStart; + ModifiedDatetimeEnd = modifiedDatetimeEnd; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets if true, files under the folder path will be read + /// recursively. Default is true. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "recursive")] + public object Recursive { get; set; } + + /// + /// Gets or sets oracle Cloud Storage wildcardFolderPath. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFolderPath")] + public object WildcardFolderPath { get; set; } + + /// + /// Gets or sets oracle Cloud Storage wildcardFileName. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFileName")] + public object WildcardFileName { get; set; } + + /// + /// Gets or sets the prefix filter for the Oracle Cloud Storage object + /// name. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "prefix")] + public object Prefix { get; set; } + + /// + /// Gets or sets point to a text file that lists each file (relative + /// path to the path configured in the dataset) that you want to copy. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "fileListPath")] + public object FileListPath { get; set; } + + /// + /// Gets or sets indicates whether to enable partition discovery. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "enablePartitionDiscovery")] + public object EnablePartitionDiscovery { get; set; } + + /// + /// Gets or sets specify the root path where partition discovery starts + /// from. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionRootPath")] + public object PartitionRootPath { get; set; } + + /// + /// Gets or sets indicates whether the source files need to be deleted + /// after copy completion. Default is false. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "deleteFilesAfterCompletion")] + public object DeleteFilesAfterCompletion { get; set; } + + /// + /// Gets or sets the start of file's modified datetime. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "modifiedDatetimeStart")] + public object ModifiedDatetimeStart { get; set; } + + /// + /// Gets or sets the end of file's modified datetime. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "modifiedDatetimeEnd")] + public object ModifiedDatetimeEnd { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleLinkedService.cs new file mode 100644 index 000000000000..35d95b3bd2e6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleLinkedService.cs @@ -0,0 +1,108 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Oracle database. + /// + [Newtonsoft.Json.JsonObject("Oracle")] + [Rest.Serialization.JsonTransformation] + public partial class OracleLinkedService : LinkedService + { + /// + /// Initializes a new instance of the OracleLinkedService class. + /// + public OracleLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OracleLinkedService class. + /// + /// The connection string. Type: string, + /// SecureString or AzureKeyVaultSecretReference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The Azure key vault secret reference of + /// password in connection string. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public OracleLinkedService(object connectionString, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), AzureKeyVaultSecretReference password = default(AzureKeyVaultSecretReference), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionString = connectionString; + Password = password; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the connection string. Type: string, SecureString or + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of password in + /// connection string. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public AzureKeyVaultSecretReference Password { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ConnectionString == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ConnectionString"); + } + if (Password != null) + { + Password.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OraclePartitionOption.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OraclePartitionOption.cs new file mode 100644 index 000000000000..82a50533c64f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OraclePartitionOption.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for OraclePartitionOption. + /// + public static class OraclePartitionOption + { + public const string None = "None"; + public const string PhysicalPartitionsOfTable = "PhysicalPartitionsOfTable"; + public const string DynamicRange = "DynamicRange"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OraclePartitionSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OraclePartitionSettings.cs new file mode 100644 index 000000000000..67712035661d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OraclePartitionSettings.cs @@ -0,0 +1,90 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The settings that will be leveraged for Oracle source partitioning. + /// + public partial class OraclePartitionSettings + { + /// + /// Initializes a new instance of the OraclePartitionSettings class. + /// + public OraclePartitionSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OraclePartitionSettings class. + /// + /// Names of the physical partitions of + /// Oracle table. + /// The name of the column in integer + /// type that will be used for proceeding range partitioning. Type: + /// string (or Expression with resultType string). + /// The maximum value of column + /// specified in partitionColumnName that will be used for proceeding + /// range partitioning. Type: string (or Expression with resultType + /// string). + /// The minimum value of column + /// specified in partitionColumnName that will be used for proceeding + /// range partitioning. Type: string (or Expression with resultType + /// string). + public OraclePartitionSettings(object partitionNames = default(object), object partitionColumnName = default(object), object partitionUpperBound = default(object), object partitionLowerBound = default(object)) + { + PartitionNames = partitionNames; + PartitionColumnName = partitionColumnName; + PartitionUpperBound = partitionUpperBound; + PartitionLowerBound = partitionLowerBound; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets names of the physical partitions of Oracle table. + /// + [JsonProperty(PropertyName = "partitionNames")] + public object PartitionNames { get; set; } + + /// + /// Gets or sets the name of the column in integer type that will be + /// used for proceeding range partitioning. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "partitionColumnName")] + public object PartitionColumnName { get; set; } + + /// + /// Gets or sets the maximum value of column specified in + /// partitionColumnName that will be used for proceeding range + /// partitioning. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionUpperBound")] + public object PartitionUpperBound { get; set; } + + /// + /// Gets or sets the minimum value of column specified in + /// partitionColumnName that will be used for proceeding range + /// partitioning. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionLowerBound")] + public object PartitionLowerBound { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleServiceCloudLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleServiceCloudLinkedService.cs new file mode 100644 index 000000000000..7016e5cfdfd0 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleServiceCloudLinkedService.cs @@ -0,0 +1,163 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Oracle Service Cloud linked service. + /// + [Newtonsoft.Json.JsonObject("OracleServiceCloud")] + [Rest.Serialization.JsonTransformation] + public partial class OracleServiceCloudLinkedService : LinkedService + { + /// + /// Initializes a new instance of the OracleServiceCloudLinkedService + /// class. + /// + public OracleServiceCloudLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OracleServiceCloudLinkedService + /// class. + /// + /// The URL of the Oracle Service Cloud + /// instance. + /// The user name that you use to access Oracle + /// Service Cloud server. + /// The password corresponding to the user name + /// that you provided in the username key. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Specifies whether the data + /// source endpoints are encrypted using HTTPS. The default value is + /// true. Type: boolean (or Expression with resultType + /// boolean). + /// Specifies whether to require the + /// host name in the server's certificate to match the host name of the + /// server when connecting over SSL. The default value is true. Type: + /// boolean (or Expression with resultType boolean). + /// Specifies whether to verify the + /// identity of the server when connecting over SSL. The default value + /// is true. Type: boolean (or Expression with resultType + /// boolean). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public OracleServiceCloudLinkedService(object host, object username, SecretBase password, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object useEncryptedEndpoints = default(object), object useHostVerification = default(object), object usePeerVerification = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Host = host; + Username = username; + Password = password; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the URL of the Oracle Service Cloud instance. + /// + [JsonProperty(PropertyName = "typeProperties.host")] + public object Host { get; set; } + + /// + /// Gets or sets the user name that you use to access Oracle Service + /// Cloud server. + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets the password corresponding to the user name that you + /// provided in the username key. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets specifies whether the data source endpoints are + /// encrypted using HTTPS. The default value is true. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.useEncryptedEndpoints")] + public object UseEncryptedEndpoints { get; set; } + + /// + /// Gets or sets specifies whether to require the host name in the + /// server's certificate to match the host name of the server when + /// connecting over SSL. The default value is true. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.useHostVerification")] + public object UseHostVerification { get; set; } + + /// + /// Gets or sets specifies whether to verify the identity of the server + /// when connecting over SSL. The default value is true. Type: boolean + /// (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.usePeerVerification")] + public object UsePeerVerification { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Host == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Host"); + } + if (Username == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Username"); + } + if (Password == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Password"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleServiceCloudObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleServiceCloudObjectDataset.cs new file mode 100644 index 000000000000..7374b36d825a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleServiceCloudObjectDataset.cs @@ -0,0 +1,88 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Oracle Service Cloud dataset. + /// + [Newtonsoft.Json.JsonObject("OracleServiceCloudObject")] + [Rest.Serialization.JsonTransformation] + public partial class OracleServiceCloudObjectDataset : Dataset + { + /// + /// Initializes a new instance of the OracleServiceCloudObjectDataset + /// class. + /// + public OracleServiceCloudObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the OracleServiceCloudObjectDataset + /// class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name. Type: string (or Expression + /// with resultType string). + public OracleServiceCloudObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleServiceCloudSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleServiceCloudSource.cs new file mode 100644 index 000000000000..87fbed971864 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleServiceCloudSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Oracle Service Cloud source. + /// + public partial class OracleServiceCloudSource : TabularSource + { + /// + /// Initializes a new instance of the OracleServiceCloudSource class. + /// + public OracleServiceCloudSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OracleServiceCloudSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public OracleServiceCloudSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleSink.cs new file mode 100644 index 000000000000..d4310874c17e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleSink.cs @@ -0,0 +1,74 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Oracle sink. + /// + public partial class OracleSink : CopySink + { + /// + /// Initializes a new instance of the OracleSink class. + /// + public OracleSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OracleSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// SQL pre-copy script. Type: string (or + /// Expression with resultType string). + public OracleSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object preCopyScript = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + PreCopyScript = preCopyScript; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SQL pre-copy script. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "preCopyScript")] + public object PreCopyScript { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleSource.cs new file mode 100644 index 000000000000..0a144f35b9f3 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleSource.cs @@ -0,0 +1,115 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Oracle source. + /// + public partial class OracleSource : CopySource + { + /// + /// Initializes a new instance of the OracleSource class. + /// + public OracleSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OracleSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Oracle reader query. Type: string + /// (or Expression with resultType string). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The partition mechanism that will be + /// used for Oracle read in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". + /// The settings that will be leveraged + /// for Oracle source partitioning. + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public OracleSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object oracleReaderQuery = default(object), object queryTimeout = default(object), object partitionOption = default(object), OraclePartitionSettings partitionSettings = default(OraclePartitionSettings), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + OracleReaderQuery = oracleReaderQuery; + QueryTimeout = queryTimeout; + PartitionOption = partitionOption; + PartitionSettings = partitionSettings; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets oracle reader query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "oracleReaderQuery")] + public object OracleReaderQuery { get; set; } + + /// + /// Gets or sets query timeout. Type: string (or Expression with + /// resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "queryTimeout")] + public object QueryTimeout { get; set; } + + /// + /// Gets or sets the partition mechanism that will be used for Oracle + /// read in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". + /// + [JsonProperty(PropertyName = "partitionOption")] + public object PartitionOption { get; set; } + + /// + /// Gets or sets the settings that will be leveraged for Oracle source + /// partitioning. + /// + [JsonProperty(PropertyName = "partitionSettings")] + public OraclePartitionSettings PartitionSettings { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleTableDataset.cs new file mode 100644 index 000000000000..756727e8eca1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OracleTableDataset.cs @@ -0,0 +1,108 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The on-premises Oracle database dataset. + /// + [Newtonsoft.Json.JsonObject("OracleTable")] + [Rest.Serialization.JsonTransformation] + public partial class OracleTableDataset : Dataset + { + /// + /// Initializes a new instance of the OracleTableDataset class. + /// + public OracleTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the OracleTableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// This property will be retired. Please + /// consider using schema + table properties instead. + /// The schema name of the + /// on-premises Oracle database. Type: string (or Expression with + /// resultType string). + /// The table name of the on-premises Oracle + /// database. Type: string (or Expression with resultType + /// string). + public OracleTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object), object oracleTableDatasetSchema = default(object), object table = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + OracleTableDatasetSchema = oracleTableDatasetSchema; + Table = table; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property will be retired. Please consider using + /// schema + table properties instead. + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Gets or sets the schema name of the on-premises Oracle database. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object OracleTableDatasetSchema { get; set; } + + /// + /// Gets or sets the table name of the on-premises Oracle database. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcCompressionCodec.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcCompressionCodec.cs new file mode 100644 index 000000000000..39efad59247e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcCompressionCodec.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for OrcCompressionCodec. + /// + public static class OrcCompressionCodec + { + public const string None = "none"; + public const string Zlib = "zlib"; + public const string Snappy = "snappy"; + public const string Lzo = "lzo"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcDataset.cs new file mode 100644 index 000000000000..05b8c537a2ba --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcDataset.cs @@ -0,0 +1,99 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ORC dataset. + /// + [Newtonsoft.Json.JsonObject("Orc")] + [Rest.Serialization.JsonTransformation] + public partial class OrcDataset : Dataset + { + /// + /// Initializes a new instance of the OrcDataset class. + /// + public OrcDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the OrcDataset class. + /// + /// Linked service reference. + /// The location of the ORC data + /// storage. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The data orcCompressionCodec. + /// Type: string (or Expression with resultType string). + public OrcDataset(LinkedServiceReference linkedServiceName, DatasetLocation location, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object orcCompressionCodec = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Location = location; + OrcCompressionCodec = orcCompressionCodec; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the location of the ORC data storage. + /// + [JsonProperty(PropertyName = "typeProperties.location")] + public DatasetLocation Location { get; set; } + + /// + /// Gets or sets the data orcCompressionCodec. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.orcCompressionCodec")] + public object OrcCompressionCodec { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Location"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcFormat.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcFormat.cs new file mode 100644 index 000000000000..54b470f574f7 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcFormat.cs @@ -0,0 +1,51 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The data stored in Optimized Row Columnar (ORC) format. + /// + public partial class OrcFormat : DatasetStorageFormat + { + /// + /// Initializes a new instance of the OrcFormat class. + /// + public OrcFormat() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OrcFormat class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Serializer. Type: string (or Expression + /// with resultType string). + /// Deserializer. Type: string (or + /// Expression with resultType string). + public OrcFormat(IDictionary additionalProperties = default(IDictionary), object serializer = default(object), object deserializer = default(object)) + : base(additionalProperties, serializer, deserializer) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcSink.cs new file mode 100644 index 000000000000..0eba4510c1eb --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcSink.cs @@ -0,0 +1,80 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity ORC sink. + /// + public partial class OrcSink : CopySink + { + /// + /// Initializes a new instance of the OrcSink class. + /// + public OrcSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OrcSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// ORC store settings. + /// ORC format settings. + public OrcSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), StoreWriteSettings storeSettings = default(StoreWriteSettings), OrcWriteSettings formatSettings = default(OrcWriteSettings)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + StoreSettings = storeSettings; + FormatSettings = formatSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets ORC store settings. + /// + [JsonProperty(PropertyName = "storeSettings")] + public StoreWriteSettings StoreSettings { get; set; } + + /// + /// Gets or sets ORC format settings. + /// + [JsonProperty(PropertyName = "formatSettings")] + public OrcWriteSettings FormatSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcSource.cs new file mode 100644 index 000000000000..5ff4611445d5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcSource.cs @@ -0,0 +1,79 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity ORC source. + /// + public partial class OrcSource : CopySource + { + /// + /// Initializes a new instance of the OrcSource class. + /// + public OrcSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OrcSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// ORC store settings. + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public OrcSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), StoreReadSettings storeSettings = default(StoreReadSettings), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + StoreSettings = storeSettings; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets ORC store settings. + /// + [JsonProperty(PropertyName = "storeSettings")] + public StoreReadSettings StoreSettings { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcWriteSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcWriteSettings.cs new file mode 100644 index 000000000000..3dd01eab7727 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OrcWriteSettings.cs @@ -0,0 +1,74 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Orc write settings. + /// + public partial class OrcWriteSettings : FormatWriteSettings + { + /// + /// Initializes a new instance of the OrcWriteSettings class. + /// + public OrcWriteSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OrcWriteSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Limit the written file's row count to + /// be smaller than or equal to the specified count. Type: integer (or + /// Expression with resultType integer). + /// Specifies the file name pattern + /// <fileNamePrefix>_<fileIndex>.<fileExtension> when + /// copy from non-file based store without partitionOptions. Type: + /// string (or Expression with resultType string). + public OrcWriteSettings(IDictionary additionalProperties = default(IDictionary), object maxRowsPerFile = default(object), object fileNamePrefix = default(object)) + : base(additionalProperties) + { + MaxRowsPerFile = maxRowsPerFile; + FileNamePrefix = fileNamePrefix; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets limit the written file's row count to be smaller than + /// or equal to the specified count. Type: integer (or Expression with + /// resultType integer). + /// + [JsonProperty(PropertyName = "maxRowsPerFile")] + public object MaxRowsPerFile { get; set; } + + /// + /// Gets or sets specifies the file name pattern + /// &lt;fileNamePrefix&gt;_&lt;fileIndex&gt;.&lt;fileExtension&gt; + /// when copy from non-file based store without partitionOptions. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "fileNamePrefix")] + public object FileNamePrefix { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OutputColumn.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OutputColumn.cs new file mode 100644 index 000000000000..35fc1970f97f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/OutputColumn.cs @@ -0,0 +1,51 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The columns to be read out from the Office 365 table. + /// + public partial class OutputColumn + { + /// + /// Initializes a new instance of the OutputColumn class. + /// + public OutputColumn() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OutputColumn class. + /// + /// Name of the table column. Type: string. + public OutputColumn(string name = default(string)) + { + Name = name; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the table column. Type: string. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PackageStore.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PackageStore.cs new file mode 100644 index 000000000000..2128cc4b7623 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PackageStore.cs @@ -0,0 +1,78 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Package store for the SSIS integration runtime. + /// + public partial class PackageStore + { + /// + /// Initializes a new instance of the PackageStore class. + /// + public PackageStore() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PackageStore class. + /// + /// The name of the package store + /// The package store linked + /// service reference. + public PackageStore(string name, EntityReference packageStoreLinkedService) + { + Name = name; + PackageStoreLinkedService = packageStoreLinkedService; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the package store + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the package store linked service reference. + /// + [JsonProperty(PropertyName = "packageStoreLinkedService")] + public EntityReference PackageStoreLinkedService { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (PackageStoreLinkedService == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PackageStoreLinkedService"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Page.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Page.cs new file mode 100644 index 000000000000..a20e5365ee63 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Page.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + + /// + /// Defines a page in Azure responses. + /// + /// Type of the page content items + [JsonObject] + public class Page : IPage + { + /// + /// Gets the link to the next page. + /// + [JsonProperty("nextLink")] + public string NextPageLink { get; private set; } + + [JsonProperty("value")] + private IList Items{ get; set; } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + public IEnumerator GetEnumerator() + { + return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through the collection. + /// + /// A an enumerator that can be used to iterate through the collection. + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParameterSpecification.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParameterSpecification.cs new file mode 100644 index 000000000000..3d6020a53ca8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParameterSpecification.cs @@ -0,0 +1,76 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Definition of a single parameter for an entity. + /// + public partial class ParameterSpecification + { + /// + /// Initializes a new instance of the ParameterSpecification class. + /// + public ParameterSpecification() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ParameterSpecification class. + /// + /// Parameter type. Possible values include: + /// 'Object', 'String', 'Int', 'Float', 'Bool', 'Array', + /// 'SecureString' + /// Default value of parameter. + public ParameterSpecification(string type, object defaultValue = default(object)) + { + Type = type; + DefaultValue = defaultValue; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets parameter type. Possible values include: 'Object', + /// 'String', 'Int', 'Float', 'Bool', 'Array', 'SecureString' + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets default value of parameter. + /// + [JsonProperty(PropertyName = "defaultValue")] + public object DefaultValue { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParameterType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParameterType.cs new file mode 100644 index 000000000000..7b2e259d9fc0 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParameterType.cs @@ -0,0 +1,27 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for ParameterType. + /// + public static class ParameterType + { + public const string Object = "Object"; + public const string String = "String"; + public const string Int = "Int"; + public const string Float = "Float"; + public const string Bool = "Bool"; + public const string Array = "Array"; + public const string SecureString = "SecureString"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParquetDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParquetDataset.cs new file mode 100644 index 000000000000..dc48d46b4d89 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParquetDataset.cs @@ -0,0 +1,98 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Parquet dataset. + /// + [Newtonsoft.Json.JsonObject("Parquet")] + [Rest.Serialization.JsonTransformation] + public partial class ParquetDataset : Dataset + { + /// + /// Initializes a new instance of the ParquetDataset class. + /// + public ParquetDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the ParquetDataset class. + /// + /// Linked service reference. + /// The location of the parquet storage. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The data compressionCodec. Type: + /// string (or Expression with resultType string). + public ParquetDataset(LinkedServiceReference linkedServiceName, DatasetLocation location, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object compressionCodec = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Location = location; + CompressionCodec = compressionCodec; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the location of the parquet storage. + /// + [JsonProperty(PropertyName = "typeProperties.location")] + public DatasetLocation Location { get; set; } + + /// + /// Gets or sets the data compressionCodec. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.compressionCodec")] + public object CompressionCodec { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Location"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParquetFormat.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParquetFormat.cs new file mode 100644 index 000000000000..c805ef989015 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParquetFormat.cs @@ -0,0 +1,51 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The data stored in Parquet format. + /// + public partial class ParquetFormat : DatasetStorageFormat + { + /// + /// Initializes a new instance of the ParquetFormat class. + /// + public ParquetFormat() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ParquetFormat class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Serializer. Type: string (or Expression + /// with resultType string). + /// Deserializer. Type: string (or + /// Expression with resultType string). + public ParquetFormat(IDictionary additionalProperties = default(IDictionary), object serializer = default(object), object deserializer = default(object)) + : base(additionalProperties, serializer, deserializer) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParquetReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParquetReadSettings.cs new file mode 100644 index 000000000000..03da401f35a8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParquetReadSettings.cs @@ -0,0 +1,56 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Parquet read settings. + /// + public partial class ParquetReadSettings : FormatReadSettings + { + /// + /// Initializes a new instance of the ParquetReadSettings class. + /// + public ParquetReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ParquetReadSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Compression settings. + public ParquetReadSettings(IDictionary additionalProperties = default(IDictionary), CompressionReadSettings compressionProperties = default(CompressionReadSettings)) + : base(additionalProperties) + { + CompressionProperties = compressionProperties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets compression settings. + /// + [JsonProperty(PropertyName = "compressionProperties")] + public CompressionReadSettings CompressionProperties { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParquetSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParquetSink.cs new file mode 100644 index 000000000000..0d18e2653289 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParquetSink.cs @@ -0,0 +1,80 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Parquet sink. + /// + public partial class ParquetSink : CopySink + { + /// + /// Initializes a new instance of the ParquetSink class. + /// + public ParquetSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ParquetSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Parquet store settings. + /// Parquet format settings. + public ParquetSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), StoreWriteSettings storeSettings = default(StoreWriteSettings), ParquetWriteSettings formatSettings = default(ParquetWriteSettings)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + StoreSettings = storeSettings; + FormatSettings = formatSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets parquet store settings. + /// + [JsonProperty(PropertyName = "storeSettings")] + public StoreWriteSettings StoreSettings { get; set; } + + /// + /// Gets or sets parquet format settings. + /// + [JsonProperty(PropertyName = "formatSettings")] + public ParquetWriteSettings FormatSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParquetSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParquetSource.cs new file mode 100644 index 000000000000..616ede27ae99 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParquetSource.cs @@ -0,0 +1,87 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Parquet source. + /// + public partial class ParquetSource : CopySource + { + /// + /// Initializes a new instance of the ParquetSource class. + /// + public ParquetSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ParquetSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Parquet store settings. + /// Parquet format settings. + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public ParquetSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), StoreReadSettings storeSettings = default(StoreReadSettings), ParquetReadSettings formatSettings = default(ParquetReadSettings), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + StoreSettings = storeSettings; + FormatSettings = formatSettings; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets parquet store settings. + /// + [JsonProperty(PropertyName = "storeSettings")] + public StoreReadSettings StoreSettings { get; set; } + + /// + /// Gets or sets parquet format settings. + /// + [JsonProperty(PropertyName = "formatSettings")] + public ParquetReadSettings FormatSettings { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParquetWriteSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParquetWriteSettings.cs new file mode 100644 index 000000000000..5204159ed3aa --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ParquetWriteSettings.cs @@ -0,0 +1,74 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Parquet write settings. + /// + public partial class ParquetWriteSettings : FormatWriteSettings + { + /// + /// Initializes a new instance of the ParquetWriteSettings class. + /// + public ParquetWriteSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ParquetWriteSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Limit the written file's row count to + /// be smaller than or equal to the specified count. Type: integer (or + /// Expression with resultType integer). + /// Specifies the file name pattern + /// <fileNamePrefix>_<fileIndex>.<fileExtension> when + /// copy from non-file based store without partitionOptions. Type: + /// string (or Expression with resultType string). + public ParquetWriteSettings(IDictionary additionalProperties = default(IDictionary), object maxRowsPerFile = default(object), object fileNamePrefix = default(object)) + : base(additionalProperties) + { + MaxRowsPerFile = maxRowsPerFile; + FileNamePrefix = fileNamePrefix; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets limit the written file's row count to be smaller than + /// or equal to the specified count. Type: integer (or Expression with + /// resultType integer). + /// + [JsonProperty(PropertyName = "maxRowsPerFile")] + public object MaxRowsPerFile { get; set; } + + /// + /// Gets or sets specifies the file name pattern + /// &lt;fileNamePrefix&gt;_&lt;fileIndex&gt;.&lt;fileExtension&gt; + /// when copy from non-file based store without partitionOptions. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "fileNamePrefix")] + public object FileNamePrefix { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PaypalLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PaypalLinkedService.cs new file mode 100644 index 000000000000..26428641fffd --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PaypalLinkedService.cs @@ -0,0 +1,151 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Paypal Service linked service. + /// + [Newtonsoft.Json.JsonObject("Paypal")] + [Rest.Serialization.JsonTransformation] + public partial class PaypalLinkedService : LinkedService + { + /// + /// Initializes a new instance of the PaypalLinkedService class. + /// + public PaypalLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PaypalLinkedService class. + /// + /// The URL of the PayPal instance. (i.e. + /// api.sandbox.paypal.com) + /// The client ID associated with your PayPal + /// application. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The client secret associated with your + /// PayPal application. + /// Specifies whether the data + /// source endpoints are encrypted using HTTPS. The default value is + /// true. + /// Specifies whether to require the + /// host name in the server's certificate to match the host name of the + /// server when connecting over SSL. The default value is true. + /// Specifies whether to verify the + /// identity of the server when connecting over SSL. The default value + /// is true. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public PaypalLinkedService(object host, object clientId, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), SecretBase clientSecret = default(SecretBase), object useEncryptedEndpoints = default(object), object useHostVerification = default(object), object usePeerVerification = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Host = host; + ClientId = clientId; + ClientSecret = clientSecret; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the URL of the PayPal instance. (i.e. + /// api.sandbox.paypal.com) + /// + [JsonProperty(PropertyName = "typeProperties.host")] + public object Host { get; set; } + + /// + /// Gets or sets the client ID associated with your PayPal application. + /// + [JsonProperty(PropertyName = "typeProperties.clientId")] + public object ClientId { get; set; } + + /// + /// Gets or sets the client secret associated with your PayPal + /// application. + /// + [JsonProperty(PropertyName = "typeProperties.clientSecret")] + public SecretBase ClientSecret { get; set; } + + /// + /// Gets or sets specifies whether the data source endpoints are + /// encrypted using HTTPS. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useEncryptedEndpoints")] + public object UseEncryptedEndpoints { get; set; } + + /// + /// Gets or sets specifies whether to require the host name in the + /// server's certificate to match the host name of the server when + /// connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useHostVerification")] + public object UseHostVerification { get; set; } + + /// + /// Gets or sets specifies whether to verify the identity of the server + /// when connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.usePeerVerification")] + public object UsePeerVerification { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Host == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Host"); + } + if (ClientId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ClientId"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PaypalObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PaypalObjectDataset.cs new file mode 100644 index 000000000000..c5f05e0d4d9e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PaypalObjectDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Paypal Service dataset. + /// + [Newtonsoft.Json.JsonObject("PaypalObject")] + [Rest.Serialization.JsonTransformation] + public partial class PaypalObjectDataset : Dataset + { + /// + /// Initializes a new instance of the PaypalObjectDataset class. + /// + public PaypalObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the PaypalObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name. Type: string (or Expression + /// with resultType string). + public PaypalObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PaypalSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PaypalSource.cs new file mode 100644 index 000000000000..a787aa30fef1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PaypalSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Paypal Service source. + /// + public partial class PaypalSource : TabularSource + { + /// + /// Initializes a new instance of the PaypalSource class. + /// + public PaypalSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PaypalSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public PaypalSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PhoenixAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PhoenixAuthenticationType.cs new file mode 100644 index 000000000000..852e4c3453b1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PhoenixAuthenticationType.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for PhoenixAuthenticationType. + /// + public static class PhoenixAuthenticationType + { + public const string Anonymous = "Anonymous"; + public const string UsernameAndPassword = "UsernameAndPassword"; + public const string WindowsAzureHDInsightService = "WindowsAzureHDInsightService"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PhoenixLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PhoenixLinkedService.cs new file mode 100644 index 000000000000..b17256551b67 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PhoenixLinkedService.cs @@ -0,0 +1,212 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Phoenix server linked service. + /// + [Newtonsoft.Json.JsonObject("Phoenix")] + [Rest.Serialization.JsonTransformation] + public partial class PhoenixLinkedService : LinkedService + { + /// + /// Initializes a new instance of the PhoenixLinkedService class. + /// + public PhoenixLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PhoenixLinkedService class. + /// + /// The IP address or host name of the Phoenix + /// server. (i.e. 192.168.222.160) + /// The authentication mechanism used + /// to connect to the Phoenix server. Possible values include: + /// 'Anonymous', 'UsernameAndPassword', + /// 'WindowsAzureHDInsightService' + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The TCP port that the Phoenix server uses to + /// listen for client connections. The default value is 8765. + /// The partial URL corresponding to the Phoenix + /// server. (i.e. /gateway/sandbox/phoenix/version). The default value + /// is hbasephoenix if using WindowsAzureHDInsightService. + /// The user name used to connect to the Phoenix + /// server. + /// The password corresponding to the user + /// name. + /// Specifies whether the connections to the + /// server are encrypted using SSL. The default value is false. + /// The full path of the .pem file + /// containing trusted CA certificates for verifying the server when + /// connecting over SSL. This property can only be set when using SSL + /// on self-hosted IR. The default value is the cacerts.pem file + /// installed with the IR. + /// Specifies whether to use a CA + /// certificate from the system trust store or from a specified PEM + /// file. The default value is false. + /// Specifies whether to require + /// a CA-issued SSL certificate name to match the host name of the + /// server when connecting over SSL. The default value is + /// false. + /// Specifies whether to allow + /// self-signed certificates from the server. The default value is + /// false. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public PhoenixLinkedService(object host, string authenticationType, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object port = default(object), object httpPath = default(object), object username = default(object), SecretBase password = default(SecretBase), object enableSsl = default(object), object trustedCertPath = default(object), object useSystemTrustStore = default(object), object allowHostNameCNMismatch = default(object), object allowSelfSignedServerCert = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Host = host; + Port = port; + HttpPath = httpPath; + AuthenticationType = authenticationType; + Username = username; + Password = password; + EnableSsl = enableSsl; + TrustedCertPath = trustedCertPath; + UseSystemTrustStore = useSystemTrustStore; + AllowHostNameCNMismatch = allowHostNameCNMismatch; + AllowSelfSignedServerCert = allowSelfSignedServerCert; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the IP address or host name of the Phoenix server. + /// (i.e. 192.168.222.160) + /// + [JsonProperty(PropertyName = "typeProperties.host")] + public object Host { get; set; } + + /// + /// Gets or sets the TCP port that the Phoenix server uses to listen + /// for client connections. The default value is 8765. + /// + [JsonProperty(PropertyName = "typeProperties.port")] + public object Port { get; set; } + + /// + /// Gets or sets the partial URL corresponding to the Phoenix server. + /// (i.e. /gateway/sandbox/phoenix/version). The default value is + /// hbasephoenix if using WindowsAzureHDInsightService. + /// + [JsonProperty(PropertyName = "typeProperties.httpPath")] + public object HttpPath { get; set; } + + /// + /// Gets or sets the authentication mechanism used to connect to the + /// Phoenix server. Possible values include: 'Anonymous', + /// 'UsernameAndPassword', 'WindowsAzureHDInsightService' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets the user name used to connect to the Phoenix server. + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets the password corresponding to the user name. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets specifies whether the connections to the server are + /// encrypted using SSL. The default value is false. + /// + [JsonProperty(PropertyName = "typeProperties.enableSsl")] + public object EnableSsl { get; set; } + + /// + /// Gets or sets the full path of the .pem file containing trusted CA + /// certificates for verifying the server when connecting over SSL. + /// This property can only be set when using SSL on self-hosted IR. The + /// default value is the cacerts.pem file installed with the IR. + /// + [JsonProperty(PropertyName = "typeProperties.trustedCertPath")] + public object TrustedCertPath { get; set; } + + /// + /// Gets or sets specifies whether to use a CA certificate from the + /// system trust store or from a specified PEM file. The default value + /// is false. + /// + [JsonProperty(PropertyName = "typeProperties.useSystemTrustStore")] + public object UseSystemTrustStore { get; set; } + + /// + /// Gets or sets specifies whether to require a CA-issued SSL + /// certificate name to match the host name of the server when + /// connecting over SSL. The default value is false. + /// + [JsonProperty(PropertyName = "typeProperties.allowHostNameCNMismatch")] + public object AllowHostNameCNMismatch { get; set; } + + /// + /// Gets or sets specifies whether to allow self-signed certificates + /// from the server. The default value is false. + /// + [JsonProperty(PropertyName = "typeProperties.allowSelfSignedServerCert")] + public object AllowSelfSignedServerCert { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Host == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Host"); + } + if (AuthenticationType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AuthenticationType"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PhoenixObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PhoenixObjectDataset.cs new file mode 100644 index 000000000000..4d9281d82a14 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PhoenixObjectDataset.cs @@ -0,0 +1,107 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Phoenix server dataset. + /// + [Newtonsoft.Json.JsonObject("PhoenixObject")] + [Rest.Serialization.JsonTransformation] + public partial class PhoenixObjectDataset : Dataset + { + /// + /// Initializes a new instance of the PhoenixObjectDataset class. + /// + public PhoenixObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the PhoenixObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// This property will be retired. Please + /// consider using schema + table properties instead. + /// The table name of the Phoenix. Type: string (or + /// Expression with resultType string). + /// The schema name of the + /// Phoenix. Type: string (or Expression with resultType + /// string). + public PhoenixObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object), object table = default(object), object phoenixObjectDatasetSchema = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + Table = table; + PhoenixObjectDatasetSchema = phoenixObjectDatasetSchema; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property will be retired. Please consider using + /// schema + table properties instead. + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Gets or sets the table name of the Phoenix. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Gets or sets the schema name of the Phoenix. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object PhoenixObjectDatasetSchema { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PhoenixSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PhoenixSource.cs new file mode 100644 index 000000000000..178a4d089ec2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PhoenixSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Phoenix server source. + /// + public partial class PhoenixSource : TabularSource + { + /// + /// Initializes a new instance of the PhoenixSource class. + /// + public PhoenixSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PhoenixSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public PhoenixSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineElapsedTimeMetricPolicy.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineElapsedTimeMetricPolicy.cs new file mode 100644 index 000000000000..03ecf1d1c3e7 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineElapsedTimeMetricPolicy.cs @@ -0,0 +1,55 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Pipeline ElapsedTime Metric Policy. + /// + public partial class PipelineElapsedTimeMetricPolicy + { + /// + /// Initializes a new instance of the PipelineElapsedTimeMetricPolicy + /// class. + /// + public PipelineElapsedTimeMetricPolicy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PipelineElapsedTimeMetricPolicy + /// class. + /// + /// TimeSpan value, after which an Azure + /// Monitoring Metric is fired. + public PipelineElapsedTimeMetricPolicy(object duration = default(object)) + { + Duration = duration; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets timeSpan value, after which an Azure Monitoring Metric + /// is fired. + /// + [JsonProperty(PropertyName = "duration")] + public object Duration { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineExternalComputeScaleProperties.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineExternalComputeScaleProperties.cs new file mode 100644 index 000000000000..d7a4071731bb --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineExternalComputeScaleProperties.cs @@ -0,0 +1,119 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// PipelineExternalComputeScale properties for managed integration + /// runtime. + /// + public partial class PipelineExternalComputeScaleProperties + { + /// + /// Initializes a new instance of the + /// PipelineExternalComputeScaleProperties class. + /// + public PipelineExternalComputeScaleProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// PipelineExternalComputeScaleProperties class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Time to live (in minutes) setting of + /// integration runtime which will execute pipeline and external + /// activity. + /// Number of the pipeline nodes, + /// which should be greater than 0 and less than 11. + /// Number of the the external + /// nodes, which should be greater than 0 and less than 11. + public PipelineExternalComputeScaleProperties(IDictionary additionalProperties = default(IDictionary), int? timeToLive = default(int?), int? numberOfPipelineNodes = default(int?), int? numberOfExternalNodes = default(int?)) + { + AdditionalProperties = additionalProperties; + TimeToLive = timeToLive; + NumberOfPipelineNodes = numberOfPipelineNodes; + NumberOfExternalNodes = numberOfExternalNodes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets time to live (in minutes) setting of integration + /// runtime which will execute pipeline and external activity. + /// + [JsonProperty(PropertyName = "timeToLive")] + public int? TimeToLive { get; set; } + + /// + /// Gets or sets number of the pipeline nodes, which should be greater + /// than 0 and less than 11. + /// + [JsonProperty(PropertyName = "numberOfPipelineNodes")] + public int? NumberOfPipelineNodes { get; set; } + + /// + /// Gets or sets number of the the external nodes, which should be + /// greater than 0 and less than 11. + /// + [JsonProperty(PropertyName = "numberOfExternalNodes")] + public int? NumberOfExternalNodes { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (TimeToLive < 5) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "TimeToLive", 5); + } + if (NumberOfPipelineNodes > 10) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "NumberOfPipelineNodes", 10); + } + if (NumberOfPipelineNodes < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "NumberOfPipelineNodes", 1); + } + if (NumberOfExternalNodes > 10) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "NumberOfExternalNodes", 10); + } + if (NumberOfExternalNodes < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "NumberOfExternalNodes", 1); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineFolder.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineFolder.cs new file mode 100644 index 000000000000..7a2b303ef8a5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineFolder.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The folder that this Pipeline is in. If not specified, Pipeline will + /// appear at the root level. + /// + public partial class PipelineFolder + { + /// + /// Initializes a new instance of the PipelineFolder class. + /// + public PipelineFolder() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PipelineFolder class. + /// + /// The name of the folder that this Pipeline is + /// in. + public PipelineFolder(string name = default(string)) + { + Name = name; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the folder that this Pipeline is in. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelinePolicy.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelinePolicy.cs new file mode 100644 index 000000000000..b08eac658e28 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelinePolicy.cs @@ -0,0 +1,49 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Pipeline Policy. + /// + public partial class PipelinePolicy + { + /// + /// Initializes a new instance of the PipelinePolicy class. + /// + public PipelinePolicy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PipelinePolicy class. + /// + public PipelinePolicy(PipelineElapsedTimeMetricPolicy elapsedTimeMetric = default(PipelineElapsedTimeMetricPolicy)) + { + ElapsedTimeMetric = elapsedTimeMetric; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "elapsedTimeMetric")] + public PipelineElapsedTimeMetricPolicy ElapsedTimeMetric { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineReference.cs new file mode 100644 index 000000000000..923048a04bbf --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineReference.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Pipeline reference type. + /// + public partial class PipelineReference + { + /// + /// Initializes a new instance of the PipelineReference class. + /// + public PipelineReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PipelineReference class. + /// + /// Reference pipeline name. + /// Reference name. + public PipelineReference(string referenceName, string name = default(string)) + { + ReferenceName = referenceName; + Name = name; + CustomInit(); + } + /// + /// Static constructor for PipelineReference class. + /// + static PipelineReference() + { + Type = "PipelineReference"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets reference pipeline name. + /// + [JsonProperty(PropertyName = "referenceName")] + public string ReferenceName { get; set; } + + /// + /// Gets or sets reference name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Pipeline reference type. + /// + [JsonProperty(PropertyName = "type")] + public static string Type { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ReferenceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ReferenceName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineResource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineResource.cs new file mode 100644 index 000000000000..e0e2fb2017d6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineResource.cs @@ -0,0 +1,181 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Pipeline resource type. + /// + [Rest.Serialization.JsonTransformation] + public partial class PipelineResource : SubResource + { + /// + /// Initializes a new instance of the PipelineResource class. + /// + public PipelineResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PipelineResource class. + /// + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + /// Unmatched properties from the + /// message are deserialized this collection + /// The description of the pipeline. + /// List of activities in pipeline. + /// List of parameters for pipeline. + /// List of variables for pipeline. + /// The max number of concurrent runs for the + /// pipeline. + /// List of tags that can be used for + /// describing the Pipeline. + /// Dimensions emitted by Pipeline. + /// The folder that this Pipeline is in. If not + /// specified, Pipeline will appear at the root level. + public PipelineResource(string id = default(string), string name = default(string), string type = default(string), string etag = default(string), IDictionary additionalProperties = default(IDictionary), string description = default(string), IList activities = default(IList), IDictionary parameters = default(IDictionary), IDictionary variables = default(IDictionary), int? concurrency = default(int?), IList annotations = default(IList), IDictionary runDimensions = default(IDictionary), PipelineFolder folder = default(PipelineFolder), PipelinePolicy policy = default(PipelinePolicy)) + : base(id, name, type, etag) + { + AdditionalProperties = additionalProperties; + Description = description; + Activities = activities; + Parameters = parameters; + Variables = variables; + Concurrency = concurrency; + Annotations = annotations; + RunDimensions = runDimensions; + Folder = folder; + Policy = policy; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets the description of the pipeline. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets or sets list of activities in pipeline. + /// + [JsonProperty(PropertyName = "properties.activities")] + public IList Activities { get; set; } + + /// + /// Gets or sets list of parameters for pipeline. + /// + [JsonProperty(PropertyName = "properties.parameters")] + public IDictionary Parameters { get; set; } + + /// + /// Gets or sets list of variables for pipeline. + /// + [JsonProperty(PropertyName = "properties.variables")] + public IDictionary Variables { get; set; } + + /// + /// Gets or sets the max number of concurrent runs for the pipeline. + /// + [JsonProperty(PropertyName = "properties.concurrency")] + public int? Concurrency { get; set; } + + /// + /// Gets or sets list of tags that can be used for describing the + /// Pipeline. + /// + [JsonProperty(PropertyName = "properties.annotations")] + public IList Annotations { get; set; } + + /// + /// Gets or sets dimensions emitted by Pipeline. + /// + [JsonProperty(PropertyName = "properties.runDimensions")] + public IDictionary RunDimensions { get; set; } + + /// + /// Gets or sets the folder that this Pipeline is in. If not specified, + /// Pipeline will appear at the root level. + /// + [JsonProperty(PropertyName = "properties.folder")] + public PipelineFolder Folder { get; set; } + + /// + /// + [JsonProperty(PropertyName = "properties.policy")] + public PipelinePolicy Policy { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Activities != null) + { + foreach (var element in Activities) + { + if (element != null) + { + element.Validate(); + } + } + } + if (Parameters != null) + { + foreach (var valueElement in Parameters.Values) + { + if (valueElement != null) + { + valueElement.Validate(); + } + } + } + if (Variables != null) + { + foreach (var valueElement1 in Variables.Values) + { + if (valueElement1 != null) + { + valueElement1.Validate(); + } + } + } + if (Concurrency < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "Concurrency", 1); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineRun.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineRun.cs new file mode 100644 index 000000000000..4a1eaa4c8bde --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineRun.cs @@ -0,0 +1,173 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Information about a pipeline run. + /// + public partial class PipelineRun + { + /// + /// Initializes a new instance of the PipelineRun class. + /// + public PipelineRun() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PipelineRun class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Identifier of a run. + /// Identifier that correlates all the + /// recovery runs of a pipeline run. + /// Indicates if the recovered pipeline run is + /// the latest in its group. + /// The pipeline name. + /// The full or partial list of parameter + /// name, value pair used in the pipeline run. + /// Run dimensions emitted by Pipeline + /// run. + /// Entity that started the pipeline + /// run. + /// The last updated timestamp for the + /// pipeline run event in ISO8601 format. + /// The start time of a pipeline run in ISO8601 + /// format. + /// The end time of a pipeline run in ISO8601 + /// format. + /// The duration of a pipeline run. + /// The status of a pipeline run. Possible values: + /// Queued, InProgress, Succeeded, Failed, Canceling, Cancelled + /// The message from a pipeline run. + public PipelineRun(IDictionary additionalProperties = default(IDictionary), string runId = default(string), string runGroupId = default(string), bool? isLatest = default(bool?), string pipelineName = default(string), IDictionary parameters = default(IDictionary), IDictionary runDimensions = default(IDictionary), PipelineRunInvokedBy invokedBy = default(PipelineRunInvokedBy), System.DateTime? lastUpdated = default(System.DateTime?), System.DateTime? runStart = default(System.DateTime?), System.DateTime? runEnd = default(System.DateTime?), int? durationInMs = default(int?), string status = default(string), string message = default(string)) + { + AdditionalProperties = additionalProperties; + RunId = runId; + RunGroupId = runGroupId; + IsLatest = isLatest; + PipelineName = pipelineName; + Parameters = parameters; + RunDimensions = runDimensions; + InvokedBy = invokedBy; + LastUpdated = lastUpdated; + RunStart = runStart; + RunEnd = runEnd; + DurationInMs = durationInMs; + Status = status; + Message = message; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets identifier of a run. + /// + [JsonProperty(PropertyName = "runId")] + public string RunId { get; private set; } + + /// + /// Gets identifier that correlates all the recovery runs of a pipeline + /// run. + /// + [JsonProperty(PropertyName = "runGroupId")] + public string RunGroupId { get; private set; } + + /// + /// Gets indicates if the recovered pipeline run is the latest in its + /// group. + /// + [JsonProperty(PropertyName = "isLatest")] + public bool? IsLatest { get; private set; } + + /// + /// Gets the pipeline name. + /// + [JsonProperty(PropertyName = "pipelineName")] + public string PipelineName { get; private set; } + + /// + /// Gets the full or partial list of parameter name, value pair used in + /// the pipeline run. + /// + [JsonProperty(PropertyName = "parameters")] + public IDictionary Parameters { get; private set; } + + /// + /// Gets run dimensions emitted by Pipeline run. + /// + [JsonProperty(PropertyName = "runDimensions")] + public IDictionary RunDimensions { get; private set; } + + /// + /// Gets entity that started the pipeline run. + /// + [JsonProperty(PropertyName = "invokedBy")] + public PipelineRunInvokedBy InvokedBy { get; private set; } + + /// + /// Gets the last updated timestamp for the pipeline run event in + /// ISO8601 format. + /// + [JsonProperty(PropertyName = "lastUpdated")] + public System.DateTime? LastUpdated { get; private set; } + + /// + /// Gets the start time of a pipeline run in ISO8601 format. + /// + [JsonProperty(PropertyName = "runStart")] + public System.DateTime? RunStart { get; private set; } + + /// + /// Gets the end time of a pipeline run in ISO8601 format. + /// + [JsonProperty(PropertyName = "runEnd")] + public System.DateTime? RunEnd { get; private set; } + + /// + /// Gets the duration of a pipeline run. + /// + [JsonProperty(PropertyName = "durationInMs")] + public int? DurationInMs { get; private set; } + + /// + /// Gets the status of a pipeline run. Possible values: Queued, + /// InProgress, Succeeded, Failed, Canceling, Cancelled + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; private set; } + + /// + /// Gets the message from a pipeline run. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineRunInvokedBy.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineRunInvokedBy.cs new file mode 100644 index 000000000000..7c34f6171063 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineRunInvokedBy.cs @@ -0,0 +1,87 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Provides entity name and id that started the pipeline run. + /// + public partial class PipelineRunInvokedBy + { + /// + /// Initializes a new instance of the PipelineRunInvokedBy class. + /// + public PipelineRunInvokedBy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PipelineRunInvokedBy class. + /// + /// Name of the entity that started the pipeline + /// run. + /// The ID of the entity that started the run. + /// The type of the entity that started the + /// run. + /// The name of the pipeline that triggered + /// the run, if any. + /// The run id of the pipeline that + /// triggered the run, if any. + public PipelineRunInvokedBy(string name = default(string), string id = default(string), string invokedByType = default(string), string pipelineName = default(string), string pipelineRunId = default(string)) + { + Name = name; + Id = id; + InvokedByType = invokedByType; + PipelineName = pipelineName; + PipelineRunId = pipelineRunId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets name of the entity that started the pipeline run. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets the ID of the entity that started the run. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets the type of the entity that started the run. + /// + [JsonProperty(PropertyName = "invokedByType")] + public string InvokedByType { get; private set; } + + /// + /// Gets the name of the pipeline that triggered the run, if any. + /// + [JsonProperty(PropertyName = "pipelineName")] + public string PipelineName { get; private set; } + + /// + /// Gets the run id of the pipeline that triggered the run, if any. + /// + [JsonProperty(PropertyName = "pipelineRunId")] + public string PipelineRunId { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineRunsQueryResponse.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineRunsQueryResponse.cs new file mode 100644 index 000000000000..155fd7af7049 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PipelineRunsQueryResponse.cs @@ -0,0 +1,78 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A list pipeline runs. + /// + public partial class PipelineRunsQueryResponse + { + /// + /// Initializes a new instance of the PipelineRunsQueryResponse class. + /// + public PipelineRunsQueryResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PipelineRunsQueryResponse class. + /// + /// List of pipeline runs. + /// The continuation token for getting + /// the next page of results, if any remaining results exist, null + /// otherwise. + public PipelineRunsQueryResponse(IList value, string continuationToken = default(string)) + { + Value = value; + ContinuationToken = continuationToken; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of pipeline runs. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + /// + /// Gets or sets the continuation token for getting the next page of + /// results, if any remaining results exist, null otherwise. + /// + [JsonProperty(PropertyName = "continuationToken")] + public string ContinuationToken { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Value == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Value"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PolybaseSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PolybaseSettings.cs new file mode 100644 index 000000000000..09a74bc8c54c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PolybaseSettings.cs @@ -0,0 +1,103 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// PolyBase settings. + /// + public partial class PolybaseSettings + { + /// + /// Initializes a new instance of the PolybaseSettings class. + /// + public PolybaseSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PolybaseSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Reject type. Possible values include: + /// 'value', 'percentage' + /// Specifies the value or the percentage of + /// rows that can be rejected before the query fails. Type: number (or + /// Expression with resultType number), minimum: 0. + /// Determines the number of rows to + /// attempt to retrieve before the PolyBase recalculates the percentage + /// of rejected rows. Type: integer (or Expression with resultType + /// integer), minimum: 0. + /// Specifies how to handle missing values + /// in delimited text files when PolyBase retrieves data from the text + /// file. Type: boolean (or Expression with resultType + /// boolean). + public PolybaseSettings(IDictionary additionalProperties = default(IDictionary), string rejectType = default(string), object rejectValue = default(object), object rejectSampleValue = default(object), object useTypeDefault = default(object)) + { + AdditionalProperties = additionalProperties; + RejectType = rejectType; + RejectValue = rejectValue; + RejectSampleValue = rejectSampleValue; + UseTypeDefault = useTypeDefault; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets reject type. Possible values include: 'value', + /// 'percentage' + /// + [JsonProperty(PropertyName = "rejectType")] + public string RejectType { get; set; } + + /// + /// Gets or sets specifies the value or the percentage of rows that can + /// be rejected before the query fails. Type: number (or Expression + /// with resultType number), minimum: 0. + /// + [JsonProperty(PropertyName = "rejectValue")] + public object RejectValue { get; set; } + + /// + /// Gets or sets determines the number of rows to attempt to retrieve + /// before the PolyBase recalculates the percentage of rejected rows. + /// Type: integer (or Expression with resultType integer), minimum: 0. + /// + [JsonProperty(PropertyName = "rejectSampleValue")] + public object RejectSampleValue { get; set; } + + /// + /// Gets or sets specifies how to handle missing values in delimited + /// text files when PolyBase retrieves data from the text file. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "useTypeDefault")] + public object UseTypeDefault { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PolybaseSettingsRejectType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PolybaseSettingsRejectType.cs new file mode 100644 index 000000000000..9b9f7e22cd57 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PolybaseSettingsRejectType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for PolybaseSettingsRejectType. + /// + public static class PolybaseSettingsRejectType + { + public const string Value = "value"; + public const string Percentage = "percentage"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PostgreSqlLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PostgreSqlLinkedService.cs new file mode 100644 index 000000000000..6e26ae9bb268 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PostgreSqlLinkedService.cs @@ -0,0 +1,108 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for PostgreSQL data source. + /// + [Newtonsoft.Json.JsonObject("PostgreSql")] + [Rest.Serialization.JsonTransformation] + public partial class PostgreSqlLinkedService : LinkedService + { + /// + /// Initializes a new instance of the PostgreSqlLinkedService class. + /// + public PostgreSqlLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PostgreSqlLinkedService class. + /// + /// The connection string. Type: string, + /// SecureString or AzureKeyVaultSecretReference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The Azure key vault secret reference of + /// password in connection string. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public PostgreSqlLinkedService(object connectionString, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), AzureKeyVaultSecretReference password = default(AzureKeyVaultSecretReference), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionString = connectionString; + Password = password; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the connection string. Type: string, SecureString or + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of password in + /// connection string. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public AzureKeyVaultSecretReference Password { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ConnectionString == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ConnectionString"); + } + if (Password != null) + { + Password.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PostgreSqlSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PostgreSqlSource.cs new file mode 100644 index 000000000000..44489dd9ae88 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PostgreSqlSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for PostgreSQL databases. + /// + public partial class PostgreSqlSource : TabularSource + { + /// + /// Initializes a new instance of the PostgreSqlSource class. + /// + public PostgreSqlSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PostgreSqlSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// Database query. Type: string (or Expression + /// with resultType string). + public PostgreSqlSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets database query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PostgreSqlTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PostgreSqlTableDataset.cs new file mode 100644 index 000000000000..5b8ec4b6dd9b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PostgreSqlTableDataset.cs @@ -0,0 +1,106 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The PostgreSQL table dataset. + /// + [Newtonsoft.Json.JsonObject("PostgreSqlTable")] + [Rest.Serialization.JsonTransformation] + public partial class PostgreSqlTableDataset : Dataset + { + /// + /// Initializes a new instance of the PostgreSqlTableDataset class. + /// + public PostgreSqlTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the PostgreSqlTableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// This property will be retired. Please + /// consider using schema + table properties instead. + /// The PostgreSQL table name. Type: string (or + /// Expression with resultType string). + /// The PostgreSQL schema + /// name. Type: string (or Expression with resultType string). + public PostgreSqlTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object), object table = default(object), object postgreSqlTableDatasetSchema = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + Table = table; + PostgreSqlTableDatasetSchema = postgreSqlTableDatasetSchema; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property will be retired. Please consider using + /// schema + table properties instead. + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Gets or sets the PostgreSQL table name. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Gets or sets the PostgreSQL schema name. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object PostgreSqlTableDatasetSchema { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PostgreSqlV2LinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PostgreSqlV2LinkedService.cs new file mode 100644 index 000000000000..d64738b3db13 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PostgreSqlV2LinkedService.cs @@ -0,0 +1,296 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for PostgreSQLV2 data source. + /// + [Newtonsoft.Json.JsonObject("PostgreSqlV2")] + [Rest.Serialization.JsonTransformation] + public partial class PostgreSqlV2LinkedService : LinkedService + { + /// + /// Initializes a new instance of the PostgreSqlV2LinkedService class. + /// + public PostgreSqlV2LinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PostgreSqlV2LinkedService class. + /// + /// Server name for connection. Type: + /// string. + /// Username for authentication. Type: + /// string. + /// Database name for connection. Type: + /// string. + /// The authentication type to use. + /// Type: string. + /// SSL mode for connection. Type: integer. 0: + /// disable, 1:allow, 2: prefer, 3: require, 4: verify-ca, 5: + /// verify-full. Type: integer. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The port for the connection. Type: + /// integer. + /// Sets the schema search path. Type: + /// string. + /// Whether connection pooling should be used. + /// Type: boolean. + /// The time to wait (in seconds) while + /// trying to establish a connection before terminating the attempt and + /// generating an error. Type: integer. + /// The time to wait (in seconds) while + /// trying to execute a command before terminating the attempt and + /// generating an error. Set to zero for infinity. Type: + /// integer. + /// Whether to trust the server + /// certificate without validating it. Type: boolean. + /// Location of a client certificate to be + /// sent to the server. Type: string. + /// Location of a client key for a client + /// certificate to be sent to the server. Type: string. + /// Password for a key for a client + /// certificate. Type: string. + /// Determines the size of the internal + /// buffer uses when reading. Increasing may improve performance if + /// transferring large values from the database. Type: integer. + /// When enabled, parameter values are + /// logged when commands are executed. Type: boolean. + /// Gets or sets the session timezone. Type: + /// string. + /// Gets or sets the .NET encoding that will be + /// used to encode/decode PostgreSQL string data. Type: string + /// The Azure key vault secret reference of + /// password in connection string. Type: string. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public PostgreSqlV2LinkedService(object server, object username, object database, object authenticationType, object sslMode, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object port = default(object), object schema = default(object), object pooling = default(object), object connectionTimeout = default(object), object commandTimeout = default(object), object trustServerCertificate = default(object), object sslCertificate = default(object), object sslKey = default(object), object sslPassword = default(object), object readBufferSize = default(object), object logParameters = default(object), object timezone = default(object), object encoding = default(object), AzureKeyVaultSecretReference password = default(AzureKeyVaultSecretReference), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Server = server; + Port = port; + Username = username; + Database = database; + AuthenticationType = authenticationType; + SslMode = sslMode; + Schema = schema; + Pooling = pooling; + ConnectionTimeout = connectionTimeout; + CommandTimeout = commandTimeout; + TrustServerCertificate = trustServerCertificate; + SslCertificate = sslCertificate; + SslKey = sslKey; + SslPassword = sslPassword; + ReadBufferSize = readBufferSize; + LogParameters = logParameters; + Timezone = timezone; + Encoding = encoding; + Password = password; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets server name for connection. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.server")] + public object Server { get; set; } + + /// + /// Gets or sets the port for the connection. Type: integer. + /// + [JsonProperty(PropertyName = "typeProperties.port")] + public object Port { get; set; } + + /// + /// Gets or sets username for authentication. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets database name for connection. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.database")] + public object Database { get; set; } + + /// + /// Gets or sets the authentication type to use. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public object AuthenticationType { get; set; } + + /// + /// Gets or sets SSL mode for connection. Type: integer. 0: disable, + /// 1:allow, 2: prefer, 3: require, 4: verify-ca, 5: verify-full. Type: + /// integer. + /// + [JsonProperty(PropertyName = "typeProperties.sslMode")] + public object SslMode { get; set; } + + /// + /// Gets or sets sets the schema search path. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object Schema { get; set; } + + /// + /// Gets or sets whether connection pooling should be used. Type: + /// boolean. + /// + [JsonProperty(PropertyName = "typeProperties.pooling")] + public object Pooling { get; set; } + + /// + /// Gets or sets the time to wait (in seconds) while trying to + /// establish a connection before terminating the attempt and + /// generating an error. Type: integer. + /// + [JsonProperty(PropertyName = "typeProperties.connectionTimeout")] + public object ConnectionTimeout { get; set; } + + /// + /// Gets or sets the time to wait (in seconds) while trying to execute + /// a command before terminating the attempt and generating an error. + /// Set to zero for infinity. Type: integer. + /// + [JsonProperty(PropertyName = "typeProperties.commandTimeout")] + public object CommandTimeout { get; set; } + + /// + /// Gets or sets whether to trust the server certificate without + /// validating it. Type: boolean. + /// + [JsonProperty(PropertyName = "typeProperties.trustServerCertificate")] + public object TrustServerCertificate { get; set; } + + /// + /// Gets or sets location of a client certificate to be sent to the + /// server. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.sslCertificate")] + public object SslCertificate { get; set; } + + /// + /// Gets or sets location of a client key for a client certificate to + /// be sent to the server. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.sslKey")] + public object SslKey { get; set; } + + /// + /// Gets or sets password for a key for a client certificate. Type: + /// string. + /// + [JsonProperty(PropertyName = "typeProperties.sslPassword")] + public object SslPassword { get; set; } + + /// + /// Gets or sets determines the size of the internal buffer uses when + /// reading. Increasing may improve performance if transferring large + /// values from the database. Type: integer. + /// + [JsonProperty(PropertyName = "typeProperties.readBufferSize")] + public object ReadBufferSize { get; set; } + + /// + /// Gets or sets when enabled, parameter values are logged when + /// commands are executed. Type: boolean. + /// + [JsonProperty(PropertyName = "typeProperties.logParameters")] + public object LogParameters { get; set; } + + /// + /// Gets or sets the session timezone. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.timezone")] + public object Timezone { get; set; } + + /// + /// Gets or sets the .NET encoding that will be used to encode/decode + /// PostgreSQL string data. Type: string + /// + [JsonProperty(PropertyName = "typeProperties.encoding")] + public object Encoding { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of password in + /// connection string. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public AzureKeyVaultSecretReference Password { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Server == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Server"); + } + if (Username == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Username"); + } + if (Database == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Database"); + } + if (AuthenticationType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AuthenticationType"); + } + if (SslMode == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SslMode"); + } + if (Password != null) + { + Password.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PostgreSqlV2Source.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PostgreSqlV2Source.cs new file mode 100644 index 000000000000..8e4cc11f93c6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PostgreSqlV2Source.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for PostgreSQL databases. + /// + public partial class PostgreSqlV2Source : TabularSource + { + /// + /// Initializes a new instance of the PostgreSqlV2Source class. + /// + public PostgreSqlV2Source() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PostgreSqlV2Source class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// Database query. Type: string (or Expression + /// with resultType string). + public PostgreSqlV2Source(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets database query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PostgreSqlV2TableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PostgreSqlV2TableDataset.cs new file mode 100644 index 000000000000..ff04f5b5cc51 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PostgreSqlV2TableDataset.cs @@ -0,0 +1,96 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The PostgreSQLV2 table dataset. + /// + [Newtonsoft.Json.JsonObject("PostgreSqlV2Table")] + [Rest.Serialization.JsonTransformation] + public partial class PostgreSqlV2TableDataset : Dataset + { + /// + /// Initializes a new instance of the PostgreSqlV2TableDataset class. + /// + public PostgreSqlV2TableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the PostgreSqlV2TableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The PostgreSQL table name. Type: string (or + /// Expression with resultType string). + /// The PostgreSQL schema + /// name. Type: string (or Expression with resultType string). + public PostgreSqlV2TableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object table = default(object), object postgreSqlV2TableDatasetSchema = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Table = table; + PostgreSqlV2TableDatasetSchema = postgreSqlV2TableDatasetSchema; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the PostgreSQL table name. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Gets or sets the PostgreSQL schema name. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object PostgreSqlV2TableDatasetSchema { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PowerQuerySink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PowerQuerySink.cs new file mode 100644 index 000000000000..d03685242e01 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PowerQuerySink.cs @@ -0,0 +1,71 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Power query sink. + /// + public partial class PowerQuerySink : DataFlowSink + { + /// + /// Initializes a new instance of the PowerQuerySink class. + /// + public PowerQuerySink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PowerQuerySink class. + /// + /// Transformation name. + /// Transformation description. + /// Dataset reference. + /// Linked service reference. + /// Flowlet Reference + /// Schema linked service + /// reference. + /// Rejected data linked + /// service reference. + /// sink script. + public PowerQuerySink(string name, string description = default(string), DatasetReference dataset = default(DatasetReference), LinkedServiceReference linkedService = default(LinkedServiceReference), DataFlowReference flowlet = default(DataFlowReference), LinkedServiceReference schemaLinkedService = default(LinkedServiceReference), LinkedServiceReference rejectedDataLinkedService = default(LinkedServiceReference), string script = default(string)) + : base(name, description, dataset, linkedService, flowlet, schemaLinkedService, rejectedDataLinkedService) + { + Script = script; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets sink script. + /// + [JsonProperty(PropertyName = "script")] + public string Script { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PowerQuerySinkMapping.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PowerQuerySinkMapping.cs new file mode 100644 index 000000000000..f4dae5123fb1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PowerQuerySinkMapping.cs @@ -0,0 +1,63 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Map Power Query mashup query to sink dataset(s). + /// + public partial class PowerQuerySinkMapping + { + /// + /// Initializes a new instance of the PowerQuerySinkMapping class. + /// + public PowerQuerySinkMapping() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PowerQuerySinkMapping class. + /// + /// Name of the query in Power Query mashup + /// document. + /// List of sinks mapped to Power Query + /// mashup query. + public PowerQuerySinkMapping(string queryName = default(string), IList dataflowSinks = default(IList)) + { + QueryName = queryName; + DataflowSinks = dataflowSinks; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the query in Power Query mashup document. + /// + [JsonProperty(PropertyName = "queryName")] + public string QueryName { get; set; } + + /// + /// Gets or sets list of sinks mapped to Power Query mashup query. + /// + [JsonProperty(PropertyName = "dataflowSinks")] + public IList DataflowSinks { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PowerQuerySource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PowerQuerySource.cs new file mode 100644 index 000000000000..861e276246b2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PowerQuerySource.cs @@ -0,0 +1,69 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Power query source. + /// + public partial class PowerQuerySource : DataFlowSource + { + /// + /// Initializes a new instance of the PowerQuerySource class. + /// + public PowerQuerySource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PowerQuerySource class. + /// + /// Transformation name. + /// Transformation description. + /// Dataset reference. + /// Linked service reference. + /// Flowlet Reference + /// Schema linked service + /// reference. + /// source script. + public PowerQuerySource(string name, string description = default(string), DatasetReference dataset = default(DatasetReference), LinkedServiceReference linkedService = default(LinkedServiceReference), DataFlowReference flowlet = default(DataFlowReference), LinkedServiceReference schemaLinkedService = default(LinkedServiceReference), string script = default(string)) + : base(name, description, dataset, linkedService, flowlet, schemaLinkedService) + { + Script = script; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets source script. + /// + [JsonProperty(PropertyName = "script")] + public string Script { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrestoAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrestoAuthenticationType.cs new file mode 100644 index 000000000000..3e1d0ebb8419 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrestoAuthenticationType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for PrestoAuthenticationType. + /// + public static class PrestoAuthenticationType + { + public const string Anonymous = "Anonymous"; + public const string LDAP = "LDAP"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrestoLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrestoLinkedService.cs new file mode 100644 index 000000000000..1e3a5f0bcb2e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrestoLinkedService.cs @@ -0,0 +1,238 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Presto server linked service. + /// + [Newtonsoft.Json.JsonObject("Presto")] + [Rest.Serialization.JsonTransformation] + public partial class PrestoLinkedService : LinkedService + { + /// + /// Initializes a new instance of the PrestoLinkedService class. + /// + public PrestoLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrestoLinkedService class. + /// + /// The IP address or host name of the Presto + /// server. (i.e. 192.168.222.160) + /// The version of the Presto server. (i.e. + /// 0.148-t) + /// The catalog context for all request against + /// the server. + /// The authentication mechanism used + /// to connect to the Presto server. Possible values include: + /// 'Anonymous', 'LDAP' + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The TCP port that the Presto server uses to + /// listen for client connections. The default value is 8080. + /// The user name used to connect to the Presto + /// server. + /// The password corresponding to the user + /// name. + /// Specifies whether the connections to the + /// server are encrypted using SSL. The default value is false. + /// The full path of the .pem file + /// containing trusted CA certificates for verifying the server when + /// connecting over SSL. This property can only be set when using SSL + /// on self-hosted IR. The default value is the cacerts.pem file + /// installed with the IR. + /// Specifies whether to use a CA + /// certificate from the system trust store or from a specified PEM + /// file. The default value is false. + /// Specifies whether to require + /// a CA-issued SSL certificate name to match the host name of the + /// server when connecting over SSL. The default value is + /// false. + /// Specifies whether to allow + /// self-signed certificates from the server. The default value is + /// false. + /// The local time zone used by the + /// connection. Valid values for this option are specified in the IANA + /// Time Zone Database. The default value is the system time + /// zone. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public PrestoLinkedService(object host, object serverVersion, object catalog, string authenticationType, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object port = default(object), object username = default(object), SecretBase password = default(SecretBase), object enableSsl = default(object), object trustedCertPath = default(object), object useSystemTrustStore = default(object), object allowHostNameCNMismatch = default(object), object allowSelfSignedServerCert = default(object), object timeZoneID = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Host = host; + ServerVersion = serverVersion; + Catalog = catalog; + Port = port; + AuthenticationType = authenticationType; + Username = username; + Password = password; + EnableSsl = enableSsl; + TrustedCertPath = trustedCertPath; + UseSystemTrustStore = useSystemTrustStore; + AllowHostNameCNMismatch = allowHostNameCNMismatch; + AllowSelfSignedServerCert = allowSelfSignedServerCert; + TimeZoneID = timeZoneID; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the IP address or host name of the Presto server. + /// (i.e. 192.168.222.160) + /// + [JsonProperty(PropertyName = "typeProperties.host")] + public object Host { get; set; } + + /// + /// Gets or sets the version of the Presto server. (i.e. 0.148-t) + /// + [JsonProperty(PropertyName = "typeProperties.serverVersion")] + public object ServerVersion { get; set; } + + /// + /// Gets or sets the catalog context for all request against the + /// server. + /// + [JsonProperty(PropertyName = "typeProperties.catalog")] + public object Catalog { get; set; } + + /// + /// Gets or sets the TCP port that the Presto server uses to listen for + /// client connections. The default value is 8080. + /// + [JsonProperty(PropertyName = "typeProperties.port")] + public object Port { get; set; } + + /// + /// Gets or sets the authentication mechanism used to connect to the + /// Presto server. Possible values include: 'Anonymous', 'LDAP' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets the user name used to connect to the Presto server. + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets the password corresponding to the user name. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets specifies whether the connections to the server are + /// encrypted using SSL. The default value is false. + /// + [JsonProperty(PropertyName = "typeProperties.enableSsl")] + public object EnableSsl { get; set; } + + /// + /// Gets or sets the full path of the .pem file containing trusted CA + /// certificates for verifying the server when connecting over SSL. + /// This property can only be set when using SSL on self-hosted IR. The + /// default value is the cacerts.pem file installed with the IR. + /// + [JsonProperty(PropertyName = "typeProperties.trustedCertPath")] + public object TrustedCertPath { get; set; } + + /// + /// Gets or sets specifies whether to use a CA certificate from the + /// system trust store or from a specified PEM file. The default value + /// is false. + /// + [JsonProperty(PropertyName = "typeProperties.useSystemTrustStore")] + public object UseSystemTrustStore { get; set; } + + /// + /// Gets or sets specifies whether to require a CA-issued SSL + /// certificate name to match the host name of the server when + /// connecting over SSL. The default value is false. + /// + [JsonProperty(PropertyName = "typeProperties.allowHostNameCNMismatch")] + public object AllowHostNameCNMismatch { get; set; } + + /// + /// Gets or sets specifies whether to allow self-signed certificates + /// from the server. The default value is false. + /// + [JsonProperty(PropertyName = "typeProperties.allowSelfSignedServerCert")] + public object AllowSelfSignedServerCert { get; set; } + + /// + /// Gets or sets the local time zone used by the connection. Valid + /// values for this option are specified in the IANA Time Zone + /// Database. The default value is the system time zone. + /// + [JsonProperty(PropertyName = "typeProperties.timeZoneID")] + public object TimeZoneID { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Host == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Host"); + } + if (ServerVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ServerVersion"); + } + if (Catalog == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Catalog"); + } + if (AuthenticationType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AuthenticationType"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrestoObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrestoObjectDataset.cs new file mode 100644 index 000000000000..b7b61af5ffaf --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrestoObjectDataset.cs @@ -0,0 +1,107 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Presto server dataset. + /// + [Newtonsoft.Json.JsonObject("PrestoObject")] + [Rest.Serialization.JsonTransformation] + public partial class PrestoObjectDataset : Dataset + { + /// + /// Initializes a new instance of the PrestoObjectDataset class. + /// + public PrestoObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the PrestoObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// This property will be retired. Please + /// consider using schema + table properties instead. + /// The table name of the Presto. Type: string (or + /// Expression with resultType string). + /// The schema name of the + /// Presto. Type: string (or Expression with resultType + /// string). + public PrestoObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object), object table = default(object), object prestoObjectDatasetSchema = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + Table = table; + PrestoObjectDatasetSchema = prestoObjectDatasetSchema; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property will be retired. Please consider using + /// schema + table properties instead. + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Gets or sets the table name of the Presto. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Gets or sets the schema name of the Presto. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object PrestoObjectDatasetSchema { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrestoSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrestoSource.cs new file mode 100644 index 000000000000..39257b6b61a7 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrestoSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Presto server source. + /// + public partial class PrestoSource : TabularSource + { + /// + /// Initializes a new instance of the PrestoSource class. + /// + public PrestoSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrestoSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public PrestoSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrivateEndpoint.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrivateEndpoint.cs new file mode 100644 index 000000000000..61d0e8c28536 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrivateEndpoint.cs @@ -0,0 +1,51 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Private endpoint which a connection belongs to. + /// + public partial class PrivateEndpoint + { + /// + /// Initializes a new instance of the PrivateEndpoint class. + /// + public PrivateEndpoint() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateEndpoint class. + /// + /// The resource Id for private endpoint + public PrivateEndpoint(string id = default(string)) + { + Id = id; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the resource Id for private endpoint + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrivateEndpointConnectionResource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrivateEndpointConnectionResource.cs new file mode 100644 index 000000000000..b458b38f22c6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrivateEndpointConnectionResource.cs @@ -0,0 +1,58 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Private Endpoint Connection ARM resource. + /// + public partial class PrivateEndpointConnectionResource : SubResource + { + /// + /// Initializes a new instance of the PrivateEndpointConnectionResource + /// class. + /// + public PrivateEndpointConnectionResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateEndpointConnectionResource + /// class. + /// + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + /// Core resource properties + public PrivateEndpointConnectionResource(string id = default(string), string name = default(string), string type = default(string), string etag = default(string), RemotePrivateEndpointConnection properties = default(RemotePrivateEndpointConnection)) + : base(id, name, type, etag) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets core resource properties + /// + [JsonProperty(PropertyName = "properties")] + public RemotePrivateEndpointConnection Properties { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrivateLinkConnectionApprovalRequest.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrivateLinkConnectionApprovalRequest.cs new file mode 100644 index 000000000000..4241c71b432f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrivateLinkConnectionApprovalRequest.cs @@ -0,0 +1,60 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// A request to approve or reject a private endpoint connection + /// + public partial class PrivateLinkConnectionApprovalRequest + { + /// + /// Initializes a new instance of the + /// PrivateLinkConnectionApprovalRequest class. + /// + public PrivateLinkConnectionApprovalRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// PrivateLinkConnectionApprovalRequest class. + /// + /// The resource of private + /// endpoint. + public PrivateLinkConnectionApprovalRequest(PrivateLinkConnectionState privateLinkServiceConnectionState = default(PrivateLinkConnectionState), PrivateEndpoint privateEndpoint = default(PrivateEndpoint)) + { + PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; + PrivateEndpoint = privateEndpoint; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "privateLinkServiceConnectionState")] + public PrivateLinkConnectionState PrivateLinkServiceConnectionState { get; set; } + + /// + /// Gets or sets the resource of private endpoint. + /// + [JsonProperty(PropertyName = "privateEndpoint")] + public PrivateEndpoint PrivateEndpoint { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrivateLinkConnectionApprovalRequestResource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrivateLinkConnectionApprovalRequestResource.cs new file mode 100644 index 000000000000..4104026c9a5d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrivateLinkConnectionApprovalRequestResource.cs @@ -0,0 +1,58 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Private Endpoint Connection Approval ARM resource. + /// + public partial class PrivateLinkConnectionApprovalRequestResource : SubResource + { + /// + /// Initializes a new instance of the + /// PrivateLinkConnectionApprovalRequestResource class. + /// + public PrivateLinkConnectionApprovalRequestResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// PrivateLinkConnectionApprovalRequestResource class. + /// + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + /// Core resource properties + public PrivateLinkConnectionApprovalRequestResource(string id = default(string), string name = default(string), string type = default(string), string etag = default(string), PrivateLinkConnectionApprovalRequest properties = default(PrivateLinkConnectionApprovalRequest)) + : base(id, name, type, etag) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets core resource properties + /// + [JsonProperty(PropertyName = "properties")] + public PrivateLinkConnectionApprovalRequest Properties { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrivateLinkConnectionState.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrivateLinkConnectionState.cs new file mode 100644 index 000000000000..9a7185886b87 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrivateLinkConnectionState.cs @@ -0,0 +1,69 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The state of a private link connection + /// + public partial class PrivateLinkConnectionState + { + /// + /// Initializes a new instance of the PrivateLinkConnectionState class. + /// + public PrivateLinkConnectionState() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateLinkConnectionState class. + /// + /// Status of a private link connection + /// Description of a private link + /// connection + /// ActionsRequired for a private link + /// connection + public PrivateLinkConnectionState(string status = default(string), string description = default(string), string actionsRequired = default(string)) + { + Status = status; + Description = description; + ActionsRequired = actionsRequired; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets status of a private link connection + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or sets description of a private link connection + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets actionsRequired for a private link connection + /// + [JsonProperty(PropertyName = "actionsRequired")] + public string ActionsRequired { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrivateLinkResource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrivateLinkResource.cs new file mode 100644 index 000000000000..2436c1b94a89 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrivateLinkResource.cs @@ -0,0 +1,56 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// A private link resource + /// + public partial class PrivateLinkResource : SubResource + { + /// + /// Initializes a new instance of the PrivateLinkResource class. + /// + public PrivateLinkResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateLinkResource class. + /// + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + /// Core resource properties + public PrivateLinkResource(string id = default(string), string name = default(string), string type = default(string), string etag = default(string), PrivateLinkResourceProperties properties = default(PrivateLinkResourceProperties)) + : base(id, name, type, etag) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets core resource properties + /// + [JsonProperty(PropertyName = "properties")] + public PrivateLinkResourceProperties Properties { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrivateLinkResourceProperties.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrivateLinkResourceProperties.cs new file mode 100644 index 000000000000..84022fc71962 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrivateLinkResourceProperties.cs @@ -0,0 +1,73 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Properties of a private link resource + /// + public partial class PrivateLinkResourceProperties + { + /// + /// Initializes a new instance of the PrivateLinkResourceProperties + /// class. + /// + public PrivateLinkResourceProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateLinkResourceProperties + /// class. + /// + /// GroupId of a private link resource + /// RequiredMembers of a private link + /// resource + /// RequiredZoneNames of a private link + /// resource + public PrivateLinkResourceProperties(string groupId = default(string), IList requiredMembers = default(IList), IList requiredZoneNames = default(IList)) + { + GroupId = groupId; + RequiredMembers = requiredMembers; + RequiredZoneNames = requiredZoneNames; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets groupId of a private link resource + /// + [JsonProperty(PropertyName = "groupId")] + public string GroupId { get; private set; } + + /// + /// Gets requiredMembers of a private link resource + /// + [JsonProperty(PropertyName = "requiredMembers")] + public IList RequiredMembers { get; private set; } + + /// + /// Gets requiredZoneNames of a private link resource + /// + [JsonProperty(PropertyName = "requiredZoneNames")] + public IList RequiredZoneNames { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrivateLinkResourcesWrapper.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrivateLinkResourcesWrapper.cs new file mode 100644 index 000000000000..1890108dffe1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PrivateLinkResourcesWrapper.cs @@ -0,0 +1,67 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Wrapper for a collection of private link resources + /// + public partial class PrivateLinkResourcesWrapper + { + /// + /// Initializes a new instance of the PrivateLinkResourcesWrapper + /// class. + /// + public PrivateLinkResourcesWrapper() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateLinkResourcesWrapper + /// class. + /// + public PrivateLinkResourcesWrapper(IList value) + { + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Value == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Value"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PublicNetworkAccess.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PublicNetworkAccess.cs new file mode 100644 index 000000000000..384def984483 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PublicNetworkAccess.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for PublicNetworkAccess. + /// + public static class PublicNetworkAccess + { + public const string Enabled = "Enabled"; + public const string Disabled = "Disabled"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PurviewConfiguration.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PurviewConfiguration.cs new file mode 100644 index 000000000000..80ddb128fca3 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/PurviewConfiguration.cs @@ -0,0 +1,51 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Purview configuration. + /// + public partial class PurviewConfiguration + { + /// + /// Initializes a new instance of the PurviewConfiguration class. + /// + public PurviewConfiguration() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PurviewConfiguration class. + /// + /// Purview resource id. + public PurviewConfiguration(string purviewResourceId = default(string)) + { + PurviewResourceId = purviewResourceId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets purview resource id. + /// + [JsonProperty(PropertyName = "purviewResourceId")] + public string PurviewResourceId { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/QuickBooksLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/QuickBooksLinkedService.cs new file mode 100644 index 000000000000..dca50c94b732 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/QuickBooksLinkedService.cs @@ -0,0 +1,158 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// QuickBooks server linked service. + /// + [Newtonsoft.Json.JsonObject("QuickBooks")] + [Rest.Serialization.JsonTransformation] + public partial class QuickBooksLinkedService : LinkedService + { + /// + /// Initializes a new instance of the QuickBooksLinkedService class. + /// + public QuickBooksLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the QuickBooksLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Properties used to connect to + /// QuickBooks. It is mutually exclusive with any other properties in + /// the linked service. Type: object. + /// The endpoint of the QuickBooks server. (i.e. + /// quickbooks.api.intuit.com) + /// The company ID of the QuickBooks company to + /// authorize. + /// The consumer key for OAuth 1.0 + /// authentication. + /// The consumer secret for OAuth 1.0 + /// authentication. + /// The access token for OAuth 1.0 + /// authentication. + /// The access token secret for OAuth + /// 1.0 authentication. + /// Specifies whether the data + /// source endpoints are encrypted using HTTPS. The default value is + /// true. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public QuickBooksLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object connectionProperties = default(object), object endpoint = default(object), object companyId = default(object), object consumerKey = default(object), SecretBase consumerSecret = default(SecretBase), SecretBase accessToken = default(SecretBase), SecretBase accessTokenSecret = default(SecretBase), object useEncryptedEndpoints = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionProperties = connectionProperties; + Endpoint = endpoint; + CompanyId = companyId; + ConsumerKey = consumerKey; + ConsumerSecret = consumerSecret; + AccessToken = accessToken; + AccessTokenSecret = accessTokenSecret; + UseEncryptedEndpoints = useEncryptedEndpoints; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets properties used to connect to QuickBooks. It is + /// mutually exclusive with any other properties in the linked service. + /// Type: object. + /// + [JsonProperty(PropertyName = "typeProperties.connectionProperties")] + public object ConnectionProperties { get; set; } + + /// + /// Gets or sets the endpoint of the QuickBooks server. (i.e. + /// quickbooks.api.intuit.com) + /// + [JsonProperty(PropertyName = "typeProperties.endpoint")] + public object Endpoint { get; set; } + + /// + /// Gets or sets the company ID of the QuickBooks company to authorize. + /// + [JsonProperty(PropertyName = "typeProperties.companyId")] + public object CompanyId { get; set; } + + /// + /// Gets or sets the consumer key for OAuth 1.0 authentication. + /// + [JsonProperty(PropertyName = "typeProperties.consumerKey")] + public object ConsumerKey { get; set; } + + /// + /// Gets or sets the consumer secret for OAuth 1.0 authentication. + /// + [JsonProperty(PropertyName = "typeProperties.consumerSecret")] + public SecretBase ConsumerSecret { get; set; } + + /// + /// Gets or sets the access token for OAuth 1.0 authentication. + /// + [JsonProperty(PropertyName = "typeProperties.accessToken")] + public SecretBase AccessToken { get; set; } + + /// + /// Gets or sets the access token secret for OAuth 1.0 authentication. + /// + [JsonProperty(PropertyName = "typeProperties.accessTokenSecret")] + public SecretBase AccessTokenSecret { get; set; } + + /// + /// Gets or sets specifies whether the data source endpoints are + /// encrypted using HTTPS. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useEncryptedEndpoints")] + public object UseEncryptedEndpoints { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/QuickBooksObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/QuickBooksObjectDataset.cs new file mode 100644 index 000000000000..47b067b75c68 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/QuickBooksObjectDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// QuickBooks server dataset. + /// + [Newtonsoft.Json.JsonObject("QuickBooksObject")] + [Rest.Serialization.JsonTransformation] + public partial class QuickBooksObjectDataset : Dataset + { + /// + /// Initializes a new instance of the QuickBooksObjectDataset class. + /// + public QuickBooksObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the QuickBooksObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name. Type: string (or Expression + /// with resultType string). + public QuickBooksObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/QuickBooksSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/QuickBooksSource.cs new file mode 100644 index 000000000000..10878446293a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/QuickBooksSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity QuickBooks server source. + /// + public partial class QuickBooksSource : TabularSource + { + /// + /// Initializes a new instance of the QuickBooksSource class. + /// + public QuickBooksSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the QuickBooksSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public QuickBooksSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/QuickbaseLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/QuickbaseLinkedService.cs new file mode 100644 index 000000000000..97e40b3fc280 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/QuickbaseLinkedService.cs @@ -0,0 +1,107 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for Quickbase. + /// + [Newtonsoft.Json.JsonObject("Quickbase")] + [Rest.Serialization.JsonTransformation] + public partial class QuickbaseLinkedService : LinkedService + { + /// + /// Initializes a new instance of the QuickbaseLinkedService class. + /// + public QuickbaseLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the QuickbaseLinkedService class. + /// + /// The url to connect Quickbase source. Type: string + /// (or Expression with resultType string). + /// The user token for the Quickbase + /// source. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public QuickbaseLinkedService(object url, SecretBase userToken, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Url = url; + UserToken = userToken; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the url to connect Quickbase source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.url")] + public object Url { get; set; } + + /// + /// Gets or sets the user token for the Quickbase source. + /// + [JsonProperty(PropertyName = "typeProperties.userToken")] + public SecretBase UserToken { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Url == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Url"); + } + if (UserToken == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "UserToken"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RecurrenceFrequency.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RecurrenceFrequency.cs new file mode 100644 index 000000000000..103c321751a3 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RecurrenceFrequency.cs @@ -0,0 +1,27 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for RecurrenceFrequency. + /// + public static class RecurrenceFrequency + { + public const string NotSpecified = "NotSpecified"; + public const string Minute = "Minute"; + public const string Hour = "Hour"; + public const string Day = "Day"; + public const string Week = "Week"; + public const string Month = "Month"; + public const string Year = "Year"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RecurrenceSchedule.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RecurrenceSchedule.cs new file mode 100644 index 000000000000..a37fe19d3090 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RecurrenceSchedule.cs @@ -0,0 +1,95 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The recurrence schedule. + /// + public partial class RecurrenceSchedule + { + /// + /// Initializes a new instance of the RecurrenceSchedule class. + /// + public RecurrenceSchedule() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RecurrenceSchedule class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The minutes. + /// The hours. + /// The days of the week. + /// The month days. + /// The monthly occurrences. + public RecurrenceSchedule(IDictionary additionalProperties = default(IDictionary), IList minutes = default(IList), IList hours = default(IList), IList weekDays = default(IList), IList monthDays = default(IList), IList monthlyOccurrences = default(IList)) + { + AdditionalProperties = additionalProperties; + Minutes = minutes; + Hours = hours; + WeekDays = weekDays; + MonthDays = monthDays; + MonthlyOccurrences = monthlyOccurrences; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets the minutes. + /// + [JsonProperty(PropertyName = "minutes")] + public IList Minutes { get; set; } + + /// + /// Gets or sets the hours. + /// + [JsonProperty(PropertyName = "hours")] + public IList Hours { get; set; } + + /// + /// Gets or sets the days of the week. + /// + [JsonProperty(PropertyName = "weekDays")] + public IList WeekDays { get; set; } + + /// + /// Gets or sets the month days. + /// + [JsonProperty(PropertyName = "monthDays")] + public IList MonthDays { get; set; } + + /// + /// Gets or sets the monthly occurrences. + /// + [JsonProperty(PropertyName = "monthlyOccurrences")] + public IList MonthlyOccurrences { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RecurrenceScheduleOccurrence.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RecurrenceScheduleOccurrence.cs new file mode 100644 index 000000000000..600e4fc93716 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RecurrenceScheduleOccurrence.cs @@ -0,0 +1,77 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The recurrence schedule occurrence. + /// + public partial class RecurrenceScheduleOccurrence + { + /// + /// Initializes a new instance of the RecurrenceScheduleOccurrence + /// class. + /// + public RecurrenceScheduleOccurrence() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RecurrenceScheduleOccurrence + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The day of the week. Possible values include: + /// 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', + /// 'Saturday' + /// The occurrence. + public RecurrenceScheduleOccurrence(IDictionary additionalProperties = default(IDictionary), DayOfWeek? day = default(DayOfWeek?), int? occurrence = default(int?)) + { + AdditionalProperties = additionalProperties; + Day = day; + Occurrence = occurrence; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets the day of the week. Possible values include: + /// 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', + /// 'Saturday' + /// + [JsonProperty(PropertyName = "day")] + public DayOfWeek? Day { get; set; } + + /// + /// Gets or sets the occurrence. + /// + [JsonProperty(PropertyName = "occurrence")] + public int? Occurrence { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RedirectIncompatibleRowSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RedirectIncompatibleRowSettings.cs new file mode 100644 index 000000000000..7ea528f69226 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RedirectIncompatibleRowSettings.cs @@ -0,0 +1,97 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Redirect incompatible row settings + /// + public partial class RedirectIncompatibleRowSettings + { + /// + /// Initializes a new instance of the RedirectIncompatibleRowSettings + /// class. + /// + public RedirectIncompatibleRowSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RedirectIncompatibleRowSettings + /// class. + /// + /// Name of the Azure Storage, Storage + /// SAS, or Azure Data Lake Store linked service used for redirecting + /// incompatible row. Must be specified if + /// redirectIncompatibleRowSettings is specified. Type: string (or + /// Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// The path for storing the redirect incompatible + /// row data. Type: string (or Expression with resultType + /// string). + public RedirectIncompatibleRowSettings(object linkedServiceName, IDictionary additionalProperties = default(IDictionary), object path = default(object)) + { + AdditionalProperties = additionalProperties; + LinkedServiceName = linkedServiceName; + Path = path; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets name of the Azure Storage, Storage SAS, or Azure Data + /// Lake Store linked service used for redirecting incompatible row. + /// Must be specified if redirectIncompatibleRowSettings is specified. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "linkedServiceName")] + public object LinkedServiceName { get; set; } + + /// + /// Gets or sets the path for storing the redirect incompatible row + /// data. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "path")] + public object Path { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (LinkedServiceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "LinkedServiceName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RedshiftUnloadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RedshiftUnloadSettings.cs new file mode 100644 index 000000000000..43fd900e8f0a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RedshiftUnloadSettings.cs @@ -0,0 +1,96 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The Amazon S3 settings needed for the interim Amazon S3 when copying + /// from Amazon Redshift with unload. With this, data from Amazon Redshift + /// source will be unloaded into S3 first and then copied into the targeted + /// sink from the interim S3. + /// + public partial class RedshiftUnloadSettings + { + /// + /// Initializes a new instance of the RedshiftUnloadSettings class. + /// + public RedshiftUnloadSettings() + { + S3LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the RedshiftUnloadSettings class. + /// + /// The name of the Amazon S3 linked + /// service which will be used for the unload operation when copying + /// from the Amazon Redshift source. + /// The bucket of the interim Amazon S3 which + /// will be used to store the unloaded data from Amazon Redshift + /// source. The bucket must be in the same region as the Amazon + /// Redshift source. Type: string (or Expression with resultType + /// string). + public RedshiftUnloadSettings(LinkedServiceReference s3LinkedServiceName, object bucketName) + { + S3LinkedServiceName = s3LinkedServiceName; + BucketName = bucketName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the Amazon S3 linked service which will be + /// used for the unload operation when copying from the Amazon Redshift + /// source. + /// + [JsonProperty(PropertyName = "s3LinkedServiceName")] + public LinkedServiceReference S3LinkedServiceName { get; set; } + + /// + /// Gets or sets the bucket of the interim Amazon S3 which will be used + /// to store the unloaded data from Amazon Redshift source. The bucket + /// must be in the same region as the Amazon Redshift source. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "bucketName")] + public object BucketName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (S3LinkedServiceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "S3LinkedServiceName"); + } + if (BucketName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "BucketName"); + } + if (S3LinkedServiceName != null) + { + S3LinkedServiceName.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RelationalSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RelationalSource.cs new file mode 100644 index 000000000000..32371f7be72d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RelationalSource.cs @@ -0,0 +1,81 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for various relational databases. + /// + public partial class RelationalSource : CopySource + { + /// + /// Initializes a new instance of the RelationalSource class. + /// + public RelationalSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RelationalSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Database query. Type: string (or Expression + /// with resultType string). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public RelationalSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object query = default(object), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + Query = query; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets database query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RelationalTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RelationalTableDataset.cs new file mode 100644 index 000000000000..f0f29ae93746 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RelationalTableDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The relational table dataset. + /// + [Newtonsoft.Json.JsonObject("RelationalTable")] + [Rest.Serialization.JsonTransformation] + public partial class RelationalTableDataset : Dataset + { + /// + /// Initializes a new instance of the RelationalTableDataset class. + /// + public RelationalTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the RelationalTableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The relational table name. Type: string (or + /// Expression with resultType string). + public RelationalTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the relational table name. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RemotePrivateEndpointConnection.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RemotePrivateEndpointConnection.cs new file mode 100644 index 000000000000..f9fbda79b735 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RemotePrivateEndpointConnection.cs @@ -0,0 +1,67 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// A remote private endpoint connection + /// + public partial class RemotePrivateEndpointConnection + { + /// + /// Initializes a new instance of the RemotePrivateEndpointConnection + /// class. + /// + public RemotePrivateEndpointConnection() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RemotePrivateEndpointConnection + /// class. + /// + /// PrivateEndpoint of a remote private + /// endpoint connection + public RemotePrivateEndpointConnection(string provisioningState = default(string), ArmIdWrapper privateEndpoint = default(ArmIdWrapper), PrivateLinkConnectionState privateLinkServiceConnectionState = default(PrivateLinkConnectionState)) + { + ProvisioningState = provisioningState; + PrivateEndpoint = privateEndpoint; + PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "provisioningState")] + public string ProvisioningState { get; private set; } + + /// + /// Gets or sets privateEndpoint of a remote private endpoint + /// connection + /// + [JsonProperty(PropertyName = "privateEndpoint")] + public ArmIdWrapper PrivateEndpoint { get; set; } + + /// + /// + [JsonProperty(PropertyName = "privateLinkServiceConnectionState")] + public PrivateLinkConnectionState PrivateLinkServiceConnectionState { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RerunTumblingWindowTrigger.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RerunTumblingWindowTrigger.cs new file mode 100644 index 000000000000..c2a69f7c1acb --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RerunTumblingWindowTrigger.cs @@ -0,0 +1,120 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Trigger that schedules pipeline reruns for all fixed time interval + /// windows from a requested start time to requested end time. + /// + [Rest.Serialization.JsonTransformation] + public partial class RerunTumblingWindowTrigger : Trigger + { + /// + /// Initializes a new instance of the RerunTumblingWindowTrigger class. + /// + public RerunTumblingWindowTrigger() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RerunTumblingWindowTrigger class. + /// + /// The parent trigger reference. + /// The start time for the time period + /// for which restatement is initiated. Only UTC time is currently + /// supported. + /// The end time for the time period for + /// which restatement is initiated. Only UTC time is currently + /// supported. + /// The max number of parallel time + /// windows (ready for execution) for which a rerun is + /// triggered. + /// Unmatched properties from the + /// message are deserialized this collection + /// Trigger description. + /// Indicates if trigger is running or not. + /// Updated when Start/Stop APIs are called on the Trigger. Possible + /// values include: 'Started', 'Stopped', 'Disabled' + /// List of tags that can be used for + /// describing the trigger. + public RerunTumblingWindowTrigger(object parentTrigger, System.DateTime requestedStartTime, System.DateTime requestedEndTime, int rerunConcurrency, IDictionary additionalProperties = default(IDictionary), string description = default(string), string runtimeState = default(string), IList annotations = default(IList)) + : base(additionalProperties, description, runtimeState, annotations) + { + ParentTrigger = parentTrigger; + RequestedStartTime = requestedStartTime; + RequestedEndTime = requestedEndTime; + RerunConcurrency = rerunConcurrency; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the parent trigger reference. + /// + [JsonProperty(PropertyName = "typeProperties.parentTrigger")] + public object ParentTrigger { get; set; } + + /// + /// Gets or sets the start time for the time period for which + /// restatement is initiated. Only UTC time is currently supported. + /// + [JsonProperty(PropertyName = "typeProperties.requestedStartTime")] + public System.DateTime RequestedStartTime { get; set; } + + /// + /// Gets or sets the end time for the time period for which restatement + /// is initiated. Only UTC time is currently supported. + /// + [JsonProperty(PropertyName = "typeProperties.requestedEndTime")] + public System.DateTime RequestedEndTime { get; set; } + + /// + /// Gets or sets the max number of parallel time windows (ready for + /// execution) for which a rerun is triggered. + /// + [JsonProperty(PropertyName = "typeProperties.rerunConcurrency")] + public int RerunConcurrency { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ParentTrigger == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ParentTrigger"); + } + if (RerunConcurrency > 50) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "RerunConcurrency", 50); + } + if (RerunConcurrency < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "RerunConcurrency", 1); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Resource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Resource.cs new file mode 100644 index 000000000000..24b909a26852 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Resource.cs @@ -0,0 +1,95 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure Data Factory top-level resource. + /// + public partial class Resource : IResource + { + /// + /// Initializes a new instance of the Resource class. + /// + public Resource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Resource class. + /// + /// The resource identifier. + /// The resource name. + /// The resource type. + /// The resource location. + /// The resource tags. + /// Etag identifies change in the resource. + public Resource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), string eTag = default(string)) + { + Id = id; + Name = name; + Type = type; + Location = location; + Tags = tags; + ETag = eTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the resource identifier. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets the resource name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets the resource type. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets or sets the resource location. + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + + /// + /// Gets or sets the resource tags. + /// + [JsonProperty(PropertyName = "tags")] + public IDictionary Tags { get; set; } + + /// + /// Gets etag identifies change in the resource. + /// + [JsonProperty(PropertyName = "eTag")] + public string ETag { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ResponsysLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ResponsysLinkedService.cs new file mode 100644 index 000000000000..42a8af398cc2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ResponsysLinkedService.cs @@ -0,0 +1,159 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Responsys linked service. + /// + [Newtonsoft.Json.JsonObject("Responsys")] + [Rest.Serialization.JsonTransformation] + public partial class ResponsysLinkedService : LinkedService + { + /// + /// Initializes a new instance of the ResponsysLinkedService class. + /// + public ResponsysLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResponsysLinkedService class. + /// + /// The endpoint of the Responsys + /// server. + /// The client ID associated with the Responsys + /// application. Type: string (or Expression with resultType + /// string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The client secret associated with the + /// Responsys application. Type: string (or Expression with resultType + /// string). + /// Specifies whether the data + /// source endpoints are encrypted using HTTPS. The default value is + /// true. Type: boolean (or Expression with resultType + /// boolean). + /// Specifies whether to require the + /// host name in the server's certificate to match the host name of the + /// server when connecting over SSL. The default value is true. Type: + /// boolean (or Expression with resultType boolean). + /// Specifies whether to verify the + /// identity of the server when connecting over SSL. The default value + /// is true. Type: boolean (or Expression with resultType + /// boolean). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public ResponsysLinkedService(object endpoint, object clientId, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), SecretBase clientSecret = default(SecretBase), object useEncryptedEndpoints = default(object), object useHostVerification = default(object), object usePeerVerification = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Endpoint = endpoint; + ClientId = clientId; + ClientSecret = clientSecret; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the endpoint of the Responsys server. + /// + [JsonProperty(PropertyName = "typeProperties.endpoint")] + public object Endpoint { get; set; } + + /// + /// Gets or sets the client ID associated with the Responsys + /// application. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.clientId")] + public object ClientId { get; set; } + + /// + /// Gets or sets the client secret associated with the Responsys + /// application. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.clientSecret")] + public SecretBase ClientSecret { get; set; } + + /// + /// Gets or sets specifies whether the data source endpoints are + /// encrypted using HTTPS. The default value is true. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.useEncryptedEndpoints")] + public object UseEncryptedEndpoints { get; set; } + + /// + /// Gets or sets specifies whether to require the host name in the + /// server's certificate to match the host name of the server when + /// connecting over SSL. The default value is true. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.useHostVerification")] + public object UseHostVerification { get; set; } + + /// + /// Gets or sets specifies whether to verify the identity of the server + /// when connecting over SSL. The default value is true. Type: boolean + /// (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.usePeerVerification")] + public object UsePeerVerification { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Endpoint == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Endpoint"); + } + if (ClientId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ClientId"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ResponsysObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ResponsysObjectDataset.cs new file mode 100644 index 000000000000..cc9e1c1b5e8e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ResponsysObjectDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Responsys dataset. + /// + [Newtonsoft.Json.JsonObject("ResponsysObject")] + [Rest.Serialization.JsonTransformation] + public partial class ResponsysObjectDataset : Dataset + { + /// + /// Initializes a new instance of the ResponsysObjectDataset class. + /// + public ResponsysObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the ResponsysObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name. Type: string (or Expression + /// with resultType string). + public ResponsysObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ResponsysSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ResponsysSource.cs new file mode 100644 index 000000000000..bcfdd6f2cb0c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ResponsysSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Responsys source. + /// + public partial class ResponsysSource : TabularSource + { + /// + /// Initializes a new instance of the ResponsysSource class. + /// + public ResponsysSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResponsysSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public ResponsysSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RestResourceDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RestResourceDataset.cs new file mode 100644 index 000000000000..ed8aea8e9d09 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RestResourceDataset.cs @@ -0,0 +1,130 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A Rest service dataset. + /// + [Newtonsoft.Json.JsonObject("RestResource")] + [Rest.Serialization.JsonTransformation] + public partial class RestResourceDataset : Dataset + { + /// + /// Initializes a new instance of the RestResourceDataset class. + /// + public RestResourceDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the RestResourceDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The relative URL to the resource that the + /// RESTful API provides. Type: string (or Expression with resultType + /// string). + /// The HTTP method used to call the + /// RESTful API. The default is GET. Type: string (or Expression with + /// resultType string). + /// The HTTP request body to the RESTful API + /// if requestMethod is POST. Type: string (or Expression with + /// resultType string). + /// The additional HTTP headers in the + /// request to the RESTful API. + /// The pagination rules to compose next + /// page requests. + public RestResourceDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object relativeUrl = default(object), object requestMethod = default(object), object requestBody = default(object), IDictionary additionalHeaders = default(IDictionary), IDictionary paginationRules = default(IDictionary)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + RelativeUrl = relativeUrl; + RequestMethod = requestMethod; + RequestBody = requestBody; + AdditionalHeaders = additionalHeaders; + PaginationRules = paginationRules; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the relative URL to the resource that the RESTful API + /// provides. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.relativeUrl")] + public object RelativeUrl { get; set; } + + /// + /// Gets or sets the HTTP method used to call the RESTful API. The + /// default is GET. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.requestMethod")] + public object RequestMethod { get; set; } + + /// + /// Gets or sets the HTTP request body to the RESTful API if + /// requestMethod is POST. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.requestBody")] + public object RequestBody { get; set; } + + /// + /// Gets or sets the additional HTTP headers in the request to the + /// RESTful API. + /// + [JsonProperty(PropertyName = "typeProperties.additionalHeaders")] + public IDictionary AdditionalHeaders { get; set; } + + /// + /// Gets or sets the pagination rules to compose next page requests. + /// + [JsonProperty(PropertyName = "typeProperties.paginationRules")] + public IDictionary PaginationRules { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RestServiceAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RestServiceAuthenticationType.cs new file mode 100644 index 000000000000..507bb90f19c5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RestServiceAuthenticationType.cs @@ -0,0 +1,25 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for RestServiceAuthenticationType. + /// + public static class RestServiceAuthenticationType + { + public const string Anonymous = "Anonymous"; + public const string Basic = "Basic"; + public const string AadServicePrincipal = "AadServicePrincipal"; + public const string ManagedServiceIdentity = "ManagedServiceIdentity"; + public const string OAuth2ClientCredential = "OAuth2ClientCredential"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RestServiceLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RestServiceLinkedService.cs new file mode 100644 index 000000000000..c70331e8e7b0 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RestServiceLinkedService.cs @@ -0,0 +1,331 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Rest Service linked service. + /// + [Newtonsoft.Json.JsonObject("RestService")] + [Rest.Serialization.JsonTransformation] + public partial class RestServiceLinkedService : LinkedService + { + /// + /// Initializes a new instance of the RestServiceLinkedService class. + /// + public RestServiceLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RestServiceLinkedService class. + /// + /// The base URL of the REST service. Type: string + /// (or Expression with resultType string). + /// Type of authentication used to + /// connect to the REST service. Possible values include: 'Anonymous', + /// 'Basic', 'AadServicePrincipal', 'ManagedServiceIdentity', + /// 'OAuth2ClientCredential' + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Whether to validate + /// server side SSL certificate when connecting to the endpoint.The + /// default value is true. Type: boolean (or Expression with resultType + /// boolean). + /// The user name used in Basic authentication + /// type. Type: string (or Expression with resultType string). + /// The password used in Basic authentication + /// type. + /// The additional HTTP headers in the + /// request to RESTful API used for authorization. Type: object (or + /// Expression with resultType object). + /// The application's client ID used + /// in AadServicePrincipal authentication type. Type: string (or + /// Expression with resultType string). + /// The application's key used in + /// AadServicePrincipal authentication type. + /// The tenant information (domain name or tenant + /// ID) used in AadServicePrincipal authentication type under which + /// your application resides. Type: string (or Expression with + /// resultType string). + /// Indicates the azure cloud type of the + /// service principle auth. Allowed values are AzurePublic, AzureChina, + /// AzureUsGovernment, AzureGermany. Default value is the data factory + /// regions’ cloud type. Type: string (or Expression with resultType + /// string). + /// The resource you are requesting + /// authorization to use. Type: string (or Expression with resultType + /// string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// The credential reference containing + /// authentication information. + /// The client ID associated with your + /// application. Type: string (or Expression with resultType + /// string). + /// The client secret associated with your + /// application. + /// The token endpoint of the authorization + /// server to acquire access token. Type: string (or Expression with + /// resultType string). + /// The target service or resource to which the + /// access will be requested. Type: string (or Expression with + /// resultType string). + /// The scope of the access required. It describes + /// what kind of access will be requested. Type: string (or Expression + /// with resultType string). + /// The service principal + /// credential type to use in Server-To-Server authentication. + /// 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for + /// certificate. Type: string (or Expression with resultType + /// string). + /// Specify the base64 + /// encoded certificate of your application registered in Azure Active + /// Directory. Type: string (or Expression with resultType + /// string). + /// Specify the + /// password of your certificate if your certificate has a password and + /// you are using AadServicePrincipal authentication. Type: string (or + /// Expression with resultType string). + public RestServiceLinkedService(object url, string authenticationType, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object enableServerCertificateValidation = default(object), object userName = default(object), SecretBase password = default(SecretBase), object authHeaders = default(object), object servicePrincipalId = default(object), SecretBase servicePrincipalKey = default(SecretBase), object tenant = default(object), object azureCloudType = default(object), object aadResourceId = default(object), string encryptedCredential = default(string), CredentialReference credential = default(CredentialReference), object clientId = default(object), SecretBase clientSecret = default(SecretBase), object tokenEndpoint = default(object), object resource = default(object), object scope = default(object), object servicePrincipalCredentialType = default(object), SecretBase servicePrincipalEmbeddedCert = default(SecretBase), SecretBase servicePrincipalEmbeddedCertPassword = default(SecretBase)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Url = url; + EnableServerCertificateValidation = enableServerCertificateValidation; + AuthenticationType = authenticationType; + UserName = userName; + Password = password; + AuthHeaders = authHeaders; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + AzureCloudType = azureCloudType; + AadResourceId = aadResourceId; + EncryptedCredential = encryptedCredential; + Credential = credential; + ClientId = clientId; + ClientSecret = clientSecret; + TokenEndpoint = tokenEndpoint; + Resource = resource; + Scope = scope; + ServicePrincipalCredentialType = servicePrincipalCredentialType; + ServicePrincipalEmbeddedCert = servicePrincipalEmbeddedCert; + ServicePrincipalEmbeddedCertPassword = servicePrincipalEmbeddedCertPassword; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the base URL of the REST service. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.url")] + public object Url { get; set; } + + /// + /// Gets or sets whether to validate server side SSL certificate when + /// connecting to the endpoint.The default value is true. Type: boolean + /// (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.enableServerCertificateValidation")] + public object EnableServerCertificateValidation { get; set; } + + /// + /// Gets or sets type of authentication used to connect to the REST + /// service. Possible values include: 'Anonymous', 'Basic', + /// 'AadServicePrincipal', 'ManagedServiceIdentity', + /// 'OAuth2ClientCredential' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets the user name used in Basic authentication type. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets the password used in Basic authentication type. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the additional HTTP headers in the request to RESTful + /// API used for authorization. Type: object (or Expression with + /// resultType object). + /// + [JsonProperty(PropertyName = "typeProperties.authHeaders")] + public object AuthHeaders { get; set; } + + /// + /// Gets or sets the application's client ID used in + /// AadServicePrincipal authentication type. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalId")] + public object ServicePrincipalId { get; set; } + + /// + /// Gets or sets the application's key used in AadServicePrincipal + /// authentication type. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalKey")] + public SecretBase ServicePrincipalKey { get; set; } + + /// + /// Gets or sets the tenant information (domain name or tenant ID) used + /// in AadServicePrincipal authentication type under which your + /// application resides. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.tenant")] + public object Tenant { get; set; } + + /// + /// Gets or sets indicates the azure cloud type of the service + /// principle auth. Allowed values are AzurePublic, AzureChina, + /// AzureUsGovernment, AzureGermany. Default value is the data factory + /// regions’ cloud type. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.azureCloudType")] + public object AzureCloudType { get; set; } + + /// + /// Gets or sets the resource you are requesting authorization to use. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.aadResourceId")] + public object AadResourceId { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets the credential reference containing authentication + /// information. + /// + [JsonProperty(PropertyName = "typeProperties.credential")] + public CredentialReference Credential { get; set; } + + /// + /// Gets or sets the client ID associated with your application. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.clientId")] + public object ClientId { get; set; } + + /// + /// Gets or sets the client secret associated with your application. + /// + [JsonProperty(PropertyName = "typeProperties.clientSecret")] + public SecretBase ClientSecret { get; set; } + + /// + /// Gets or sets the token endpoint of the authorization server to + /// acquire access token. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.tokenEndpoint")] + public object TokenEndpoint { get; set; } + + /// + /// Gets or sets the target service or resource to which the access + /// will be requested. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.resource")] + public object Resource { get; set; } + + /// + /// Gets or sets the scope of the access required. It describes what + /// kind of access will be requested. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.scope")] + public object Scope { get; set; } + + /// + /// Gets or sets the service principal credential type to use in + /// Server-To-Server authentication. 'ServicePrincipalKey' for + /// key/secret, 'ServicePrincipalCert' for certificate. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalCredentialType")] + public object ServicePrincipalCredentialType { get; set; } + + /// + /// Gets or sets specify the base64 encoded certificate of your + /// application registered in Azure Active Directory. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalEmbeddedCert")] + public SecretBase ServicePrincipalEmbeddedCert { get; set; } + + /// + /// Gets or sets specify the password of your certificate if your + /// certificate has a password and you are using AadServicePrincipal + /// authentication. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalEmbeddedCertPassword")] + public SecretBase ServicePrincipalEmbeddedCertPassword { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Url == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Url"); + } + if (AuthenticationType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AuthenticationType"); + } + if (Credential != null) + { + Credential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RestSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RestSink.cs new file mode 100644 index 000000000000..41b070919e3d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RestSink.cs @@ -0,0 +1,127 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Rest service Sink. + /// + public partial class RestSink : CopySink + { + /// + /// Initializes a new instance of the RestSink class. + /// + public RestSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RestSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The HTTP method used to call the + /// RESTful API. The default is POST. Type: string (or Expression with + /// resultType string). + /// The additional HTTP headers in the + /// request to the RESTful API. Type: key value pairs (value should be + /// string type). + /// The timeout (TimeSpan) to get an + /// HTTP response. It is the timeout to get a response, not the timeout + /// to read response data. Default value: 00:01:40. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The time to await before sending next + /// request, in milliseconds + /// Http Compression Type to Send + /// data in compressed format with Optimal Compression Level, Default + /// is None. And The Only Supported option is Gzip. Type: string (or + /// Expression with resultType string). + public RestSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object requestMethod = default(object), object additionalHeaders = default(object), object httpRequestTimeout = default(object), object requestInterval = default(object), object httpCompressionType = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + RequestMethod = requestMethod; + AdditionalHeaders = additionalHeaders; + HttpRequestTimeout = httpRequestTimeout; + RequestInterval = requestInterval; + HttpCompressionType = httpCompressionType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the HTTP method used to call the RESTful API. The + /// default is POST. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "requestMethod")] + public object RequestMethod { get; set; } + + /// + /// Gets or sets the additional HTTP headers in the request to the + /// RESTful API. Type: key value pairs (value should be string type). + /// + [JsonProperty(PropertyName = "additionalHeaders")] + public object AdditionalHeaders { get; set; } + + /// + /// Gets or sets the timeout (TimeSpan) to get an HTTP response. It is + /// the timeout to get a response, not the timeout to read response + /// data. Default value: 00:01:40. Type: string (or Expression with + /// resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "httpRequestTimeout")] + public object HttpRequestTimeout { get; set; } + + /// + /// Gets or sets the time to await before sending next request, in + /// milliseconds + /// + [JsonProperty(PropertyName = "requestInterval")] + public object RequestInterval { get; set; } + + /// + /// Gets or sets http Compression Type to Send data in compressed + /// format with Optimal Compression Level, Default is None. And The + /// Only Supported option is Gzip. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "httpCompressionType")] + public object HttpCompressionType { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RestSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RestSource.cs new file mode 100644 index 000000000000..6750f379a740 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RestSource.cs @@ -0,0 +1,141 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Rest service source. + /// + public partial class RestSource : CopySource + { + /// + /// Initializes a new instance of the RestSource class. + /// + public RestSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RestSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The HTTP method used to call the + /// RESTful API. The default is GET. Type: string (or Expression with + /// resultType string). + /// The HTTP request body to the RESTful API + /// if requestMethod is POST. Type: string (or Expression with + /// resultType string). + /// The additional HTTP headers in the + /// request to the RESTful API. Type: string (or Expression with + /// resultType string). + /// The pagination rules to compose next + /// page requests. Type: string (or Expression with resultType + /// string). + /// The timeout (TimeSpan) to get an + /// HTTP response. It is the timeout to get a response, not the timeout + /// to read response data. Default value: 00:01:40. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The time to await before sending next + /// page request. + /// Specifies the additional columns to + /// be added to source data. Type: key value pairs (value should be + /// string type). + public RestSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object requestMethod = default(object), object requestBody = default(object), object additionalHeaders = default(object), object paginationRules = default(object), object httpRequestTimeout = default(object), object requestInterval = default(object), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + RequestMethod = requestMethod; + RequestBody = requestBody; + AdditionalHeaders = additionalHeaders; + PaginationRules = paginationRules; + HttpRequestTimeout = httpRequestTimeout; + RequestInterval = requestInterval; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the HTTP method used to call the RESTful API. The + /// default is GET. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "requestMethod")] + public object RequestMethod { get; set; } + + /// + /// Gets or sets the HTTP request body to the RESTful API if + /// requestMethod is POST. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "requestBody")] + public object RequestBody { get; set; } + + /// + /// Gets or sets the additional HTTP headers in the request to the + /// RESTful API. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "additionalHeaders")] + public object AdditionalHeaders { get; set; } + + /// + /// Gets or sets the pagination rules to compose next page requests. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "paginationRules")] + public object PaginationRules { get; set; } + + /// + /// Gets or sets the timeout (TimeSpan) to get an HTTP response. It is + /// the timeout to get a response, not the timeout to read response + /// data. Default value: 00:01:40. Type: string (or Expression with + /// resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "httpRequestTimeout")] + public object HttpRequestTimeout { get; set; } + + /// + /// Gets or sets the time to await before sending next page request. + /// + [JsonProperty(PropertyName = "requestInterval")] + public object RequestInterval { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: key value pairs (value should be string type). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RetryPolicy.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RetryPolicy.cs new file mode 100644 index 000000000000..3f7162a05438 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RetryPolicy.cs @@ -0,0 +1,81 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Execution policy for an activity. + /// + public partial class RetryPolicy + { + /// + /// Initializes a new instance of the RetryPolicy class. + /// + public RetryPolicy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RetryPolicy class. + /// + /// Maximum ordinary retry attempts. Default is 0. + /// Type: integer (or Expression with resultType integer), minimum: + /// 0. + /// Interval between retries in + /// seconds. Default is 30. + public RetryPolicy(object count = default(object), int? intervalInSeconds = default(int?)) + { + Count = count; + IntervalInSeconds = intervalInSeconds; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets maximum ordinary retry attempts. Default is 0. Type: + /// integer (or Expression with resultType integer), minimum: 0. + /// + [JsonProperty(PropertyName = "count")] + public object Count { get; set; } + + /// + /// Gets or sets interval between retries in seconds. Default is 30. + /// + [JsonProperty(PropertyName = "intervalInSeconds")] + public int? IntervalInSeconds { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (IntervalInSeconds > 86400) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "IntervalInSeconds", 86400); + } + if (IntervalInSeconds < 30) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "IntervalInSeconds", 30); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RunFilterParameters.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RunFilterParameters.cs new file mode 100644 index 000000000000..91e6fbe3737f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RunFilterParameters.cs @@ -0,0 +1,120 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Query parameters for listing runs. + /// + public partial class RunFilterParameters + { + /// + /// Initializes a new instance of the RunFilterParameters class. + /// + public RunFilterParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RunFilterParameters class. + /// + /// The time at or after which the run + /// event was updated in 'ISO 8601' format. + /// The time at or before which the run + /// event was updated in 'ISO 8601' format. + /// The continuation token for getting + /// the next page of results. Null for first page. + /// List of filters. + /// List of OrderBy option. + public RunFilterParameters(System.DateTime lastUpdatedAfter, System.DateTime lastUpdatedBefore, string continuationToken = default(string), IList filters = default(IList), IList orderBy = default(IList)) + { + ContinuationToken = continuationToken; + LastUpdatedAfter = lastUpdatedAfter; + LastUpdatedBefore = lastUpdatedBefore; + Filters = filters; + OrderBy = orderBy; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the continuation token for getting the next page of + /// results. Null for first page. + /// + [JsonProperty(PropertyName = "continuationToken")] + public string ContinuationToken { get; set; } + + /// + /// Gets or sets the time at or after which the run event was updated + /// in 'ISO 8601' format. + /// + [JsonProperty(PropertyName = "lastUpdatedAfter")] + public System.DateTime LastUpdatedAfter { get; set; } + + /// + /// Gets or sets the time at or before which the run event was updated + /// in 'ISO 8601' format. + /// + [JsonProperty(PropertyName = "lastUpdatedBefore")] + public System.DateTime LastUpdatedBefore { get; set; } + + /// + /// Gets or sets list of filters. + /// + [JsonProperty(PropertyName = "filters")] + public IList Filters { get; set; } + + /// + /// Gets or sets list of OrderBy option. + /// + [JsonProperty(PropertyName = "orderBy")] + public IList OrderBy { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Filters != null) + { + foreach (var element in Filters) + { + if (element != null) + { + element.Validate(); + } + } + } + if (OrderBy != null) + { + foreach (var element1 in OrderBy) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RunQueryFilter.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RunQueryFilter.cs new file mode 100644 index 000000000000..ea7330654360 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RunQueryFilter.cs @@ -0,0 +1,110 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Query filter option for listing runs. + /// + public partial class RunQueryFilter + { + /// + /// Initializes a new instance of the RunQueryFilter class. + /// + public RunQueryFilter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RunQueryFilter class. + /// + /// Parameter name to be used for filter. The + /// allowed operands to query pipeline runs are PipelineName, RunStart, + /// RunEnd and Status; to query activity runs are ActivityName, + /// ActivityRunStart, ActivityRunEnd, ActivityType and Status, and to + /// query trigger runs are TriggerName, TriggerRunTimestamp and Status. + /// Possible values include: 'PipelineName', 'Status', 'RunStart', + /// 'RunEnd', 'ActivityName', 'ActivityRunStart', 'ActivityRunEnd', + /// 'ActivityType', 'TriggerName', 'TriggerRunTimestamp', 'RunGroupId', + /// 'LatestOnly' + /// Operator to be used for filter. + /// Possible values include: 'Equals', 'NotEquals', 'In', + /// 'NotIn' + /// List of filter values. + public RunQueryFilter(string operand, string operatorProperty, IList values) + { + Operand = operand; + OperatorProperty = operatorProperty; + Values = values; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets parameter name to be used for filter. The allowed + /// operands to query pipeline runs are PipelineName, RunStart, RunEnd + /// and Status; to query activity runs are ActivityName, + /// ActivityRunStart, ActivityRunEnd, ActivityType and Status, and to + /// query trigger runs are TriggerName, TriggerRunTimestamp and Status. + /// Possible values include: 'PipelineName', 'Status', 'RunStart', + /// 'RunEnd', 'ActivityName', 'ActivityRunStart', 'ActivityRunEnd', + /// 'ActivityType', 'TriggerName', 'TriggerRunTimestamp', 'RunGroupId', + /// 'LatestOnly' + /// + [JsonProperty(PropertyName = "operand")] + public string Operand { get; set; } + + /// + /// Gets or sets operator to be used for filter. Possible values + /// include: 'Equals', 'NotEquals', 'In', 'NotIn' + /// + [JsonProperty(PropertyName = "operator")] + public string OperatorProperty { get; set; } + + /// + /// Gets or sets list of filter values. + /// + [JsonProperty(PropertyName = "values")] + public IList Values { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Operand == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Operand"); + } + if (OperatorProperty == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "OperatorProperty"); + } + if (Values == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Values"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RunQueryFilterOperand.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RunQueryFilterOperand.cs new file mode 100644 index 000000000000..1680220315e6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RunQueryFilterOperand.cs @@ -0,0 +1,32 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for RunQueryFilterOperand. + /// + public static class RunQueryFilterOperand + { + public const string PipelineName = "PipelineName"; + public const string Status = "Status"; + public const string RunStart = "RunStart"; + public const string RunEnd = "RunEnd"; + public const string ActivityName = "ActivityName"; + public const string ActivityRunStart = "ActivityRunStart"; + public const string ActivityRunEnd = "ActivityRunEnd"; + public const string ActivityType = "ActivityType"; + public const string TriggerName = "TriggerName"; + public const string TriggerRunTimestamp = "TriggerRunTimestamp"; + public const string RunGroupId = "RunGroupId"; + public const string LatestOnly = "LatestOnly"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RunQueryFilterOperator.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RunQueryFilterOperator.cs new file mode 100644 index 000000000000..6511978c907a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RunQueryFilterOperator.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for RunQueryFilterOperator. + /// + public static class RunQueryFilterOperator + { + public const string Equals = "Equals"; + public const string NotEquals = "NotEquals"; + public const string In = "In"; + public const string NotIn = "NotIn"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RunQueryOrder.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RunQueryOrder.cs new file mode 100644 index 000000000000..38c1e3859e90 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RunQueryOrder.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for RunQueryOrder. + /// + public static class RunQueryOrder + { + public const string ASC = "ASC"; + public const string DESC = "DESC"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RunQueryOrderBy.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RunQueryOrderBy.cs new file mode 100644 index 000000000000..52350f4144be --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RunQueryOrderBy.cs @@ -0,0 +1,93 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// An object to provide order by options for listing runs. + /// + public partial class RunQueryOrderBy + { + /// + /// Initializes a new instance of the RunQueryOrderBy class. + /// + public RunQueryOrderBy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RunQueryOrderBy class. + /// + /// Parameter name to be used for order by. The + /// allowed parameters to order by for pipeline runs are PipelineName, + /// RunStart, RunEnd and Status; for activity runs are ActivityName, + /// ActivityRunStart, ActivityRunEnd and Status; for trigger runs are + /// TriggerName, TriggerRunTimestamp and Status. Possible values + /// include: 'RunStart', 'RunEnd', 'PipelineName', 'Status', + /// 'ActivityName', 'ActivityRunStart', 'ActivityRunEnd', + /// 'TriggerName', 'TriggerRunTimestamp' + /// Sorting order of the parameter. Possible values + /// include: 'ASC', 'DESC' + public RunQueryOrderBy(string orderBy, string order) + { + OrderBy = orderBy; + Order = order; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets parameter name to be used for order by. The allowed + /// parameters to order by for pipeline runs are PipelineName, + /// RunStart, RunEnd and Status; for activity runs are ActivityName, + /// ActivityRunStart, ActivityRunEnd and Status; for trigger runs are + /// TriggerName, TriggerRunTimestamp and Status. Possible values + /// include: 'RunStart', 'RunEnd', 'PipelineName', 'Status', + /// 'ActivityName', 'ActivityRunStart', 'ActivityRunEnd', + /// 'TriggerName', 'TriggerRunTimestamp' + /// + [JsonProperty(PropertyName = "orderBy")] + public string OrderBy { get; set; } + + /// + /// Gets or sets sorting order of the parameter. Possible values + /// include: 'ASC', 'DESC' + /// + [JsonProperty(PropertyName = "order")] + public string Order { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (OrderBy == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "OrderBy"); + } + if (Order == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Order"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RunQueryOrderByField.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RunQueryOrderByField.cs new file mode 100644 index 000000000000..22ac2a6964de --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/RunQueryOrderByField.cs @@ -0,0 +1,29 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for RunQueryOrderByField. + /// + public static class RunQueryOrderByField + { + public const string RunStart = "RunStart"; + public const string RunEnd = "RunEnd"; + public const string PipelineName = "PipelineName"; + public const string Status = "Status"; + public const string ActivityName = "ActivityName"; + public const string ActivityRunStart = "ActivityRunStart"; + public const string ActivityRunEnd = "ActivityRunEnd"; + public const string TriggerName = "TriggerName"; + public const string TriggerRunTimestamp = "TriggerRunTimestamp"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SSISAccessCredential.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SSISAccessCredential.cs new file mode 100644 index 000000000000..ad61ed3f9010 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SSISAccessCredential.cs @@ -0,0 +1,93 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// SSIS access credential. + /// + public partial class SSISAccessCredential + { + /// + /// Initializes a new instance of the SSISAccessCredential class. + /// + public SSISAccessCredential() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SSISAccessCredential class. + /// + /// Domain for windows authentication. Type: + /// string (or Expression with resultType string). + /// UseName for windows authentication. Type: + /// string (or Expression with resultType string). + /// Password for windows authentication. + public SSISAccessCredential(object domain, object userName, SecretBase password) + { + Domain = domain; + UserName = userName; + Password = password; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets domain for windows authentication. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "domain")] + public object Domain { get; set; } + + /// + /// Gets or sets useName for windows authentication. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "userName")] + public object UserName { get; set; } + + /// + /// Gets or sets password for windows authentication. + /// + [JsonProperty(PropertyName = "password")] + public SecretBase Password { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Domain == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Domain"); + } + if (UserName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "UserName"); + } + if (Password == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Password"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SSISChildPackage.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SSISChildPackage.cs new file mode 100644 index 000000000000..e05fea4cc933 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SSISChildPackage.cs @@ -0,0 +1,98 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// SSIS embedded child package. + /// + public partial class SSISChildPackage + { + /// + /// Initializes a new instance of the SSISChildPackage class. + /// + public SSISChildPackage() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SSISChildPackage class. + /// + /// Path for embedded child package. Type: + /// string (or Expression with resultType string). + /// Content for embedded child package. + /// Type: string (or Expression with resultType string). + /// Name for embedded child package. + /// Last modified date for + /// embedded child package. + public SSISChildPackage(object packagePath, object packageContent, string packageName = default(string), string packageLastModifiedDate = default(string)) + { + PackagePath = packagePath; + PackageName = packageName; + PackageContent = packageContent; + PackageLastModifiedDate = packageLastModifiedDate; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets path for embedded child package. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "packagePath")] + public object PackagePath { get; set; } + + /// + /// Gets or sets name for embedded child package. + /// + [JsonProperty(PropertyName = "packageName")] + public string PackageName { get; set; } + + /// + /// Gets or sets content for embedded child package. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "packageContent")] + public object PackageContent { get; set; } + + /// + /// Gets or sets last modified date for embedded child package. + /// + [JsonProperty(PropertyName = "packageLastModifiedDate")] + public string PackageLastModifiedDate { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (PackagePath == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PackagePath"); + } + if (PackageContent == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PackageContent"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SSISExecutionCredential.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SSISExecutionCredential.cs new file mode 100644 index 000000000000..fd06f3504742 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SSISExecutionCredential.cs @@ -0,0 +1,97 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// SSIS package execution credential. + /// + public partial class SSISExecutionCredential + { + /// + /// Initializes a new instance of the SSISExecutionCredential class. + /// + public SSISExecutionCredential() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SSISExecutionCredential class. + /// + /// Domain for windows authentication. Type: + /// string (or Expression with resultType string). + /// UseName for windows authentication. Type: + /// string (or Expression with resultType string). + /// Password for windows authentication. + public SSISExecutionCredential(object domain, object userName, SecureString password) + { + Domain = domain; + UserName = userName; + Password = password; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets domain for windows authentication. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "domain")] + public object Domain { get; set; } + + /// + /// Gets or sets useName for windows authentication. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "userName")] + public object UserName { get; set; } + + /// + /// Gets or sets password for windows authentication. + /// + [JsonProperty(PropertyName = "password")] + public SecureString Password { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Domain == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Domain"); + } + if (UserName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "UserName"); + } + if (Password == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Password"); + } + if (Password != null) + { + Password.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SSISExecutionParameter.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SSISExecutionParameter.cs new file mode 100644 index 000000000000..b170a0ca6a91 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SSISExecutionParameter.cs @@ -0,0 +1,67 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// SSIS execution parameter. + /// + public partial class SSISExecutionParameter + { + /// + /// Initializes a new instance of the SSISExecutionParameter class. + /// + public SSISExecutionParameter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SSISExecutionParameter class. + /// + /// SSIS package execution parameter value. Type: + /// string (or Expression with resultType string). + public SSISExecutionParameter(object value) + { + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SSIS package execution parameter value. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "value")] + public object Value { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Value == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Value"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SSISLogLocation.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SSISLogLocation.cs new file mode 100644 index 000000000000..39c5ad5cb5af --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SSISLogLocation.cs @@ -0,0 +1,109 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// SSIS package execution log location + /// + [Rest.Serialization.JsonTransformation] + public partial class SSISLogLocation + { + /// + /// Initializes a new instance of the SSISLogLocation class. + /// + public SSISLogLocation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SSISLogLocation class. + /// + /// The SSIS package execution log path. Type: + /// string (or Expression with resultType string). + /// The package execution log access + /// credential. + /// Specifies the interval to refresh + /// log. The default interval is 5 minutes. Type: string (or Expression + /// with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + public SSISLogLocation(object logPath, SSISAccessCredential accessCredential = default(SSISAccessCredential), object logRefreshInterval = default(object)) + { + LogPath = logPath; + AccessCredential = accessCredential; + LogRefreshInterval = logRefreshInterval; + CustomInit(); + } + /// + /// Static constructor for SSISLogLocation class. + /// + static SSISLogLocation() + { + Type = "File"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the SSIS package execution log path. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "logPath")] + public object LogPath { get; set; } + + /// + /// Gets or sets the package execution log access credential. + /// + [JsonProperty(PropertyName = "typeProperties.accessCredential")] + public SSISAccessCredential AccessCredential { get; set; } + + /// + /// Gets or sets specifies the interval to refresh log. The default + /// interval is 5 minutes. Type: string (or Expression with resultType + /// string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "typeProperties.logRefreshInterval")] + public object LogRefreshInterval { get; set; } + + /// + /// The type of SSIS log location. + /// + [JsonProperty(PropertyName = "type")] + public static string Type { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (LogPath == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "LogPath"); + } + if (AccessCredential != null) + { + AccessCredential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SSISPackageLocation.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SSISPackageLocation.cs new file mode 100644 index 000000000000..0c6083576c94 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SSISPackageLocation.cs @@ -0,0 +1,169 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// SSIS package location. + /// + [Rest.Serialization.JsonTransformation] + public partial class SSISPackageLocation + { + /// + /// Initializes a new instance of the SSISPackageLocation class. + /// + public SSISPackageLocation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SSISPackageLocation class. + /// + /// The SSIS package path. Type: string (or + /// Expression with resultType string). + /// The type of SSIS package location. Possible + /// values include: 'SSISDB', 'File', 'InlinePackage', + /// 'PackageStore' + /// Password of the package. + /// The package access + /// credential. + /// The configuration file of the + /// package execution. Type: string (or Expression with resultType + /// string). + /// The configuration file + /// access credential. + /// The package name. + /// The embedded package content. Type: + /// string (or Expression with resultType string). + /// The embedded package last + /// modified date. + /// The embedded child package + /// list. + public SSISPackageLocation(object packagePath = default(object), string type = default(string), SecretBase packagePassword = default(SecretBase), SSISAccessCredential accessCredential = default(SSISAccessCredential), object configurationPath = default(object), SSISAccessCredential configurationAccessCredential = default(SSISAccessCredential), string packageName = default(string), object packageContent = default(object), string packageLastModifiedDate = default(string), IList childPackages = default(IList)) + { + PackagePath = packagePath; + Type = type; + PackagePassword = packagePassword; + AccessCredential = accessCredential; + ConfigurationPath = configurationPath; + ConfigurationAccessCredential = configurationAccessCredential; + PackageName = packageName; + PackageContent = packageContent; + PackageLastModifiedDate = packageLastModifiedDate; + ChildPackages = childPackages; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the SSIS package path. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "packagePath")] + public object PackagePath { get; set; } + + /// + /// Gets or sets the type of SSIS package location. Possible values + /// include: 'SSISDB', 'File', 'InlinePackage', 'PackageStore' + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets password of the package. + /// + [JsonProperty(PropertyName = "typeProperties.packagePassword")] + public SecretBase PackagePassword { get; set; } + + /// + /// Gets or sets the package access credential. + /// + [JsonProperty(PropertyName = "typeProperties.accessCredential")] + public SSISAccessCredential AccessCredential { get; set; } + + /// + /// Gets or sets the configuration file of the package execution. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.configurationPath")] + public object ConfigurationPath { get; set; } + + /// + /// Gets or sets the configuration file access credential. + /// + [JsonProperty(PropertyName = "typeProperties.configurationAccessCredential")] + public SSISAccessCredential ConfigurationAccessCredential { get; set; } + + /// + /// Gets or sets the package name. + /// + [JsonProperty(PropertyName = "typeProperties.packageName")] + public string PackageName { get; set; } + + /// + /// Gets or sets the embedded package content. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.packageContent")] + public object PackageContent { get; set; } + + /// + /// Gets or sets the embedded package last modified date. + /// + [JsonProperty(PropertyName = "typeProperties.packageLastModifiedDate")] + public string PackageLastModifiedDate { get; set; } + + /// + /// Gets or sets the embedded child package list. + /// + [JsonProperty(PropertyName = "typeProperties.childPackages")] + public IList ChildPackages { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (AccessCredential != null) + { + AccessCredential.Validate(); + } + if (ConfigurationAccessCredential != null) + { + ConfigurationAccessCredential.Validate(); + } + if (ChildPackages != null) + { + foreach (var element in ChildPackages) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SSISPropertyOverride.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SSISPropertyOverride.cs new file mode 100644 index 000000000000..85ac8d0eea82 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SSISPropertyOverride.cs @@ -0,0 +1,78 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// SSIS property override. + /// + public partial class SSISPropertyOverride + { + /// + /// Initializes a new instance of the SSISPropertyOverride class. + /// + public SSISPropertyOverride() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SSISPropertyOverride class. + /// + /// SSIS package property override value. Type: + /// string (or Expression with resultType string). + /// Whether SSIS package property override + /// value is sensitive data. Value will be encrypted in SSISDB if it is + /// true + public SSISPropertyOverride(object value, bool? isSensitive = default(bool?)) + { + Value = value; + IsSensitive = isSensitive; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SSIS package property override value. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "value")] + public object Value { get; set; } + + /// + /// Gets or sets whether SSIS package property override value is + /// sensitive data. Value will be encrypted in SSISDB if it is true + /// + [JsonProperty(PropertyName = "isSensitive")] + public bool? IsSensitive { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Value == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Value"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceLinkedService.cs new file mode 100644 index 000000000000..823c49bf06c2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceLinkedService.cs @@ -0,0 +1,139 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for Salesforce. + /// + [Newtonsoft.Json.JsonObject("Salesforce")] + [Rest.Serialization.JsonTransformation] + public partial class SalesforceLinkedService : LinkedService + { + /// + /// Initializes a new instance of the SalesforceLinkedService class. + /// + public SalesforceLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SalesforceLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The URL of Salesforce instance. + /// Default is 'https://login.salesforce.com'. To copy data from + /// sandbox, specify 'https://test.salesforce.com'. To copy data from + /// custom domain, specify, for example, + /// 'https://[domain].my.salesforce.com'. Type: string (or Expression + /// with resultType string). + /// The username for Basic authentication of the + /// Salesforce instance. Type: string (or Expression with resultType + /// string). + /// The password for Basic authentication of the + /// Salesforce instance. + /// The security token is optional to + /// remotely access Salesforce instance. + /// The Salesforce API version used in ADF. + /// Type: string (or Expression with resultType string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public SalesforceLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object environmentUrl = default(object), object username = default(object), SecretBase password = default(SecretBase), SecretBase securityToken = default(SecretBase), object apiVersion = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + EnvironmentUrl = environmentUrl; + Username = username; + Password = password; + SecurityToken = securityToken; + ApiVersion = apiVersion; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the URL of Salesforce instance. Default is + /// 'https://login.salesforce.com'. To copy data from sandbox, specify + /// 'https://test.salesforce.com'. To copy data from custom domain, + /// specify, for example, 'https://[domain].my.salesforce.com'. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.environmentUrl")] + public object EnvironmentUrl { get; set; } + + /// + /// Gets or sets the username for Basic authentication of the + /// Salesforce instance. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets the password for Basic authentication of the + /// Salesforce instance. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the security token is optional to remotely access + /// Salesforce instance. + /// + [JsonProperty(PropertyName = "typeProperties.securityToken")] + public SecretBase SecurityToken { get; set; } + + /// + /// Gets or sets the Salesforce API version used in ADF. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.apiVersion")] + public object ApiVersion { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceMarketingCloudLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceMarketingCloudLinkedService.cs new file mode 100644 index 000000000000..55a3f2bb19b2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceMarketingCloudLinkedService.cs @@ -0,0 +1,158 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Salesforce Marketing Cloud linked service. + /// + [Newtonsoft.Json.JsonObject("SalesforceMarketingCloud")] + [Rest.Serialization.JsonTransformation] + public partial class SalesforceMarketingCloudLinkedService : LinkedService + { + /// + /// Initializes a new instance of the + /// SalesforceMarketingCloudLinkedService class. + /// + public SalesforceMarketingCloudLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// SalesforceMarketingCloudLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Properties used to connect to + /// Salesforce Marketing Cloud. It is mutually exclusive with any other + /// properties in the linked service. Type: object. + /// The client ID associated with the Salesforce + /// Marketing Cloud application. Type: string (or Expression with + /// resultType string). + /// The client secret associated with the + /// Salesforce Marketing Cloud application. Type: string (or Expression + /// with resultType string). + /// Specifies whether the data + /// source endpoints are encrypted using HTTPS. The default value is + /// true. Type: boolean (or Expression with resultType + /// boolean). + /// Specifies whether to require the + /// host name in the server's certificate to match the host name of the + /// server when connecting over SSL. The default value is true. Type: + /// boolean (or Expression with resultType boolean). + /// Specifies whether to verify the + /// identity of the server when connecting over SSL. The default value + /// is true. Type: boolean (or Expression with resultType + /// boolean). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public SalesforceMarketingCloudLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object connectionProperties = default(object), object clientId = default(object), SecretBase clientSecret = default(SecretBase), object useEncryptedEndpoints = default(object), object useHostVerification = default(object), object usePeerVerification = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionProperties = connectionProperties; + ClientId = clientId; + ClientSecret = clientSecret; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets properties used to connect to Salesforce Marketing + /// Cloud. It is mutually exclusive with any other properties in the + /// linked service. Type: object. + /// + [JsonProperty(PropertyName = "typeProperties.connectionProperties")] + public object ConnectionProperties { get; set; } + + /// + /// Gets or sets the client ID associated with the Salesforce Marketing + /// Cloud application. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.clientId")] + public object ClientId { get; set; } + + /// + /// Gets or sets the client secret associated with the Salesforce + /// Marketing Cloud application. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.clientSecret")] + public SecretBase ClientSecret { get; set; } + + /// + /// Gets or sets specifies whether the data source endpoints are + /// encrypted using HTTPS. The default value is true. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.useEncryptedEndpoints")] + public object UseEncryptedEndpoints { get; set; } + + /// + /// Gets or sets specifies whether to require the host name in the + /// server's certificate to match the host name of the server when + /// connecting over SSL. The default value is true. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.useHostVerification")] + public object UseHostVerification { get; set; } + + /// + /// Gets or sets specifies whether to verify the identity of the server + /// when connecting over SSL. The default value is true. Type: boolean + /// (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.usePeerVerification")] + public object UsePeerVerification { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceMarketingCloudObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceMarketingCloudObjectDataset.cs new file mode 100644 index 000000000000..0755931cf14a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceMarketingCloudObjectDataset.cs @@ -0,0 +1,88 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Salesforce Marketing Cloud dataset. + /// + [Newtonsoft.Json.JsonObject("SalesforceMarketingCloudObject")] + [Rest.Serialization.JsonTransformation] + public partial class SalesforceMarketingCloudObjectDataset : Dataset + { + /// + /// Initializes a new instance of the + /// SalesforceMarketingCloudObjectDataset class. + /// + public SalesforceMarketingCloudObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// SalesforceMarketingCloudObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name. Type: string (or Expression + /// with resultType string). + public SalesforceMarketingCloudObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceMarketingCloudSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceMarketingCloudSource.cs new file mode 100644 index 000000000000..bb865a2ac339 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceMarketingCloudSource.cs @@ -0,0 +1,77 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Salesforce Marketing Cloud source. + /// + public partial class SalesforceMarketingCloudSource : TabularSource + { + /// + /// Initializes a new instance of the SalesforceMarketingCloudSource + /// class. + /// + public SalesforceMarketingCloudSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SalesforceMarketingCloudSource + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public SalesforceMarketingCloudSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceObjectDataset.cs new file mode 100644 index 000000000000..6662eff3e4e9 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceObjectDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Salesforce object dataset. + /// + [Newtonsoft.Json.JsonObject("SalesforceObject")] + [Rest.Serialization.JsonTransformation] + public partial class SalesforceObjectDataset : Dataset + { + /// + /// Initializes a new instance of the SalesforceObjectDataset class. + /// + public SalesforceObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the SalesforceObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The Salesforce object API name. Type: + /// string (or Expression with resultType string). + public SalesforceObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object objectApiName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + ObjectApiName = objectApiName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Salesforce object API name. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.objectApiName")] + public object ObjectApiName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceServiceCloudLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceServiceCloudLinkedService.cs new file mode 100644 index 000000000000..84394d8e51fc --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceServiceCloudLinkedService.cs @@ -0,0 +1,152 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for Salesforce Service Cloud. + /// + [Newtonsoft.Json.JsonObject("SalesforceServiceCloud")] + [Rest.Serialization.JsonTransformation] + public partial class SalesforceServiceCloudLinkedService : LinkedService + { + /// + /// Initializes a new instance of the + /// SalesforceServiceCloudLinkedService class. + /// + public SalesforceServiceCloudLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// SalesforceServiceCloudLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The URL of Salesforce Service Cloud + /// instance. Default is 'https://login.salesforce.com'. To copy data + /// from sandbox, specify 'https://test.salesforce.com'. To copy data + /// from custom domain, specify, for example, + /// 'https://[domain].my.salesforce.com'. Type: string (or Expression + /// with resultType string). + /// The username for Basic authentication of the + /// Salesforce instance. Type: string (or Expression with resultType + /// string). + /// The password for Basic authentication of the + /// Salesforce instance. + /// The security token is optional to + /// remotely access Salesforce instance. + /// The Salesforce API version used in ADF. + /// Type: string (or Expression with resultType string). + /// Extended properties appended to + /// the connection string. Type: string (or Expression with resultType + /// string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public SalesforceServiceCloudLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object environmentUrl = default(object), object username = default(object), SecretBase password = default(SecretBase), SecretBase securityToken = default(SecretBase), object apiVersion = default(object), object extendedProperties = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + EnvironmentUrl = environmentUrl; + Username = username; + Password = password; + SecurityToken = securityToken; + ApiVersion = apiVersion; + ExtendedProperties = extendedProperties; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the URL of Salesforce Service Cloud instance. Default + /// is 'https://login.salesforce.com'. To copy data from sandbox, + /// specify 'https://test.salesforce.com'. To copy data from custom + /// domain, specify, for example, 'https://[domain].my.salesforce.com'. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.environmentUrl")] + public object EnvironmentUrl { get; set; } + + /// + /// Gets or sets the username for Basic authentication of the + /// Salesforce instance. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets the password for Basic authentication of the + /// Salesforce instance. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the security token is optional to remotely access + /// Salesforce instance. + /// + [JsonProperty(PropertyName = "typeProperties.securityToken")] + public SecretBase SecurityToken { get; set; } + + /// + /// Gets or sets the Salesforce API version used in ADF. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.apiVersion")] + public object ApiVersion { get; set; } + + /// + /// Gets or sets extended properties appended to the connection string. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.extendedProperties")] + public object ExtendedProperties { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceServiceCloudObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceServiceCloudObjectDataset.cs new file mode 100644 index 000000000000..9b5749e9939f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceServiceCloudObjectDataset.cs @@ -0,0 +1,88 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Salesforce Service Cloud object dataset. + /// + [Newtonsoft.Json.JsonObject("SalesforceServiceCloudObject")] + [Rest.Serialization.JsonTransformation] + public partial class SalesforceServiceCloudObjectDataset : Dataset + { + /// + /// Initializes a new instance of the + /// SalesforceServiceCloudObjectDataset class. + /// + public SalesforceServiceCloudObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// SalesforceServiceCloudObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The Salesforce Service Cloud object API + /// name. Type: string (or Expression with resultType string). + public SalesforceServiceCloudObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object objectApiName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + ObjectApiName = objectApiName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Salesforce Service Cloud object API name. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.objectApiName")] + public object ObjectApiName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceServiceCloudSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceServiceCloudSink.cs new file mode 100644 index 000000000000..86c399b738e0 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceServiceCloudSink.cs @@ -0,0 +1,111 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Salesforce Service Cloud sink. + /// + public partial class SalesforceServiceCloudSink : CopySink + { + /// + /// Initializes a new instance of the SalesforceServiceCloudSink class. + /// + public SalesforceServiceCloudSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SalesforceServiceCloudSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The write behavior for the operation. + /// Default is Insert. Possible values include: 'Insert', + /// 'Upsert' + /// The name of the external ID field + /// for upsert operation. Default value is 'Id' column. Type: string + /// (or Expression with resultType string). + /// The flag indicating whether or not + /// to ignore null values from input dataset (except key fields) during + /// write operation. Default value is false. If set it to true, it + /// means ADF will leave the data in the destination object unchanged + /// when doing upsert/update operation and insert defined default value + /// when doing insert operation, versus ADF will update the data in the + /// destination object to NULL when doing upsert/update operation and + /// insert NULL value when doing insert operation. Type: boolean (or + /// Expression with resultType boolean). + public SalesforceServiceCloudSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), string writeBehavior = default(string), object externalIdFieldName = default(object), object ignoreNullValues = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + WriteBehavior = writeBehavior; + ExternalIdFieldName = externalIdFieldName; + IgnoreNullValues = ignoreNullValues; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the write behavior for the operation. Default is + /// Insert. Possible values include: 'Insert', 'Upsert' + /// + [JsonProperty(PropertyName = "writeBehavior")] + public string WriteBehavior { get; set; } + + /// + /// Gets or sets the name of the external ID field for upsert + /// operation. Default value is 'Id' column. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "externalIdFieldName")] + public object ExternalIdFieldName { get; set; } + + /// + /// Gets or sets the flag indicating whether or not to ignore null + /// values from input dataset (except key fields) during write + /// operation. Default value is false. If set it to true, it means ADF + /// will leave the data in the destination object unchanged when doing + /// upsert/update operation and insert defined default value when doing + /// insert operation, versus ADF will update the data in the + /// destination object to NULL when doing upsert/update operation and + /// insert NULL value when doing insert operation. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "ignoreNullValues")] + public object IgnoreNullValues { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceServiceCloudSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceServiceCloudSource.cs new file mode 100644 index 000000000000..07672b36b960 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceServiceCloudSource.cs @@ -0,0 +1,95 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Salesforce Service Cloud source. + /// + public partial class SalesforceServiceCloudSource : CopySource + { + /// + /// Initializes a new instance of the SalesforceServiceCloudSource + /// class. + /// + public SalesforceServiceCloudSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SalesforceServiceCloudSource + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Database query. Type: string (or Expression + /// with resultType string). + /// The read behavior for the operation. + /// Default is Query. Allowed values: Query/QueryAll. Type: string (or + /// Expression with resultType string). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public SalesforceServiceCloudSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object query = default(object), object readBehavior = default(object), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + Query = query; + ReadBehavior = readBehavior; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets database query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets the read behavior for the operation. Default is Query. + /// Allowed values: Query/QueryAll. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "readBehavior")] + public object ReadBehavior { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceServiceCloudV2LinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceServiceCloudV2LinkedService.cs new file mode 100644 index 000000000000..9151120b6afe --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceServiceCloudV2LinkedService.cs @@ -0,0 +1,142 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for Salesforce Service Cloud V2. + /// + [Newtonsoft.Json.JsonObject("SalesforceServiceCloudV2")] + [Rest.Serialization.JsonTransformation] + public partial class SalesforceServiceCloudV2LinkedService : LinkedService + { + /// + /// Initializes a new instance of the + /// SalesforceServiceCloudV2LinkedService class. + /// + public SalesforceServiceCloudV2LinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// SalesforceServiceCloudV2LinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The URL of Salesforce Service Cloud + /// instance. For example, 'https://[domain].my.salesforce.com'. Type: + /// string (or Expression with resultType string). + /// The authentication type to be used + /// to connect to the Salesforce. Currently, we only support + /// OAuth2ClientCredentials, it is also the default value + /// The client Id for OAuth 2.0 Client + /// Credentials Flow authentication of the Salesforce instance. Type: + /// string (or Expression with resultType string). + /// The client secret for OAuth 2.0 Client + /// Credentials Flow authentication of the Salesforce instance. + /// The Salesforce API version used in ADF. + /// The version must be larger than or equal to 47.0 which is required + /// by Salesforce BULK API 2.0. Type: string (or Expression with + /// resultType string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public SalesforceServiceCloudV2LinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object environmentUrl = default(object), object authenticationType = default(object), object clientId = default(object), SecretBase clientSecret = default(SecretBase), object apiVersion = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + EnvironmentUrl = environmentUrl; + AuthenticationType = authenticationType; + ClientId = clientId; + ClientSecret = clientSecret; + ApiVersion = apiVersion; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the URL of Salesforce Service Cloud instance. For + /// example, 'https://[domain].my.salesforce.com'. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.environmentUrl")] + public object EnvironmentUrl { get; set; } + + /// + /// Gets or sets the authentication type to be used to connect to the + /// Salesforce. Currently, we only support OAuth2ClientCredentials, it + /// is also the default value + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public object AuthenticationType { get; set; } + + /// + /// Gets or sets the client Id for OAuth 2.0 Client Credentials Flow + /// authentication of the Salesforce instance. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.clientId")] + public object ClientId { get; set; } + + /// + /// Gets or sets the client secret for OAuth 2.0 Client Credentials + /// Flow authentication of the Salesforce instance. + /// + [JsonProperty(PropertyName = "typeProperties.clientSecret")] + public SecretBase ClientSecret { get; set; } + + /// + /// Gets or sets the Salesforce API version used in ADF. The version + /// must be larger than or equal to 47.0 which is required by + /// Salesforce BULK API 2.0. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.apiVersion")] + public object ApiVersion { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceServiceCloudV2ObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceServiceCloudV2ObjectDataset.cs new file mode 100644 index 000000000000..0ce32ab807e5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceServiceCloudV2ObjectDataset.cs @@ -0,0 +1,99 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Salesforce Service Cloud V2 object dataset. + /// + [Newtonsoft.Json.JsonObject("SalesforceServiceCloudV2Object")] + [Rest.Serialization.JsonTransformation] + public partial class SalesforceServiceCloudV2ObjectDataset : Dataset + { + /// + /// Initializes a new instance of the + /// SalesforceServiceCloudV2ObjectDataset class. + /// + public SalesforceServiceCloudV2ObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// SalesforceServiceCloudV2ObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The Salesforce Service Cloud V2 object + /// API name. Type: string (or Expression with resultType + /// string). + /// The Salesforce Service Cloud V2 reportId. + /// Type: string (or Expression with resultType string). + public SalesforceServiceCloudV2ObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object objectApiName = default(object), object reportId = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + ObjectApiName = objectApiName; + ReportId = reportId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Salesforce Service Cloud V2 object API name. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.objectApiName")] + public object ObjectApiName { get; set; } + + /// + /// Gets or sets the Salesforce Service Cloud V2 reportId. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.reportId")] + public object ReportId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceServiceCloudV2Sink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceServiceCloudV2Sink.cs new file mode 100644 index 000000000000..9f6298a24c1f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceServiceCloudV2Sink.cs @@ -0,0 +1,113 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Salesforce Service Cloud V2 sink. + /// + public partial class SalesforceServiceCloudV2Sink : CopySink + { + /// + /// Initializes a new instance of the SalesforceServiceCloudV2Sink + /// class. + /// + public SalesforceServiceCloudV2Sink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SalesforceServiceCloudV2Sink + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The write behavior for the operation. + /// Default is Insert. Possible values include: 'Insert', + /// 'Upsert' + /// The name of the external ID field + /// for upsert operation. Default value is 'Id' column. Type: string + /// (or Expression with resultType string). + /// The flag indicating whether or not + /// to ignore null values from input dataset (except key fields) during + /// write operation. Default value is false. If set it to true, it + /// means ADF will leave the data in the destination object unchanged + /// when doing upsert/update operation and insert defined default value + /// when doing insert operation, versus ADF will update the data in the + /// destination object to NULL when doing upsert/update operation and + /// insert NULL value when doing insert operation. Type: boolean (or + /// Expression with resultType boolean). + public SalesforceServiceCloudV2Sink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), string writeBehavior = default(string), object externalIdFieldName = default(object), object ignoreNullValues = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + WriteBehavior = writeBehavior; + ExternalIdFieldName = externalIdFieldName; + IgnoreNullValues = ignoreNullValues; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the write behavior for the operation. Default is + /// Insert. Possible values include: 'Insert', 'Upsert' + /// + [JsonProperty(PropertyName = "writeBehavior")] + public string WriteBehavior { get; set; } + + /// + /// Gets or sets the name of the external ID field for upsert + /// operation. Default value is 'Id' column. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "externalIdFieldName")] + public object ExternalIdFieldName { get; set; } + + /// + /// Gets or sets the flag indicating whether or not to ignore null + /// values from input dataset (except key fields) during write + /// operation. Default value is false. If set it to true, it means ADF + /// will leave the data in the destination object unchanged when doing + /// upsert/update operation and insert defined default value when doing + /// insert operation, versus ADF will update the data in the + /// destination object to NULL when doing upsert/update operation and + /// insert NULL value when doing insert operation. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "ignoreNullValues")] + public object IgnoreNullValues { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceServiceCloudV2Source.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceServiceCloudV2Source.cs new file mode 100644 index 000000000000..7ee90917c465 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceServiceCloudV2Source.cs @@ -0,0 +1,116 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Salesforce Service Cloud V2 source. + /// + public partial class SalesforceServiceCloudV2Source : CopySource + { + /// + /// Initializes a new instance of the SalesforceServiceCloudV2Source + /// class. + /// + public SalesforceServiceCloudV2Source() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SalesforceServiceCloudV2Source + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Deprecating, please use 'query' property + /// instead. Type: string (or Expression with resultType + /// string). + /// You can only use Salesforce Object Query + /// Language (SOQL) query with limitations. For SOQL limitations, see + /// this article: + /// https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/queries.htm#SOQL%20Considerations. + /// If query is not specified, all the data of the Salesforce object + /// specified in ObjectApiName/reportId in dataset will be retrieved. + /// Type: string (or Expression with resultType string). + /// This property control whether + /// query result contains Deleted objects. Default is false. Type: + /// boolean (or Expression with resultType boolean). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public SalesforceServiceCloudV2Source(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object sOQLQuery = default(object), object query = default(object), object includeDeletedObjects = default(object), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + SOQLQuery = sOQLQuery; + Query = query; + IncludeDeletedObjects = includeDeletedObjects; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets deprecating, please use 'query' property instead. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "SOQLQuery")] + public object SOQLQuery { get; set; } + + /// + /// Gets or sets you can only use Salesforce Object Query Language + /// (SOQL) query with limitations. For SOQL limitations, see this + /// article: + /// https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/queries.htm#SOQL%20Considerations. + /// If query is not specified, all the data of the Salesforce object + /// specified in ObjectApiName/reportId in dataset will be retrieved. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets this property control whether query result contains + /// Deleted objects. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// + [JsonProperty(PropertyName = "includeDeletedObjects")] + public object IncludeDeletedObjects { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceSink.cs new file mode 100644 index 000000000000..ff40feef168d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceSink.cs @@ -0,0 +1,111 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Salesforce sink. + /// + public partial class SalesforceSink : CopySink + { + /// + /// Initializes a new instance of the SalesforceSink class. + /// + public SalesforceSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SalesforceSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The write behavior for the operation. + /// Default is Insert. Possible values include: 'Insert', + /// 'Upsert' + /// The name of the external ID field + /// for upsert operation. Default value is 'Id' column. Type: string + /// (or Expression with resultType string). + /// The flag indicating whether or not + /// to ignore null values from input dataset (except key fields) during + /// write operation. Default value is false. If set it to true, it + /// means ADF will leave the data in the destination object unchanged + /// when doing upsert/update operation and insert defined default value + /// when doing insert operation, versus ADF will update the data in the + /// destination object to NULL when doing upsert/update operation and + /// insert NULL value when doing insert operation. Type: boolean (or + /// Expression with resultType boolean). + public SalesforceSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), string writeBehavior = default(string), object externalIdFieldName = default(object), object ignoreNullValues = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + WriteBehavior = writeBehavior; + ExternalIdFieldName = externalIdFieldName; + IgnoreNullValues = ignoreNullValues; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the write behavior for the operation. Default is + /// Insert. Possible values include: 'Insert', 'Upsert' + /// + [JsonProperty(PropertyName = "writeBehavior")] + public string WriteBehavior { get; set; } + + /// + /// Gets or sets the name of the external ID field for upsert + /// operation. Default value is 'Id' column. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "externalIdFieldName")] + public object ExternalIdFieldName { get; set; } + + /// + /// Gets or sets the flag indicating whether or not to ignore null + /// values from input dataset (except key fields) during write + /// operation. Default value is false. If set it to true, it means ADF + /// will leave the data in the destination object unchanged when doing + /// upsert/update operation and insert defined default value when doing + /// insert operation, versus ADF will update the data in the + /// destination object to NULL when doing upsert/update operation and + /// insert NULL value when doing insert operation. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "ignoreNullValues")] + public object IgnoreNullValues { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceSinkWriteBehavior.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceSinkWriteBehavior.cs new file mode 100644 index 000000000000..be7d87590235 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceSinkWriteBehavior.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for SalesforceSinkWriteBehavior. + /// + public static class SalesforceSinkWriteBehavior + { + public const string Insert = "Insert"; + public const string Upsert = "Upsert"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceSource.cs new file mode 100644 index 000000000000..4c274b753e8c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceSource.cs @@ -0,0 +1,87 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Salesforce source. + /// + public partial class SalesforceSource : TabularSource + { + /// + /// Initializes a new instance of the SalesforceSource class. + /// + public SalesforceSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SalesforceSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// Database query. Type: string (or Expression + /// with resultType string). + /// The read behavior for the operation. + /// Default is Query. Allowed values: Query/QueryAll. Type: string (or + /// Expression with resultType string). + public SalesforceSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object), object readBehavior = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + ReadBehavior = readBehavior; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets database query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets the read behavior for the operation. Default is Query. + /// Allowed values: Query/QueryAll. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "readBehavior")] + public object ReadBehavior { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceSourceReadBehavior.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceSourceReadBehavior.cs new file mode 100644 index 000000000000..7b2454b345fe --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceSourceReadBehavior.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for SalesforceSourceReadBehavior. + /// + public static class SalesforceSourceReadBehavior + { + public const string Query = "Query"; + public const string QueryAll = "QueryAll"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceV2LinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceV2LinkedService.cs new file mode 100644 index 000000000000..2d766fc72f05 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceV2LinkedService.cs @@ -0,0 +1,140 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for Salesforce V2. + /// + [Newtonsoft.Json.JsonObject("SalesforceV2")] + [Rest.Serialization.JsonTransformation] + public partial class SalesforceV2LinkedService : LinkedService + { + /// + /// Initializes a new instance of the SalesforceV2LinkedService class. + /// + public SalesforceV2LinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SalesforceV2LinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The URL of Salesforce instance. For + /// example, 'https://[domain].my.salesforce.com'. Type: string (or + /// Expression with resultType string). + /// The authentication type to be used + /// to connect to the Salesforce. Currently, we only support + /// OAuth2ClientCredentials, it is also the default value + /// The client Id for OAuth 2.0 Client + /// Credentials Flow authentication of the Salesforce instance. Type: + /// string (or Expression with resultType string). + /// The client secret for OAuth 2.0 Client + /// Credentials Flow authentication of the Salesforce instance. + /// The Salesforce API version used in ADF. + /// The version must be larger than or equal to 47.0 which is required + /// by Salesforce BULK API 2.0. Type: string (or Expression with + /// resultType string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public SalesforceV2LinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object environmentUrl = default(object), object authenticationType = default(object), object clientId = default(object), SecretBase clientSecret = default(SecretBase), object apiVersion = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + EnvironmentUrl = environmentUrl; + AuthenticationType = authenticationType; + ClientId = clientId; + ClientSecret = clientSecret; + ApiVersion = apiVersion; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the URL of Salesforce instance. For example, + /// 'https://[domain].my.salesforce.com'. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.environmentUrl")] + public object EnvironmentUrl { get; set; } + + /// + /// Gets or sets the authentication type to be used to connect to the + /// Salesforce. Currently, we only support OAuth2ClientCredentials, it + /// is also the default value + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public object AuthenticationType { get; set; } + + /// + /// Gets or sets the client Id for OAuth 2.0 Client Credentials Flow + /// authentication of the Salesforce instance. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.clientId")] + public object ClientId { get; set; } + + /// + /// Gets or sets the client secret for OAuth 2.0 Client Credentials + /// Flow authentication of the Salesforce instance. + /// + [JsonProperty(PropertyName = "typeProperties.clientSecret")] + public SecretBase ClientSecret { get; set; } + + /// + /// Gets or sets the Salesforce API version used in ADF. The version + /// must be larger than or equal to 47.0 which is required by + /// Salesforce BULK API 2.0. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.apiVersion")] + public object ApiVersion { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceV2ObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceV2ObjectDataset.cs new file mode 100644 index 000000000000..9b4e775852d5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceV2ObjectDataset.cs @@ -0,0 +1,96 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Salesforce V2 object dataset. + /// + [Newtonsoft.Json.JsonObject("SalesforceV2Object")] + [Rest.Serialization.JsonTransformation] + public partial class SalesforceV2ObjectDataset : Dataset + { + /// + /// Initializes a new instance of the SalesforceV2ObjectDataset class. + /// + public SalesforceV2ObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the SalesforceV2ObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The Salesforce V2 object API name. + /// Type: string (or Expression with resultType string). + /// The Salesforce V2 report Id. Type: string + /// (or Expression with resultType string). + public SalesforceV2ObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object objectApiName = default(object), object reportId = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + ObjectApiName = objectApiName; + ReportId = reportId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Salesforce V2 object API name. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.objectApiName")] + public object ObjectApiName { get; set; } + + /// + /// Gets or sets the Salesforce V2 report Id. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.reportId")] + public object ReportId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceV2Sink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceV2Sink.cs new file mode 100644 index 000000000000..65f4b4b76eb7 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceV2Sink.cs @@ -0,0 +1,111 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Salesforce V2 sink. + /// + public partial class SalesforceV2Sink : CopySink + { + /// + /// Initializes a new instance of the SalesforceV2Sink class. + /// + public SalesforceV2Sink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SalesforceV2Sink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The write behavior for the operation. + /// Default is Insert. Possible values include: 'Insert', + /// 'Upsert' + /// The name of the external ID field + /// for upsert operation. Default value is 'Id' column. Type: string + /// (or Expression with resultType string). + /// The flag indicating whether or not + /// to ignore null values from input dataset (except key fields) during + /// write operation. Default value is false. If set it to true, it + /// means ADF will leave the data in the destination object unchanged + /// when doing upsert/update operation and insert defined default value + /// when doing insert operation, versus ADF will update the data in the + /// destination object to NULL when doing upsert/update operation and + /// insert NULL value when doing insert operation. Type: boolean (or + /// Expression with resultType boolean). + public SalesforceV2Sink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), string writeBehavior = default(string), object externalIdFieldName = default(object), object ignoreNullValues = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + WriteBehavior = writeBehavior; + ExternalIdFieldName = externalIdFieldName; + IgnoreNullValues = ignoreNullValues; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the write behavior for the operation. Default is + /// Insert. Possible values include: 'Insert', 'Upsert' + /// + [JsonProperty(PropertyName = "writeBehavior")] + public string WriteBehavior { get; set; } + + /// + /// Gets or sets the name of the external ID field for upsert + /// operation. Default value is 'Id' column. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "externalIdFieldName")] + public object ExternalIdFieldName { get; set; } + + /// + /// Gets or sets the flag indicating whether or not to ignore null + /// values from input dataset (except key fields) during write + /// operation. Default value is false. If set it to true, it means ADF + /// will leave the data in the destination object unchanged when doing + /// upsert/update operation and insert defined default value when doing + /// insert operation, versus ADF will update the data in the + /// destination object to NULL when doing upsert/update operation and + /// insert NULL value when doing insert operation. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "ignoreNullValues")] + public object IgnoreNullValues { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceV2SinkWriteBehavior.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceV2SinkWriteBehavior.cs new file mode 100644 index 000000000000..04caeeeeb52b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceV2SinkWriteBehavior.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for SalesforceV2SinkWriteBehavior. + /// + public static class SalesforceV2SinkWriteBehavior + { + public const string Insert = "Insert"; + public const string Upsert = "Upsert"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceV2Source.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceV2Source.cs new file mode 100644 index 000000000000..045047c110a1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SalesforceV2Source.cs @@ -0,0 +1,120 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Salesforce V2 source. + /// + public partial class SalesforceV2Source : TabularSource + { + /// + /// Initializes a new instance of the SalesforceV2Source class. + /// + public SalesforceV2Source() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SalesforceV2Source class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// Deprecating, please use 'query' property + /// instead. Type: string (or Expression with resultType + /// string). + /// You can only use Salesforce Object Query + /// Language (SOQL) query with limitations. For SOQL limitations, see + /// this article: + /// https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/queries.htm#SOQL%20Considerations. + /// If query is not specified, all the data of the Salesforce object + /// specified in ObjectApiName/reportId in dataset will be retrieved. + /// Type: string (or Expression with resultType string). + /// This property control whether + /// query result contains Deleted objects. Default is false. Type: + /// boolean (or Expression with resultType boolean). + /// Page size for each http request, too large + /// pageSize will caused timeout, default 300,000. Type: integer (or + /// Expression with resultType integer). + public SalesforceV2Source(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object sOQLQuery = default(object), object query = default(object), object includeDeletedObjects = default(object), object pageSize = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + SOQLQuery = sOQLQuery; + Query = query; + IncludeDeletedObjects = includeDeletedObjects; + PageSize = pageSize; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets deprecating, please use 'query' property instead. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "SOQLQuery")] + public object SOQLQuery { get; set; } + + /// + /// Gets or sets you can only use Salesforce Object Query Language + /// (SOQL) query with limitations. For SOQL limitations, see this + /// article: + /// https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/queries.htm#SOQL%20Considerations. + /// If query is not specified, all the data of the Salesforce object + /// specified in ObjectApiName/reportId in dataset will be retrieved. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets this property control whether query result contains + /// Deleted objects. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// + [JsonProperty(PropertyName = "includeDeletedObjects")] + public object IncludeDeletedObjects { get; set; } + + /// + /// Gets or sets page size for each http request, too large pageSize + /// will caused timeout, default 300,000. Type: integer (or Expression + /// with resultType integer). + /// + [JsonProperty(PropertyName = "pageSize")] + public object PageSize { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapBWLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapBWLinkedService.cs new file mode 100644 index 000000000000..9b10457f2d23 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapBWLinkedService.cs @@ -0,0 +1,145 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// SAP Business Warehouse Linked Service. + /// + [Newtonsoft.Json.JsonObject("SapBW")] + [Rest.Serialization.JsonTransformation] + public partial class SapBWLinkedService : LinkedService + { + /// + /// Initializes a new instance of the SapBWLinkedService class. + /// + public SapBWLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SapBWLinkedService class. + /// + /// Host name of the SAP BW instance. Type: string + /// (or Expression with resultType string). + /// System number of the BW system. (Usually + /// a two-digit decimal number represented as a string.) Type: string + /// (or Expression with resultType string). + /// Client ID of the client on the BW system. + /// (Usually a three-digit decimal number represented as a string) + /// Type: string (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Username to access the SAP BW server. Type: + /// string (or Expression with resultType string). + /// Password to access the SAP BW + /// server. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public SapBWLinkedService(object server, object systemNumber, object clientId, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object userName = default(object), SecretBase password = default(SecretBase), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Server = server; + SystemNumber = systemNumber; + ClientId = clientId; + UserName = userName; + Password = password; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets host name of the SAP BW instance. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.server")] + public object Server { get; set; } + + /// + /// Gets or sets system number of the BW system. (Usually a two-digit + /// decimal number represented as a string.) Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.systemNumber")] + public object SystemNumber { get; set; } + + /// + /// Gets or sets client ID of the client on the BW system. (Usually a + /// three-digit decimal number represented as a string) Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.clientId")] + public object ClientId { get; set; } + + /// + /// Gets or sets username to access the SAP BW server. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets password to access the SAP BW server. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Server == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Server"); + } + if (SystemNumber == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SystemNumber"); + } + if (ClientId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ClientId"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapBwCubeDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapBwCubeDataset.cs new file mode 100644 index 000000000000..f76bc3a63b59 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapBwCubeDataset.cs @@ -0,0 +1,73 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The SAP BW cube dataset. + /// + [Newtonsoft.Json.JsonObject("SapBwCube")] + public partial class SapBwCubeDataset : Dataset + { + /// + /// Initializes a new instance of the SapBwCubeDataset class. + /// + public SapBwCubeDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the SapBwCubeDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + public SapBwCubeDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapBwSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapBwSource.cs new file mode 100644 index 000000000000..42603b346387 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapBwSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for SapBW server via MDX. + /// + public partial class SapBwSource : TabularSource + { + /// + /// Initializes a new instance of the SapBwSource class. + /// + public SapBwSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SapBwSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// MDX query. Type: string (or Expression with + /// resultType string). + public SapBwSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets MDX query. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapCloudForCustomerLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapCloudForCustomerLinkedService.cs new file mode 100644 index 000000000000..040757f6e7f2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapCloudForCustomerLinkedService.cs @@ -0,0 +1,121 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for SAP Cloud for Customer. + /// + [Newtonsoft.Json.JsonObject("SapCloudForCustomer")] + [Rest.Serialization.JsonTransformation] + public partial class SapCloudForCustomerLinkedService : LinkedService + { + /// + /// Initializes a new instance of the SapCloudForCustomerLinkedService + /// class. + /// + public SapCloudForCustomerLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SapCloudForCustomerLinkedService + /// class. + /// + /// The URL of SAP Cloud for Customer OData API. For + /// example, + /// '[https://[tenantname].crm.ondemand.com/sap/c4c/odata/v1]'. Type: + /// string (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The username for Basic authentication. Type: + /// string (or Expression with resultType string). + /// The password for Basic + /// authentication. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Either encryptedCredential or + /// username/password must be provided. Type: string. + public SapCloudForCustomerLinkedService(object url, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object username = default(object), SecretBase password = default(SecretBase), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Url = url; + Username = username; + Password = password; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the URL of SAP Cloud for Customer OData API. For + /// example, + /// '[https://[tenantname].crm.ondemand.com/sap/c4c/odata/v1]'. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.url")] + public object Url { get; set; } + + /// + /// Gets or sets the username for Basic authentication. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets the password for Basic authentication. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Either encryptedCredential or username/password must be + /// provided. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Url == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Url"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapCloudForCustomerResourceDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapCloudForCustomerResourceDataset.cs new file mode 100644 index 000000000000..94ba9933de04 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapCloudForCustomerResourceDataset.cs @@ -0,0 +1,93 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The path of the SAP Cloud for Customer OData entity. + /// + [Newtonsoft.Json.JsonObject("SapCloudForCustomerResource")] + [Rest.Serialization.JsonTransformation] + public partial class SapCloudForCustomerResourceDataset : Dataset + { + /// + /// Initializes a new instance of the + /// SapCloudForCustomerResourceDataset class. + /// + public SapCloudForCustomerResourceDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// SapCloudForCustomerResourceDataset class. + /// + /// Linked service reference. + /// The path of the SAP Cloud for Customer OData + /// entity. Type: string (or Expression with resultType + /// string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + public SapCloudForCustomerResourceDataset(LinkedServiceReference linkedServiceName, object path, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Path = path; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the path of the SAP Cloud for Customer OData entity. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.path")] + public object Path { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Path"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapCloudForCustomerSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapCloudForCustomerSink.cs new file mode 100644 index 000000000000..300ff70a7478 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapCloudForCustomerSink.cs @@ -0,0 +1,91 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity SAP Cloud for Customer sink. + /// + public partial class SapCloudForCustomerSink : CopySink + { + /// + /// Initializes a new instance of the SapCloudForCustomerSink class. + /// + public SapCloudForCustomerSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SapCloudForCustomerSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The write behavior for the operation. + /// Default is 'Insert'. Possible values include: 'Insert', + /// 'Update' + /// The timeout (TimeSpan) to get an + /// HTTP response. It is the timeout to get a response, not the timeout + /// to read response data. Default value: 00:05:00. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + public SapCloudForCustomerSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), string writeBehavior = default(string), object httpRequestTimeout = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + WriteBehavior = writeBehavior; + HttpRequestTimeout = httpRequestTimeout; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the write behavior for the operation. Default is + /// 'Insert'. Possible values include: 'Insert', 'Update' + /// + [JsonProperty(PropertyName = "writeBehavior")] + public string WriteBehavior { get; set; } + + /// + /// Gets or sets the timeout (TimeSpan) to get an HTTP response. It is + /// the timeout to get a response, not the timeout to read response + /// data. Default value: 00:05:00. Type: string (or Expression with + /// resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "httpRequestTimeout")] + public object HttpRequestTimeout { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapCloudForCustomerSinkWriteBehavior.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapCloudForCustomerSinkWriteBehavior.cs new file mode 100644 index 000000000000..716a044002ac --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapCloudForCustomerSinkWriteBehavior.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for SapCloudForCustomerSinkWriteBehavior. + /// + public static class SapCloudForCustomerSinkWriteBehavior + { + public const string Insert = "Insert"; + public const string Update = "Update"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapCloudForCustomerSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapCloudForCustomerSource.cs new file mode 100644 index 000000000000..4968259e7be7 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapCloudForCustomerSource.cs @@ -0,0 +1,92 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for SAP Cloud for Customer source. + /// + public partial class SapCloudForCustomerSource : TabularSource + { + /// + /// Initializes a new instance of the SapCloudForCustomerSource class. + /// + public SapCloudForCustomerSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SapCloudForCustomerSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// SAP Cloud for Customer OData query. For + /// example, "$top=1". Type: string (or Expression with resultType + /// string). + /// The timeout (TimeSpan) to get an + /// HTTP response. It is the timeout to get a response, not the timeout + /// to read response data. Default value: 00:05:00. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + public SapCloudForCustomerSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object), object httpRequestTimeout = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + HttpRequestTimeout = httpRequestTimeout; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SAP Cloud for Customer OData query. For example, + /// "$top=1". Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets the timeout (TimeSpan) to get an HTTP response. It is + /// the timeout to get a response, not the timeout to read response + /// data. Default value: 00:05:00. Type: string (or Expression with + /// resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "httpRequestTimeout")] + public object HttpRequestTimeout { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapEccLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapEccLinkedService.cs new file mode 100644 index 000000000000..73ec7c1a5c1b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapEccLinkedService.cs @@ -0,0 +1,117 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for SAP ERP Central Component(SAP ECC). + /// + [Newtonsoft.Json.JsonObject("SapEcc")] + [Rest.Serialization.JsonTransformation] + public partial class SapEccLinkedService : LinkedService + { + /// + /// Initializes a new instance of the SapEccLinkedService class. + /// + public SapEccLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SapEccLinkedService class. + /// + /// The URL of SAP ECC OData API. For example, + /// '[https://hostname:port/sap/opu/odata/sap/servicename/]'. Type: + /// string (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The username for Basic authentication. Type: + /// string (or Expression with resultType string). + /// The password for Basic + /// authentication. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Either encryptedCredential or + /// username/password must be provided. Type: string. + public SapEccLinkedService(object url, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object username = default(object), SecretBase password = default(SecretBase), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Url = url; + Username = username; + Password = password; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the URL of SAP ECC OData API. For example, + /// '[https://hostname:port/sap/opu/odata/sap/servicename/]'. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.url")] + public object Url { get; set; } + + /// + /// Gets or sets the username for Basic authentication. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets the password for Basic authentication. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Either encryptedCredential or username/password must be + /// provided. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Url == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Url"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapEccResourceDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapEccResourceDataset.cs new file mode 100644 index 000000000000..85409efdb94b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapEccResourceDataset.cs @@ -0,0 +1,90 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The path of the SAP ECC OData entity. + /// + [Newtonsoft.Json.JsonObject("SapEccResource")] + [Rest.Serialization.JsonTransformation] + public partial class SapEccResourceDataset : Dataset + { + /// + /// Initializes a new instance of the SapEccResourceDataset class. + /// + public SapEccResourceDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the SapEccResourceDataset class. + /// + /// Linked service reference. + /// The path of the SAP ECC OData entity. Type: + /// string (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + public SapEccResourceDataset(LinkedServiceReference linkedServiceName, object path, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Path = path; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the path of the SAP ECC OData entity. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.path")] + public object Path { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Path == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Path"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapEccSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapEccSource.cs new file mode 100644 index 000000000000..1b65f3aa0e15 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapEccSource.cs @@ -0,0 +1,91 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for SAP ECC source. + /// + public partial class SapEccSource : TabularSource + { + /// + /// Initializes a new instance of the SapEccSource class. + /// + public SapEccSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SapEccSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// SAP ECC OData query. For example, "$top=1". + /// Type: string (or Expression with resultType string). + /// The timeout (TimeSpan) to get an + /// HTTP response. It is the timeout to get a response, not the timeout + /// to read response data. Default value: 00:05:00. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + public SapEccSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object), object httpRequestTimeout = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + HttpRequestTimeout = httpRequestTimeout; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SAP ECC OData query. For example, "$top=1". Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets the timeout (TimeSpan) to get an HTTP response. It is + /// the timeout to get a response, not the timeout to read response + /// data. Default value: 00:05:00. Type: string (or Expression with + /// resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "httpRequestTimeout")] + public object HttpRequestTimeout { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapHanaAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapHanaAuthenticationType.cs new file mode 100644 index 000000000000..7bf1f9ee9189 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapHanaAuthenticationType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for SapHanaAuthenticationType. + /// + public static class SapHanaAuthenticationType + { + public const string Basic = "Basic"; + public const string Windows = "Windows"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapHanaLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapHanaLinkedService.cs new file mode 100644 index 000000000000..b502e2f02b27 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapHanaLinkedService.cs @@ -0,0 +1,130 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// SAP HANA Linked Service. + /// + [Newtonsoft.Json.JsonObject("SapHana")] + [Rest.Serialization.JsonTransformation] + public partial class SapHanaLinkedService : LinkedService + { + /// + /// Initializes a new instance of the SapHanaLinkedService class. + /// + public SapHanaLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SapHanaLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// SAP HANA ODBC connection string. + /// Type: string, SecureString or AzureKeyVaultSecretReference. + /// Host name of the SAP HANA server. Type: string + /// (or Expression with resultType string). + /// The authentication type to be used + /// to connect to the SAP HANA server. Possible values include: + /// 'Basic', 'Windows' + /// Username to access the SAP HANA server. + /// Type: string (or Expression with resultType string). + /// Password to access the SAP HANA + /// server. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public SapHanaLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object connectionString = default(object), object server = default(object), string authenticationType = default(string), object userName = default(object), SecretBase password = default(SecretBase), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionString = connectionString; + Server = server; + AuthenticationType = authenticationType; + UserName = userName; + Password = password; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SAP HANA ODBC connection string. Type: string, + /// SecureString or AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets host name of the SAP HANA server. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.server")] + public object Server { get; set; } + + /// + /// Gets or sets the authentication type to be used to connect to the + /// SAP HANA server. Possible values include: 'Basic', 'Windows' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets username to access the SAP HANA server. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets password to access the SAP HANA server. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapHanaPartitionOption.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapHanaPartitionOption.cs new file mode 100644 index 000000000000..9db501160237 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapHanaPartitionOption.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for SapHanaPartitionOption. + /// + public static class SapHanaPartitionOption + { + public const string None = "None"; + public const string PhysicalPartitionsOfTable = "PhysicalPartitionsOfTable"; + public const string SapHanaDynamicRange = "SapHanaDynamicRange"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapHanaPartitionSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapHanaPartitionSettings.cs new file mode 100644 index 000000000000..3f3e0091e4cb --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapHanaPartitionSettings.cs @@ -0,0 +1,55 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The settings that will be leveraged for SAP HANA source partitioning. + /// + public partial class SapHanaPartitionSettings + { + /// + /// Initializes a new instance of the SapHanaPartitionSettings class. + /// + public SapHanaPartitionSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SapHanaPartitionSettings class. + /// + /// The name of the column that will + /// be used for proceeding range partitioning. Type: string (or + /// Expression with resultType string). + public SapHanaPartitionSettings(object partitionColumnName = default(object)) + { + PartitionColumnName = partitionColumnName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the column that will be used for + /// proceeding range partitioning. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "partitionColumnName")] + public object PartitionColumnName { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapHanaSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapHanaSource.cs new file mode 100644 index 000000000000..1ab812905165 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapHanaSource.cs @@ -0,0 +1,108 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for SAP HANA source. + /// + public partial class SapHanaSource : TabularSource + { + /// + /// Initializes a new instance of the SapHanaSource class. + /// + public SapHanaSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SapHanaSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// SAP HANA Sql query. Type: string (or Expression + /// with resultType string). + /// The packet size of data read from SAP + /// HANA. Type: integer(or Expression with resultType integer). + /// The partition mechanism that will be + /// used for SAP HANA read in parallel. Possible values include: + /// "None", "PhysicalPartitionsOfTable", "SapHanaDynamicRange". + /// + /// The settings that will be leveraged + /// for SAP HANA source partitioning. + public SapHanaSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object), object packetSize = default(object), object partitionOption = default(object), SapHanaPartitionSettings partitionSettings = default(SapHanaPartitionSettings)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + PacketSize = packetSize; + PartitionOption = partitionOption; + PartitionSettings = partitionSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SAP HANA Sql query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets the packet size of data read from SAP HANA. Type: + /// integer(or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "packetSize")] + public object PacketSize { get; set; } + + /// + /// Gets or sets the partition mechanism that will be used for SAP HANA + /// read in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "SapHanaDynamicRange". + /// + [JsonProperty(PropertyName = "partitionOption")] + public object PartitionOption { get; set; } + + /// + /// Gets or sets the settings that will be leveraged for SAP HANA + /// source partitioning. + /// + [JsonProperty(PropertyName = "partitionSettings")] + public SapHanaPartitionSettings PartitionSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapHanaTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapHanaTableDataset.cs new file mode 100644 index 000000000000..c1ffe44234d8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapHanaTableDataset.cs @@ -0,0 +1,96 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// SAP HANA Table properties. + /// + [Newtonsoft.Json.JsonObject("SapHanaTable")] + [Rest.Serialization.JsonTransformation] + public partial class SapHanaTableDataset : Dataset + { + /// + /// Initializes a new instance of the SapHanaTableDataset class. + /// + public SapHanaTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the SapHanaTableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The schema name of SAP + /// HANA. Type: string (or Expression with resultType string). + /// The table name of SAP HANA. Type: string (or + /// Expression with resultType string). + public SapHanaTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object sapHanaTableDatasetSchema = default(object), object table = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + SapHanaTableDatasetSchema = sapHanaTableDatasetSchema; + Table = table; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the schema name of SAP HANA. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object SapHanaTableDatasetSchema { get; set; } + + /// + /// Gets or sets the table name of SAP HANA. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapOdpLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapOdpLinkedService.cs new file mode 100644 index 000000000000..83a7e4bc0f2e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapOdpLinkedService.cs @@ -0,0 +1,271 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// SAP ODP Linked Service. + /// + [Newtonsoft.Json.JsonObject("SapOdp")] + [Rest.Serialization.JsonTransformation] + public partial class SapOdpLinkedService : LinkedService + { + /// + /// Initializes a new instance of the SapOdpLinkedService class. + /// + public SapOdpLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SapOdpLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Host name of the SAP instance where the table + /// is located. Type: string (or Expression with resultType + /// string). + /// System number of the SAP system where + /// the table is located. (Usually a two-digit decimal number + /// represented as a string.) Type: string (or Expression with + /// resultType string). + /// Client ID of the client on the SAP system + /// where the table is located. (Usually a three-digit decimal number + /// represented as a string) Type: string (or Expression with + /// resultType string). + /// Language of the SAP system where the table + /// is located. The default value is EN. Type: string (or Expression + /// with resultType string). + /// SystemID of the SAP system where the table + /// is located. Type: string (or Expression with resultType + /// string). + /// Username to access the SAP server where the + /// table is located. Type: string (or Expression with resultType + /// string). + /// Password to access the SAP server where the + /// table is located. + /// The hostname of the SAP Message Server. + /// Type: string (or Expression with resultType string). + /// The service name or port number + /// of the Message Server. Type: string (or Expression with resultType + /// string). + /// SNC activation indicator to access the SAP + /// server where the table is located. Must be either 0 (off) or 1 + /// (on). Type: string (or Expression with resultType string). + /// Initiator's SNC name to access the SAP + /// server where the table is located. Type: string (or Expression with + /// resultType string). + /// Communication partner's SNC name to + /// access the SAP server where the table is located. Type: string (or + /// Expression with resultType string). + /// External security product's library to + /// access the SAP server where the table is located. Type: string (or + /// Expression with resultType string). + /// SNC Quality of Protection. Allowed value + /// include: 1, 2, 3, 8, 9. Type: string (or Expression with resultType + /// string). + /// SNC X509 certificate file path. + /// Type: string (or Expression with resultType string). + /// The Logon Group for the SAP System. Type: + /// string (or Expression with resultType string). + /// The subscriber name. Type: string (or + /// Expression with resultType string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public SapOdpLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object server = default(object), object systemNumber = default(object), object clientId = default(object), object language = default(object), object systemId = default(object), object userName = default(object), SecretBase password = default(SecretBase), object messageServer = default(object), object messageServerService = default(object), object sncMode = default(object), object sncMyName = default(object), object sncPartnerName = default(object), object sncLibraryPath = default(object), object sncQop = default(object), object x509CertificatePath = default(object), object logonGroup = default(object), object subscriberName = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Server = server; + SystemNumber = systemNumber; + ClientId = clientId; + Language = language; + SystemId = systemId; + UserName = userName; + Password = password; + MessageServer = messageServer; + MessageServerService = messageServerService; + SncMode = sncMode; + SncMyName = sncMyName; + SncPartnerName = sncPartnerName; + SncLibraryPath = sncLibraryPath; + SncQop = sncQop; + X509CertificatePath = x509CertificatePath; + LogonGroup = logonGroup; + SubscriberName = subscriberName; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets host name of the SAP instance where the table is + /// located. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.server")] + public object Server { get; set; } + + /// + /// Gets or sets system number of the SAP system where the table is + /// located. (Usually a two-digit decimal number represented as a + /// string.) Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.systemNumber")] + public object SystemNumber { get; set; } + + /// + /// Gets or sets client ID of the client on the SAP system where the + /// table is located. (Usually a three-digit decimal number represented + /// as a string) Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.clientId")] + public object ClientId { get; set; } + + /// + /// Gets or sets language of the SAP system where the table is located. + /// The default value is EN. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.language")] + public object Language { get; set; } + + /// + /// Gets or sets systemID of the SAP system where the table is located. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.systemId")] + public object SystemId { get; set; } + + /// + /// Gets or sets username to access the SAP server where the table is + /// located. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets password to access the SAP server where the table is + /// located. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the hostname of the SAP Message Server. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.messageServer")] + public object MessageServer { get; set; } + + /// + /// Gets or sets the service name or port number of the Message Server. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.messageServerService")] + public object MessageServerService { get; set; } + + /// + /// Gets or sets SNC activation indicator to access the SAP server + /// where the table is located. Must be either 0 (off) or 1 (on). Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.sncMode")] + public object SncMode { get; set; } + + /// + /// Gets or sets initiator's SNC name to access the SAP server where + /// the table is located. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.sncMyName")] + public object SncMyName { get; set; } + + /// + /// Gets or sets communication partner's SNC name to access the SAP + /// server where the table is located. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.sncPartnerName")] + public object SncPartnerName { get; set; } + + /// + /// Gets or sets external security product's library to access the SAP + /// server where the table is located. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.sncLibraryPath")] + public object SncLibraryPath { get; set; } + + /// + /// Gets or sets SNC Quality of Protection. Allowed value include: 1, + /// 2, 3, 8, 9. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.sncQop")] + public object SncQop { get; set; } + + /// + /// Gets or sets SNC X509 certificate file path. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.x509CertificatePath")] + public object X509CertificatePath { get; set; } + + /// + /// Gets or sets the Logon Group for the SAP System. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.logonGroup")] + public object LogonGroup { get; set; } + + /// + /// Gets or sets the subscriber name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.subscriberName")] + public object SubscriberName { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapOdpResourceDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapOdpResourceDataset.cs new file mode 100644 index 000000000000..2859c0ac0372 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapOdpResourceDataset.cs @@ -0,0 +1,104 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// SAP ODP Resource properties. + /// + [Newtonsoft.Json.JsonObject("SapOdpResource")] + [Rest.Serialization.JsonTransformation] + public partial class SapOdpResourceDataset : Dataset + { + /// + /// Initializes a new instance of the SapOdpResourceDataset class. + /// + public SapOdpResourceDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the SapOdpResourceDataset class. + /// + /// Linked service reference. + /// The context of the SAP ODP Object. Type: + /// string (or Expression with resultType string). + /// The name of the SAP ODP Object. Type: + /// string (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + public SapOdpResourceDataset(LinkedServiceReference linkedServiceName, object context, object objectName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Context = context; + ObjectName = objectName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the context of the SAP ODP Object. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.context")] + public object Context { get; set; } + + /// + /// Gets or sets the name of the SAP ODP Object. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.objectName")] + public object ObjectName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Context == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Context"); + } + if (ObjectName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ObjectName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapOdpSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapOdpSource.cs new file mode 100644 index 000000000000..3cc7e910832f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapOdpSource.cs @@ -0,0 +1,112 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for SAP ODP source. + /// + public partial class SapOdpSource : TabularSource + { + /// + /// Initializes a new instance of the SapOdpSource class. + /// + public SapOdpSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SapOdpSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// The extraction mode. Allowed value + /// include: Full, Delta and Recovery. The default value is Full. Type: + /// string (or Expression with resultType string). + /// The subscriber process to manage + /// the delta process. Type: string (or Expression with resultType + /// string). + /// Specifies the selection conditions from + /// source data. Type: array of objects(selection) (or Expression with + /// resultType array of objects). + /// Specifies the columns to be selected from + /// source data. Type: array of objects(projection) (or Expression with + /// resultType array of objects). + public SapOdpSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object extractionMode = default(object), object subscriberProcess = default(object), object selection = default(object), object projection = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + ExtractionMode = extractionMode; + SubscriberProcess = subscriberProcess; + Selection = selection; + Projection = projection; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the extraction mode. Allowed value include: Full, + /// Delta and Recovery. The default value is Full. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "extractionMode")] + public object ExtractionMode { get; set; } + + /// + /// Gets or sets the subscriber process to manage the delta process. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "subscriberProcess")] + public object SubscriberProcess { get; set; } + + /// + /// Gets or sets specifies the selection conditions from source data. + /// Type: array of objects(selection) (or Expression with resultType + /// array of objects). + /// + [JsonProperty(PropertyName = "selection")] + public object Selection { get; set; } + + /// + /// Gets or sets specifies the columns to be selected from source data. + /// Type: array of objects(projection) (or Expression with resultType + /// array of objects). + /// + [JsonProperty(PropertyName = "projection")] + public object Projection { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapOpenHubLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapOpenHubLinkedService.cs new file mode 100644 index 000000000000..7f762c666c9c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapOpenHubLinkedService.cs @@ -0,0 +1,196 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// SAP Business Warehouse Open Hub Destination Linked Service. + /// + [Newtonsoft.Json.JsonObject("SapOpenHub")] + [Rest.Serialization.JsonTransformation] + public partial class SapOpenHubLinkedService : LinkedService + { + /// + /// Initializes a new instance of the SapOpenHubLinkedService class. + /// + public SapOpenHubLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SapOpenHubLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Host name of the SAP BW instance where the + /// open hub destination is located. Type: string (or Expression with + /// resultType string). + /// System number of the BW system where the + /// open hub destination is located. (Usually a two-digit decimal + /// number represented as a string.) Type: string (or Expression with + /// resultType string). + /// Client ID of the client on the BW system + /// where the open hub destination is located. (Usually a three-digit + /// decimal number represented as a string) Type: string (or Expression + /// with resultType string). + /// Language of the BW system where the open hub + /// destination is located. The default value is EN. Type: string (or + /// Expression with resultType string). + /// SystemID of the SAP system where the table + /// is located. Type: string (or Expression with resultType + /// string). + /// Username to access the SAP BW server where + /// the open hub destination is located. Type: string (or Expression + /// with resultType string). + /// Password to access the SAP BW server where + /// the open hub destination is located. + /// The hostname of the SAP Message Server. + /// Type: string (or Expression with resultType string). + /// The service name or port number + /// of the Message Server. Type: string (or Expression with resultType + /// string). + /// The Logon Group for the SAP System. Type: + /// string (or Expression with resultType string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public SapOpenHubLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object server = default(object), object systemNumber = default(object), object clientId = default(object), object language = default(object), object systemId = default(object), object userName = default(object), SecretBase password = default(SecretBase), object messageServer = default(object), object messageServerService = default(object), object logonGroup = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Server = server; + SystemNumber = systemNumber; + ClientId = clientId; + Language = language; + SystemId = systemId; + UserName = userName; + Password = password; + MessageServer = messageServer; + MessageServerService = messageServerService; + LogonGroup = logonGroup; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets host name of the SAP BW instance where the open hub + /// destination is located. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.server")] + public object Server { get; set; } + + /// + /// Gets or sets system number of the BW system where the open hub + /// destination is located. (Usually a two-digit decimal number + /// represented as a string.) Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.systemNumber")] + public object SystemNumber { get; set; } + + /// + /// Gets or sets client ID of the client on the BW system where the + /// open hub destination is located. (Usually a three-digit decimal + /// number represented as a string) Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.clientId")] + public object ClientId { get; set; } + + /// + /// Gets or sets language of the BW system where the open hub + /// destination is located. The default value is EN. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.language")] + public object Language { get; set; } + + /// + /// Gets or sets systemID of the SAP system where the table is located. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.systemId")] + public object SystemId { get; set; } + + /// + /// Gets or sets username to access the SAP BW server where the open + /// hub destination is located. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets password to access the SAP BW server where the open + /// hub destination is located. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the hostname of the SAP Message Server. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.messageServer")] + public object MessageServer { get; set; } + + /// + /// Gets or sets the service name or port number of the Message Server. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.messageServerService")] + public object MessageServerService { get; set; } + + /// + /// Gets or sets the Logon Group for the SAP System. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.logonGroup")] + public object LogonGroup { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapOpenHubSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapOpenHubSource.cs new file mode 100644 index 000000000000..69c6f265b6fa --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapOpenHubSource.cs @@ -0,0 +1,117 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for SAP Business Warehouse Open Hub Destination + /// source. + /// + public partial class SapOpenHubSource : TabularSource + { + /// + /// Initializes a new instance of the SapOpenHubSource class. + /// + public SapOpenHubSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SapOpenHubSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// Whether to exclude the records of + /// the last request. The default value is true. Type: boolean (or + /// Expression with resultType boolean). + /// The ID of request for delta loading. + /// Once it is set, only data with requestId larger than the value of + /// this property will be retrieved. The default value is 0. Type: + /// integer (or Expression with resultType integer ). + /// Specifies the custom + /// RFC function module that will be used to read data from SAP Table. + /// Type: string (or Expression with resultType string). + /// The single character that will + /// be used as delimiter passed to SAP RFC as well as splitting the + /// output data retrieved. Type: string (or Expression with resultType + /// string). + public SapOpenHubSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object excludeLastRequest = default(object), object baseRequestId = default(object), object customRfcReadTableFunctionModule = default(object), object sapDataColumnDelimiter = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + ExcludeLastRequest = excludeLastRequest; + BaseRequestId = baseRequestId; + CustomRfcReadTableFunctionModule = customRfcReadTableFunctionModule; + SapDataColumnDelimiter = sapDataColumnDelimiter; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets whether to exclude the records of the last request. + /// The default value is true. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "excludeLastRequest")] + public object ExcludeLastRequest { get; set; } + + /// + /// Gets or sets the ID of request for delta loading. Once it is set, + /// only data with requestId larger than the value of this property + /// will be retrieved. The default value is 0. Type: integer (or + /// Expression with resultType integer ). + /// + [JsonProperty(PropertyName = "baseRequestId")] + public object BaseRequestId { get; set; } + + /// + /// Gets or sets specifies the custom RFC function module that will be + /// used to read data from SAP Table. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "customRfcReadTableFunctionModule")] + public object CustomRfcReadTableFunctionModule { get; set; } + + /// + /// Gets or sets the single character that will be used as delimiter + /// passed to SAP RFC as well as splitting the output data retrieved. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "sapDataColumnDelimiter")] + public object SapDataColumnDelimiter { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapOpenHubTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapOpenHubTableDataset.cs new file mode 100644 index 000000000000..7052c2ddd584 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapOpenHubTableDataset.cs @@ -0,0 +1,118 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Sap Business Warehouse Open Hub Destination Table properties. + /// + [Newtonsoft.Json.JsonObject("SapOpenHubTable")] + [Rest.Serialization.JsonTransformation] + public partial class SapOpenHubTableDataset : Dataset + { + /// + /// Initializes a new instance of the SapOpenHubTableDataset class. + /// + public SapOpenHubTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the SapOpenHubTableDataset class. + /// + /// Linked service reference. + /// The name of the Open Hub + /// Destination with destination type as Database Table. Type: string + /// (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// Whether to exclude the records of + /// the last request. The default value is true. Type: boolean (or + /// Expression with resultType boolean). + /// The ID of request for delta loading. + /// Once it is set, only data with requestId larger than the value of + /// this property will be retrieved. The default value is 0. Type: + /// integer (or Expression with resultType integer ). + public SapOpenHubTableDataset(LinkedServiceReference linkedServiceName, object openHubDestinationName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object excludeLastRequest = default(object), object baseRequestId = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + OpenHubDestinationName = openHubDestinationName; + ExcludeLastRequest = excludeLastRequest; + BaseRequestId = baseRequestId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the Open Hub Destination with destination + /// type as Database Table. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.openHubDestinationName")] + public object OpenHubDestinationName { get; set; } + + /// + /// Gets or sets whether to exclude the records of the last request. + /// The default value is true. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.excludeLastRequest")] + public object ExcludeLastRequest { get; set; } + + /// + /// Gets or sets the ID of request for delta loading. Once it is set, + /// only data with requestId larger than the value of this property + /// will be retrieved. The default value is 0. Type: integer (or + /// Expression with resultType integer ). + /// + [JsonProperty(PropertyName = "typeProperties.baseRequestId")] + public object BaseRequestId { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (OpenHubDestinationName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "OpenHubDestinationName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapTableLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapTableLinkedService.cs new file mode 100644 index 000000000000..490d8c643400 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapTableLinkedService.cs @@ -0,0 +1,251 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// SAP Table Linked Service. + /// + [Newtonsoft.Json.JsonObject("SapTable")] + [Rest.Serialization.JsonTransformation] + public partial class SapTableLinkedService : LinkedService + { + /// + /// Initializes a new instance of the SapTableLinkedService class. + /// + public SapTableLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SapTableLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Host name of the SAP instance where the table + /// is located. Type: string (or Expression with resultType + /// string). + /// System number of the SAP system where + /// the table is located. (Usually a two-digit decimal number + /// represented as a string.) Type: string (or Expression with + /// resultType string). + /// Client ID of the client on the SAP system + /// where the table is located. (Usually a three-digit decimal number + /// represented as a string) Type: string (or Expression with + /// resultType string). + /// Language of the SAP system where the table + /// is located. The default value is EN. Type: string (or Expression + /// with resultType string). + /// SystemID of the SAP system where the table + /// is located. Type: string (or Expression with resultType + /// string). + /// Username to access the SAP server where the + /// table is located. Type: string (or Expression with resultType + /// string). + /// Password to access the SAP server where the + /// table is located. + /// The hostname of the SAP Message Server. + /// Type: string (or Expression with resultType string). + /// The service name or port number + /// of the Message Server. Type: string (or Expression with resultType + /// string). + /// SNC activation indicator to access the SAP + /// server where the table is located. Must be either 0 (off) or 1 + /// (on). Type: string (or Expression with resultType string). + /// Initiator's SNC name to access the SAP + /// server where the table is located. Type: string (or Expression with + /// resultType string). + /// Communication partner's SNC name to + /// access the SAP server where the table is located. Type: string (or + /// Expression with resultType string). + /// External security product's library to + /// access the SAP server where the table is located. Type: string (or + /// Expression with resultType string). + /// SNC Quality of Protection. Allowed value + /// include: 1, 2, 3, 8, 9. Type: string (or Expression with resultType + /// string). + /// The Logon Group for the SAP System. Type: + /// string (or Expression with resultType string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public SapTableLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object server = default(object), object systemNumber = default(object), object clientId = default(object), object language = default(object), object systemId = default(object), object userName = default(object), SecretBase password = default(SecretBase), object messageServer = default(object), object messageServerService = default(object), object sncMode = default(object), object sncMyName = default(object), object sncPartnerName = default(object), object sncLibraryPath = default(object), object sncQop = default(object), object logonGroup = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Server = server; + SystemNumber = systemNumber; + ClientId = clientId; + Language = language; + SystemId = systemId; + UserName = userName; + Password = password; + MessageServer = messageServer; + MessageServerService = messageServerService; + SncMode = sncMode; + SncMyName = sncMyName; + SncPartnerName = sncPartnerName; + SncLibraryPath = sncLibraryPath; + SncQop = sncQop; + LogonGroup = logonGroup; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets host name of the SAP instance where the table is + /// located. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.server")] + public object Server { get; set; } + + /// + /// Gets or sets system number of the SAP system where the table is + /// located. (Usually a two-digit decimal number represented as a + /// string.) Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.systemNumber")] + public object SystemNumber { get; set; } + + /// + /// Gets or sets client ID of the client on the SAP system where the + /// table is located. (Usually a three-digit decimal number represented + /// as a string) Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.clientId")] + public object ClientId { get; set; } + + /// + /// Gets or sets language of the SAP system where the table is located. + /// The default value is EN. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.language")] + public object Language { get; set; } + + /// + /// Gets or sets systemID of the SAP system where the table is located. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.systemId")] + public object SystemId { get; set; } + + /// + /// Gets or sets username to access the SAP server where the table is + /// located. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets password to access the SAP server where the table is + /// located. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the hostname of the SAP Message Server. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.messageServer")] + public object MessageServer { get; set; } + + /// + /// Gets or sets the service name or port number of the Message Server. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.messageServerService")] + public object MessageServerService { get; set; } + + /// + /// Gets or sets SNC activation indicator to access the SAP server + /// where the table is located. Must be either 0 (off) or 1 (on). Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.sncMode")] + public object SncMode { get; set; } + + /// + /// Gets or sets initiator's SNC name to access the SAP server where + /// the table is located. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.sncMyName")] + public object SncMyName { get; set; } + + /// + /// Gets or sets communication partner's SNC name to access the SAP + /// server where the table is located. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.sncPartnerName")] + public object SncPartnerName { get; set; } + + /// + /// Gets or sets external security product's library to access the SAP + /// server where the table is located. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.sncLibraryPath")] + public object SncLibraryPath { get; set; } + + /// + /// Gets or sets SNC Quality of Protection. Allowed value include: 1, + /// 2, 3, 8, 9. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.sncQop")] + public object SncQop { get; set; } + + /// + /// Gets or sets the Logon Group for the SAP System. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.logonGroup")] + public object LogonGroup { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapTablePartitionOption.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapTablePartitionOption.cs new file mode 100644 index 000000000000..184057d28197 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapTablePartitionOption.cs @@ -0,0 +1,26 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for SapTablePartitionOption. + /// + public static class SapTablePartitionOption + { + public const string None = "None"; + public const string PartitionOnInt = "PartitionOnInt"; + public const string PartitionOnCalendarYear = "PartitionOnCalendarYear"; + public const string PartitionOnCalendarMonth = "PartitionOnCalendarMonth"; + public const string PartitionOnCalendarDate = "PartitionOnCalendarDate"; + public const string PartitionOnTime = "PartitionOnTime"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapTablePartitionSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapTablePartitionSettings.cs new file mode 100644 index 000000000000..2876a9248c0d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapTablePartitionSettings.cs @@ -0,0 +1,92 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The settings that will be leveraged for SAP table source partitioning. + /// + public partial class SapTablePartitionSettings + { + /// + /// Initializes a new instance of the SapTablePartitionSettings class. + /// + public SapTablePartitionSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SapTablePartitionSettings class. + /// + /// The name of the column that will + /// be used for proceeding range partitioning. Type: string (or + /// Expression with resultType string). + /// The maximum value of column + /// specified in partitionColumnName that will be used for proceeding + /// range partitioning. Type: string (or Expression with resultType + /// string). + /// The minimum value of column + /// specified in partitionColumnName that will be used for proceeding + /// range partitioning. Type: string (or Expression with resultType + /// string). + /// The maximum value of partitions + /// the table will be split into. Type: integer (or Expression with + /// resultType string). + public SapTablePartitionSettings(object partitionColumnName = default(object), object partitionUpperBound = default(object), object partitionLowerBound = default(object), object maxPartitionsNumber = default(object)) + { + PartitionColumnName = partitionColumnName; + PartitionUpperBound = partitionUpperBound; + PartitionLowerBound = partitionLowerBound; + MaxPartitionsNumber = maxPartitionsNumber; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the column that will be used for + /// proceeding range partitioning. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "partitionColumnName")] + public object PartitionColumnName { get; set; } + + /// + /// Gets or sets the maximum value of column specified in + /// partitionColumnName that will be used for proceeding range + /// partitioning. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionUpperBound")] + public object PartitionUpperBound { get; set; } + + /// + /// Gets or sets the minimum value of column specified in + /// partitionColumnName that will be used for proceeding range + /// partitioning. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionLowerBound")] + public object PartitionLowerBound { get; set; } + + /// + /// Gets or sets the maximum value of partitions the table will be + /// split into. Type: integer (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "maxPartitionsNumber")] + public object MaxPartitionsNumber { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapTableResourceDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapTableResourceDataset.cs new file mode 100644 index 000000000000..c36e4e2ecd94 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapTableResourceDataset.cs @@ -0,0 +1,90 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// SAP Table Resource properties. + /// + [Newtonsoft.Json.JsonObject("SapTableResource")] + [Rest.Serialization.JsonTransformation] + public partial class SapTableResourceDataset : Dataset + { + /// + /// Initializes a new instance of the SapTableResourceDataset class. + /// + public SapTableResourceDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the SapTableResourceDataset class. + /// + /// Linked service reference. + /// The name of the SAP Table. Type: string (or + /// Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + public SapTableResourceDataset(LinkedServiceReference linkedServiceName, object tableName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the SAP Table. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (TableName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TableName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapTableSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapTableSource.cs new file mode 100644 index 000000000000..df3f040fedb2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SapTableSource.cs @@ -0,0 +1,172 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for SAP Table source. + /// + public partial class SapTableSource : TabularSource + { + /// + /// Initializes a new instance of the SapTableSource class. + /// + public SapTableSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SapTableSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// The number of rows to be retrieved. Type: + /// integer(or Expression with resultType integer). + /// The number of rows that will be skipped. + /// Type: integer (or Expression with resultType integer). + /// The fields of the SAP table that will + /// be retrieved. For example, column0, column1. Type: string (or + /// Expression with resultType string). + /// The options for the filtering of the + /// SAP Table. For example, COLUMN0 EQ SOME VALUE. Type: string (or + /// Expression with resultType string). + /// Specifies the maximum number of rows that + /// will be retrieved at a time when retrieving data from SAP Table. + /// Type: integer (or Expression with resultType integer). + /// Specifies the custom + /// RFC function module that will be used to read data from SAP Table. + /// Type: string (or Expression with resultType string). + /// The single character that will + /// be used as delimiter passed to SAP RFC as well as splitting the + /// output data retrieved. Type: string (or Expression with resultType + /// string). + /// The partition mechanism that will be + /// used for SAP table read in parallel. Possible values include: + /// "None", "PartitionOnInt", "PartitionOnCalendarYear", + /// "PartitionOnCalendarMonth", "PartitionOnCalendarDate", + /// "PartitionOnTime". + /// The settings that will be leveraged + /// for SAP table source partitioning. + public SapTableSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object rowCount = default(object), object rowSkips = default(object), object rfcTableFields = default(object), object rfcTableOptions = default(object), object batchSize = default(object), object customRfcReadTableFunctionModule = default(object), object sapDataColumnDelimiter = default(object), object partitionOption = default(object), SapTablePartitionSettings partitionSettings = default(SapTablePartitionSettings)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + RowCount = rowCount; + RowSkips = rowSkips; + RfcTableFields = rfcTableFields; + RfcTableOptions = rfcTableOptions; + BatchSize = batchSize; + CustomRfcReadTableFunctionModule = customRfcReadTableFunctionModule; + SapDataColumnDelimiter = sapDataColumnDelimiter; + PartitionOption = partitionOption; + PartitionSettings = partitionSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the number of rows to be retrieved. Type: integer(or + /// Expression with resultType integer). + /// + [JsonProperty(PropertyName = "rowCount")] + public object RowCount { get; set; } + + /// + /// Gets or sets the number of rows that will be skipped. Type: integer + /// (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "rowSkips")] + public object RowSkips { get; set; } + + /// + /// Gets or sets the fields of the SAP table that will be retrieved. + /// For example, column0, column1. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "rfcTableFields")] + public object RfcTableFields { get; set; } + + /// + /// Gets or sets the options for the filtering of the SAP Table. For + /// example, COLUMN0 EQ SOME VALUE. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "rfcTableOptions")] + public object RfcTableOptions { get; set; } + + /// + /// Gets or sets specifies the maximum number of rows that will be + /// retrieved at a time when retrieving data from SAP Table. Type: + /// integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "batchSize")] + public object BatchSize { get; set; } + + /// + /// Gets or sets specifies the custom RFC function module that will be + /// used to read data from SAP Table. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "customRfcReadTableFunctionModule")] + public object CustomRfcReadTableFunctionModule { get; set; } + + /// + /// Gets or sets the single character that will be used as delimiter + /// passed to SAP RFC as well as splitting the output data retrieved. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "sapDataColumnDelimiter")] + public object SapDataColumnDelimiter { get; set; } + + /// + /// Gets or sets the partition mechanism that will be used for SAP + /// table read in parallel. Possible values include: "None", + /// "PartitionOnInt", "PartitionOnCalendarYear", + /// "PartitionOnCalendarMonth", "PartitionOnCalendarDate", + /// "PartitionOnTime". + /// + [JsonProperty(PropertyName = "partitionOption")] + public object PartitionOption { get; set; } + + /// + /// Gets or sets the settings that will be leveraged for SAP table + /// source partitioning. + /// + [JsonProperty(PropertyName = "partitionSettings")] + public SapTablePartitionSettings PartitionSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScheduleTrigger.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScheduleTrigger.cs new file mode 100644 index 000000000000..c001f6fabce1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScheduleTrigger.cs @@ -0,0 +1,79 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Trigger that creates pipeline runs periodically, on schedule. + /// + [Rest.Serialization.JsonTransformation] + public partial class ScheduleTrigger : MultiplePipelineTrigger + { + /// + /// Initializes a new instance of the ScheduleTrigger class. + /// + public ScheduleTrigger() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ScheduleTrigger class. + /// + /// Recurrence schedule configuration. + /// Unmatched properties from the + /// message are deserialized this collection + /// Trigger description. + /// Indicates if trigger is running or not. + /// Updated when Start/Stop APIs are called on the Trigger. Possible + /// values include: 'Started', 'Stopped', 'Disabled' + /// List of tags that can be used for + /// describing the trigger. + /// Pipelines that need to be started. + public ScheduleTrigger(ScheduleTriggerRecurrence recurrence, IDictionary additionalProperties = default(IDictionary), string description = default(string), string runtimeState = default(string), IList annotations = default(IList), IList pipelines = default(IList)) + : base(additionalProperties, description, runtimeState, annotations, pipelines) + { + Recurrence = recurrence; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets recurrence schedule configuration. + /// + [JsonProperty(PropertyName = "typeProperties.recurrence")] + public ScheduleTriggerRecurrence Recurrence { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Recurrence == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Recurrence"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScheduleTriggerRecurrence.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScheduleTriggerRecurrence.cs new file mode 100644 index 000000000000..9c77ec2f45d0 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScheduleTriggerRecurrence.cs @@ -0,0 +1,106 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The workflow trigger recurrence. + /// + public partial class ScheduleTriggerRecurrence + { + /// + /// Initializes a new instance of the ScheduleTriggerRecurrence class. + /// + public ScheduleTriggerRecurrence() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ScheduleTriggerRecurrence class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The frequency. Possible values include: + /// 'NotSpecified', 'Minute', 'Hour', 'Day', 'Week', 'Month', + /// 'Year' + /// The interval. + /// The start time. + /// The end time. + /// The time zone. + /// The recurrence schedule. + public ScheduleTriggerRecurrence(IDictionary additionalProperties = default(IDictionary), string frequency = default(string), int? interval = default(int?), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeZone = default(string), RecurrenceSchedule schedule = default(RecurrenceSchedule)) + { + AdditionalProperties = additionalProperties; + Frequency = frequency; + Interval = interval; + StartTime = startTime; + EndTime = endTime; + TimeZone = timeZone; + Schedule = schedule; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets the frequency. Possible values include: + /// 'NotSpecified', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year' + /// + [JsonProperty(PropertyName = "frequency")] + public string Frequency { get; set; } + + /// + /// Gets or sets the interval. + /// + [JsonProperty(PropertyName = "interval")] + public int? Interval { get; set; } + + /// + /// Gets or sets the start time. + /// + [JsonProperty(PropertyName = "startTime")] + public System.DateTime? StartTime { get; set; } + + /// + /// Gets or sets the end time. + /// + [JsonProperty(PropertyName = "endTime")] + public System.DateTime? EndTime { get; set; } + + /// + /// Gets or sets the time zone. + /// + [JsonProperty(PropertyName = "timeZone")] + public string TimeZone { get; set; } + + /// + /// Gets or sets the recurrence schedule. + /// + [JsonProperty(PropertyName = "schedule")] + public RecurrenceSchedule Schedule { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptAction.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptAction.cs new file mode 100644 index 000000000000..d4a6f454ca3c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptAction.cs @@ -0,0 +1,101 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Custom script action to run on HDI ondemand cluster once it's up. + /// + public partial class ScriptAction + { + /// + /// Initializes a new instance of the ScriptAction class. + /// + public ScriptAction() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ScriptAction class. + /// + /// The user provided name of the script + /// action. + /// The URI for the script action. + /// The node types on which the script action + /// should be executed. + /// The parameters for the script + /// action. + public ScriptAction(string name, string uri, object roles, string parameters = default(string)) + { + Name = name; + Uri = uri; + Roles = roles; + Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the user provided name of the script action. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the URI for the script action. + /// + [JsonProperty(PropertyName = "uri")] + public string Uri { get; set; } + + /// + /// Gets or sets the node types on which the script action should be + /// executed. + /// + [JsonProperty(PropertyName = "roles")] + public object Roles { get; set; } + + /// + /// Gets or sets the parameters for the script action. + /// + [JsonProperty(PropertyName = "parameters")] + public string Parameters { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (Uri == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Uri"); + } + if (Roles == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Roles"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptActivity.cs new file mode 100644 index 000000000000..97745efe4e1e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptActivity.cs @@ -0,0 +1,119 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Script activity type. + /// + [Newtonsoft.Json.JsonObject("Script")] + [Rest.Serialization.JsonTransformation] + public partial class ScriptActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the ScriptActivity class. + /// + public ScriptActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ScriptActivity class. + /// + /// Activity name. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// ScriptBlock execution + /// timeout. Type: string (or Expression with resultType string), + /// pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Array of script blocks. Type: array. + /// Log settings of script activity. + public ScriptActivity(string name, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), object scriptBlockExecutionTimeout = default(object), IList scripts = default(IList), ScriptActivityTypePropertiesLogSettings logSettings = default(ScriptActivityTypePropertiesLogSettings)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + ScriptBlockExecutionTimeout = scriptBlockExecutionTimeout; + Scripts = scripts; + LogSettings = logSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets scriptBlock execution timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "typeProperties.scriptBlockExecutionTimeout")] + public object ScriptBlockExecutionTimeout { get; set; } + + /// + /// Gets or sets array of script blocks. Type: array. + /// + [JsonProperty(PropertyName = "typeProperties.scripts")] + public IList Scripts { get; set; } + + /// + /// Gets or sets log settings of script activity. + /// + [JsonProperty(PropertyName = "typeProperties.logSettings")] + public ScriptActivityTypePropertiesLogSettings LogSettings { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Scripts != null) + { + foreach (var element in Scripts) + { + if (element != null) + { + element.Validate(); + } + } + } + if (LogSettings != null) + { + LogSettings.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptActivityLogDestination.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptActivityLogDestination.cs new file mode 100644 index 000000000000..25cd34c60cf0 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptActivityLogDestination.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for ScriptActivityLogDestination. + /// + public static class ScriptActivityLogDestination + { + public const string ActivityOutput = "ActivityOutput"; + public const string ExternalStore = "ExternalStore"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptActivityParameter.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptActivityParameter.cs new file mode 100644 index 000000000000..6f2668583699 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptActivityParameter.cs @@ -0,0 +1,95 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Parameters of a script block. + /// + public partial class ScriptActivityParameter + { + /// + /// Initializes a new instance of the ScriptActivityParameter class. + /// + public ScriptActivityParameter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ScriptActivityParameter class. + /// + /// The name of the parameter. Type: string (or + /// Expression with resultType string). + /// The type of the parameter. Possible values + /// include: 'Boolean', 'DateTime', 'DateTimeOffset', 'Decimal', + /// 'Double', 'Guid', 'Int16', 'Int32', 'Int64', 'Single', 'String', + /// 'Timespan' + /// The value of the parameter. Type: string (or + /// Expression with resultType string). + /// The direction of the parameter. Possible + /// values include: 'Input', 'Output', 'InputOutput' + /// The size of the output direction + /// parameter. + public ScriptActivityParameter(object name = default(object), string type = default(string), object value = default(object), string direction = default(string), int? size = default(int?)) + { + Name = name; + Type = type; + Value = value; + Direction = direction; + Size = size; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the parameter. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "name")] + public object Name { get; set; } + + /// + /// Gets or sets the type of the parameter. Possible values include: + /// 'Boolean', 'DateTime', 'DateTimeOffset', 'Decimal', 'Double', + /// 'Guid', 'Int16', 'Int32', 'Int64', 'Single', 'String', 'Timespan' + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets the value of the parameter. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "value")] + public object Value { get; set; } + + /// + /// Gets or sets the direction of the parameter. Possible values + /// include: 'Input', 'Output', 'InputOutput' + /// + [JsonProperty(PropertyName = "direction")] + public string Direction { get; set; } + + /// + /// Gets or sets the size of the output direction parameter. + /// + [JsonProperty(PropertyName = "size")] + public int? Size { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptActivityParameterDirection.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptActivityParameterDirection.cs new file mode 100644 index 000000000000..a1389ad2974a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptActivityParameterDirection.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for ScriptActivityParameterDirection. + /// + public static class ScriptActivityParameterDirection + { + public const string Input = "Input"; + public const string Output = "Output"; + public const string InputOutput = "InputOutput"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptActivityParameterType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptActivityParameterType.cs new file mode 100644 index 000000000000..0832da239198 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptActivityParameterType.cs @@ -0,0 +1,32 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for ScriptActivityParameterType. + /// + public static class ScriptActivityParameterType + { + public const string Boolean = "Boolean"; + public const string DateTime = "DateTime"; + public const string DateTimeOffset = "DateTimeOffset"; + public const string Decimal = "Decimal"; + public const string Double = "Double"; + public const string Guid = "Guid"; + public const string Int16 = "Int16"; + public const string Int32 = "Int32"; + public const string Int64 = "Int64"; + public const string Single = "Single"; + public const string String = "String"; + public const string Timespan = "Timespan"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptActivityScriptBlock.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptActivityScriptBlock.cs new file mode 100644 index 000000000000..d6f08b797c34 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptActivityScriptBlock.cs @@ -0,0 +1,94 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Script block of scripts. + /// + public partial class ScriptActivityScriptBlock + { + /// + /// Initializes a new instance of the ScriptActivityScriptBlock class. + /// + public ScriptActivityScriptBlock() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ScriptActivityScriptBlock class. + /// + /// The query text. Type: string (or Expression with + /// resultType string). + /// The type of the query. Please refer to the + /// ScriptType for valid options. Type: string (or Expression with + /// resultType string). + /// Array of script parameters. Type: + /// array. + public ScriptActivityScriptBlock(object text, object type, IList parameters = default(IList)) + { + Text = text; + Type = type; + Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the query text. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "text")] + public object Text { get; set; } + + /// + /// Gets or sets the type of the query. Please refer to the ScriptType + /// for valid options. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "type")] + public object Type { get; set; } + + /// + /// Gets or sets array of script parameters. Type: array. + /// + [JsonProperty(PropertyName = "parameters")] + public IList Parameters { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Text == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Text"); + } + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptActivityTypePropertiesLogSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptActivityTypePropertiesLogSettings.cs new file mode 100644 index 000000000000..c37b3cd21ac5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptActivityTypePropertiesLogSettings.cs @@ -0,0 +1,83 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Log settings of script activity. + /// + public partial class ScriptActivityTypePropertiesLogSettings + { + /// + /// Initializes a new instance of the + /// ScriptActivityTypePropertiesLogSettings class. + /// + public ScriptActivityTypePropertiesLogSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ScriptActivityTypePropertiesLogSettings class. + /// + /// The destination of logs. Type: string. + /// Possible values include: 'ActivityOutput', 'ExternalStore' + /// Log location settings customer + /// needs to provide when enabling log. + public ScriptActivityTypePropertiesLogSettings(string logDestination, LogLocationSettings logLocationSettings = default(LogLocationSettings)) + { + LogDestination = logDestination; + LogLocationSettings = logLocationSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the destination of logs. Type: string. Possible values + /// include: 'ActivityOutput', 'ExternalStore' + /// + [JsonProperty(PropertyName = "logDestination")] + public string LogDestination { get; set; } + + /// + /// Gets or sets log location settings customer needs to provide when + /// enabling log. + /// + [JsonProperty(PropertyName = "logLocationSettings")] + public LogLocationSettings LogLocationSettings { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (LogDestination == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "LogDestination"); + } + if (LogLocationSettings != null) + { + LogLocationSettings.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptType.cs new file mode 100644 index 000000000000..fb0d08c8b2ee --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ScriptType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for ScriptType. + /// + public static class ScriptType + { + public const string Query = "Query"; + public const string NonQuery = "NonQuery"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SecretBase.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SecretBase.cs new file mode 100644 index 000000000000..893914a82e13 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SecretBase.cs @@ -0,0 +1,35 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using System.Linq; + + /// + /// The base definition of a secret type. + /// + public partial class SecretBase + { + /// + /// Initializes a new instance of the SecretBase class. + /// + public SecretBase() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SecureInputOutputPolicy.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SecureInputOutputPolicy.cs new file mode 100644 index 000000000000..0b7b97670a64 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SecureInputOutputPolicy.cs @@ -0,0 +1,64 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Execution policy for an activity that supports secure input and output. + /// + public partial class SecureInputOutputPolicy + { + /// + /// Initializes a new instance of the SecureInputOutputPolicy class. + /// + public SecureInputOutputPolicy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SecureInputOutputPolicy class. + /// + /// When set to true, Input from activity is + /// considered as secure and will not be logged to monitoring. + /// When set to true, Output from activity + /// is considered as secure and will not be logged to + /// monitoring. + public SecureInputOutputPolicy(bool? secureInput = default(bool?), bool? secureOutput = default(bool?)) + { + SecureInput = secureInput; + SecureOutput = secureOutput; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets when set to true, Input from activity is considered as + /// secure and will not be logged to monitoring. + /// + [JsonProperty(PropertyName = "secureInput")] + public bool? SecureInput { get; set; } + + /// + /// Gets or sets when set to true, Output from activity is considered + /// as secure and will not be logged to monitoring. + /// + [JsonProperty(PropertyName = "secureOutput")] + public bool? SecureOutput { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SecureString.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SecureString.cs new file mode 100644 index 000000000000..1416b8d28183 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SecureString.cs @@ -0,0 +1,66 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Azure Data Factory secure string definition. The string value will be + /// masked with asterisks '*' during Get or List API calls. + /// + public partial class SecureString : SecretBase + { + /// + /// Initializes a new instance of the SecureString class. + /// + public SecureString() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SecureString class. + /// + /// Value of secure string. + public SecureString(string value) + { + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets value of secure string. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Value == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Value"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SelfDependencyTumblingWindowTriggerReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SelfDependencyTumblingWindowTriggerReference.cs new file mode 100644 index 000000000000..71d386c8a657 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SelfDependencyTumblingWindowTriggerReference.cs @@ -0,0 +1,110 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Self referenced tumbling window trigger dependency. + /// + public partial class SelfDependencyTumblingWindowTriggerReference : DependencyReference + { + /// + /// Initializes a new instance of the + /// SelfDependencyTumblingWindowTriggerReference class. + /// + public SelfDependencyTumblingWindowTriggerReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// SelfDependencyTumblingWindowTriggerReference class. + /// + /// Timespan applied to the start time of a + /// tumbling window when evaluating dependency. + /// The size of the window when evaluating the + /// dependency. If undefined the frequency of the tumbling window will + /// be used. + public SelfDependencyTumblingWindowTriggerReference(string offset, string size = default(string)) + { + Offset = offset; + Size = size; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets timespan applied to the start time of a tumbling + /// window when evaluating dependency. + /// + [JsonProperty(PropertyName = "offset")] + public string Offset { get; set; } + + /// + /// Gets or sets the size of the window when evaluating the dependency. + /// If undefined the frequency of the tumbling window will be used. + /// + [JsonProperty(PropertyName = "size")] + public string Size { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Offset == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Offset"); + } + if (Offset != null) + { + if (Offset.Length > 15) + { + throw new ValidationException(ValidationRules.MaxLength, "Offset", 15); + } + if (Offset.Length < 8) + { + throw new ValidationException(ValidationRules.MinLength, "Offset", 8); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(Offset, "-((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9]))")) + { + throw new ValidationException(ValidationRules.Pattern, "Offset", "-((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9]))"); + } + } + if (Size != null) + { + if (Size.Length > 15) + { + throw new ValidationException(ValidationRules.MaxLength, "Size", 15); + } + if (Size.Length < 8) + { + throw new ValidationException(ValidationRules.MinLength, "Size", 8); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(Size, "((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9]))")) + { + throw new ValidationException(ValidationRules.Pattern, "Size", "((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9]))"); + } + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SelfHostedIntegrationRuntime.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SelfHostedIntegrationRuntime.cs new file mode 100644 index 000000000000..f8b03471566e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SelfHostedIntegrationRuntime.cs @@ -0,0 +1,74 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Self-hosted integration runtime. + /// + [Newtonsoft.Json.JsonObject("SelfHosted")] + [Rest.Serialization.JsonTransformation] + public partial class SelfHostedIntegrationRuntime : IntegrationRuntime + { + /// + /// Initializes a new instance of the SelfHostedIntegrationRuntime + /// class. + /// + public SelfHostedIntegrationRuntime() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SelfHostedIntegrationRuntime + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Integration runtime description. + /// An + /// alternative option to ensure interactive authoring function when + /// your self-hosted integration runtime is unable to establish a + /// connection with Azure Relay. + public SelfHostedIntegrationRuntime(IDictionary additionalProperties = default(IDictionary), string description = default(string), LinkedIntegrationRuntimeType linkedInfo = default(LinkedIntegrationRuntimeType), bool? selfContainedInteractiveAuthoringEnabled = default(bool?)) + : base(additionalProperties, description) + { + LinkedInfo = linkedInfo; + SelfContainedInteractiveAuthoringEnabled = selfContainedInteractiveAuthoringEnabled; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "typeProperties.linkedInfo")] + public LinkedIntegrationRuntimeType LinkedInfo { get; set; } + + /// + /// Gets or sets an alternative option to ensure interactive authoring + /// function when your self-hosted integration runtime is unable to + /// establish a connection with Azure Relay. + /// + [JsonProperty(PropertyName = "typeProperties.selfContainedInteractiveAuthoringEnabled")] + public bool? SelfContainedInteractiveAuthoringEnabled { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SelfHostedIntegrationRuntimeNode.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SelfHostedIntegrationRuntimeNode.cs new file mode 100644 index 000000000000..51c0fac30b2f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SelfHostedIntegrationRuntimeNode.cs @@ -0,0 +1,228 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Properties of Self-hosted integration runtime node. + /// + public partial class SelfHostedIntegrationRuntimeNode + { + /// + /// Initializes a new instance of the SelfHostedIntegrationRuntimeNode + /// class. + /// + public SelfHostedIntegrationRuntimeNode() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SelfHostedIntegrationRuntimeNode + /// class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Name of the integration runtime + /// node. + /// Machine name of the integration runtime + /// node. + /// URI for the host machine of the + /// integration runtime. + /// Status of the integration runtime node. + /// Possible values include: 'NeedRegistration', 'Online', 'Limited', + /// 'Offline', 'Upgrading', 'Initializing', 'InitializeFailed' + /// The integration runtime capabilities + /// dictionary + /// Status of the integration runtime node + /// version. + /// Version of the integration runtime + /// node. + /// The time at which the integration + /// runtime node was registered in ISO8601 format. + /// The most recent time at which the + /// integration runtime was connected in ISO8601 format. + /// The time at which the integration runtime + /// will expire in ISO8601 format. + /// The time the node last started + /// up. + /// The integration runtime node last stop + /// time. + /// The result of the last integration + /// runtime node update. Possible values include: 'None', 'Succeed', + /// 'Fail' + /// The last time for the integration + /// runtime node update start. + /// The last time for the integration + /// runtime node update end. + /// Indicates whether this node is the + /// active dispatcher for integration runtime requests. + /// Maximum concurrent jobs on the + /// integration runtime node. + /// The maximum concurrent jobs in this + /// integration runtime. + public SelfHostedIntegrationRuntimeNode(IDictionary additionalProperties = default(IDictionary), string nodeName = default(string), string machineName = default(string), string hostServiceUri = default(string), string status = default(string), IDictionary capabilities = default(IDictionary), string versionStatus = default(string), string version = default(string), System.DateTime? registerTime = default(System.DateTime?), System.DateTime? lastConnectTime = default(System.DateTime?), System.DateTime? expiryTime = default(System.DateTime?), System.DateTime? lastStartTime = default(System.DateTime?), System.DateTime? lastStopTime = default(System.DateTime?), string lastUpdateResult = default(string), System.DateTime? lastStartUpdateTime = default(System.DateTime?), System.DateTime? lastEndUpdateTime = default(System.DateTime?), bool? isActiveDispatcher = default(bool?), int? concurrentJobsLimit = default(int?), int? maxConcurrentJobs = default(int?)) + { + AdditionalProperties = additionalProperties; + NodeName = nodeName; + MachineName = machineName; + HostServiceUri = hostServiceUri; + Status = status; + Capabilities = capabilities; + VersionStatus = versionStatus; + Version = version; + RegisterTime = registerTime; + LastConnectTime = lastConnectTime; + ExpiryTime = expiryTime; + LastStartTime = lastStartTime; + LastStopTime = lastStopTime; + LastUpdateResult = lastUpdateResult; + LastStartUpdateTime = lastStartUpdateTime; + LastEndUpdateTime = lastEndUpdateTime; + IsActiveDispatcher = isActiveDispatcher; + ConcurrentJobsLimit = concurrentJobsLimit; + MaxConcurrentJobs = maxConcurrentJobs; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets name of the integration runtime node. + /// + [JsonProperty(PropertyName = "nodeName")] + public string NodeName { get; private set; } + + /// + /// Gets machine name of the integration runtime node. + /// + [JsonProperty(PropertyName = "machineName")] + public string MachineName { get; private set; } + + /// + /// Gets URI for the host machine of the integration runtime. + /// + [JsonProperty(PropertyName = "hostServiceUri")] + public string HostServiceUri { get; private set; } + + /// + /// Gets status of the integration runtime node. Possible values + /// include: 'NeedRegistration', 'Online', 'Limited', 'Offline', + /// 'Upgrading', 'Initializing', 'InitializeFailed' + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; private set; } + + /// + /// Gets the integration runtime capabilities dictionary + /// + [JsonProperty(PropertyName = "capabilities")] + public IDictionary Capabilities { get; private set; } + + /// + /// Gets status of the integration runtime node version. + /// + [JsonProperty(PropertyName = "versionStatus")] + public string VersionStatus { get; private set; } + + /// + /// Gets version of the integration runtime node. + /// + [JsonProperty(PropertyName = "version")] + public string Version { get; private set; } + + /// + /// Gets the time at which the integration runtime node was registered + /// in ISO8601 format. + /// + [JsonProperty(PropertyName = "registerTime")] + public System.DateTime? RegisterTime { get; private set; } + + /// + /// Gets the most recent time at which the integration runtime was + /// connected in ISO8601 format. + /// + [JsonProperty(PropertyName = "lastConnectTime")] + public System.DateTime? LastConnectTime { get; private set; } + + /// + /// Gets the time at which the integration runtime will expire in + /// ISO8601 format. + /// + [JsonProperty(PropertyName = "expiryTime")] + public System.DateTime? ExpiryTime { get; private set; } + + /// + /// Gets the time the node last started up. + /// + [JsonProperty(PropertyName = "lastStartTime")] + public System.DateTime? LastStartTime { get; private set; } + + /// + /// Gets the integration runtime node last stop time. + /// + [JsonProperty(PropertyName = "lastStopTime")] + public System.DateTime? LastStopTime { get; private set; } + + /// + /// Gets the result of the last integration runtime node update. + /// Possible values include: 'None', 'Succeed', 'Fail' + /// + [JsonProperty(PropertyName = "lastUpdateResult")] + public string LastUpdateResult { get; private set; } + + /// + /// Gets the last time for the integration runtime node update start. + /// + [JsonProperty(PropertyName = "lastStartUpdateTime")] + public System.DateTime? LastStartUpdateTime { get; private set; } + + /// + /// Gets the last time for the integration runtime node update end. + /// + [JsonProperty(PropertyName = "lastEndUpdateTime")] + public System.DateTime? LastEndUpdateTime { get; private set; } + + /// + /// Gets indicates whether this node is the active dispatcher for + /// integration runtime requests. + /// + [JsonProperty(PropertyName = "isActiveDispatcher")] + public bool? IsActiveDispatcher { get; private set; } + + /// + /// Gets maximum concurrent jobs on the integration runtime node. + /// + [JsonProperty(PropertyName = "concurrentJobsLimit")] + public int? ConcurrentJobsLimit { get; private set; } + + /// + /// Gets the maximum concurrent jobs in this integration runtime. + /// + [JsonProperty(PropertyName = "maxConcurrentJobs")] + public int? MaxConcurrentJobs { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SelfHostedIntegrationRuntimeNodeStatus.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SelfHostedIntegrationRuntimeNodeStatus.cs new file mode 100644 index 000000000000..4cdc75398dc9 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SelfHostedIntegrationRuntimeNodeStatus.cs @@ -0,0 +1,27 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for SelfHostedIntegrationRuntimeNodeStatus. + /// + public static class SelfHostedIntegrationRuntimeNodeStatus + { + public const string NeedRegistration = "NeedRegistration"; + public const string Online = "Online"; + public const string Limited = "Limited"; + public const string Offline = "Offline"; + public const string Upgrading = "Upgrading"; + public const string Initializing = "Initializing"; + public const string InitializeFailed = "InitializeFailed"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SelfHostedIntegrationRuntimeStatus.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SelfHostedIntegrationRuntimeStatus.cs new file mode 100644 index 000000000000..4a67a11d8df1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SelfHostedIntegrationRuntimeStatus.cs @@ -0,0 +1,232 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Self-hosted integration runtime status. + /// + [Newtonsoft.Json.JsonObject("SelfHosted")] + [Rest.Serialization.JsonTransformation] + public partial class SelfHostedIntegrationRuntimeStatus : IntegrationRuntimeStatus + { + /// + /// Initializes a new instance of the + /// SelfHostedIntegrationRuntimeStatus class. + /// + public SelfHostedIntegrationRuntimeStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// SelfHostedIntegrationRuntimeStatus class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The data factory name which the + /// integration runtime belong to. + /// The state of integration runtime. Possible + /// values include: 'Initial', 'Stopped', 'Started', 'Starting', + /// 'Stopping', 'NeedRegistration', 'Online', 'Limited', 'Offline', + /// 'AccessDenied' + /// The time at which the integration runtime + /// was created, in ISO8601 format. + /// The task queue id of the integration + /// runtime. + /// It is used to set the + /// encryption mode for node-node communication channel (when more than + /// 2 self-hosted integration runtime nodes exist). Possible values + /// include: 'NotSet', 'SslEncrypted', 'NotEncrypted' + /// Version of the integration runtime. + /// The list of nodes for this integration + /// runtime. + /// The date at which the integration + /// runtime will be scheduled to update, in ISO8601 format. + /// The time in the date scheduled by + /// service to update the integration runtime, e.g., PT03H is 3 + /// hours + /// The local time zone offset in + /// hours. + /// Object with additional information about + /// integration runtime capabilities. + /// The URLs for the services used in + /// integration runtime backend service. + /// Whether Self-hosted integration runtime + /// auto update has been turned on. Possible values include: 'On', + /// 'Off' + /// Status of the integration runtime + /// version. + /// The list of linked integration runtimes that + /// are created to share with this integration runtime. + /// The version that the integration + /// runtime is going to update to. + /// The latest version on download + /// center. + /// The estimated time when the self-hosted + /// integration runtime will be updated. + /// An + /// alternative option to ensure interactive authoring function when + /// your self-hosted integration runtime is unable to establish a + /// connection with Azure Relay. + public SelfHostedIntegrationRuntimeStatus(IDictionary additionalProperties = default(IDictionary), string dataFactoryName = default(string), string state = default(string), System.DateTime? createTime = default(System.DateTime?), string taskQueueId = default(string), string internalChannelEncryption = default(string), string version = default(string), IList nodes = default(IList), System.DateTime? scheduledUpdateDate = default(System.DateTime?), string updateDelayOffset = default(string), string localTimeZoneOffset = default(string), IDictionary capabilities = default(IDictionary), IList serviceUrls = default(IList), string autoUpdate = default(string), string versionStatus = default(string), IList links = default(IList), string pushedVersion = default(string), string latestVersion = default(string), System.DateTime? autoUpdateETA = default(System.DateTime?), bool? selfContainedInteractiveAuthoringEnabled = default(bool?)) + : base(additionalProperties, dataFactoryName, state) + { + CreateTime = createTime; + TaskQueueId = taskQueueId; + InternalChannelEncryption = internalChannelEncryption; + Version = version; + Nodes = nodes; + ScheduledUpdateDate = scheduledUpdateDate; + UpdateDelayOffset = updateDelayOffset; + LocalTimeZoneOffset = localTimeZoneOffset; + Capabilities = capabilities; + ServiceUrls = serviceUrls; + AutoUpdate = autoUpdate; + VersionStatus = versionStatus; + Links = links; + PushedVersion = pushedVersion; + LatestVersion = latestVersion; + AutoUpdateETA = autoUpdateETA; + SelfContainedInteractiveAuthoringEnabled = selfContainedInteractiveAuthoringEnabled; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the time at which the integration runtime was created, in + /// ISO8601 format. + /// + [JsonProperty(PropertyName = "typeProperties.createTime")] + public System.DateTime? CreateTime { get; private set; } + + /// + /// Gets the task queue id of the integration runtime. + /// + [JsonProperty(PropertyName = "typeProperties.taskQueueId")] + public string TaskQueueId { get; private set; } + + /// + /// Gets it is used to set the encryption mode for node-node + /// communication channel (when more than 2 self-hosted integration + /// runtime nodes exist). Possible values include: 'NotSet', + /// 'SslEncrypted', 'NotEncrypted' + /// + [JsonProperty(PropertyName = "typeProperties.internalChannelEncryption")] + public string InternalChannelEncryption { get; private set; } + + /// + /// Gets version of the integration runtime. + /// + [JsonProperty(PropertyName = "typeProperties.version")] + public string Version { get; private set; } + + /// + /// Gets or sets the list of nodes for this integration runtime. + /// + [JsonProperty(PropertyName = "typeProperties.nodes")] + public IList Nodes { get; set; } + + /// + /// Gets the date at which the integration runtime will be scheduled to + /// update, in ISO8601 format. + /// + [JsonProperty(PropertyName = "typeProperties.scheduledUpdateDate")] + public System.DateTime? ScheduledUpdateDate { get; private set; } + + /// + /// Gets the time in the date scheduled by service to update the + /// integration runtime, e.g., PT03H is 3 hours + /// + [JsonProperty(PropertyName = "typeProperties.updateDelayOffset")] + public string UpdateDelayOffset { get; private set; } + + /// + /// Gets the local time zone offset in hours. + /// + [JsonProperty(PropertyName = "typeProperties.localTimeZoneOffset")] + public string LocalTimeZoneOffset { get; private set; } + + /// + /// Gets object with additional information about integration runtime + /// capabilities. + /// + [JsonProperty(PropertyName = "typeProperties.capabilities")] + public IDictionary Capabilities { get; private set; } + + /// + /// Gets the URLs for the services used in integration runtime backend + /// service. + /// + [JsonProperty(PropertyName = "typeProperties.serviceUrls")] + public IList ServiceUrls { get; private set; } + + /// + /// Gets whether Self-hosted integration runtime auto update has been + /// turned on. Possible values include: 'On', 'Off' + /// + [JsonProperty(PropertyName = "typeProperties.autoUpdate")] + public string AutoUpdate { get; private set; } + + /// + /// Gets status of the integration runtime version. + /// + [JsonProperty(PropertyName = "typeProperties.versionStatus")] + public string VersionStatus { get; private set; } + + /// + /// Gets or sets the list of linked integration runtimes that are + /// created to share with this integration runtime. + /// + [JsonProperty(PropertyName = "typeProperties.links")] + public IList Links { get; set; } + + /// + /// Gets the version that the integration runtime is going to update + /// to. + /// + [JsonProperty(PropertyName = "typeProperties.pushedVersion")] + public string PushedVersion { get; private set; } + + /// + /// Gets the latest version on download center. + /// + [JsonProperty(PropertyName = "typeProperties.latestVersion")] + public string LatestVersion { get; private set; } + + /// + /// Gets the estimated time when the self-hosted integration runtime + /// will be updated. + /// + [JsonProperty(PropertyName = "typeProperties.autoUpdateETA")] + public System.DateTime? AutoUpdateETA { get; private set; } + + /// + /// Gets an alternative option to ensure interactive authoring function + /// when your self-hosted integration runtime is unable to establish a + /// connection with Azure Relay. + /// + [JsonProperty(PropertyName = "typeProperties.selfContainedInteractiveAuthoringEnabled")] + public bool? SelfContainedInteractiveAuthoringEnabled { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServiceNowAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServiceNowAuthenticationType.cs new file mode 100644 index 000000000000..35f58d69a9d5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServiceNowAuthenticationType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for ServiceNowAuthenticationType. + /// + public static class ServiceNowAuthenticationType + { + public const string Basic = "Basic"; + public const string OAuth2 = "OAuth2"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServiceNowLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServiceNowLinkedService.cs new file mode 100644 index 000000000000..5074032a1b05 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServiceNowLinkedService.cs @@ -0,0 +1,180 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ServiceNow server linked service. + /// + [Newtonsoft.Json.JsonObject("ServiceNow")] + [Rest.Serialization.JsonTransformation] + public partial class ServiceNowLinkedService : LinkedService + { + /// + /// Initializes a new instance of the ServiceNowLinkedService class. + /// + public ServiceNowLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ServiceNowLinkedService class. + /// + /// The endpoint of the ServiceNow server. (i.e. + /// <instance>.service-now.com) + /// The authentication type to use. + /// Possible values include: 'Basic', 'OAuth2' + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The user name used to connect to the + /// ServiceNow server for Basic and OAuth2 authentication. + /// The password corresponding to the user name + /// for Basic and OAuth2 authentication. + /// The client id for OAuth2 + /// authentication. + /// The client secret for OAuth2 + /// authentication. + /// Specifies whether the data + /// source endpoints are encrypted using HTTPS. The default value is + /// true. + /// Specifies whether to require the + /// host name in the server's certificate to match the host name of the + /// server when connecting over SSL. The default value is true. + /// Specifies whether to verify the + /// identity of the server when connecting over SSL. The default value + /// is true. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public ServiceNowLinkedService(object endpoint, string authenticationType, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object username = default(object), SecretBase password = default(SecretBase), object clientId = default(object), SecretBase clientSecret = default(SecretBase), object useEncryptedEndpoints = default(object), object useHostVerification = default(object), object usePeerVerification = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Endpoint = endpoint; + AuthenticationType = authenticationType; + Username = username; + Password = password; + ClientId = clientId; + ClientSecret = clientSecret; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the endpoint of the ServiceNow server. (i.e. + /// &lt;instance&gt;.service-now.com) + /// + [JsonProperty(PropertyName = "typeProperties.endpoint")] + public object Endpoint { get; set; } + + /// + /// Gets or sets the authentication type to use. Possible values + /// include: 'Basic', 'OAuth2' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets the user name used to connect to the ServiceNow server + /// for Basic and OAuth2 authentication. + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets the password corresponding to the user name for Basic + /// and OAuth2 authentication. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the client id for OAuth2 authentication. + /// + [JsonProperty(PropertyName = "typeProperties.clientId")] + public object ClientId { get; set; } + + /// + /// Gets or sets the client secret for OAuth2 authentication. + /// + [JsonProperty(PropertyName = "typeProperties.clientSecret")] + public SecretBase ClientSecret { get; set; } + + /// + /// Gets or sets specifies whether the data source endpoints are + /// encrypted using HTTPS. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useEncryptedEndpoints")] + public object UseEncryptedEndpoints { get; set; } + + /// + /// Gets or sets specifies whether to require the host name in the + /// server's certificate to match the host name of the server when + /// connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useHostVerification")] + public object UseHostVerification { get; set; } + + /// + /// Gets or sets specifies whether to verify the identity of the server + /// when connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.usePeerVerification")] + public object UsePeerVerification { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Endpoint == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Endpoint"); + } + if (AuthenticationType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AuthenticationType"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServiceNowObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServiceNowObjectDataset.cs new file mode 100644 index 000000000000..0cf32ca39d0a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServiceNowObjectDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ServiceNow server dataset. + /// + [Newtonsoft.Json.JsonObject("ServiceNowObject")] + [Rest.Serialization.JsonTransformation] + public partial class ServiceNowObjectDataset : Dataset + { + /// + /// Initializes a new instance of the ServiceNowObjectDataset class. + /// + public ServiceNowObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the ServiceNowObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name. Type: string (or Expression + /// with resultType string). + public ServiceNowObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServiceNowSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServiceNowSource.cs new file mode 100644 index 000000000000..96f4a4ef0f9b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServiceNowSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity ServiceNow server source. + /// + public partial class ServiceNowSource : TabularSource + { + /// + /// Initializes a new instance of the ServiceNowSource class. + /// + public ServiceNowSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ServiceNowSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public ServiceNowSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServiceNowV2AuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServiceNowV2AuthenticationType.cs new file mode 100644 index 000000000000..6ee35020b6b6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServiceNowV2AuthenticationType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for ServiceNowV2AuthenticationType. + /// + public static class ServiceNowV2AuthenticationType + { + public const string Basic = "Basic"; + public const string OAuth2 = "OAuth2"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServiceNowV2LinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServiceNowV2LinkedService.cs new file mode 100644 index 000000000000..b9e58e0d9818 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServiceNowV2LinkedService.cs @@ -0,0 +1,156 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ServiceNowV2 server linked service. + /// + [Newtonsoft.Json.JsonObject("ServiceNowV2")] + [Rest.Serialization.JsonTransformation] + public partial class ServiceNowV2LinkedService : LinkedService + { + /// + /// Initializes a new instance of the ServiceNowV2LinkedService class. + /// + public ServiceNowV2LinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ServiceNowV2LinkedService class. + /// + /// The endpoint of the ServiceNowV2 server. + /// (i.e. <instance>.service-now.com) + /// The authentication type to use. + /// Possible values include: 'Basic', 'OAuth2' + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The user name used to connect to the + /// ServiceNowV2 server for Basic and OAuth2 authentication. + /// The password corresponding to the user name + /// for Basic and OAuth2 authentication. + /// The client id for OAuth2 + /// authentication. + /// The client secret for OAuth2 + /// authentication. + /// GrantType for OAuth2 authentication. + /// Default value is password. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public ServiceNowV2LinkedService(object endpoint, string authenticationType, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object username = default(object), SecretBase password = default(SecretBase), object clientId = default(object), SecretBase clientSecret = default(SecretBase), object grantType = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Endpoint = endpoint; + AuthenticationType = authenticationType; + Username = username; + Password = password; + ClientId = clientId; + ClientSecret = clientSecret; + GrantType = grantType; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the endpoint of the ServiceNowV2 server. (i.e. + /// &lt;instance&gt;.service-now.com) + /// + [JsonProperty(PropertyName = "typeProperties.endpoint")] + public object Endpoint { get; set; } + + /// + /// Gets or sets the authentication type to use. Possible values + /// include: 'Basic', 'OAuth2' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets the user name used to connect to the ServiceNowV2 + /// server for Basic and OAuth2 authentication. + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets the password corresponding to the user name for Basic + /// and OAuth2 authentication. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the client id for OAuth2 authentication. + /// + [JsonProperty(PropertyName = "typeProperties.clientId")] + public object ClientId { get; set; } + + /// + /// Gets or sets the client secret for OAuth2 authentication. + /// + [JsonProperty(PropertyName = "typeProperties.clientSecret")] + public SecretBase ClientSecret { get; set; } + + /// + /// Gets or sets grantType for OAuth2 authentication. Default value is + /// password. + /// + [JsonProperty(PropertyName = "typeProperties.grantType")] + public object GrantType { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Endpoint == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Endpoint"); + } + if (AuthenticationType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AuthenticationType"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServiceNowV2ObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServiceNowV2ObjectDataset.cs new file mode 100644 index 000000000000..325a0297a43c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServiceNowV2ObjectDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// ServiceNowV2 server dataset. + /// + [Newtonsoft.Json.JsonObject("ServiceNowV2Object")] + [Rest.Serialization.JsonTransformation] + public partial class ServiceNowV2ObjectDataset : Dataset + { + /// + /// Initializes a new instance of the ServiceNowV2ObjectDataset class. + /// + public ServiceNowV2ObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the ServiceNowV2ObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name. Type: string (or Expression + /// with resultType string). + public ServiceNowV2ObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServiceNowV2Source.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServiceNowV2Source.cs new file mode 100644 index 000000000000..dcc2da6b97cf --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServiceNowV2Source.cs @@ -0,0 +1,84 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity ServiceNowV2 server source. + /// + public partial class ServiceNowV2Source : TabularSource + { + /// + /// Initializes a new instance of the ServiceNowV2Source class. + /// + public ServiceNowV2Source() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ServiceNowV2Source class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// Expression to filter data from + /// source. + /// Page size of the result. Type: integer (or + /// Expression with resultType integer). + public ServiceNowV2Source(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), ExpressionV2 expression = default(ExpressionV2), object pageSize = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Expression = expression; + PageSize = pageSize; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets expression to filter data from source. + /// + [JsonProperty(PropertyName = "expression")] + public ExpressionV2 Expression { get; set; } + + /// + /// Gets or sets page size of the result. Type: integer (or Expression + /// with resultType integer). + /// + [JsonProperty(PropertyName = "pageSize")] + public object PageSize { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServicePrincipalCredential.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServicePrincipalCredential.cs new file mode 100644 index 000000000000..82099cf020a8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServicePrincipalCredential.cs @@ -0,0 +1,97 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Service principal credential. + /// + [Newtonsoft.Json.JsonObject("ServicePrincipal")] + [Rest.Serialization.JsonTransformation] + public partial class ServicePrincipalCredential : Credential + { + /// + /// Initializes a new instance of the ServicePrincipalCredential class. + /// + public ServicePrincipalCredential() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ServicePrincipalCredential class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Credential description. + /// List of tags that can be used for + /// describing the Credential. + /// The app ID of the service + /// principal used to authenticate + /// The key of the service principal + /// used to authenticate. + /// The ID of the tenant to which the service + /// principal belongs + public ServicePrincipalCredential(IDictionary additionalProperties = default(IDictionary), string description = default(string), IList annotations = default(IList), object servicePrincipalId = default(object), AzureKeyVaultSecretReference servicePrincipalKey = default(AzureKeyVaultSecretReference), object tenant = default(object)) + : base(additionalProperties, description, annotations) + { + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the app ID of the service principal used to + /// authenticate + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalId")] + public object ServicePrincipalId { get; set; } + + /// + /// Gets or sets the key of the service principal used to authenticate. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalKey")] + public AzureKeyVaultSecretReference ServicePrincipalKey { get; set; } + + /// + /// Gets or sets the ID of the tenant to which the service principal + /// belongs + /// + [JsonProperty(PropertyName = "typeProperties.tenant")] + public object Tenant { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ServicePrincipalKey != null) + { + ServicePrincipalKey.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServicePrincipalCredentialType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServicePrincipalCredentialType.cs new file mode 100644 index 000000000000..a9817cbe8822 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ServicePrincipalCredentialType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for ServicePrincipalCredentialType. + /// + public static class ServicePrincipalCredentialType + { + public const string ServicePrincipalKey = "ServicePrincipalKey"; + public const string ServicePrincipalCert = "ServicePrincipalCert"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SetVariableActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SetVariableActivity.cs new file mode 100644 index 000000000000..2e37f36c525c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SetVariableActivity.cs @@ -0,0 +1,110 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Set value for a Variable. + /// + [Newtonsoft.Json.JsonObject("SetVariable")] + [Rest.Serialization.JsonTransformation] + public partial class SetVariableActivity : ControlActivity + { + /// + /// Initializes a new instance of the SetVariableActivity class. + /// + public SetVariableActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SetVariableActivity class. + /// + /// Activity name. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Name of the variable whose value needs + /// to be set. + /// Value to be set. Could be a static value or + /// Expression. + /// If set to true, it sets the + /// pipeline run return value. + /// Activity policy. + public SetVariableActivity(string name, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), string variableName = default(string), object value = default(object), bool? setSystemVariable = default(bool?), SecureInputOutputPolicy policy = default(SecureInputOutputPolicy)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties) + { + VariableName = variableName; + Value = value; + SetSystemVariable = setSystemVariable; + Policy = policy; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the variable whose value needs to be set. + /// + [JsonProperty(PropertyName = "typeProperties.variableName")] + public string VariableName { get; set; } + + /// + /// Gets or sets value to be set. Could be a static value or + /// Expression. + /// + [JsonProperty(PropertyName = "typeProperties.value")] + public object Value { get; set; } + + /// + /// Gets or sets if set to true, it sets the pipeline run return value. + /// + [JsonProperty(PropertyName = "typeProperties.setSystemVariable")] + public bool? SetSystemVariable { get; set; } + + /// + /// Gets or sets activity policy. + /// + [JsonProperty(PropertyName = "policy")] + public SecureInputOutputPolicy Policy { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SftpAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SftpAuthenticationType.cs new file mode 100644 index 000000000000..e7d93b9a8692 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SftpAuthenticationType.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for SftpAuthenticationType. + /// + public static class SftpAuthenticationType + { + public const string Basic = "Basic"; + public const string SshPublicKey = "SshPublicKey"; + public const string MultiFactor = "MultiFactor"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SftpLocation.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SftpLocation.cs new file mode 100644 index 000000000000..74202e259808 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SftpLocation.cs @@ -0,0 +1,51 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The location of SFTP dataset. + /// + public partial class SftpLocation : DatasetLocation + { + /// + /// Initializes a new instance of the SftpLocation class. + /// + public SftpLocation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SftpLocation class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Specify the folder path of dataset. Type: + /// string (or Expression with resultType string) + /// Specify the file name of dataset. Type: + /// string (or Expression with resultType string). + public SftpLocation(IDictionary additionalProperties = default(IDictionary), object folderPath = default(object), object fileName = default(object)) + : base(additionalProperties, folderPath, fileName) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SftpReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SftpReadSettings.cs new file mode 100644 index 000000000000..98422fc25917 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SftpReadSettings.cs @@ -0,0 +1,168 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Sftp read settings. + /// + public partial class SftpReadSettings : StoreReadSettings + { + /// + /// Initializes a new instance of the SftpReadSettings class. + /// + public SftpReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SftpReadSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// If true, files under the folder path will + /// be read recursively. Default is true. Type: boolean (or Expression + /// with resultType boolean). + /// Sftp wildcardFolderPath. Type: + /// string (or Expression with resultType string). + /// Sftp wildcardFileName. Type: string + /// (or Expression with resultType string). + /// Indicates whether to enable + /// partition discovery. Type: boolean (or Expression with resultType + /// boolean). + /// Specify the root path where + /// partition discovery starts from. Type: string (or Expression with + /// resultType string). + /// Point to a text file that lists each + /// file (relative path to the path configured in the dataset) that you + /// want to copy. Type: string (or Expression with resultType + /// string). + /// Indicates whether the + /// source files need to be deleted after copy completion. Default is + /// false. Type: boolean (or Expression with resultType + /// boolean). + /// The start of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + /// The end of file's modified + /// datetime. Type: string (or Expression with resultType + /// string). + /// If true, disable parallel reading + /// within each file. Default is false. Type: boolean (or Expression + /// with resultType boolean). + public SftpReadSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object recursive = default(object), object wildcardFolderPath = default(object), object wildcardFileName = default(object), object enablePartitionDiscovery = default(object), object partitionRootPath = default(object), object fileListPath = default(object), object deleteFilesAfterCompletion = default(object), object modifiedDatetimeStart = default(object), object modifiedDatetimeEnd = default(object), object disableChunking = default(object)) + : base(additionalProperties, maxConcurrentConnections, disableMetricsCollection) + { + Recursive = recursive; + WildcardFolderPath = wildcardFolderPath; + WildcardFileName = wildcardFileName; + EnablePartitionDiscovery = enablePartitionDiscovery; + PartitionRootPath = partitionRootPath; + FileListPath = fileListPath; + DeleteFilesAfterCompletion = deleteFilesAfterCompletion; + ModifiedDatetimeStart = modifiedDatetimeStart; + ModifiedDatetimeEnd = modifiedDatetimeEnd; + DisableChunking = disableChunking; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets if true, files under the folder path will be read + /// recursively. Default is true. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "recursive")] + public object Recursive { get; set; } + + /// + /// Gets or sets sftp wildcardFolderPath. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFolderPath")] + public object WildcardFolderPath { get; set; } + + /// + /// Gets or sets sftp wildcardFileName. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "wildcardFileName")] + public object WildcardFileName { get; set; } + + /// + /// Gets or sets indicates whether to enable partition discovery. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "enablePartitionDiscovery")] + public object EnablePartitionDiscovery { get; set; } + + /// + /// Gets or sets specify the root path where partition discovery starts + /// from. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionRootPath")] + public object PartitionRootPath { get; set; } + + /// + /// Gets or sets point to a text file that lists each file (relative + /// path to the path configured in the dataset) that you want to copy. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "fileListPath")] + public object FileListPath { get; set; } + + /// + /// Gets or sets indicates whether the source files need to be deleted + /// after copy completion. Default is false. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "deleteFilesAfterCompletion")] + public object DeleteFilesAfterCompletion { get; set; } + + /// + /// Gets or sets the start of file's modified datetime. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "modifiedDatetimeStart")] + public object ModifiedDatetimeStart { get; set; } + + /// + /// Gets or sets the end of file's modified datetime. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "modifiedDatetimeEnd")] + public object ModifiedDatetimeEnd { get; set; } + + /// + /// Gets or sets if true, disable parallel reading within each file. + /// Default is false. Type: boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "disableChunking")] + public object DisableChunking { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SftpServerLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SftpServerLinkedService.cs new file mode 100644 index 000000000000..32bcdd96c735 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SftpServerLinkedService.cs @@ -0,0 +1,207 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A linked service for an SSH File Transfer Protocol (SFTP) server. + /// + [Newtonsoft.Json.JsonObject("Sftp")] + [Rest.Serialization.JsonTransformation] + public partial class SftpServerLinkedService : LinkedService + { + /// + /// Initializes a new instance of the SftpServerLinkedService class. + /// + public SftpServerLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SftpServerLinkedService class. + /// + /// The SFTP server host name. Type: string (or + /// Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The TCP port number that the SFTP server uses to + /// listen for client connections. Default value is 22. Type: integer + /// (or Expression with resultType integer), minimum: 0. + /// The authentication type to be used + /// to connect to the FTP server. Possible values include: 'Basic', + /// 'SshPublicKey', 'MultiFactor' + /// The username used to log on to the SFTP + /// server. Type: string (or Expression with resultType + /// string). + /// Password to logon the SFTP server for Basic + /// authentication. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// The SSH private key file path for + /// SshPublicKey authentication. Only valid for on-premises copy. For + /// on-premises copy with SshPublicKey authentication, either + /// PrivateKeyPath or PrivateKeyContent should be specified. SSH + /// private key should be OpenSSH format. Type: string (or Expression + /// with resultType string). + /// Base64 encoded SSH private key + /// content for SshPublicKey authentication. For on-premises copy with + /// SshPublicKey authentication, either PrivateKeyPath or + /// PrivateKeyContent should be specified. SSH private key should be + /// OpenSSH format. + /// The password to decrypt the SSH private + /// key if the SSH private key is encrypted. + /// If true, skip the SSH host key + /// validation. Default value is false. Type: boolean (or Expression + /// with resultType boolean). + /// The host key finger-print of the + /// SFTP server. When SkipHostKeyValidation is false, + /// HostKeyFingerprint should be specified. Type: string (or Expression + /// with resultType string). + public SftpServerLinkedService(object host, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object port = default(object), string authenticationType = default(string), object userName = default(object), SecretBase password = default(SecretBase), string encryptedCredential = default(string), object privateKeyPath = default(object), SecretBase privateKeyContent = default(SecretBase), SecretBase passPhrase = default(SecretBase), object skipHostKeyValidation = default(object), object hostKeyFingerprint = default(object)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Host = host; + Port = port; + AuthenticationType = authenticationType; + UserName = userName; + Password = password; + EncryptedCredential = encryptedCredential; + PrivateKeyPath = privateKeyPath; + PrivateKeyContent = privateKeyContent; + PassPhrase = passPhrase; + SkipHostKeyValidation = skipHostKeyValidation; + HostKeyFingerprint = hostKeyFingerprint; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the SFTP server host name. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.host")] + public object Host { get; set; } + + /// + /// Gets or sets the TCP port number that the SFTP server uses to + /// listen for client connections. Default value is 22. Type: integer + /// (or Expression with resultType integer), minimum: 0. + /// + [JsonProperty(PropertyName = "typeProperties.port")] + public object Port { get; set; } + + /// + /// Gets or sets the authentication type to be used to connect to the + /// FTP server. Possible values include: 'Basic', 'SshPublicKey', + /// 'MultiFactor' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets the username used to log on to the SFTP server. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets password to logon the SFTP server for Basic + /// authentication. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets the SSH private key file path for SshPublicKey + /// authentication. Only valid for on-premises copy. For on-premises + /// copy with SshPublicKey authentication, either PrivateKeyPath or + /// PrivateKeyContent should be specified. SSH private key should be + /// OpenSSH format. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.privateKeyPath")] + public object PrivateKeyPath { get; set; } + + /// + /// Gets or sets base64 encoded SSH private key content for + /// SshPublicKey authentication. For on-premises copy with SshPublicKey + /// authentication, either PrivateKeyPath or PrivateKeyContent should + /// be specified. SSH private key should be OpenSSH format. + /// + [JsonProperty(PropertyName = "typeProperties.privateKeyContent")] + public SecretBase PrivateKeyContent { get; set; } + + /// + /// Gets or sets the password to decrypt the SSH private key if the SSH + /// private key is encrypted. + /// + [JsonProperty(PropertyName = "typeProperties.passPhrase")] + public SecretBase PassPhrase { get; set; } + + /// + /// Gets or sets if true, skip the SSH host key validation. Default + /// value is false. Type: boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "typeProperties.skipHostKeyValidation")] + public object SkipHostKeyValidation { get; set; } + + /// + /// Gets or sets the host key finger-print of the SFTP server. When + /// SkipHostKeyValidation is false, HostKeyFingerprint should be + /// specified. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.hostKeyFingerprint")] + public object HostKeyFingerprint { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Host == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Host"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SftpWriteSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SftpWriteSettings.cs new file mode 100644 index 000000000000..27e1ebc9e376 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SftpWriteSettings.cs @@ -0,0 +1,84 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Sftp write settings. + /// + public partial class SftpWriteSettings : StoreWriteSettings + { + /// + /// Initializes a new instance of the SftpWriteSettings class. + /// + public SftpWriteSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SftpWriteSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The type of copy behavior for copy + /// sink. + /// Specify the custom metadata to be added to + /// sink data. Type: array of objects (or Expression with resultType + /// array of objects). + /// Specifies the timeout for writing + /// each chunk to SFTP server. Default value: 01:00:00 (one hour). + /// Type: string (or Expression with resultType string). + /// Upload to temporary file(s) and + /// rename. Disable this option if your SFTP server doesn't support + /// rename operation. Type: boolean (or Expression with resultType + /// boolean). + public SftpWriteSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object copyBehavior = default(object), IList metadata = default(IList), object operationTimeout = default(object), object useTempFileRename = default(object)) + : base(additionalProperties, maxConcurrentConnections, disableMetricsCollection, copyBehavior, metadata) + { + OperationTimeout = operationTimeout; + UseTempFileRename = useTempFileRename; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies the timeout for writing each chunk to SFTP + /// server. Default value: 01:00:00 (one hour). Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "operationTimeout")] + public object OperationTimeout { get; set; } + + /// + /// Gets or sets upload to temporary file(s) and rename. Disable this + /// option if your SFTP server doesn't support rename operation. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "useTempFileRename")] + public object UseTempFileRename { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SharePointOnlineListLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SharePointOnlineListLinkedService.cs new file mode 100644 index 000000000000..6455007bf2b4 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SharePointOnlineListLinkedService.cs @@ -0,0 +1,187 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// SharePoint Online List linked service. + /// + [Newtonsoft.Json.JsonObject("SharePointOnlineList")] + [Rest.Serialization.JsonTransformation] + public partial class SharePointOnlineListLinkedService : LinkedService + { + /// + /// Initializes a new instance of the SharePointOnlineListLinkedService + /// class. + /// + public SharePointOnlineListLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SharePointOnlineListLinkedService + /// class. + /// + /// The URL of the SharePoint Online site. For + /// example, https://contoso.sharepoint.com/sites/siteName. Type: + /// string (or Expression with resultType string). + /// The tenant ID under which your application + /// resides. You can find it from Azure portal Active Directory + /// overview page. Type: string (or Expression with resultType + /// string). + /// The application (client) ID of + /// your application registered in Azure Active Directory. Make sure to + /// grant SharePoint site permission to this application. Type: string + /// (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The client secret of your + /// application registered in Azure Active Directory. Type: string (or + /// Expression with resultType string). + /// The service principal + /// credential type to use in Server-To-Server authentication. + /// 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for + /// certificate. Type: string (or Expression with resultType + /// string). + /// Specify the base64 + /// encoded certificate of your application registered in Azure Active + /// Directory. Type: string (or Expression with resultType + /// string). + /// Specify the + /// password of your certificate if your certificate has a password and + /// you are using AadServicePrincipal authentication. Type: string (or + /// Expression with resultType string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public SharePointOnlineListLinkedService(object siteUrl, object tenantId, object servicePrincipalId, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), SecretBase servicePrincipalKey = default(SecretBase), object servicePrincipalCredentialType = default(object), SecretBase servicePrincipalEmbeddedCert = default(SecretBase), SecretBase servicePrincipalEmbeddedCertPassword = default(SecretBase), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + SiteUrl = siteUrl; + TenantId = tenantId; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + ServicePrincipalCredentialType = servicePrincipalCredentialType; + ServicePrincipalEmbeddedCert = servicePrincipalEmbeddedCert; + ServicePrincipalEmbeddedCertPassword = servicePrincipalEmbeddedCertPassword; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the URL of the SharePoint Online site. For example, + /// https://contoso.sharepoint.com/sites/siteName. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.siteUrl")] + public object SiteUrl { get; set; } + + /// + /// Gets or sets the tenant ID under which your application resides. + /// You can find it from Azure portal Active Directory overview page. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tenantId")] + public object TenantId { get; set; } + + /// + /// Gets or sets the application (client) ID of your application + /// registered in Azure Active Directory. Make sure to grant SharePoint + /// site permission to this application. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalId")] + public object ServicePrincipalId { get; set; } + + /// + /// Gets or sets the client secret of your application registered in + /// Azure Active Directory. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalKey")] + public SecretBase ServicePrincipalKey { get; set; } + + /// + /// Gets or sets the service principal credential type to use in + /// Server-To-Server authentication. 'ServicePrincipalKey' for + /// key/secret, 'ServicePrincipalCert' for certificate. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalCredentialType")] + public object ServicePrincipalCredentialType { get; set; } + + /// + /// Gets or sets specify the base64 encoded certificate of your + /// application registered in Azure Active Directory. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalEmbeddedCert")] + public SecretBase ServicePrincipalEmbeddedCert { get; set; } + + /// + /// Gets or sets specify the password of your certificate if your + /// certificate has a password and you are using AadServicePrincipal + /// authentication. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalEmbeddedCertPassword")] + public SecretBase ServicePrincipalEmbeddedCertPassword { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (SiteUrl == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SiteUrl"); + } + if (TenantId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TenantId"); + } + if (ServicePrincipalId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ServicePrincipalId"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SharePointOnlineListResourceDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SharePointOnlineListResourceDataset.cs new file mode 100644 index 000000000000..45153ca4059a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SharePointOnlineListResourceDataset.cs @@ -0,0 +1,88 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The sharepoint online list resource dataset. + /// + [Newtonsoft.Json.JsonObject("SharePointOnlineListResource")] + [Rest.Serialization.JsonTransformation] + public partial class SharePointOnlineListResourceDataset : Dataset + { + /// + /// Initializes a new instance of the + /// SharePointOnlineListResourceDataset class. + /// + public SharePointOnlineListResourceDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// SharePointOnlineListResourceDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The name of the SharePoint Online list. + /// Type: string (or Expression with resultType string). + public SharePointOnlineListResourceDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object listName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + ListName = listName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the SharePoint Online list. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.listName")] + public object ListName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SharePointOnlineListSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SharePointOnlineListSource.cs new file mode 100644 index 000000000000..0278c6abbb23 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SharePointOnlineListSource.cs @@ -0,0 +1,85 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for sharePoint online list source. + /// + public partial class SharePointOnlineListSource : CopySource + { + /// + /// Initializes a new instance of the SharePointOnlineListSource class. + /// + public SharePointOnlineListSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SharePointOnlineListSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The OData query to filter the data in + /// SharePoint Online list. For example, "$top=1". Type: string (or + /// Expression with resultType string). + /// The wait time to get a response + /// from SharePoint Online. Default value is 5 minutes (00:05:00). + /// Type: string (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + public SharePointOnlineListSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object query = default(object), object httpRequestTimeout = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + Query = query; + HttpRequestTimeout = httpRequestTimeout; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the OData query to filter the data in SharePoint + /// Online list. For example, "$top=1". Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets the wait time to get a response from SharePoint + /// Online. Default value is 5 minutes (00:05:00). Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "httpRequestTimeout")] + public object HttpRequestTimeout { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ShopifyLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ShopifyLinkedService.cs new file mode 100644 index 000000000000..f054488de451 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ShopifyLinkedService.cs @@ -0,0 +1,139 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Shopify Service linked service. + /// + [Newtonsoft.Json.JsonObject("Shopify")] + [Rest.Serialization.JsonTransformation] + public partial class ShopifyLinkedService : LinkedService + { + /// + /// Initializes a new instance of the ShopifyLinkedService class. + /// + public ShopifyLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ShopifyLinkedService class. + /// + /// The endpoint of the Shopify server. (i.e. + /// mystore.myshopify.com) + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The API access token that can be used to + /// access Shopify’s data. The token won't expire if it is offline + /// mode. + /// Specifies whether the data + /// source endpoints are encrypted using HTTPS. The default value is + /// true. + /// Specifies whether to require the + /// host name in the server's certificate to match the host name of the + /// server when connecting over SSL. The default value is true. + /// Specifies whether to verify the + /// identity of the server when connecting over SSL. The default value + /// is true. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public ShopifyLinkedService(object host, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), SecretBase accessToken = default(SecretBase), object useEncryptedEndpoints = default(object), object useHostVerification = default(object), object usePeerVerification = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Host = host; + AccessToken = accessToken; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the endpoint of the Shopify server. (i.e. + /// mystore.myshopify.com) + /// + [JsonProperty(PropertyName = "typeProperties.host")] + public object Host { get; set; } + + /// + /// Gets or sets the API access token that can be used to access + /// Shopify’s data. The token won't expire if it is offline mode. + /// + [JsonProperty(PropertyName = "typeProperties.accessToken")] + public SecretBase AccessToken { get; set; } + + /// + /// Gets or sets specifies whether the data source endpoints are + /// encrypted using HTTPS. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useEncryptedEndpoints")] + public object UseEncryptedEndpoints { get; set; } + + /// + /// Gets or sets specifies whether to require the host name in the + /// server's certificate to match the host name of the server when + /// connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useHostVerification")] + public object UseHostVerification { get; set; } + + /// + /// Gets or sets specifies whether to verify the identity of the server + /// when connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.usePeerVerification")] + public object UsePeerVerification { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Host == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Host"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ShopifyObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ShopifyObjectDataset.cs new file mode 100644 index 000000000000..3e349a2ed443 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ShopifyObjectDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Shopify Service dataset. + /// + [Newtonsoft.Json.JsonObject("ShopifyObject")] + [Rest.Serialization.JsonTransformation] + public partial class ShopifyObjectDataset : Dataset + { + /// + /// Initializes a new instance of the ShopifyObjectDataset class. + /// + public ShopifyObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the ShopifyObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name. Type: string (or Expression + /// with resultType string). + public ShopifyObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ShopifySource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ShopifySource.cs new file mode 100644 index 000000000000..73ffc53a86be --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ShopifySource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Shopify Service source. + /// + public partial class ShopifySource : TabularSource + { + /// + /// Initializes a new instance of the ShopifySource class. + /// + public ShopifySource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ShopifySource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public ShopifySource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SkipErrorFile.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SkipErrorFile.cs new file mode 100644 index 000000000000..15768887653d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SkipErrorFile.cs @@ -0,0 +1,67 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Skip error file. + /// + public partial class SkipErrorFile + { + /// + /// Initializes a new instance of the SkipErrorFile class. + /// + public SkipErrorFile() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SkipErrorFile class. + /// + /// Skip if file is deleted by other client + /// during copy. Default is true. Type: boolean (or Expression with + /// resultType boolean). + /// Skip if source/sink file changed by + /// other concurrent write. Default is false. Type: boolean (or + /// Expression with resultType boolean). + public SkipErrorFile(object fileMissing = default(object), object dataInconsistency = default(object)) + { + FileMissing = fileMissing; + DataInconsistency = dataInconsistency; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets skip if file is deleted by other client during copy. + /// Default is true. Type: boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "fileMissing")] + public object FileMissing { get; set; } + + /// + /// Gets or sets skip if source/sink file changed by other concurrent + /// write. Default is false. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "dataInconsistency")] + public object DataInconsistency { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SmartsheetLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SmartsheetLinkedService.cs new file mode 100644 index 000000000000..b6d81f13b164 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SmartsheetLinkedService.cs @@ -0,0 +1,93 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for Smartsheet. + /// + [Newtonsoft.Json.JsonObject("Smartsheet")] + [Rest.Serialization.JsonTransformation] + public partial class SmartsheetLinkedService : LinkedService + { + /// + /// Initializes a new instance of the SmartsheetLinkedService class. + /// + public SmartsheetLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SmartsheetLinkedService class. + /// + /// The api token for the Smartsheet + /// source. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public SmartsheetLinkedService(SecretBase apiToken, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ApiToken = apiToken; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the api token for the Smartsheet source. + /// + [JsonProperty(PropertyName = "typeProperties.apiToken")] + public SecretBase ApiToken { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ApiToken == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ApiToken"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeAuthenticationType.cs new file mode 100644 index 000000000000..d22f3fdf5f98 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeAuthenticationType.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for SnowflakeAuthenticationType. + /// + public static class SnowflakeAuthenticationType + { + public const string Basic = "Basic"; + public const string KeyPair = "KeyPair"; + public const string AADServicePrincipal = "AADServicePrincipal"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeDataset.cs new file mode 100644 index 000000000000..f8eda0b771e0 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeDataset.cs @@ -0,0 +1,97 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The snowflake dataset. + /// + [Newtonsoft.Json.JsonObject("SnowflakeTable")] + [Rest.Serialization.JsonTransformation] + public partial class SnowflakeDataset : Dataset + { + /// + /// Initializes a new instance of the SnowflakeDataset class. + /// + public SnowflakeDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the SnowflakeDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The schema name of the + /// Snowflake database. Type: string (or Expression with resultType + /// string). + /// The table name of the Snowflake database. Type: + /// string (or Expression with resultType string). + public SnowflakeDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object snowflakeDatasetSchema = default(object), object table = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + SnowflakeDatasetSchema = snowflakeDatasetSchema; + Table = table; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the schema name of the Snowflake database. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object SnowflakeDatasetSchema { get; set; } + + /// + /// Gets or sets the table name of the Snowflake database. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeExportCopyCommand.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeExportCopyCommand.cs new file mode 100644 index 000000000000..c439aa2c2c8d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeExportCopyCommand.cs @@ -0,0 +1,92 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Snowflake export command settings. + /// + public partial class SnowflakeExportCopyCommand : ExportSettings + { + /// + /// Initializes a new instance of the SnowflakeExportCopyCommand class. + /// + public SnowflakeExportCopyCommand() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SnowflakeExportCopyCommand class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Additional copy options + /// directly passed to snowflake Copy Command. Type: key value pairs + /// (value should be string type) (or Expression with resultType + /// object). Example: "additionalCopyOptions": { "DATE_FORMAT": + /// "MM/DD/YYYY", "TIME_FORMAT": "'HH24:MI:SS.FF'" } + /// Additional format options + /// directly passed to snowflake Copy Command. Type: key value pairs + /// (value should be string type) (or Expression with resultType + /// object). Example: "additionalFormatOptions": { "OVERWRITE": "TRUE", + /// "MAX_FILE_SIZE": "'FALSE'" } + /// The name of the snowflake storage + /// integration to use for the copy operation. Type: string (or + /// Expression with resultType string). + public SnowflakeExportCopyCommand(IDictionary additionalProperties = default(IDictionary), IDictionary additionalCopyOptions = default(IDictionary), IDictionary additionalFormatOptions = default(IDictionary), object storageIntegration = default(object)) + : base(additionalProperties) + { + AdditionalCopyOptions = additionalCopyOptions; + AdditionalFormatOptions = additionalFormatOptions; + StorageIntegration = storageIntegration; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets additional copy options directly passed to snowflake + /// Copy Command. Type: key value pairs (value should be string type) + /// (or Expression with resultType object). Example: + /// "additionalCopyOptions": { "DATE_FORMAT": "MM/DD/YYYY", + /// "TIME_FORMAT": "'HH24:MI:SS.FF'" } + /// + [JsonProperty(PropertyName = "additionalCopyOptions")] + public IDictionary AdditionalCopyOptions { get; set; } + + /// + /// Gets or sets additional format options directly passed to snowflake + /// Copy Command. Type: key value pairs (value should be string type) + /// (or Expression with resultType object). Example: + /// "additionalFormatOptions": { "OVERWRITE": "TRUE", "MAX_FILE_SIZE": + /// "'FALSE'" } + /// + [JsonProperty(PropertyName = "additionalFormatOptions")] + public IDictionary AdditionalFormatOptions { get; set; } + + /// + /// Gets or sets the name of the snowflake storage integration to use + /// for the copy operation. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "storageIntegration")] + public object StorageIntegration { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeImportCopyCommand.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeImportCopyCommand.cs new file mode 100644 index 000000000000..5953313a20d6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeImportCopyCommand.cs @@ -0,0 +1,92 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Snowflake import command settings. + /// + public partial class SnowflakeImportCopyCommand : ImportSettings + { + /// + /// Initializes a new instance of the SnowflakeImportCopyCommand class. + /// + public SnowflakeImportCopyCommand() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SnowflakeImportCopyCommand class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Additional copy options + /// directly passed to snowflake Copy Command. Type: key value pairs + /// (value should be string type) (or Expression with resultType + /// object). Example: "additionalCopyOptions": { "DATE_FORMAT": + /// "MM/DD/YYYY", "TIME_FORMAT": "'HH24:MI:SS.FF'" } + /// Additional format options + /// directly passed to snowflake Copy Command. Type: key value pairs + /// (value should be string type) (or Expression with resultType + /// object). Example: "additionalFormatOptions": { "FORCE": "TRUE", + /// "LOAD_UNCERTAIN_FILES": "'FALSE'" } + /// The name of the snowflake storage + /// integration to use for the copy operation. Type: string (or + /// Expression with resultType string). + public SnowflakeImportCopyCommand(IDictionary additionalProperties = default(IDictionary), IDictionary additionalCopyOptions = default(IDictionary), IDictionary additionalFormatOptions = default(IDictionary), object storageIntegration = default(object)) + : base(additionalProperties) + { + AdditionalCopyOptions = additionalCopyOptions; + AdditionalFormatOptions = additionalFormatOptions; + StorageIntegration = storageIntegration; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets additional copy options directly passed to snowflake + /// Copy Command. Type: key value pairs (value should be string type) + /// (or Expression with resultType object). Example: + /// "additionalCopyOptions": { "DATE_FORMAT": "MM/DD/YYYY", + /// "TIME_FORMAT": "'HH24:MI:SS.FF'" } + /// + [JsonProperty(PropertyName = "additionalCopyOptions")] + public IDictionary AdditionalCopyOptions { get; set; } + + /// + /// Gets or sets additional format options directly passed to snowflake + /// Copy Command. Type: key value pairs (value should be string type) + /// (or Expression with resultType object). Example: + /// "additionalFormatOptions": { "FORCE": "TRUE", + /// "LOAD_UNCERTAIN_FILES": "'FALSE'" } + /// + [JsonProperty(PropertyName = "additionalFormatOptions")] + public IDictionary AdditionalFormatOptions { get; set; } + + /// + /// Gets or sets the name of the snowflake storage integration to use + /// for the copy operation. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "storageIntegration")] + public object StorageIntegration { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeLinkedService.cs new file mode 100644 index 000000000000..0934dd024a54 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeLinkedService.cs @@ -0,0 +1,108 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Snowflake linked service. + /// + [Newtonsoft.Json.JsonObject("Snowflake")] + [Rest.Serialization.JsonTransformation] + public partial class SnowflakeLinkedService : LinkedService + { + /// + /// Initializes a new instance of the SnowflakeLinkedService class. + /// + public SnowflakeLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SnowflakeLinkedService class. + /// + /// The connection string of snowflake. + /// Type: string, SecureString. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The Azure key vault secret reference of + /// password in connection string. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public SnowflakeLinkedService(object connectionString, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), AzureKeyVaultSecretReference password = default(AzureKeyVaultSecretReference), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionString = connectionString; + Password = password; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the connection string of snowflake. Type: string, + /// SecureString. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of password in + /// connection string. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public AzureKeyVaultSecretReference Password { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ConnectionString == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ConnectionString"); + } + if (Password != null) + { + Password.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeSink.cs new file mode 100644 index 000000000000..c750086bdbe3 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeSink.cs @@ -0,0 +1,82 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity snowflake sink. + /// + public partial class SnowflakeSink : CopySink + { + /// + /// Initializes a new instance of the SnowflakeSink class. + /// + public SnowflakeSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SnowflakeSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// SQL pre-copy script. Type: string (or + /// Expression with resultType string). + /// Snowflake import settings. + public SnowflakeSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object preCopyScript = default(object), SnowflakeImportCopyCommand importSettings = default(SnowflakeImportCopyCommand)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + PreCopyScript = preCopyScript; + ImportSettings = importSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SQL pre-copy script. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "preCopyScript")] + public object PreCopyScript { get; set; } + + /// + /// Gets or sets snowflake import settings. + /// + [JsonProperty(PropertyName = "importSettings")] + public SnowflakeImportCopyCommand ImportSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeSource.cs new file mode 100644 index 000000000000..37e1b3037242 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeSource.cs @@ -0,0 +1,91 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity snowflake source. + /// + public partial class SnowflakeSource : CopySource + { + /// + /// Initializes a new instance of the SnowflakeSource class. + /// + public SnowflakeSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SnowflakeSource class. + /// + /// Snowflake export settings. + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Snowflake Sql query. Type: string (or + /// Expression with resultType string). + public SnowflakeSource(SnowflakeExportCopyCommand exportSettings, IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + Query = query; + ExportSettings = exportSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets snowflake Sql query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets snowflake export settings. + /// + [JsonProperty(PropertyName = "exportSettings")] + public SnowflakeExportCopyCommand ExportSettings { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ExportSettings == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ExportSettings"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeV2Dataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeV2Dataset.cs new file mode 100644 index 000000000000..e508126fa497 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeV2Dataset.cs @@ -0,0 +1,97 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The snowflake dataset. + /// + [Newtonsoft.Json.JsonObject("SnowflakeV2Table")] + [Rest.Serialization.JsonTransformation] + public partial class SnowflakeV2Dataset : Dataset + { + /// + /// Initializes a new instance of the SnowflakeV2Dataset class. + /// + public SnowflakeV2Dataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the SnowflakeV2Dataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The schema name of the + /// Snowflake database. Type: string (or Expression with resultType + /// string). + /// The table name of the Snowflake database. Type: + /// string (or Expression with resultType string). + public SnowflakeV2Dataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object snowflakeV2DatasetSchema = default(object), object table = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + SnowflakeV2DatasetSchema = snowflakeV2DatasetSchema; + Table = table; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the schema name of the Snowflake database. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object SnowflakeV2DatasetSchema { get; set; } + + /// + /// Gets or sets the table name of the Snowflake database. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeV2LinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeV2LinkedService.cs new file mode 100644 index 000000000000..d15f7c7bdcf0 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeV2LinkedService.cs @@ -0,0 +1,220 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Snowflake linked service. + /// + [Newtonsoft.Json.JsonObject("SnowflakeV2")] + [Rest.Serialization.JsonTransformation] + public partial class SnowflakeV2LinkedService : LinkedService + { + /// + /// Initializes a new instance of the SnowflakeV2LinkedService class. + /// + public SnowflakeV2LinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SnowflakeV2LinkedService class. + /// + /// The account identifier of your + /// Snowflake account, e.g. xy12345.east-us-2.azure + /// The name of the Snowflake database. + /// The name of the Snowflake + /// warehouse. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The name of the Snowflake user. + /// The Azure key vault secret reference of + /// password in connection string. + /// The type used for authentication. + /// Type: string. Possible values include: 'Basic', 'KeyPair', + /// 'AADServicePrincipal' + /// The client ID of the application registered + /// in Azure Active Directory for AADServicePrincipal + /// authentication. + /// The Azure key vault secret reference of + /// client secret for AADServicePrincipal authentication. + /// The tenant ID of the application registered + /// in Azure Active Directory for AADServicePrincipal + /// authentication. + /// The scope of the application registered in + /// Azure Active Directory for AADServicePrincipal + /// authentication. + /// The Azure key vault secret reference of + /// privateKey for KeyPair auth. + /// The Azure key vault secret + /// reference of private key password for KeyPair auth with encrypted + /// private key. + /// The host name of the Snowflake account. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public SnowflakeV2LinkedService(object accountIdentifier, object database, object warehouse, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object user = default(object), SecretBase password = default(SecretBase), string authenticationType = default(string), object clientId = default(object), SecretBase clientSecret = default(SecretBase), object tenantId = default(object), object scope = default(object), SecretBase privateKey = default(SecretBase), SecretBase privateKeyPassphrase = default(SecretBase), object host = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + AccountIdentifier = accountIdentifier; + User = user; + Password = password; + Database = database; + Warehouse = warehouse; + AuthenticationType = authenticationType; + ClientId = clientId; + ClientSecret = clientSecret; + TenantId = tenantId; + Scope = scope; + PrivateKey = privateKey; + PrivateKeyPassphrase = privateKeyPassphrase; + Host = host; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the account identifier of your Snowflake account, e.g. + /// xy12345.east-us-2.azure + /// + [JsonProperty(PropertyName = "typeProperties.accountIdentifier")] + public object AccountIdentifier { get; set; } + + /// + /// Gets or sets the name of the Snowflake user. + /// + [JsonProperty(PropertyName = "typeProperties.user")] + public object User { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of password in + /// connection string. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the name of the Snowflake database. + /// + [JsonProperty(PropertyName = "typeProperties.database")] + public object Database { get; set; } + + /// + /// Gets or sets the name of the Snowflake warehouse. + /// + [JsonProperty(PropertyName = "typeProperties.warehouse")] + public object Warehouse { get; set; } + + /// + /// Gets or sets the type used for authentication. Type: string. + /// Possible values include: 'Basic', 'KeyPair', 'AADServicePrincipal' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets the client ID of the application registered in Azure + /// Active Directory for AADServicePrincipal authentication. + /// + [JsonProperty(PropertyName = "typeProperties.clientId")] + public object ClientId { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of client secret + /// for AADServicePrincipal authentication. + /// + [JsonProperty(PropertyName = "typeProperties.clientSecret")] + public SecretBase ClientSecret { get; set; } + + /// + /// Gets or sets the tenant ID of the application registered in Azure + /// Active Directory for AADServicePrincipal authentication. + /// + [JsonProperty(PropertyName = "typeProperties.tenantId")] + public object TenantId { get; set; } + + /// + /// Gets or sets the scope of the application registered in Azure + /// Active Directory for AADServicePrincipal authentication. + /// + [JsonProperty(PropertyName = "typeProperties.scope")] + public object Scope { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of privateKey for + /// KeyPair auth. + /// + [JsonProperty(PropertyName = "typeProperties.privateKey")] + public SecretBase PrivateKey { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of private key + /// password for KeyPair auth with encrypted private key. + /// + [JsonProperty(PropertyName = "typeProperties.privateKeyPassphrase")] + public SecretBase PrivateKeyPassphrase { get; set; } + + /// + /// Gets or sets the host name of the Snowflake account. + /// + [JsonProperty(PropertyName = "typeProperties.host")] + public object Host { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (AccountIdentifier == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AccountIdentifier"); + } + if (Database == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Database"); + } + if (Warehouse == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Warehouse"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeV2Sink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeV2Sink.cs new file mode 100644 index 000000000000..d0bc786ad436 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeV2Sink.cs @@ -0,0 +1,82 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity snowflake sink. + /// + public partial class SnowflakeV2Sink : CopySink + { + /// + /// Initializes a new instance of the SnowflakeV2Sink class. + /// + public SnowflakeV2Sink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SnowflakeV2Sink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// SQL pre-copy script. Type: string (or + /// Expression with resultType string). + /// Snowflake import settings. + public SnowflakeV2Sink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object preCopyScript = default(object), SnowflakeImportCopyCommand importSettings = default(SnowflakeImportCopyCommand)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + PreCopyScript = preCopyScript; + ImportSettings = importSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SQL pre-copy script. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "preCopyScript")] + public object PreCopyScript { get; set; } + + /// + /// Gets or sets snowflake import settings. + /// + [JsonProperty(PropertyName = "importSettings")] + public SnowflakeImportCopyCommand ImportSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeV2Source.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeV2Source.cs new file mode 100644 index 000000000000..718ef6f83225 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeV2Source.cs @@ -0,0 +1,91 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity snowflake source. + /// + public partial class SnowflakeV2Source : CopySource + { + /// + /// Initializes a new instance of the SnowflakeV2Source class. + /// + public SnowflakeV2Source() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SnowflakeV2Source class. + /// + /// Snowflake export settings. + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Snowflake Sql query. Type: string (or + /// Expression with resultType string). + public SnowflakeV2Source(SnowflakeExportCopyCommand exportSettings, IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + Query = query; + ExportSettings = exportSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets snowflake Sql query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets snowflake export settings. + /// + [JsonProperty(PropertyName = "exportSettings")] + public SnowflakeExportCopyCommand ExportSettings { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ExportSettings == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ExportSettings"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SparkAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SparkAuthenticationType.cs new file mode 100644 index 000000000000..67f77ecc1c9b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SparkAuthenticationType.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for SparkAuthenticationType. + /// + public static class SparkAuthenticationType + { + public const string Anonymous = "Anonymous"; + public const string Username = "Username"; + public const string UsernameAndPassword = "UsernameAndPassword"; + public const string WindowsAzureHDInsightService = "WindowsAzureHDInsightService"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SparkConfigurationParametrizationReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SparkConfigurationParametrizationReference.cs new file mode 100644 index 000000000000..5e598ffeed1c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SparkConfigurationParametrizationReference.cs @@ -0,0 +1,83 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Spark configuration reference. + /// + public partial class SparkConfigurationParametrizationReference + { + /// + /// Initializes a new instance of the + /// SparkConfigurationParametrizationReference class. + /// + public SparkConfigurationParametrizationReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// SparkConfigurationParametrizationReference class. + /// + /// Reference spark configuration name. + /// Type: string (or Expression with resultType string). + public SparkConfigurationParametrizationReference(object referenceName) + { + ReferenceName = referenceName; + CustomInit(); + } + /// + /// Static constructor for SparkConfigurationParametrizationReference + /// class. + /// + static SparkConfigurationParametrizationReference() + { + Type = "SparkConfigurationReference"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets reference spark configuration name. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "referenceName")] + public object ReferenceName { get; set; } + + /// + /// Spark configuration reference type. + /// + [JsonProperty(PropertyName = "type")] + public static string Type { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ReferenceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ReferenceName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SparkLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SparkLinkedService.cs new file mode 100644 index 000000000000..bd8a0533e005 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SparkLinkedService.cs @@ -0,0 +1,234 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Spark Server linked service. + /// + [Newtonsoft.Json.JsonObject("Spark")] + [Rest.Serialization.JsonTransformation] + public partial class SparkLinkedService : LinkedService + { + /// + /// Initializes a new instance of the SparkLinkedService class. + /// + public SparkLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SparkLinkedService class. + /// + /// IP address or host name of the Spark + /// server + /// The TCP port that the Spark server uses to + /// listen for client connections. + /// The authentication method used to + /// access the Spark server. Possible values include: 'Anonymous', + /// 'Username', 'UsernameAndPassword', + /// 'WindowsAzureHDInsightService' + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The type of Spark server. Possible values + /// include: 'SharkServer', 'SharkServer2', 'SparkThriftServer' + /// The transport protocol to use + /// in the Thrift layer. Possible values include: 'Binary', 'SASL', + /// 'HTTP ' + /// The user name that you use to access Spark + /// Server. + /// The password corresponding to the user name + /// that you provided in the Username field + /// The partial URL corresponding to the Spark + /// server. + /// Specifies whether the connections to the + /// server are encrypted using SSL. The default value is false. + /// The full path of the .pem file + /// containing trusted CA certificates for verifying the server when + /// connecting over SSL. This property can only be set when using SSL + /// on self-hosted IR. The default value is the cacerts.pem file + /// installed with the IR. + /// Specifies whether to use a CA + /// certificate from the system trust store or from a specified PEM + /// file. The default value is false. + /// Specifies whether to require + /// a CA-issued SSL certificate name to match the host name of the + /// server when connecting over SSL. The default value is + /// false. + /// Specifies whether to allow + /// self-signed certificates from the server. The default value is + /// false. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public SparkLinkedService(object host, object port, string authenticationType, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), string serverType = default(string), string thriftTransportProtocol = default(string), object username = default(object), SecretBase password = default(SecretBase), object httpPath = default(object), object enableSsl = default(object), object trustedCertPath = default(object), object useSystemTrustStore = default(object), object allowHostNameCNMismatch = default(object), object allowSelfSignedServerCert = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Host = host; + Port = port; + ServerType = serverType; + ThriftTransportProtocol = thriftTransportProtocol; + AuthenticationType = authenticationType; + Username = username; + Password = password; + HttpPath = httpPath; + EnableSsl = enableSsl; + TrustedCertPath = trustedCertPath; + UseSystemTrustStore = useSystemTrustStore; + AllowHostNameCNMismatch = allowHostNameCNMismatch; + AllowSelfSignedServerCert = allowSelfSignedServerCert; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets IP address or host name of the Spark server + /// + [JsonProperty(PropertyName = "typeProperties.host")] + public object Host { get; set; } + + /// + /// Gets or sets the TCP port that the Spark server uses to listen for + /// client connections. + /// + [JsonProperty(PropertyName = "typeProperties.port")] + public object Port { get; set; } + + /// + /// Gets or sets the type of Spark server. Possible values include: + /// 'SharkServer', 'SharkServer2', 'SparkThriftServer' + /// + [JsonProperty(PropertyName = "typeProperties.serverType")] + public string ServerType { get; set; } + + /// + /// Gets or sets the transport protocol to use in the Thrift layer. + /// Possible values include: 'Binary', 'SASL', 'HTTP ' + /// + [JsonProperty(PropertyName = "typeProperties.thriftTransportProtocol")] + public string ThriftTransportProtocol { get; set; } + + /// + /// Gets or sets the authentication method used to access the Spark + /// server. Possible values include: 'Anonymous', 'Username', + /// 'UsernameAndPassword', 'WindowsAzureHDInsightService' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets the user name that you use to access Spark Server. + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets the password corresponding to the user name that you + /// provided in the Username field + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the partial URL corresponding to the Spark server. + /// + [JsonProperty(PropertyName = "typeProperties.httpPath")] + public object HttpPath { get; set; } + + /// + /// Gets or sets specifies whether the connections to the server are + /// encrypted using SSL. The default value is false. + /// + [JsonProperty(PropertyName = "typeProperties.enableSsl")] + public object EnableSsl { get; set; } + + /// + /// Gets or sets the full path of the .pem file containing trusted CA + /// certificates for verifying the server when connecting over SSL. + /// This property can only be set when using SSL on self-hosted IR. The + /// default value is the cacerts.pem file installed with the IR. + /// + [JsonProperty(PropertyName = "typeProperties.trustedCertPath")] + public object TrustedCertPath { get; set; } + + /// + /// Gets or sets specifies whether to use a CA certificate from the + /// system trust store or from a specified PEM file. The default value + /// is false. + /// + [JsonProperty(PropertyName = "typeProperties.useSystemTrustStore")] + public object UseSystemTrustStore { get; set; } + + /// + /// Gets or sets specifies whether to require a CA-issued SSL + /// certificate name to match the host name of the server when + /// connecting over SSL. The default value is false. + /// + [JsonProperty(PropertyName = "typeProperties.allowHostNameCNMismatch")] + public object AllowHostNameCNMismatch { get; set; } + + /// + /// Gets or sets specifies whether to allow self-signed certificates + /// from the server. The default value is false. + /// + [JsonProperty(PropertyName = "typeProperties.allowSelfSignedServerCert")] + public object AllowSelfSignedServerCert { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Host == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Host"); + } + if (Port == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Port"); + } + if (AuthenticationType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AuthenticationType"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SparkObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SparkObjectDataset.cs new file mode 100644 index 000000000000..e3c9e3aaf192 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SparkObjectDataset.cs @@ -0,0 +1,106 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Spark Server dataset. + /// + [Newtonsoft.Json.JsonObject("SparkObject")] + [Rest.Serialization.JsonTransformation] + public partial class SparkObjectDataset : Dataset + { + /// + /// Initializes a new instance of the SparkObjectDataset class. + /// + public SparkObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the SparkObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// This property will be retired. Please + /// consider using schema + table properties instead. + /// The table name of the Spark. Type: string (or + /// Expression with resultType string). + /// The schema name of the + /// Spark. Type: string (or Expression with resultType string). + public SparkObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object), object table = default(object), object sparkObjectDatasetSchema = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + Table = table; + SparkObjectDatasetSchema = sparkObjectDatasetSchema; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property will be retired. Please consider using + /// schema + table properties instead. + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Gets or sets the table name of the Spark. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Gets or sets the schema name of the Spark. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object SparkObjectDatasetSchema { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SparkServerType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SparkServerType.cs new file mode 100644 index 000000000000..c27ec0a8ef64 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SparkServerType.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for SparkServerType. + /// + public static class SparkServerType + { + public const string SharkServer = "SharkServer"; + public const string SharkServer2 = "SharkServer2"; + public const string SparkThriftServer = "SparkThriftServer"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SparkSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SparkSource.cs new file mode 100644 index 000000000000..3a6f8dbdaab4 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SparkSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Spark Server source. + /// + public partial class SparkSource : TabularSource + { + /// + /// Initializes a new instance of the SparkSource class. + /// + public SparkSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SparkSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public SparkSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SparkThriftTransportProtocol.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SparkThriftTransportProtocol.cs new file mode 100644 index 000000000000..170878640fd6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SparkThriftTransportProtocol.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for SparkThriftTransportProtocol. + /// + public static class SparkThriftTransportProtocol + { + public const string Binary = "Binary"; + public const string SASL = "SASL"; + public const string HTTP = "HTTP "; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlAlwaysEncryptedAkvAuthType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlAlwaysEncryptedAkvAuthType.cs new file mode 100644 index 000000000000..b0dc3e353f24 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlAlwaysEncryptedAkvAuthType.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for SqlAlwaysEncryptedAkvAuthType. + /// + public static class SqlAlwaysEncryptedAkvAuthType + { + public const string ServicePrincipal = "ServicePrincipal"; + public const string ManagedIdentity = "ManagedIdentity"; + public const string UserAssignedManagedIdentity = "UserAssignedManagedIdentity"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlAlwaysEncryptedProperties.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlAlwaysEncryptedProperties.cs new file mode 100644 index 000000000000..76c0cf7d5e28 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlAlwaysEncryptedProperties.cs @@ -0,0 +1,108 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Sql always encrypted properties. + /// + public partial class SqlAlwaysEncryptedProperties + { + /// + /// Initializes a new instance of the SqlAlwaysEncryptedProperties + /// class. + /// + public SqlAlwaysEncryptedProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SqlAlwaysEncryptedProperties + /// class. + /// + /// Sql always encrypted AKV + /// authentication type. Type: string. Possible values include: + /// 'ServicePrincipal', 'ManagedIdentity', + /// 'UserAssignedManagedIdentity' + /// The client ID of the application + /// in Azure Active Directory used for Azure Key Vault authentication. + /// Type: string (or Expression with resultType string). + /// The key of the service principal + /// used to authenticate against Azure Key Vault. + /// The credential reference containing + /// authentication information. + public SqlAlwaysEncryptedProperties(string alwaysEncryptedAkvAuthType, object servicePrincipalId = default(object), SecretBase servicePrincipalKey = default(SecretBase), CredentialReference credential = default(CredentialReference)) + { + AlwaysEncryptedAkvAuthType = alwaysEncryptedAkvAuthType; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Credential = credential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets sql always encrypted AKV authentication type. Type: + /// string. Possible values include: 'ServicePrincipal', + /// 'ManagedIdentity', 'UserAssignedManagedIdentity' + /// + [JsonProperty(PropertyName = "alwaysEncryptedAkvAuthType")] + public string AlwaysEncryptedAkvAuthType { get; set; } + + /// + /// Gets or sets the client ID of the application in Azure Active + /// Directory used for Azure Key Vault authentication. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "servicePrincipalId")] + public object ServicePrincipalId { get; set; } + + /// + /// Gets or sets the key of the service principal used to authenticate + /// against Azure Key Vault. + /// + [JsonProperty(PropertyName = "servicePrincipalKey")] + public SecretBase ServicePrincipalKey { get; set; } + + /// + /// Gets or sets the credential reference containing authentication + /// information. + /// + [JsonProperty(PropertyName = "credential")] + public CredentialReference Credential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (AlwaysEncryptedAkvAuthType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AlwaysEncryptedAkvAuthType"); + } + if (Credential != null) + { + Credential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlDWSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlDWSink.cs new file mode 100644 index 000000000000..e63175803062 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlDWSink.cs @@ -0,0 +1,161 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity SQL Data Warehouse sink. + /// + public partial class SqlDWSink : CopySink + { + /// + /// Initializes a new instance of the SqlDWSink class. + /// + public SqlDWSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SqlDWSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// SQL pre-copy script. Type: string (or + /// Expression with resultType string). + /// Indicates to use PolyBase to copy data + /// into SQL Data Warehouse when applicable. Type: boolean (or + /// Expression with resultType boolean). + /// Specifies PolyBase-related settings + /// when allowPolyBase is true. + /// Indicates to use Copy Command to + /// copy data into SQL Data Warehouse. Type: boolean (or Expression + /// with resultType boolean). + /// Specifies Copy Command related + /// settings when allowCopyCommand is true. + /// The option to handle sink table, such as + /// autoCreate. For now only 'autoCreate' value is supported. Type: + /// string (or Expression with resultType string). + /// Whether to use table lock + /// during bulk copy. Type: boolean (or Expression with resultType + /// boolean). + /// Write behavior when copying data into + /// azure SQL DW. Type: SqlDWWriteBehaviorEnum (or Expression with + /// resultType SqlDWWriteBehaviorEnum) + /// SQL DW upsert settings. + public SqlDWSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object preCopyScript = default(object), object allowPolyBase = default(object), PolybaseSettings polyBaseSettings = default(PolybaseSettings), object allowCopyCommand = default(object), DWCopyCommandSettings copyCommandSettings = default(DWCopyCommandSettings), object tableOption = default(object), object sqlWriterUseTableLock = default(object), object writeBehavior = default(object), SqlDWUpsertSettings upsertSettings = default(SqlDWUpsertSettings)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + PreCopyScript = preCopyScript; + AllowPolyBase = allowPolyBase; + PolyBaseSettings = polyBaseSettings; + AllowCopyCommand = allowCopyCommand; + CopyCommandSettings = copyCommandSettings; + TableOption = tableOption; + SqlWriterUseTableLock = sqlWriterUseTableLock; + WriteBehavior = writeBehavior; + UpsertSettings = upsertSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SQL pre-copy script. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "preCopyScript")] + public object PreCopyScript { get; set; } + + /// + /// Gets or sets indicates to use PolyBase to copy data into SQL Data + /// Warehouse when applicable. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "allowPolyBase")] + public object AllowPolyBase { get; set; } + + /// + /// Gets or sets specifies PolyBase-related settings when allowPolyBase + /// is true. + /// + [JsonProperty(PropertyName = "polyBaseSettings")] + public PolybaseSettings PolyBaseSettings { get; set; } + + /// + /// Gets or sets indicates to use Copy Command to copy data into SQL + /// Data Warehouse. Type: boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "allowCopyCommand")] + public object AllowCopyCommand { get; set; } + + /// + /// Gets or sets specifies Copy Command related settings when + /// allowCopyCommand is true. + /// + [JsonProperty(PropertyName = "copyCommandSettings")] + public DWCopyCommandSettings CopyCommandSettings { get; set; } + + /// + /// Gets or sets the option to handle sink table, such as autoCreate. + /// For now only 'autoCreate' value is supported. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "tableOption")] + public object TableOption { get; set; } + + /// + /// Gets or sets whether to use table lock during bulk copy. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "sqlWriterUseTableLock")] + public object SqlWriterUseTableLock { get; set; } + + /// + /// Gets or sets write behavior when copying data into azure SQL DW. + /// Type: SqlDWWriteBehaviorEnum (or Expression with resultType + /// SqlDWWriteBehaviorEnum) + /// + [JsonProperty(PropertyName = "writeBehavior")] + public object WriteBehavior { get; set; } + + /// + /// Gets or sets SQL DW upsert settings. + /// + [JsonProperty(PropertyName = "upsertSettings")] + public SqlDWUpsertSettings UpsertSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlDWSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlDWSource.cs new file mode 100644 index 000000000000..9b01f8dfd89d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlDWSource.cs @@ -0,0 +1,142 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity SQL Data Warehouse source. + /// + public partial class SqlDWSource : TabularSource + { + /// + /// Initializes a new instance of the SqlDWSource class. + /// + public SqlDWSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SqlDWSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// SQL Data Warehouse reader query. Type: + /// string (or Expression with resultType string). + /// Name of the stored + /// procedure for a SQL Data Warehouse source. This cannot be used at + /// the same time as SqlReaderQuery. Type: string (or Expression with + /// resultType string). + /// Value and type setting for + /// stored procedure parameters. Example: "{Parameter1: {value: "1", + /// type: "int"}}". Type: object (or Expression with resultType + /// object), itemType: StoredProcedureParameter. + /// Specifies the transaction locking + /// behavior for the SQL source. Allowed values: + /// ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. + /// The default value is ReadCommitted. Type: string (or Expression + /// with resultType string). + /// The partition mechanism that will be + /// used for Sql read in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". Type: string (or + /// Expression with resultType string). + /// The settings that will be leveraged + /// for Sql source partitioning. + public SqlDWSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object sqlReaderQuery = default(object), object sqlReaderStoredProcedureName = default(object), object storedProcedureParameters = default(object), object isolationLevel = default(object), object partitionOption = default(object), SqlPartitionSettings partitionSettings = default(SqlPartitionSettings)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + SqlReaderQuery = sqlReaderQuery; + SqlReaderStoredProcedureName = sqlReaderStoredProcedureName; + StoredProcedureParameters = storedProcedureParameters; + IsolationLevel = isolationLevel; + PartitionOption = partitionOption; + PartitionSettings = partitionSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SQL Data Warehouse reader query. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "sqlReaderQuery")] + public object SqlReaderQuery { get; set; } + + /// + /// Gets or sets name of the stored procedure for a SQL Data Warehouse + /// source. This cannot be used at the same time as SqlReaderQuery. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "sqlReaderStoredProcedureName")] + public object SqlReaderStoredProcedureName { get; set; } + + /// + /// Gets or sets value and type setting for stored procedure + /// parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + /// Type: object (or Expression with resultType object), itemType: + /// StoredProcedureParameter. + /// + [JsonProperty(PropertyName = "storedProcedureParameters")] + public object StoredProcedureParameters { get; set; } + + /// + /// Gets or sets specifies the transaction locking behavior for the SQL + /// source. Allowed values: + /// ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. + /// The default value is ReadCommitted. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "isolationLevel")] + public object IsolationLevel { get; set; } + + /// + /// Gets or sets the partition mechanism that will be used for Sql read + /// in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionOption")] + public object PartitionOption { get; set; } + + /// + /// Gets or sets the settings that will be leveraged for Sql source + /// partitioning. + /// + [JsonProperty(PropertyName = "partitionSettings")] + public SqlPartitionSettings PartitionSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlDWUpsertSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlDWUpsertSettings.cs new file mode 100644 index 000000000000..7b6c86c2eef4 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlDWUpsertSettings.cs @@ -0,0 +1,64 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Sql DW upsert option settings + /// + public partial class SqlDWUpsertSettings + { + /// + /// Initializes a new instance of the SqlDWUpsertSettings class. + /// + public SqlDWUpsertSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SqlDWUpsertSettings class. + /// + /// Schema name for interim table. + /// Type: string (or Expression with resultType string). + /// Key column names for unique row identification. + /// Type: array of strings (or Expression with resultType array of + /// strings). + public SqlDWUpsertSettings(object interimSchemaName = default(object), object keys = default(object)) + { + InterimSchemaName = interimSchemaName; + Keys = keys; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets schema name for interim table. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "interimSchemaName")] + public object InterimSchemaName { get; set; } + + /// + /// Gets or sets key column names for unique row identification. Type: + /// array of strings (or Expression with resultType array of strings). + /// + [JsonProperty(PropertyName = "keys")] + public object Keys { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlDWWriteBehaviorEnum.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlDWWriteBehaviorEnum.cs new file mode 100644 index 000000000000..6f905c4287ca --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlDWWriteBehaviorEnum.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for SqlDWWriteBehaviorEnum. + /// + public static class SqlDWWriteBehaviorEnum + { + public const string Insert = "Insert"; + public const string Upsert = "Upsert"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlMISink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlMISink.cs new file mode 100644 index 000000000000..daddd332da88 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlMISink.cs @@ -0,0 +1,157 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure SQL Managed Instance sink. + /// + public partial class SqlMISink : CopySink + { + /// + /// Initializes a new instance of the SqlMISink class. + /// + public SqlMISink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SqlMISink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// SQL writer stored + /// procedure name. Type: string (or Expression with resultType + /// string). + /// SQL writer table type. Type: + /// string (or Expression with resultType string). + /// SQL pre-copy script. Type: string (or + /// Expression with resultType string). + /// SQL stored procedure + /// parameters. + /// The stored + /// procedure parameter name of the table type. Type: string (or + /// Expression with resultType string). + /// The option to handle sink table, such as + /// autoCreate. For now only 'autoCreate' value is supported. Type: + /// string (or Expression with resultType string). + /// Whether to use table lock + /// during bulk copy. Type: boolean (or Expression with resultType + /// boolean). + /// White behavior when copying data into + /// azure SQL MI. Type: string (or Expression with resultType + /// string) + /// SQL upsert settings. + public SqlMISink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object sqlWriterStoredProcedureName = default(object), object sqlWriterTableType = default(object), object preCopyScript = default(object), object storedProcedureParameters = default(object), object storedProcedureTableTypeParameterName = default(object), object tableOption = default(object), object sqlWriterUseTableLock = default(object), object writeBehavior = default(object), SqlUpsertSettings upsertSettings = default(SqlUpsertSettings)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + SqlWriterStoredProcedureName = sqlWriterStoredProcedureName; + SqlWriterTableType = sqlWriterTableType; + PreCopyScript = preCopyScript; + StoredProcedureParameters = storedProcedureParameters; + StoredProcedureTableTypeParameterName = storedProcedureTableTypeParameterName; + TableOption = tableOption; + SqlWriterUseTableLock = sqlWriterUseTableLock; + WriteBehavior = writeBehavior; + UpsertSettings = upsertSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SQL writer stored procedure name. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "sqlWriterStoredProcedureName")] + public object SqlWriterStoredProcedureName { get; set; } + + /// + /// Gets or sets SQL writer table type. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "sqlWriterTableType")] + public object SqlWriterTableType { get; set; } + + /// + /// Gets or sets SQL pre-copy script. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "preCopyScript")] + public object PreCopyScript { get; set; } + + /// + /// Gets or sets SQL stored procedure parameters. + /// + [JsonProperty(PropertyName = "storedProcedureParameters")] + public object StoredProcedureParameters { get; set; } + + /// + /// Gets or sets the stored procedure parameter name of the table type. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "storedProcedureTableTypeParameterName")] + public object StoredProcedureTableTypeParameterName { get; set; } + + /// + /// Gets or sets the option to handle sink table, such as autoCreate. + /// For now only 'autoCreate' value is supported. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "tableOption")] + public object TableOption { get; set; } + + /// + /// Gets or sets whether to use table lock during bulk copy. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "sqlWriterUseTableLock")] + public object SqlWriterUseTableLock { get; set; } + + /// + /// Gets or sets white behavior when copying data into azure SQL MI. + /// Type: string (or Expression with resultType string) + /// + [JsonProperty(PropertyName = "writeBehavior")] + public object WriteBehavior { get; set; } + + /// + /// Gets or sets SQL upsert settings. + /// + [JsonProperty(PropertyName = "upsertSettings")] + public SqlUpsertSettings UpsertSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlMISource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlMISource.cs new file mode 100644 index 000000000000..70467873fe42 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlMISource.cs @@ -0,0 +1,149 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure SQL Managed Instance source. + /// + public partial class SqlMISource : TabularSource + { + /// + /// Initializes a new instance of the SqlMISource class. + /// + public SqlMISource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SqlMISource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// SQL reader query. Type: string (or + /// Expression with resultType string). + /// Name of the stored + /// procedure for a Azure SQL Managed Instance source. This cannot be + /// used at the same time as SqlReaderQuery. Type: string (or + /// Expression with resultType string). + /// Value and type setting for + /// stored procedure parameters. Example: "{Parameter1: {value: "1", + /// type: "int"}}". + /// Specifies the transaction locking + /// behavior for the SQL source. Allowed values: + /// ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. + /// The default value is ReadCommitted. Type: string (or Expression + /// with resultType string). + /// Which additional types to + /// produce. + /// The partition mechanism that will be + /// used for Sql read in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". Type: string (or + /// Expression with resultType string). + /// The settings that will be leveraged + /// for Sql source partitioning. + public SqlMISource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object sqlReaderQuery = default(object), object sqlReaderStoredProcedureName = default(object), object storedProcedureParameters = default(object), object isolationLevel = default(object), object produceAdditionalTypes = default(object), object partitionOption = default(object), SqlPartitionSettings partitionSettings = default(SqlPartitionSettings)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + SqlReaderQuery = sqlReaderQuery; + SqlReaderStoredProcedureName = sqlReaderStoredProcedureName; + StoredProcedureParameters = storedProcedureParameters; + IsolationLevel = isolationLevel; + ProduceAdditionalTypes = produceAdditionalTypes; + PartitionOption = partitionOption; + PartitionSettings = partitionSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SQL reader query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "sqlReaderQuery")] + public object SqlReaderQuery { get; set; } + + /// + /// Gets or sets name of the stored procedure for a Azure SQL Managed + /// Instance source. This cannot be used at the same time as + /// SqlReaderQuery. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "sqlReaderStoredProcedureName")] + public object SqlReaderStoredProcedureName { get; set; } + + /// + /// Gets or sets value and type setting for stored procedure + /// parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + /// + [JsonProperty(PropertyName = "storedProcedureParameters")] + public object StoredProcedureParameters { get; set; } + + /// + /// Gets or sets specifies the transaction locking behavior for the SQL + /// source. Allowed values: + /// ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. + /// The default value is ReadCommitted. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "isolationLevel")] + public object IsolationLevel { get; set; } + + /// + /// Gets or sets which additional types to produce. + /// + [JsonProperty(PropertyName = "produceAdditionalTypes")] + public object ProduceAdditionalTypes { get; set; } + + /// + /// Gets or sets the partition mechanism that will be used for Sql read + /// in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionOption")] + public object PartitionOption { get; set; } + + /// + /// Gets or sets the settings that will be leveraged for Sql source + /// partitioning. + /// + [JsonProperty(PropertyName = "partitionSettings")] + public SqlPartitionSettings PartitionSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlPartitionOption.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlPartitionOption.cs new file mode 100644 index 000000000000..f65428093808 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlPartitionOption.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for SqlPartitionOption. + /// + public static class SqlPartitionOption + { + public const string None = "None"; + public const string PhysicalPartitionsOfTable = "PhysicalPartitionsOfTable"; + public const string DynamicRange = "DynamicRange"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlPartitionSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlPartitionSettings.cs new file mode 100644 index 000000000000..f7f7d7b3be9b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlPartitionSettings.cs @@ -0,0 +1,93 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The settings that will be leveraged for Sql source partitioning. + /// + public partial class SqlPartitionSettings + { + /// + /// Initializes a new instance of the SqlPartitionSettings class. + /// + public SqlPartitionSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SqlPartitionSettings class. + /// + /// The name of the column in integer + /// or datetime type that will be used for proceeding partitioning. If + /// not specified, the primary key of the table is auto-detected and + /// used as the partition column. Type: string (or Expression with + /// resultType string). + /// The maximum value of the + /// partition column for partition range splitting. This value is used + /// to decide the partition stride, not for filtering the rows in + /// table. All rows in the table or query result will be partitioned + /// and copied. Type: string (or Expression with resultType + /// string). + /// The minimum value of the + /// partition column for partition range splitting. This value is used + /// to decide the partition stride, not for filtering the rows in + /// table. All rows in the table or query result will be partitioned + /// and copied. Type: string (or Expression with resultType + /// string). + public SqlPartitionSettings(object partitionColumnName = default(object), object partitionUpperBound = default(object), object partitionLowerBound = default(object)) + { + PartitionColumnName = partitionColumnName; + PartitionUpperBound = partitionUpperBound; + PartitionLowerBound = partitionLowerBound; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the column in integer or datetime type + /// that will be used for proceeding partitioning. If not specified, + /// the primary key of the table is auto-detected and used as the + /// partition column. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "partitionColumnName")] + public object PartitionColumnName { get; set; } + + /// + /// Gets or sets the maximum value of the partition column for + /// partition range splitting. This value is used to decide the + /// partition stride, not for filtering the rows in table. All rows in + /// the table or query result will be partitioned and copied. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionUpperBound")] + public object PartitionUpperBound { get; set; } + + /// + /// Gets or sets the minimum value of the partition column for + /// partition range splitting. This value is used to decide the + /// partition stride, not for filtering the rows in table. All rows in + /// the table or query result will be partitioned and copied. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionLowerBound")] + public object PartitionLowerBound { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerAuthenticationType.cs new file mode 100644 index 000000000000..6b960e8d41a5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerAuthenticationType.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for SqlServerAuthenticationType. + /// + public static class SqlServerAuthenticationType + { + public const string SQL = "SQL"; + public const string Windows = "Windows"; + public const string UserAssignedManagedIdentity = "UserAssignedManagedIdentity"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerBaseLinkedServiceTypeProperties.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerBaseLinkedServiceTypeProperties.cs new file mode 100644 index 000000000000..ef799361bc4c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerBaseLinkedServiceTypeProperties.cs @@ -0,0 +1,317 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Sql Server family connector common linked service properties. + /// + public partial class SqlServerBaseLinkedServiceTypeProperties + { + /// + /// Initializes a new instance of the + /// SqlServerBaseLinkedServiceTypeProperties class. + /// + public SqlServerBaseLinkedServiceTypeProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// SqlServerBaseLinkedServiceTypeProperties class. + /// + /// The name or network address of the instance of + /// SQL Server to which to connect, used by recommended version. Type: + /// string (or Expression with resultType string). + /// The name of the database, used by + /// recommended version. Type: string (or Expression with resultType + /// string). + /// Indicate whether TLS encryption is required + /// for all data sent between the client and server, used by + /// recommended version. Possible values are true/yes/mandatory, + /// false/no/optional and strict. Type: string (or Expression with + /// resultType string). + /// Indicate whether the channel + /// will be encrypted while bypassing walking the certificate chain to + /// validate trust, used by recommended version. Type: Boolean (or + /// Expression with resultType boolean). + /// The host name to use when + /// validating the server certificate for the connection. When not + /// specified, the server name from the Data Source is used for + /// certificate validation, used by recommended version. Type: string + /// (or Expression with resultType string). + /// The application workload type when + /// connecting to a server, used by recommended version. Possible + /// values are ReadOnly and ReadWrite. Type: string (or Expression with + /// resultType string). + /// The length of time (in seconds) to + /// wait for a connection to the server before terminating the attempt + /// and generating an error, used by recommended version. Type: integer + /// (or Expression with resultType integer). + /// The number of re-connections + /// attempted after identifying that there was an idle connection + /// failure, used by recommended version. This must be an integer + /// between 0 and 255. Type: integer (or Expression with resultType + /// integer). + /// The amount of time (in seconds) + /// between each re-connection attempt after identifying that there was + /// an idle connection failure, used by recommended version. This must + /// be an integer between 1 and 60. Type: integer (or Expression with + /// resultType integer). + /// The minimum time, in seconds, for + /// the connection to live in the connection pool before being + /// destroyed, used by recommended version. Type: integer (or + /// Expression with resultType integer). + /// The default wait time (in seconds) + /// before terminating the attempt to execute a command and generating + /// an error, used by recommended version. Type: integer (or Expression + /// with resultType integer). + /// Indicate whether User ID and + /// Password are specified in the connection (when false) or whether + /// the current Windows account credentials are used for authentication + /// (when true), used by recommended version. Type: Boolean (or + /// Expression with resultType boolean). + /// The name or address of the partner + /// server to connect to if the primary server is down, used by + /// recommended version. Type: string (or Expression with resultType + /// string). + /// The maximum number of connections allowed + /// in the connection pool for this specific connection string, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// The minimum number of connections allowed + /// in the connection pool for this specific connection string, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// When true, an application + /// can maintain multiple active result sets (MARS). When false, an + /// application must process or cancel all result sets from one batch + /// before it can execute any other batch on that connection, used by + /// recommended version. Type: Boolean (or Expression with resultType + /// boolean). + /// If your application is connecting + /// to an AlwaysOn availability group (AG) on different subnets, + /// setting MultiSubnetFailover=true provides faster detection of and + /// connection to the (currently) active server, used by recommended + /// version. Type: Boolean (or Expression with resultType + /// boolean). + /// The size in bytes of the network packets + /// used to communicate with an instance of server, used by recommended + /// version. Type: integer (or Expression with resultType + /// integer). + /// Indicate whether the connection will be + /// pooled or explicitly opened every time that the connection is + /// requested, used by recommended version. Type: Boolean (or + /// Expression with resultType boolean). + public SqlServerBaseLinkedServiceTypeProperties(object server = default(object), object database = default(object), object encrypt = default(object), object trustServerCertificate = default(object), object hostNameInCertificate = default(object), object applicationIntent = default(object), object connectTimeout = default(object), object connectRetryCount = default(object), object connectRetryInterval = default(object), object loadBalanceTimeout = default(object), object commandTimeout = default(object), object integratedSecurity = default(object), object failoverPartner = default(object), object maxPoolSize = default(object), object minPoolSize = default(object), object multipleActiveResultSets = default(object), object multiSubnetFailover = default(object), object packetSize = default(object), object pooling = default(object)) + { + Server = server; + Database = database; + Encrypt = encrypt; + TrustServerCertificate = trustServerCertificate; + HostNameInCertificate = hostNameInCertificate; + ApplicationIntent = applicationIntent; + ConnectTimeout = connectTimeout; + ConnectRetryCount = connectRetryCount; + ConnectRetryInterval = connectRetryInterval; + LoadBalanceTimeout = loadBalanceTimeout; + CommandTimeout = commandTimeout; + IntegratedSecurity = integratedSecurity; + FailoverPartner = failoverPartner; + MaxPoolSize = maxPoolSize; + MinPoolSize = minPoolSize; + MultipleActiveResultSets = multipleActiveResultSets; + MultiSubnetFailover = multiSubnetFailover; + PacketSize = packetSize; + Pooling = pooling; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name or network address of the instance of SQL + /// Server to which to connect, used by recommended version. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "server")] + public object Server { get; set; } + + /// + /// Gets or sets the name of the database, used by recommended version. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "database")] + public object Database { get; set; } + + /// + /// Gets or sets indicate whether TLS encryption is required for all + /// data sent between the client and server, used by recommended + /// version. Possible values are true/yes/mandatory, false/no/optional + /// and strict. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "encrypt")] + public object Encrypt { get; set; } + + /// + /// Gets or sets indicate whether the channel will be encrypted while + /// bypassing walking the certificate chain to validate trust, used by + /// recommended version. Type: Boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "trustServerCertificate")] + public object TrustServerCertificate { get; set; } + + /// + /// Gets or sets the host name to use when validating the server + /// certificate for the connection. When not specified, the server name + /// from the Data Source is used for certificate validation, used by + /// recommended version. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "hostNameInCertificate")] + public object HostNameInCertificate { get; set; } + + /// + /// Gets or sets the application workload type when connecting to a + /// server, used by recommended version. Possible values are ReadOnly + /// and ReadWrite. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "applicationIntent")] + public object ApplicationIntent { get; set; } + + /// + /// Gets or sets the length of time (in seconds) to wait for a + /// connection to the server before terminating the attempt and + /// generating an error, used by recommended version. Type: integer (or + /// Expression with resultType integer). + /// + [JsonProperty(PropertyName = "connectTimeout")] + public object ConnectTimeout { get; set; } + + /// + /// Gets or sets the number of re-connections attempted after + /// identifying that there was an idle connection failure, used by + /// recommended version. This must be an integer between 0 and 255. + /// Type: integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "connectRetryCount")] + public object ConnectRetryCount { get; set; } + + /// + /// Gets or sets the amount of time (in seconds) between each + /// re-connection attempt after identifying that there was an idle + /// connection failure, used by recommended version. This must be an + /// integer between 1 and 60. Type: integer (or Expression with + /// resultType integer). + /// + [JsonProperty(PropertyName = "connectRetryInterval")] + public object ConnectRetryInterval { get; set; } + + /// + /// Gets or sets the minimum time, in seconds, for the connection to + /// live in the connection pool before being destroyed, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// + [JsonProperty(PropertyName = "loadBalanceTimeout")] + public object LoadBalanceTimeout { get; set; } + + /// + /// Gets or sets the default wait time (in seconds) before terminating + /// the attempt to execute a command and generating an error, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// + [JsonProperty(PropertyName = "commandTimeout")] + public object CommandTimeout { get; set; } + + /// + /// Gets or sets indicate whether User ID and Password are specified in + /// the connection (when false) or whether the current Windows account + /// credentials are used for authentication (when true), used by + /// recommended version. Type: Boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "integratedSecurity")] + public object IntegratedSecurity { get; set; } + + /// + /// Gets or sets the name or address of the partner server to connect + /// to if the primary server is down, used by recommended version. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "failoverPartner")] + public object FailoverPartner { get; set; } + + /// + /// Gets or sets the maximum number of connections allowed in the + /// connection pool for this specific connection string, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// + [JsonProperty(PropertyName = "maxPoolSize")] + public object MaxPoolSize { get; set; } + + /// + /// Gets or sets the minimum number of connections allowed in the + /// connection pool for this specific connection string, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// + [JsonProperty(PropertyName = "minPoolSize")] + public object MinPoolSize { get; set; } + + /// + /// Gets or sets when true, an application can maintain multiple active + /// result sets (MARS). When false, an application must process or + /// cancel all result sets from one batch before it can execute any + /// other batch on that connection, used by recommended version. Type: + /// Boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "multipleActiveResultSets")] + public object MultipleActiveResultSets { get; set; } + + /// + /// Gets or sets if your application is connecting to an AlwaysOn + /// availability group (AG) on different subnets, setting + /// MultiSubnetFailover=true provides faster detection of and + /// connection to the (currently) active server, used by recommended + /// version. Type: Boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "multiSubnetFailover")] + public object MultiSubnetFailover { get; set; } + + /// + /// Gets or sets the size in bytes of the network packets used to + /// communicate with an instance of server, used by recommended + /// version. Type: integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "packetSize")] + public object PacketSize { get; set; } + + /// + /// Gets or sets indicate whether the connection will be pooled or + /// explicitly opened every time that the connection is requested, used + /// by recommended version. Type: Boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "pooling")] + public object Pooling { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerLinkedService.cs new file mode 100644 index 000000000000..247a3783aadd --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerLinkedService.cs @@ -0,0 +1,420 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// SQL Server linked service. + /// + [Newtonsoft.Json.JsonObject("SqlServer")] + [Rest.Serialization.JsonTransformation] + public partial class SqlServerLinkedService : LinkedService + { + /// + /// Initializes a new instance of the SqlServerLinkedService class. + /// + public SqlServerLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SqlServerLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The name or network address of the instance of + /// SQL Server to which to connect, used by recommended version. Type: + /// string (or Expression with resultType string). + /// The name of the database, used by + /// recommended version. Type: string (or Expression with resultType + /// string). + /// Indicate whether TLS encryption is required + /// for all data sent between the client and server, used by + /// recommended version. Possible values are true/yes/mandatory, + /// false/no/optional and strict. Type: string (or Expression with + /// resultType string). + /// Indicate whether the channel + /// will be encrypted while bypassing walking the certificate chain to + /// validate trust, used by recommended version. Type: Boolean (or + /// Expression with resultType boolean). + /// The host name to use when + /// validating the server certificate for the connection. When not + /// specified, the server name from the Data Source is used for + /// certificate validation, used by recommended version. Type: string + /// (or Expression with resultType string). + /// The application workload type when + /// connecting to a server, used by recommended version. Possible + /// values are ReadOnly and ReadWrite. Type: string (or Expression with + /// resultType string). + /// The length of time (in seconds) to + /// wait for a connection to the server before terminating the attempt + /// and generating an error, used by recommended version. Type: integer + /// (or Expression with resultType integer). + /// The number of re-connections + /// attempted after identifying that there was an idle connection + /// failure, used by recommended version. This must be an integer + /// between 0 and 255. Type: integer (or Expression with resultType + /// integer). + /// The amount of time (in seconds) + /// between each re-connection attempt after identifying that there was + /// an idle connection failure, used by recommended version. This must + /// be an integer between 1 and 60. Type: integer (or Expression with + /// resultType integer). + /// The minimum time, in seconds, for + /// the connection to live in the connection pool before being + /// destroyed, used by recommended version. Type: integer (or + /// Expression with resultType integer). + /// The default wait time (in seconds) + /// before terminating the attempt to execute a command and generating + /// an error, used by recommended version. Type: integer (or Expression + /// with resultType integer). + /// Indicate whether User ID and + /// Password are specified in the connection (when false) or whether + /// the current Windows account credentials are used for authentication + /// (when true), used by recommended version. Type: Boolean (or + /// Expression with resultType boolean). + /// The name or address of the partner + /// server to connect to if the primary server is down, used by + /// recommended version. Type: string (or Expression with resultType + /// string). + /// The maximum number of connections allowed + /// in the connection pool for this specific connection string, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// The minimum number of connections allowed + /// in the connection pool for this specific connection string, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// When true, an application + /// can maintain multiple active result sets (MARS). When false, an + /// application must process or cancel all result sets from one batch + /// before it can execute any other batch on that connection, used by + /// recommended version. Type: Boolean (or Expression with resultType + /// boolean). + /// If your application is connecting + /// to an AlwaysOn availability group (AG) on different subnets, + /// setting MultiSubnetFailover=true provides faster detection of and + /// connection to the (currently) active server, used by recommended + /// version. Type: Boolean (or Expression with resultType + /// boolean). + /// The size in bytes of the network packets + /// used to communicate with an instance of server, used by recommended + /// version. Type: integer (or Expression with resultType + /// integer). + /// Indicate whether the connection will be + /// pooled or explicitly opened every time that the connection is + /// requested, used by recommended version. Type: Boolean (or + /// Expression with resultType boolean). + /// The connection string. Type: string, + /// SecureString or AzureKeyVaultSecretReference. + /// The type used for authentication. + /// Type: string. Possible values include: 'SQL', 'Windows', + /// 'UserAssignedManagedIdentity' + /// The on-premises Windows authentication user + /// name. Type: string (or Expression with resultType string). + /// The on-premises Windows authentication + /// password. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// Sql always encrypted + /// properties. + /// The credential reference containing + /// authentication information. + public SqlServerLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object server = default(object), object database = default(object), object encrypt = default(object), object trustServerCertificate = default(object), object hostNameInCertificate = default(object), object applicationIntent = default(object), object connectTimeout = default(object), object connectRetryCount = default(object), object connectRetryInterval = default(object), object loadBalanceTimeout = default(object), object commandTimeout = default(object), object integratedSecurity = default(object), object failoverPartner = default(object), object maxPoolSize = default(object), object minPoolSize = default(object), object multipleActiveResultSets = default(object), object multiSubnetFailover = default(object), object packetSize = default(object), object pooling = default(object), object connectionString = default(object), string authenticationType = default(string), object userName = default(object), SecretBase password = default(SecretBase), string encryptedCredential = default(string), SqlAlwaysEncryptedProperties alwaysEncryptedSettings = default(SqlAlwaysEncryptedProperties), CredentialReference credential = default(CredentialReference)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Server = server; + Database = database; + Encrypt = encrypt; + TrustServerCertificate = trustServerCertificate; + HostNameInCertificate = hostNameInCertificate; + ApplicationIntent = applicationIntent; + ConnectTimeout = connectTimeout; + ConnectRetryCount = connectRetryCount; + ConnectRetryInterval = connectRetryInterval; + LoadBalanceTimeout = loadBalanceTimeout; + CommandTimeout = commandTimeout; + IntegratedSecurity = integratedSecurity; + FailoverPartner = failoverPartner; + MaxPoolSize = maxPoolSize; + MinPoolSize = minPoolSize; + MultipleActiveResultSets = multipleActiveResultSets; + MultiSubnetFailover = multiSubnetFailover; + PacketSize = packetSize; + Pooling = pooling; + ConnectionString = connectionString; + AuthenticationType = authenticationType; + UserName = userName; + Password = password; + EncryptedCredential = encryptedCredential; + AlwaysEncryptedSettings = alwaysEncryptedSettings; + Credential = credential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name or network address of the instance of SQL + /// Server to which to connect, used by recommended version. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.server")] + public object Server { get; set; } + + /// + /// Gets or sets the name of the database, used by recommended version. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.database")] + public object Database { get; set; } + + /// + /// Gets or sets indicate whether TLS encryption is required for all + /// data sent between the client and server, used by recommended + /// version. Possible values are true/yes/mandatory, false/no/optional + /// and strict. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.encrypt")] + public object Encrypt { get; set; } + + /// + /// Gets or sets indicate whether the channel will be encrypted while + /// bypassing walking the certificate chain to validate trust, used by + /// recommended version. Type: Boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "typeProperties.trustServerCertificate")] + public object TrustServerCertificate { get; set; } + + /// + /// Gets or sets the host name to use when validating the server + /// certificate for the connection. When not specified, the server name + /// from the Data Source is used for certificate validation, used by + /// recommended version. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.hostNameInCertificate")] + public object HostNameInCertificate { get; set; } + + /// + /// Gets or sets the application workload type when connecting to a + /// server, used by recommended version. Possible values are ReadOnly + /// and ReadWrite. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.applicationIntent")] + public object ApplicationIntent { get; set; } + + /// + /// Gets or sets the length of time (in seconds) to wait for a + /// connection to the server before terminating the attempt and + /// generating an error, used by recommended version. Type: integer (or + /// Expression with resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.connectTimeout")] + public object ConnectTimeout { get; set; } + + /// + /// Gets or sets the number of re-connections attempted after + /// identifying that there was an idle connection failure, used by + /// recommended version. This must be an integer between 0 and 255. + /// Type: integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.connectRetryCount")] + public object ConnectRetryCount { get; set; } + + /// + /// Gets or sets the amount of time (in seconds) between each + /// re-connection attempt after identifying that there was an idle + /// connection failure, used by recommended version. This must be an + /// integer between 1 and 60. Type: integer (or Expression with + /// resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.connectRetryInterval")] + public object ConnectRetryInterval { get; set; } + + /// + /// Gets or sets the minimum time, in seconds, for the connection to + /// live in the connection pool before being destroyed, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// + [JsonProperty(PropertyName = "typeProperties.loadBalanceTimeout")] + public object LoadBalanceTimeout { get; set; } + + /// + /// Gets or sets the default wait time (in seconds) before terminating + /// the attempt to execute a command and generating an error, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// + [JsonProperty(PropertyName = "typeProperties.commandTimeout")] + public object CommandTimeout { get; set; } + + /// + /// Gets or sets indicate whether User ID and Password are specified in + /// the connection (when false) or whether the current Windows account + /// credentials are used for authentication (when true), used by + /// recommended version. Type: Boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "typeProperties.integratedSecurity")] + public object IntegratedSecurity { get; set; } + + /// + /// Gets or sets the name or address of the partner server to connect + /// to if the primary server is down, used by recommended version. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.failoverPartner")] + public object FailoverPartner { get; set; } + + /// + /// Gets or sets the maximum number of connections allowed in the + /// connection pool for this specific connection string, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// + [JsonProperty(PropertyName = "typeProperties.maxPoolSize")] + public object MaxPoolSize { get; set; } + + /// + /// Gets or sets the minimum number of connections allowed in the + /// connection pool for this specific connection string, used by + /// recommended version. Type: integer (or Expression with resultType + /// integer). + /// + [JsonProperty(PropertyName = "typeProperties.minPoolSize")] + public object MinPoolSize { get; set; } + + /// + /// Gets or sets when true, an application can maintain multiple active + /// result sets (MARS). When false, an application must process or + /// cancel all result sets from one batch before it can execute any + /// other batch on that connection, used by recommended version. Type: + /// Boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.multipleActiveResultSets")] + public object MultipleActiveResultSets { get; set; } + + /// + /// Gets or sets if your application is connecting to an AlwaysOn + /// availability group (AG) on different subnets, setting + /// MultiSubnetFailover=true provides faster detection of and + /// connection to the (currently) active server, used by recommended + /// version. Type: Boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.multiSubnetFailover")] + public object MultiSubnetFailover { get; set; } + + /// + /// Gets or sets the size in bytes of the network packets used to + /// communicate with an instance of server, used by recommended + /// version. Type: integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.packetSize")] + public object PacketSize { get; set; } + + /// + /// Gets or sets indicate whether the connection will be pooled or + /// explicitly opened every time that the connection is requested, used + /// by recommended version. Type: Boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.pooling")] + public object Pooling { get; set; } + + /// + /// Gets or sets the connection string. Type: string, SecureString or + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets the type used for authentication. Type: string. + /// Possible values include: 'SQL', 'Windows', + /// 'UserAssignedManagedIdentity' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets the on-premises Windows authentication user name. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets the on-premises Windows authentication password. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets sql always encrypted properties. + /// + [JsonProperty(PropertyName = "typeProperties.alwaysEncryptedSettings")] + public SqlAlwaysEncryptedProperties AlwaysEncryptedSettings { get; set; } + + /// + /// Gets or sets the credential reference containing authentication + /// information. + /// + [JsonProperty(PropertyName = "typeProperties.credential")] + public CredentialReference Credential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (AlwaysEncryptedSettings != null) + { + AlwaysEncryptedSettings.Validate(); + } + if (Credential != null) + { + Credential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerSink.cs new file mode 100644 index 000000000000..8f3aeeff9dfc --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerSink.cs @@ -0,0 +1,157 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity SQL server sink. + /// + public partial class SqlServerSink : CopySink + { + /// + /// Initializes a new instance of the SqlServerSink class. + /// + public SqlServerSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SqlServerSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// SQL writer stored + /// procedure name. Type: string (or Expression with resultType + /// string). + /// SQL writer table type. Type: + /// string (or Expression with resultType string). + /// SQL pre-copy script. Type: string (or + /// Expression with resultType string). + /// SQL stored procedure + /// parameters. + /// The stored + /// procedure parameter name of the table type. Type: string (or + /// Expression with resultType string). + /// The option to handle sink table, such as + /// autoCreate. For now only 'autoCreate' value is supported. Type: + /// string (or Expression with resultType string). + /// Whether to use table lock + /// during bulk copy. Type: boolean (or Expression with resultType + /// boolean). + /// Write behavior when copying data into + /// sql server. Type: string (or Expression with resultType + /// string). + /// SQL upsert settings. + public SqlServerSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object sqlWriterStoredProcedureName = default(object), object sqlWriterTableType = default(object), object preCopyScript = default(object), object storedProcedureParameters = default(object), object storedProcedureTableTypeParameterName = default(object), object tableOption = default(object), object sqlWriterUseTableLock = default(object), object writeBehavior = default(object), SqlUpsertSettings upsertSettings = default(SqlUpsertSettings)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + SqlWriterStoredProcedureName = sqlWriterStoredProcedureName; + SqlWriterTableType = sqlWriterTableType; + PreCopyScript = preCopyScript; + StoredProcedureParameters = storedProcedureParameters; + StoredProcedureTableTypeParameterName = storedProcedureTableTypeParameterName; + TableOption = tableOption; + SqlWriterUseTableLock = sqlWriterUseTableLock; + WriteBehavior = writeBehavior; + UpsertSettings = upsertSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SQL writer stored procedure name. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "sqlWriterStoredProcedureName")] + public object SqlWriterStoredProcedureName { get; set; } + + /// + /// Gets or sets SQL writer table type. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "sqlWriterTableType")] + public object SqlWriterTableType { get; set; } + + /// + /// Gets or sets SQL pre-copy script. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "preCopyScript")] + public object PreCopyScript { get; set; } + + /// + /// Gets or sets SQL stored procedure parameters. + /// + [JsonProperty(PropertyName = "storedProcedureParameters")] + public object StoredProcedureParameters { get; set; } + + /// + /// Gets or sets the stored procedure parameter name of the table type. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "storedProcedureTableTypeParameterName")] + public object StoredProcedureTableTypeParameterName { get; set; } + + /// + /// Gets or sets the option to handle sink table, such as autoCreate. + /// For now only 'autoCreate' value is supported. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "tableOption")] + public object TableOption { get; set; } + + /// + /// Gets or sets whether to use table lock during bulk copy. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "sqlWriterUseTableLock")] + public object SqlWriterUseTableLock { get; set; } + + /// + /// Gets or sets write behavior when copying data into sql server. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "writeBehavior")] + public object WriteBehavior { get; set; } + + /// + /// Gets or sets SQL upsert settings. + /// + [JsonProperty(PropertyName = "upsertSettings")] + public SqlUpsertSettings UpsertSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerSource.cs new file mode 100644 index 000000000000..eeddb48cf4a6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerSource.cs @@ -0,0 +1,148 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity SQL server source. + /// + public partial class SqlServerSource : TabularSource + { + /// + /// Initializes a new instance of the SqlServerSource class. + /// + public SqlServerSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SqlServerSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// SQL reader query. Type: string (or + /// Expression with resultType string). + /// Name of the stored + /// procedure for a SQL Database source. This cannot be used at the + /// same time as SqlReaderQuery. Type: string (or Expression with + /// resultType string). + /// Value and type setting for + /// stored procedure parameters. Example: "{Parameter1: {value: "1", + /// type: "int"}}". + /// Specifies the transaction locking + /// behavior for the SQL source. Allowed values: + /// ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. + /// The default value is ReadCommitted. Type: string (or Expression + /// with resultType string). + /// Which additional types to + /// produce. + /// The partition mechanism that will be + /// used for Sql read in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". Type: string (or + /// Expression with resultType string). + /// The settings that will be leveraged + /// for Sql source partitioning. + public SqlServerSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object sqlReaderQuery = default(object), object sqlReaderStoredProcedureName = default(object), object storedProcedureParameters = default(object), object isolationLevel = default(object), object produceAdditionalTypes = default(object), object partitionOption = default(object), SqlPartitionSettings partitionSettings = default(SqlPartitionSettings)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + SqlReaderQuery = sqlReaderQuery; + SqlReaderStoredProcedureName = sqlReaderStoredProcedureName; + StoredProcedureParameters = storedProcedureParameters; + IsolationLevel = isolationLevel; + ProduceAdditionalTypes = produceAdditionalTypes; + PartitionOption = partitionOption; + PartitionSettings = partitionSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SQL reader query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "sqlReaderQuery")] + public object SqlReaderQuery { get; set; } + + /// + /// Gets or sets name of the stored procedure for a SQL Database + /// source. This cannot be used at the same time as SqlReaderQuery. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "sqlReaderStoredProcedureName")] + public object SqlReaderStoredProcedureName { get; set; } + + /// + /// Gets or sets value and type setting for stored procedure + /// parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + /// + [JsonProperty(PropertyName = "storedProcedureParameters")] + public object StoredProcedureParameters { get; set; } + + /// + /// Gets or sets specifies the transaction locking behavior for the SQL + /// source. Allowed values: + /// ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. + /// The default value is ReadCommitted. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "isolationLevel")] + public object IsolationLevel { get; set; } + + /// + /// Gets or sets which additional types to produce. + /// + [JsonProperty(PropertyName = "produceAdditionalTypes")] + public object ProduceAdditionalTypes { get; set; } + + /// + /// Gets or sets the partition mechanism that will be used for Sql read + /// in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionOption")] + public object PartitionOption { get; set; } + + /// + /// Gets or sets the settings that will be leveraged for Sql source + /// partitioning. + /// + [JsonProperty(PropertyName = "partitionSettings")] + public SqlPartitionSettings PartitionSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerStoredProcedureActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerStoredProcedureActivity.cs new file mode 100644 index 000000000000..87b5d1c31bd4 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerStoredProcedureActivity.cs @@ -0,0 +1,103 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// SQL stored procedure activity type. + /// + [Newtonsoft.Json.JsonObject("SqlServerStoredProcedure")] + [Rest.Serialization.JsonTransformation] + public partial class SqlServerStoredProcedureActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the SqlServerStoredProcedureActivity + /// class. + /// + public SqlServerStoredProcedureActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SqlServerStoredProcedureActivity + /// class. + /// + /// Activity name. + /// Stored procedure name. Type: + /// string (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// Value and type setting for + /// stored procedure parameters. Example: "{Parameter1: {value: "1", + /// type: "int"}}". + public SqlServerStoredProcedureActivity(string name, object storedProcedureName, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), object storedProcedureParameters = default(object)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + StoredProcedureName = storedProcedureName; + StoredProcedureParameters = storedProcedureParameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets stored procedure name. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.storedProcedureName")] + public object StoredProcedureName { get; set; } + + /// + /// Gets or sets value and type setting for stored procedure + /// parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + /// + [JsonProperty(PropertyName = "typeProperties.storedProcedureParameters")] + public object StoredProcedureParameters { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (StoredProcedureName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "StoredProcedureName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerTableDataset.cs new file mode 100644 index 000000000000..c01f36c57696 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlServerTableDataset.cs @@ -0,0 +1,107 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The on-premises SQL Server dataset. + /// + [Newtonsoft.Json.JsonObject("SqlServerTable")] + [Rest.Serialization.JsonTransformation] + public partial class SqlServerTableDataset : Dataset + { + /// + /// Initializes a new instance of the SqlServerTableDataset class. + /// + public SqlServerTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the SqlServerTableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// This property will be retired. Please + /// consider using schema + table properties instead. + /// The schema name of the + /// SQL Server dataset. Type: string (or Expression with resultType + /// string). + /// The table name of the SQL Server dataset. Type: + /// string (or Expression with resultType string). + public SqlServerTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object), object sqlServerTableDatasetSchema = default(object), object table = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + SqlServerTableDatasetSchema = sqlServerTableDatasetSchema; + Table = table; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property will be retired. Please consider using + /// schema + table properties instead. + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Gets or sets the schema name of the SQL Server dataset. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object SqlServerTableDatasetSchema { get; set; } + + /// + /// Gets or sets the table name of the SQL Server dataset. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlSink.cs new file mode 100644 index 000000000000..53506cb64975 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlSink.cs @@ -0,0 +1,156 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity SQL sink. + /// + public partial class SqlSink : CopySink + { + /// + /// Initializes a new instance of the SqlSink class. + /// + public SqlSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SqlSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// SQL writer stored + /// procedure name. Type: string (or Expression with resultType + /// string). + /// SQL writer table type. Type: + /// string (or Expression with resultType string). + /// SQL pre-copy script. Type: string (or + /// Expression with resultType string). + /// SQL stored procedure + /// parameters. + /// The stored + /// procedure parameter name of the table type. Type: string (or + /// Expression with resultType string). + /// The option to handle sink table, such as + /// autoCreate. For now only 'autoCreate' value is supported. Type: + /// string (or Expression with resultType string). + /// Whether to use table lock + /// during bulk copy. Type: boolean (or Expression with resultType + /// boolean). + /// Write behavior when copying data into + /// sql. Type: string (or Expression with resultType string). + /// SQL upsert settings. + public SqlSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object sqlWriterStoredProcedureName = default(object), object sqlWriterTableType = default(object), object preCopyScript = default(object), object storedProcedureParameters = default(object), object storedProcedureTableTypeParameterName = default(object), object tableOption = default(object), object sqlWriterUseTableLock = default(object), object writeBehavior = default(object), SqlUpsertSettings upsertSettings = default(SqlUpsertSettings)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + SqlWriterStoredProcedureName = sqlWriterStoredProcedureName; + SqlWriterTableType = sqlWriterTableType; + PreCopyScript = preCopyScript; + StoredProcedureParameters = storedProcedureParameters; + StoredProcedureTableTypeParameterName = storedProcedureTableTypeParameterName; + TableOption = tableOption; + SqlWriterUseTableLock = sqlWriterUseTableLock; + WriteBehavior = writeBehavior; + UpsertSettings = upsertSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SQL writer stored procedure name. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "sqlWriterStoredProcedureName")] + public object SqlWriterStoredProcedureName { get; set; } + + /// + /// Gets or sets SQL writer table type. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "sqlWriterTableType")] + public object SqlWriterTableType { get; set; } + + /// + /// Gets or sets SQL pre-copy script. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "preCopyScript")] + public object PreCopyScript { get; set; } + + /// + /// Gets or sets SQL stored procedure parameters. + /// + [JsonProperty(PropertyName = "storedProcedureParameters")] + public object StoredProcedureParameters { get; set; } + + /// + /// Gets or sets the stored procedure parameter name of the table type. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "storedProcedureTableTypeParameterName")] + public object StoredProcedureTableTypeParameterName { get; set; } + + /// + /// Gets or sets the option to handle sink table, such as autoCreate. + /// For now only 'autoCreate' value is supported. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "tableOption")] + public object TableOption { get; set; } + + /// + /// Gets or sets whether to use table lock during bulk copy. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "sqlWriterUseTableLock")] + public object SqlWriterUseTableLock { get; set; } + + /// + /// Gets or sets write behavior when copying data into sql. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "writeBehavior")] + public object WriteBehavior { get; set; } + + /// + /// Gets or sets SQL upsert settings. + /// + [JsonProperty(PropertyName = "upsertSettings")] + public SqlUpsertSettings UpsertSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlSource.cs new file mode 100644 index 000000000000..0454a78ef129 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlSource.cs @@ -0,0 +1,139 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity SQL source. + /// + public partial class SqlSource : TabularSource + { + /// + /// Initializes a new instance of the SqlSource class. + /// + public SqlSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SqlSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// SQL reader query. Type: string (or + /// Expression with resultType string). + /// Name of the stored + /// procedure for a SQL Database source. This cannot be used at the + /// same time as SqlReaderQuery. Type: string (or Expression with + /// resultType string). + /// Value and type setting for + /// stored procedure parameters. Example: "{Parameter1: {value: "1", + /// type: "int"}}". + /// Specifies the transaction locking + /// behavior for the SQL source. Allowed values: + /// ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. + /// The default value is ReadCommitted. Type: string (or Expression + /// with resultType string). + /// The partition mechanism that will be + /// used for Sql read in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". Type: string (or + /// Expression with resultType string). + /// The settings that will be leveraged + /// for Sql source partitioning. + public SqlSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object sqlReaderQuery = default(object), object sqlReaderStoredProcedureName = default(object), object storedProcedureParameters = default(object), object isolationLevel = default(object), object partitionOption = default(object), SqlPartitionSettings partitionSettings = default(SqlPartitionSettings)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + SqlReaderQuery = sqlReaderQuery; + SqlReaderStoredProcedureName = sqlReaderStoredProcedureName; + StoredProcedureParameters = storedProcedureParameters; + IsolationLevel = isolationLevel; + PartitionOption = partitionOption; + PartitionSettings = partitionSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SQL reader query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "sqlReaderQuery")] + public object SqlReaderQuery { get; set; } + + /// + /// Gets or sets name of the stored procedure for a SQL Database + /// source. This cannot be used at the same time as SqlReaderQuery. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "sqlReaderStoredProcedureName")] + public object SqlReaderStoredProcedureName { get; set; } + + /// + /// Gets or sets value and type setting for stored procedure + /// parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + /// + [JsonProperty(PropertyName = "storedProcedureParameters")] + public object StoredProcedureParameters { get; set; } + + /// + /// Gets or sets specifies the transaction locking behavior for the SQL + /// source. Allowed values: + /// ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. + /// The default value is ReadCommitted. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "isolationLevel")] + public object IsolationLevel { get; set; } + + /// + /// Gets or sets the partition mechanism that will be used for Sql read + /// in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionOption")] + public object PartitionOption { get; set; } + + /// + /// Gets or sets the settings that will be leveraged for Sql source + /// partitioning. + /// + [JsonProperty(PropertyName = "partitionSettings")] + public SqlPartitionSettings PartitionSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlUpsertSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlUpsertSettings.cs new file mode 100644 index 000000000000..04c0ec7db7eb --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlUpsertSettings.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Sql upsert option settings + /// + public partial class SqlUpsertSettings + { + /// + /// Initializes a new instance of the SqlUpsertSettings class. + /// + public SqlUpsertSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SqlUpsertSettings class. + /// + /// Specifies whether to use temp db for upsert + /// interim table. Type: boolean (or Expression with resultType + /// boolean). + /// Schema name for interim table. + /// Type: string (or Expression with resultType string). + /// Key column names for unique row identification. + /// Type: array of strings (or Expression with resultType array of + /// strings). + public SqlUpsertSettings(object useTempDB = default(object), object interimSchemaName = default(object), object keys = default(object)) + { + UseTempDB = useTempDB; + InterimSchemaName = interimSchemaName; + Keys = keys; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies whether to use temp db for upsert interim + /// table. Type: boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "useTempDB")] + public object UseTempDB { get; set; } + + /// + /// Gets or sets schema name for interim table. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "interimSchemaName")] + public object InterimSchemaName { get; set; } + + /// + /// Gets or sets key column names for unique row identification. Type: + /// array of strings (or Expression with resultType array of strings). + /// + [JsonProperty(PropertyName = "keys")] + public object Keys { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlWriteBehaviorEnum.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlWriteBehaviorEnum.cs new file mode 100644 index 000000000000..1bc31bb01b30 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SqlWriteBehaviorEnum.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for SqlWriteBehaviorEnum. + /// + public static class SqlWriteBehaviorEnum + { + public const string Insert = "Insert"; + public const string Upsert = "Upsert"; + public const string StoredProcedure = "StoredProcedure"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SquareLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SquareLinkedService.cs new file mode 100644 index 000000000000..6b178e00c2e1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SquareLinkedService.cs @@ -0,0 +1,165 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Square Service linked service. + /// + [Newtonsoft.Json.JsonObject("Square")] + [Rest.Serialization.JsonTransformation] + public partial class SquareLinkedService : LinkedService + { + /// + /// Initializes a new instance of the SquareLinkedService class. + /// + public SquareLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SquareLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Properties used to connect to + /// Square. It is mutually exclusive with any other properties in the + /// linked service. Type: object. + /// The URL of the Square instance. (i.e. + /// mystore.mysquare.com) + /// The client ID associated with your Square + /// application. + /// The client secret associated with your + /// Square application. + /// The redirect URL assigned in the Square + /// application dashboard. (i.e. http://localhost:2500) + /// Specifies whether the data + /// source endpoints are encrypted using HTTPS. The default value is + /// true. + /// Specifies whether to require the + /// host name in the server's certificate to match the host name of the + /// server when connecting over SSL. The default value is true. + /// Specifies whether to verify the + /// identity of the server when connecting over SSL. The default value + /// is true. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public SquareLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object connectionProperties = default(object), object host = default(object), object clientId = default(object), SecretBase clientSecret = default(SecretBase), object redirectUri = default(object), object useEncryptedEndpoints = default(object), object useHostVerification = default(object), object usePeerVerification = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionProperties = connectionProperties; + Host = host; + ClientId = clientId; + ClientSecret = clientSecret; + RedirectUri = redirectUri; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets properties used to connect to Square. It is mutually + /// exclusive with any other properties in the linked service. Type: + /// object. + /// + [JsonProperty(PropertyName = "typeProperties.connectionProperties")] + public object ConnectionProperties { get; set; } + + /// + /// Gets or sets the URL of the Square instance. (i.e. + /// mystore.mysquare.com) + /// + [JsonProperty(PropertyName = "typeProperties.host")] + public object Host { get; set; } + + /// + /// Gets or sets the client ID associated with your Square application. + /// + [JsonProperty(PropertyName = "typeProperties.clientId")] + public object ClientId { get; set; } + + /// + /// Gets or sets the client secret associated with your Square + /// application. + /// + [JsonProperty(PropertyName = "typeProperties.clientSecret")] + public SecretBase ClientSecret { get; set; } + + /// + /// Gets or sets the redirect URL assigned in the Square application + /// dashboard. (i.e. http://localhost:2500) + /// + [JsonProperty(PropertyName = "typeProperties.redirectUri")] + public object RedirectUri { get; set; } + + /// + /// Gets or sets specifies whether the data source endpoints are + /// encrypted using HTTPS. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useEncryptedEndpoints")] + public object UseEncryptedEndpoints { get; set; } + + /// + /// Gets or sets specifies whether to require the host name in the + /// server's certificate to match the host name of the server when + /// connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useHostVerification")] + public object UseHostVerification { get; set; } + + /// + /// Gets or sets specifies whether to verify the identity of the server + /// when connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.usePeerVerification")] + public object UsePeerVerification { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SquareObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SquareObjectDataset.cs new file mode 100644 index 000000000000..b367b0151bd7 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SquareObjectDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Square Service dataset. + /// + [Newtonsoft.Json.JsonObject("SquareObject")] + [Rest.Serialization.JsonTransformation] + public partial class SquareObjectDataset : Dataset + { + /// + /// Initializes a new instance of the SquareObjectDataset class. + /// + public SquareObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the SquareObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name. Type: string (or Expression + /// with resultType string). + public SquareObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SquareSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SquareSource.cs new file mode 100644 index 000000000000..ecde984731c1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SquareSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Square Service source. + /// + public partial class SquareSource : TabularSource + { + /// + /// Initializes a new instance of the SquareSource class. + /// + public SquareSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SquareSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public SquareSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisEnvironment.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisEnvironment.cs new file mode 100644 index 000000000000..a792643686fc --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisEnvironment.cs @@ -0,0 +1,67 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Ssis environment. + /// + [Newtonsoft.Json.JsonObject("Environment")] + public partial class SsisEnvironment : SsisObjectMetadata + { + /// + /// Initializes a new instance of the SsisEnvironment class. + /// + public SsisEnvironment() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SsisEnvironment class. + /// + /// Metadata id. + /// Metadata name. + /// Metadata description. + /// Folder id which contains + /// environment. + /// Variable in environment + public SsisEnvironment(long? id = default(long?), string name = default(string), string description = default(string), long? folderId = default(long?), IList variables = default(IList)) + : base(id, name, description) + { + FolderId = folderId; + Variables = variables; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets folder id which contains environment. + /// + [JsonProperty(PropertyName = "folderId")] + public long? FolderId { get; set; } + + /// + /// Gets or sets variable in environment + /// + [JsonProperty(PropertyName = "variables")] + public IList Variables { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisEnvironmentReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisEnvironmentReference.cs new file mode 100644 index 000000000000..839668c2483c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisEnvironmentReference.cs @@ -0,0 +1,76 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Ssis environment reference. + /// + public partial class SsisEnvironmentReference + { + /// + /// Initializes a new instance of the SsisEnvironmentReference class. + /// + public SsisEnvironmentReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SsisEnvironmentReference class. + /// + /// Environment reference id. + /// Environment folder + /// name. + /// Environment name. + /// Reference type + public SsisEnvironmentReference(long? id = default(long?), string environmentFolderName = default(string), string environmentName = default(string), string referenceType = default(string)) + { + Id = id; + EnvironmentFolderName = environmentFolderName; + EnvironmentName = environmentName; + ReferenceType = referenceType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets environment reference id. + /// + [JsonProperty(PropertyName = "id")] + public long? Id { get; set; } + + /// + /// Gets or sets environment folder name. + /// + [JsonProperty(PropertyName = "environmentFolderName")] + public string EnvironmentFolderName { get; set; } + + /// + /// Gets or sets environment name. + /// + [JsonProperty(PropertyName = "environmentName")] + public string EnvironmentName { get; set; } + + /// + /// Gets or sets reference type + /// + [JsonProperty(PropertyName = "referenceType")] + public string ReferenceType { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisFolder.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisFolder.cs new file mode 100644 index 000000000000..c51cc8b33799 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisFolder.cs @@ -0,0 +1,48 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Ssis folder. + /// + [Newtonsoft.Json.JsonObject("Folder")] + public partial class SsisFolder : SsisObjectMetadata + { + /// + /// Initializes a new instance of the SsisFolder class. + /// + public SsisFolder() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SsisFolder class. + /// + /// Metadata id. + /// Metadata name. + /// Metadata description. + public SsisFolder(long? id = default(long?), string name = default(string), string description = default(string)) + : base(id, name, description) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisObjectMetadata.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisObjectMetadata.cs new file mode 100644 index 000000000000..83b77940a1c2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisObjectMetadata.cs @@ -0,0 +1,67 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// SSIS object metadata. + /// + public partial class SsisObjectMetadata + { + /// + /// Initializes a new instance of the SsisObjectMetadata class. + /// + public SsisObjectMetadata() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SsisObjectMetadata class. + /// + /// Metadata id. + /// Metadata name. + /// Metadata description. + public SsisObjectMetadata(long? id = default(long?), string name = default(string), string description = default(string)) + { + Id = id; + Name = name; + Description = description; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets metadata id. + /// + [JsonProperty(PropertyName = "id")] + public long? Id { get; set; } + + /// + /// Gets or sets metadata name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets metadata description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisObjectMetadataListResponse.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisObjectMetadataListResponse.cs new file mode 100644 index 000000000000..1d6150e15244 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisObjectMetadataListResponse.cs @@ -0,0 +1,65 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A list of SSIS object metadata. + /// + public partial class SsisObjectMetadataListResponse + { + /// + /// Initializes a new instance of the SsisObjectMetadataListResponse + /// class. + /// + public SsisObjectMetadataListResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SsisObjectMetadataListResponse + /// class. + /// + /// List of SSIS object metadata. + /// The link to the next page of results, if any + /// remaining results exist. + public SsisObjectMetadataListResponse(IList value = default(IList), string nextLink = default(string)) + { + Value = value; + NextLink = nextLink; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of SSIS object metadata. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + /// + /// Gets or sets the link to the next page of results, if any remaining + /// results exist. + /// + [JsonProperty(PropertyName = "nextLink")] + public string NextLink { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisObjectMetadataStatusResponse.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisObjectMetadataStatusResponse.cs new file mode 100644 index 000000000000..3a60a7de4a9a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisObjectMetadataStatusResponse.cs @@ -0,0 +1,77 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The status of the operation. + /// + public partial class SsisObjectMetadataStatusResponse + { + /// + /// Initializes a new instance of the SsisObjectMetadataStatusResponse + /// class. + /// + public SsisObjectMetadataStatusResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SsisObjectMetadataStatusResponse + /// class. + /// + /// The status of the operation. + /// The operation name. + /// The operation properties. + /// The operation error message. + public SsisObjectMetadataStatusResponse(string status = default(string), string name = default(string), string properties = default(string), string error = default(string)) + { + Status = status; + Name = name; + Properties = properties; + Error = error; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the status of the operation. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or sets the operation name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the operation properties. + /// + [JsonProperty(PropertyName = "properties")] + public string Properties { get; set; } + + /// + /// Gets or sets the operation error message. + /// + [JsonProperty(PropertyName = "error")] + public string Error { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisObjectMetadataType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisObjectMetadataType.cs new file mode 100644 index 000000000000..c5e556cd28e0 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisObjectMetadataType.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for SsisObjectMetadataType. + /// + public static class SsisObjectMetadataType + { + public const string Folder = "Folder"; + public const string Project = "Project"; + public const string Package = "Package"; + public const string Environment = "Environment"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisPackage.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisPackage.cs new file mode 100644 index 000000000000..59f3a3478f63 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisPackage.cs @@ -0,0 +1,83 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Ssis Package. + /// + [Newtonsoft.Json.JsonObject("Package")] + public partial class SsisPackage : SsisObjectMetadata + { + /// + /// Initializes a new instance of the SsisPackage class. + /// + public SsisPackage() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SsisPackage class. + /// + /// Metadata id. + /// Metadata name. + /// Metadata description. + /// Folder id which contains package. + /// Project version which contains + /// package. + /// Project id which contains package. + /// Parameters in package + public SsisPackage(long? id = default(long?), string name = default(string), string description = default(string), long? folderId = default(long?), long? projectVersion = default(long?), long? projectId = default(long?), IList parameters = default(IList)) + : base(id, name, description) + { + FolderId = folderId; + ProjectVersion = projectVersion; + ProjectId = projectId; + Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets folder id which contains package. + /// + [JsonProperty(PropertyName = "folderId")] + public long? FolderId { get; set; } + + /// + /// Gets or sets project version which contains package. + /// + [JsonProperty(PropertyName = "projectVersion")] + public long? ProjectVersion { get; set; } + + /// + /// Gets or sets project id which contains package. + /// + [JsonProperty(PropertyName = "projectId")] + public long? ProjectId { get; set; } + + /// + /// Gets or sets parameters in package + /// + [JsonProperty(PropertyName = "parameters")] + public IList Parameters { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisPackageLocationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisPackageLocationType.cs new file mode 100644 index 000000000000..337f74c111a8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisPackageLocationType.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for SsisPackageLocationType. + /// + public static class SsisPackageLocationType + { + public const string SSISDB = "SSISDB"; + public const string File = "File"; + public const string InlinePackage = "InlinePackage"; + public const string PackageStore = "PackageStore"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisParameter.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisParameter.cs new file mode 100644 index 000000000000..b41d5e76c0f8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisParameter.cs @@ -0,0 +1,141 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Ssis parameter. + /// + public partial class SsisParameter + { + /// + /// Initializes a new instance of the SsisParameter class. + /// + public SsisParameter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SsisParameter class. + /// + /// Parameter id. + /// Parameter name. + /// Parameter description. + /// Parameter type. + /// Whether parameter is required. + /// Whether parameter is sensitive. + /// Design default value of + /// parameter. + /// Default value of parameter. + /// Default sensitive value of + /// parameter. + /// Parameter value type. + /// Parameter value set. + /// Parameter reference variable. + public SsisParameter(long? id = default(long?), string name = default(string), string description = default(string), string dataType = default(string), bool? required = default(bool?), bool? sensitive = default(bool?), string designDefaultValue = default(string), string defaultValue = default(string), string sensitiveDefaultValue = default(string), string valueType = default(string), bool? valueSet = default(bool?), string variable = default(string)) + { + Id = id; + Name = name; + Description = description; + DataType = dataType; + Required = required; + Sensitive = sensitive; + DesignDefaultValue = designDefaultValue; + DefaultValue = defaultValue; + SensitiveDefaultValue = sensitiveDefaultValue; + ValueType = valueType; + ValueSet = valueSet; + Variable = variable; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets parameter id. + /// + [JsonProperty(PropertyName = "id")] + public long? Id { get; set; } + + /// + /// Gets or sets parameter name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets parameter description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets parameter type. + /// + [JsonProperty(PropertyName = "dataType")] + public string DataType { get; set; } + + /// + /// Gets or sets whether parameter is required. + /// + [JsonProperty(PropertyName = "required")] + public bool? Required { get; set; } + + /// + /// Gets or sets whether parameter is sensitive. + /// + [JsonProperty(PropertyName = "sensitive")] + public bool? Sensitive { get; set; } + + /// + /// Gets or sets design default value of parameter. + /// + [JsonProperty(PropertyName = "designDefaultValue")] + public string DesignDefaultValue { get; set; } + + /// + /// Gets or sets default value of parameter. + /// + [JsonProperty(PropertyName = "defaultValue")] + public string DefaultValue { get; set; } + + /// + /// Gets or sets default sensitive value of parameter. + /// + [JsonProperty(PropertyName = "sensitiveDefaultValue")] + public string SensitiveDefaultValue { get; set; } + + /// + /// Gets or sets parameter value type. + /// + [JsonProperty(PropertyName = "valueType")] + public string ValueType { get; set; } + + /// + /// Gets or sets parameter value set. + /// + [JsonProperty(PropertyName = "valueSet")] + public bool? ValueSet { get; set; } + + /// + /// Gets or sets parameter reference variable. + /// + [JsonProperty(PropertyName = "variable")] + public string Variable { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisProject.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisProject.cs new file mode 100644 index 000000000000..18429061a216 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisProject.cs @@ -0,0 +1,83 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Ssis project. + /// + [Newtonsoft.Json.JsonObject("Project")] + public partial class SsisProject : SsisObjectMetadata + { + /// + /// Initializes a new instance of the SsisProject class. + /// + public SsisProject() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SsisProject class. + /// + /// Metadata id. + /// Metadata name. + /// Metadata description. + /// Folder id which contains project. + /// Project version. + /// Environment reference in + /// project + /// Parameters in project + public SsisProject(long? id = default(long?), string name = default(string), string description = default(string), long? folderId = default(long?), long? version = default(long?), IList environmentRefs = default(IList), IList parameters = default(IList)) + : base(id, name, description) + { + FolderId = folderId; + Version = version; + EnvironmentRefs = environmentRefs; + Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets folder id which contains project. + /// + [JsonProperty(PropertyName = "folderId")] + public long? FolderId { get; set; } + + /// + /// Gets or sets project version. + /// + [JsonProperty(PropertyName = "version")] + public long? Version { get; set; } + + /// + /// Gets or sets environment reference in project + /// + [JsonProperty(PropertyName = "environmentRefs")] + public IList EnvironmentRefs { get; set; } + + /// + /// Gets or sets parameters in project + /// + [JsonProperty(PropertyName = "parameters")] + public IList Parameters { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisVariable.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisVariable.cs new file mode 100644 index 000000000000..a28e8b9783b9 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SsisVariable.cs @@ -0,0 +1,99 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Ssis variable. + /// + public partial class SsisVariable + { + /// + /// Initializes a new instance of the SsisVariable class. + /// + public SsisVariable() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SsisVariable class. + /// + /// Variable id. + /// Variable name. + /// Variable description. + /// Variable type. + /// Whether variable is sensitive. + /// Variable value. + /// Variable sensitive value. + public SsisVariable(long? id = default(long?), string name = default(string), string description = default(string), string dataType = default(string), bool? sensitive = default(bool?), string value = default(string), string sensitiveValue = default(string)) + { + Id = id; + Name = name; + Description = description; + DataType = dataType; + Sensitive = sensitive; + Value = value; + SensitiveValue = sensitiveValue; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets variable id. + /// + [JsonProperty(PropertyName = "id")] + public long? Id { get; set; } + + /// + /// Gets or sets variable name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets variable description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets variable type. + /// + [JsonProperty(PropertyName = "dataType")] + public string DataType { get; set; } + + /// + /// Gets or sets whether variable is sensitive. + /// + [JsonProperty(PropertyName = "sensitive")] + public bool? Sensitive { get; set; } + + /// + /// Gets or sets variable value. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + /// + /// Gets or sets variable sensitive value. + /// + [JsonProperty(PropertyName = "sensitiveValue")] + public string SensitiveValue { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/StagingSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/StagingSettings.cs new file mode 100644 index 000000000000..a6b7fe981f44 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/StagingSettings.cs @@ -0,0 +1,106 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Staging settings. + /// + public partial class StagingSettings + { + /// + /// Initializes a new instance of the StagingSettings class. + /// + public StagingSettings() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the StagingSettings class. + /// + /// Staging linked service + /// reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// The path to storage for storing the interim + /// data. Type: string (or Expression with resultType string). + /// Specifies whether to use + /// compression when copying data via an interim staging. Default value + /// is false. Type: boolean (or Expression with resultType + /// boolean). + public StagingSettings(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), object path = default(object), object enableCompression = default(object)) + { + AdditionalProperties = additionalProperties; + LinkedServiceName = linkedServiceName; + Path = path; + EnableCompression = enableCompression; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets staging linked service reference. + /// + [JsonProperty(PropertyName = "linkedServiceName")] + public LinkedServiceReference LinkedServiceName { get; set; } + + /// + /// Gets or sets the path to storage for storing the interim data. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "path")] + public object Path { get; set; } + + /// + /// Gets or sets specifies whether to use compression when copying data + /// via an interim staging. Default value is false. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "enableCompression")] + public object EnableCompression { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (LinkedServiceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "LinkedServiceName"); + } + if (LinkedServiceName != null) + { + LinkedServiceName.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/StoreReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/StoreReadSettings.cs new file mode 100644 index 000000000000..6f01401f2d44 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/StoreReadSettings.cs @@ -0,0 +1,78 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Connector read setting. + /// + public partial class StoreReadSettings + { + /// + /// Initializes a new instance of the StoreReadSettings class. + /// + public StoreReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the StoreReadSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + public StoreReadSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object)) + { + AdditionalProperties = additionalProperties; + MaxConcurrentConnections = maxConcurrentConnections; + DisableMetricsCollection = disableMetricsCollection; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets the maximum concurrent connection count for the source + /// data store. Type: integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "maxConcurrentConnections")] + public object MaxConcurrentConnections { get; set; } + + /// + /// Gets or sets if true, disable data store metrics collection. + /// Default is false. Type: boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "disableMetricsCollection")] + public object DisableMetricsCollection { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/StoreWriteSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/StoreWriteSettings.cs new file mode 100644 index 000000000000..fa525a4ec984 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/StoreWriteSettings.cs @@ -0,0 +1,99 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Connector write settings. + /// + public partial class StoreWriteSettings + { + /// + /// Initializes a new instance of the StoreWriteSettings class. + /// + public StoreWriteSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the StoreWriteSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// The type of copy behavior for copy + /// sink. + /// Specify the custom metadata to be added to + /// sink data. Type: array of objects (or Expression with resultType + /// array of objects). + public StoreWriteSettings(IDictionary additionalProperties = default(IDictionary), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object copyBehavior = default(object), IList metadata = default(IList)) + { + AdditionalProperties = additionalProperties; + MaxConcurrentConnections = maxConcurrentConnections; + DisableMetricsCollection = disableMetricsCollection; + CopyBehavior = copyBehavior; + Metadata = metadata; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets the maximum concurrent connection count for the source + /// data store. Type: integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "maxConcurrentConnections")] + public object MaxConcurrentConnections { get; set; } + + /// + /// Gets or sets if true, disable data store metrics collection. + /// Default is false. Type: boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "disableMetricsCollection")] + public object DisableMetricsCollection { get; set; } + + /// + /// Gets or sets the type of copy behavior for copy sink. + /// + [JsonProperty(PropertyName = "copyBehavior")] + public object CopyBehavior { get; set; } + + /// + /// Gets or sets specify the custom metadata to be added to sink data. + /// Type: array of objects (or Expression with resultType array of + /// objects). + /// + [JsonProperty(PropertyName = "metadata")] + public IList Metadata { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/StoredProcedureParameter.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/StoredProcedureParameter.cs new file mode 100644 index 000000000000..ce4f484cbc4d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/StoredProcedureParameter.cs @@ -0,0 +1,65 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// SQL stored procedure parameter. + /// + public partial class StoredProcedureParameter + { + /// + /// Initializes a new instance of the StoredProcedureParameter class. + /// + public StoredProcedureParameter() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the StoredProcedureParameter class. + /// + /// Stored procedure parameter value. Type: string + /// (or Expression with resultType string). + /// Stored procedure parameter type. Possible values + /// include: 'String', 'Int', 'Int64', 'Decimal', 'Guid', 'Boolean', + /// 'Date' + public StoredProcedureParameter(object value = default(object), string type = default(string)) + { + Value = value; + Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets stored procedure parameter value. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "value")] + public object Value { get; set; } + + /// + /// Gets or sets stored procedure parameter type. Possible values + /// include: 'String', 'Int', 'Int64', 'Decimal', 'Guid', 'Boolean', + /// 'Date' + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/StoredProcedureParameterType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/StoredProcedureParameterType.cs new file mode 100644 index 000000000000..9337fdcd53bc --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/StoredProcedureParameterType.cs @@ -0,0 +1,27 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for StoredProcedureParameterType. + /// + public static class StoredProcedureParameterType + { + public const string String = "String"; + public const string Int = "Int"; + public const string Int64 = "Int64"; + public const string Decimal = "Decimal"; + public const string Guid = "Guid"; + public const string Boolean = "Boolean"; + public const string Date = "Date"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SubResource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SubResource.cs new file mode 100644 index 000000000000..61e60f65cd38 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SubResource.cs @@ -0,0 +1,77 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Azure Data Factory nested resource, which belongs to a factory. + /// + public partial class SubResource : IResource + { + /// + /// Initializes a new instance of the SubResource class. + /// + public SubResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SubResource class. + /// + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + public SubResource(string id = default(string), string name = default(string), string type = default(string), string etag = default(string)) + { + Id = id; + Name = name; + Type = type; + Etag = etag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the resource identifier. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets the resource name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets the resource type. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets etag identifies change in the resource. + /// + [JsonProperty(PropertyName = "etag")] + public string Etag { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SubResourceDebugResource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SubResourceDebugResource.cs new file mode 100644 index 000000000000..f9830f6a5d6e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SubResourceDebugResource.cs @@ -0,0 +1,51 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Azure Data Factory nested debug resource. + /// + public partial class SubResourceDebugResource + { + /// + /// Initializes a new instance of the SubResourceDebugResource class. + /// + public SubResourceDebugResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SubResourceDebugResource class. + /// + /// The resource name. + public SubResourceDebugResource(string name = default(string)) + { + Name = name; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the resource name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SwitchActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SwitchActivity.cs new file mode 100644 index 000000000000..8c3efdf6c6ae --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SwitchActivity.cs @@ -0,0 +1,133 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// This activity evaluates an expression and executes activities under the + /// cases property that correspond to the expression evaluation expected in + /// the equals property. + /// + [Newtonsoft.Json.JsonObject("Switch")] + [Rest.Serialization.JsonTransformation] + public partial class SwitchActivity : ControlActivity + { + /// + /// Initializes a new instance of the SwitchActivity class. + /// + public SwitchActivity() + { + On = new Expression(); + CustomInit(); + } + + /// + /// Initializes a new instance of the SwitchActivity class. + /// + /// Activity name. + /// An expression that would evaluate to a string or + /// integer. This is used to determine the block of activities in cases + /// that will be executed. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// List of cases that correspond to expected + /// values of the 'on' property. This is an optional property and if + /// not provided, the activity will execute activities provided in + /// defaultActivities. + /// List of activities to execute if no + /// case condition is satisfied. This is an optional property and if + /// not provided, the activity will exit without any action. + public SwitchActivity(string name, Expression on, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), IList cases = default(IList), IList defaultActivities = default(IList)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties) + { + On = on; + Cases = cases; + DefaultActivities = defaultActivities; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets an expression that would evaluate to a string or + /// integer. This is used to determine the block of activities in cases + /// that will be executed. + /// + [JsonProperty(PropertyName = "typeProperties.on")] + public Expression On { get; set; } + + /// + /// Gets or sets list of cases that correspond to expected values of + /// the 'on' property. This is an optional property and if not + /// provided, the activity will execute activities provided in + /// defaultActivities. + /// + [JsonProperty(PropertyName = "typeProperties.cases")] + public IList Cases { get; set; } + + /// + /// Gets or sets list of activities to execute if no case condition is + /// satisfied. This is an optional property and if not provided, the + /// activity will exit without any action. + /// + [JsonProperty(PropertyName = "typeProperties.defaultActivities")] + public IList DefaultActivities { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (On == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "On"); + } + if (On != null) + { + On.Validate(); + } + if (DefaultActivities != null) + { + foreach (var element in DefaultActivities) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SwitchCase.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SwitchCase.cs new file mode 100644 index 000000000000..f4ccad238623 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SwitchCase.cs @@ -0,0 +1,65 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Switch cases with have a value and corresponding activities. + /// + public partial class SwitchCase + { + /// + /// Initializes a new instance of the SwitchCase class. + /// + public SwitchCase() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SwitchCase class. + /// + /// Expected value that satisfies the expression + /// result of the 'on' property. + /// List of activities to execute for + /// satisfied case condition. + public SwitchCase(string value = default(string), IList activities = default(IList)) + { + Value = value; + Activities = activities; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets expected value that satisfies the expression result of + /// the 'on' property. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + /// + /// Gets or sets list of activities to execute for satisfied case + /// condition. + /// + [JsonProperty(PropertyName = "activities")] + public IList Activities { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SybaseAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SybaseAuthenticationType.cs new file mode 100644 index 000000000000..343f7afa8e45 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SybaseAuthenticationType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for SybaseAuthenticationType. + /// + public static class SybaseAuthenticationType + { + public const string Basic = "Basic"; + public const string Windows = "Windows"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SybaseLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SybaseLinkedService.cs new file mode 100644 index 000000000000..dacde347adb8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SybaseLinkedService.cs @@ -0,0 +1,146 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for Sybase data source. + /// + [Newtonsoft.Json.JsonObject("Sybase")] + [Rest.Serialization.JsonTransformation] + public partial class SybaseLinkedService : LinkedService + { + /// + /// Initializes a new instance of the SybaseLinkedService class. + /// + public SybaseLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SybaseLinkedService class. + /// + /// Server name for connection. Type: string (or + /// Expression with resultType string). + /// Database name for connection. Type: string + /// (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Schema name for connection. Type: string (or + /// Expression with resultType string). + /// AuthenticationType to be used for + /// connection. Possible values include: 'Basic', 'Windows' + /// Username for authentication. Type: string + /// (or Expression with resultType string). + /// Password for authentication. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public SybaseLinkedService(object server, object database, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object schema = default(object), string authenticationType = default(string), object username = default(object), SecretBase password = default(SecretBase), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + Server = server; + Database = database; + Schema = schema; + AuthenticationType = authenticationType; + Username = username; + Password = password; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets server name for connection. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.server")] + public object Server { get; set; } + + /// + /// Gets or sets database name for connection. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.database")] + public object Database { get; set; } + + /// + /// Gets or sets schema name for connection. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object Schema { get; set; } + + /// + /// Gets or sets authenticationType to be used for connection. Possible + /// values include: 'Basic', 'Windows' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets username for authentication. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets password for authentication. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Server == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Server"); + } + if (Database == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Database"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SybaseSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SybaseSource.cs new file mode 100644 index 000000000000..3b7f7f3bca80 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SybaseSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for Sybase databases. + /// + public partial class SybaseSource : TabularSource + { + /// + /// Initializes a new instance of the SybaseSource class. + /// + public SybaseSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SybaseSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// Database query. Type: string (or Expression + /// with resultType string). + public SybaseSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets database query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SybaseTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SybaseTableDataset.cs new file mode 100644 index 000000000000..f793cc8ba931 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SybaseTableDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Sybase table dataset. + /// + [Newtonsoft.Json.JsonObject("SybaseTable")] + [Rest.Serialization.JsonTransformation] + public partial class SybaseTableDataset : Dataset + { + /// + /// Initializes a new instance of the SybaseTableDataset class. + /// + public SybaseTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the SybaseTableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The Sybase table name. Type: string (or + /// Expression with resultType string). + public SybaseTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Sybase table name. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SynapseNotebookActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SynapseNotebookActivity.cs new file mode 100644 index 000000000000..c65dadd0771b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SynapseNotebookActivity.cs @@ -0,0 +1,202 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Execute Synapse notebook activity. + /// + [Newtonsoft.Json.JsonObject("SynapseNotebook")] + [Rest.Serialization.JsonTransformation] + public partial class SynapseNotebookActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the SynapseNotebookActivity class. + /// + public SynapseNotebookActivity() + { + Notebook = new SynapseNotebookReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the SynapseNotebookActivity class. + /// + /// Activity name. + /// Synapse notebook reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// The name of the big data pool which will be + /// used to execute the notebook. + /// Notebook parameters. + /// Number of core and memory to be used for + /// executors allocated in the specified Spark pool for the session, + /// which will be used for overriding 'executorCores' and + /// 'executorMemory' of the notebook you provide. Type: string (or + /// Expression with resultType string). + /// Spark configuration properties, which will + /// override the 'conf' of the notebook you provide. + /// Number of core and memory to be used for + /// driver allocated in the specified Spark pool for the session, which + /// will be used for overriding 'driverCores' and 'driverMemory' of the + /// notebook you provide. Type: string (or Expression with resultType + /// string). + /// Number of executors to launch for this + /// session, which will override the 'numExecutors' of the notebook you + /// provide. Type: integer (or Expression with resultType + /// integer). + /// The type of the spark config. + /// Possible values include: 'Default', 'Customized', + /// 'Artifact' + /// The spark configuration of + /// the spark job. + /// Spark configuration property. + public SynapseNotebookActivity(string name, SynapseNotebookReference notebook, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), BigDataPoolParametrizationReference sparkPool = default(BigDataPoolParametrizationReference), IDictionary parameters = default(IDictionary), object executorSize = default(object), object conf = default(object), object driverSize = default(object), object numExecutors = default(object), string configurationType = default(string), SparkConfigurationParametrizationReference targetSparkConfiguration = default(SparkConfigurationParametrizationReference), IDictionary sparkConfig = default(IDictionary)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + Notebook = notebook; + SparkPool = sparkPool; + Parameters = parameters; + ExecutorSize = executorSize; + Conf = conf; + DriverSize = driverSize; + NumExecutors = numExecutors; + ConfigurationType = configurationType; + TargetSparkConfiguration = targetSparkConfiguration; + SparkConfig = sparkConfig; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets synapse notebook reference. + /// + [JsonProperty(PropertyName = "typeProperties.notebook")] + public SynapseNotebookReference Notebook { get; set; } + + /// + /// Gets or sets the name of the big data pool which will be used to + /// execute the notebook. + /// + [JsonProperty(PropertyName = "typeProperties.sparkPool")] + public BigDataPoolParametrizationReference SparkPool { get; set; } + + /// + /// Gets or sets notebook parameters. + /// + [JsonProperty(PropertyName = "typeProperties.parameters")] + public IDictionary Parameters { get; set; } + + /// + /// Gets or sets number of core and memory to be used for executors + /// allocated in the specified Spark pool for the session, which will + /// be used for overriding 'executorCores' and 'executorMemory' of the + /// notebook you provide. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.executorSize")] + public object ExecutorSize { get; set; } + + /// + /// Gets or sets spark configuration properties, which will override + /// the 'conf' of the notebook you provide. + /// + [JsonProperty(PropertyName = "typeProperties.conf")] + public object Conf { get; set; } + + /// + /// Gets or sets number of core and memory to be used for driver + /// allocated in the specified Spark pool for the session, which will + /// be used for overriding 'driverCores' and 'driverMemory' of the + /// notebook you provide. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.driverSize")] + public object DriverSize { get; set; } + + /// + /// Gets or sets number of executors to launch for this session, which + /// will override the 'numExecutors' of the notebook you provide. Type: + /// integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.numExecutors")] + public object NumExecutors { get; set; } + + /// + /// Gets or sets the type of the spark config. Possible values include: + /// 'Default', 'Customized', 'Artifact' + /// + [JsonProperty(PropertyName = "typeProperties.configurationType")] + public string ConfigurationType { get; set; } + + /// + /// Gets or sets the spark configuration of the spark job. + /// + [JsonProperty(PropertyName = "typeProperties.targetSparkConfiguration")] + public SparkConfigurationParametrizationReference TargetSparkConfiguration { get; set; } + + /// + /// Gets or sets spark configuration property. + /// + [JsonProperty(PropertyName = "typeProperties.sparkConfig")] + public IDictionary SparkConfig { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Notebook == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Notebook"); + } + if (Notebook != null) + { + Notebook.Validate(); + } + if (SparkPool != null) + { + SparkPool.Validate(); + } + if (TargetSparkConfiguration != null) + { + TargetSparkConfiguration.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SynapseNotebookReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SynapseNotebookReference.cs new file mode 100644 index 000000000000..66acc9048c61 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SynapseNotebookReference.cs @@ -0,0 +1,80 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Synapse notebook reference type. + /// + public partial class SynapseNotebookReference + { + /// + /// Initializes a new instance of the SynapseNotebookReference class. + /// + public SynapseNotebookReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SynapseNotebookReference class. + /// + /// Reference notebook name. Type: string + /// (or Expression with resultType string). + public SynapseNotebookReference(object referenceName) + { + ReferenceName = referenceName; + CustomInit(); + } + /// + /// Static constructor for SynapseNotebookReference class. + /// + static SynapseNotebookReference() + { + Type = "NotebookReference"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets reference notebook name. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "referenceName")] + public object ReferenceName { get; set; } + + /// + /// Synapse notebook reference type. + /// + [JsonProperty(PropertyName = "type")] + public static string Type { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ReferenceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ReferenceName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SynapseSparkJobDefinitionActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SynapseSparkJobDefinitionActivity.cs new file mode 100644 index 000000000000..2a80051fbc1b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SynapseSparkJobDefinitionActivity.cs @@ -0,0 +1,290 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Execute spark job activity. + /// + [Newtonsoft.Json.JsonObject("SparkJob")] + [Rest.Serialization.JsonTransformation] + public partial class SynapseSparkJobDefinitionActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the SynapseSparkJobDefinitionActivity + /// class. + /// + public SynapseSparkJobDefinitionActivity() + { + SparkJob = new SynapseSparkJobReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the SynapseSparkJobDefinitionActivity + /// class. + /// + /// Activity name. + /// Synapse spark job reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// User specified arguments to + /// SynapseSparkJobDefinitionActivity. + /// The main file used for the job, which will + /// override the 'file' of the spark job definition you provide. Type: + /// string (or Expression with resultType string). + /// Scanning subfolders from the root folder + /// of the main definition file, these files will be added as reference + /// files. The folders named 'jars', 'pyFiles', 'files' or 'archives' + /// will be scanned, and the folders name are case sensitive. Type: + /// boolean (or Expression with resultType boolean). + /// The fully-qualified identifier or the main + /// class that is in the main definition file, which will override the + /// 'className' of the spark job definition you provide. Type: string + /// (or Expression with resultType string). + /// (Deprecated. Please use pythonCodeReference and + /// filesV2) Additional files used for reference in the main definition + /// file, which will override the 'files' of the spark job definition + /// you provide. + /// Additional python code files used + /// for reference in the main definition file, which will override the + /// 'pyFiles' of the spark job definition you provide. + /// Additional files used for reference in the + /// main definition file, which will override the 'jars' and 'files' of + /// the spark job definition you provide. + /// The name of the big data pool which + /// will be used to execute the spark batch job, which will override + /// the 'targetBigDataPool' of the spark job definition you + /// provide. + /// Number of core and memory to be used for + /// executors allocated in the specified Spark pool for the job, which + /// will be used for overriding 'executorCores' and 'executorMemory' of + /// the spark job definition you provide. Type: string (or Expression + /// with resultType string). + /// Spark configuration properties, which will + /// override the 'conf' of the spark job definition you + /// provide. + /// Number of core and memory to be used for + /// driver allocated in the specified Spark pool for the job, which + /// will be used for overriding 'driverCores' and 'driverMemory' of the + /// spark job definition you provide. Type: string (or Expression with + /// resultType string). + /// Number of executors to launch for this + /// job, which will override the 'numExecutors' of the spark job + /// definition you provide. Type: integer (or Expression with + /// resultType integer). + /// The type of the spark config. + /// Possible values include: 'Default', 'Customized', + /// 'Artifact' + /// The spark configuration of + /// the spark job. + /// Spark configuration property. + public SynapseSparkJobDefinitionActivity(string name, SynapseSparkJobReference sparkJob, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), IList arguments = default(IList), object file = default(object), object scanFolder = default(object), object className = default(object), IList files = default(IList), IList pythonCodeReference = default(IList), IList filesV2 = default(IList), BigDataPoolParametrizationReference targetBigDataPool = default(BigDataPoolParametrizationReference), object executorSize = default(object), object conf = default(object), object driverSize = default(object), object numExecutors = default(object), string configurationType = default(string), SparkConfigurationParametrizationReference targetSparkConfiguration = default(SparkConfigurationParametrizationReference), IDictionary sparkConfig = default(IDictionary)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + SparkJob = sparkJob; + Arguments = arguments; + File = file; + ScanFolder = scanFolder; + ClassName = className; + Files = files; + PythonCodeReference = pythonCodeReference; + FilesV2 = filesV2; + TargetBigDataPool = targetBigDataPool; + ExecutorSize = executorSize; + Conf = conf; + DriverSize = driverSize; + NumExecutors = numExecutors; + ConfigurationType = configurationType; + TargetSparkConfiguration = targetSparkConfiguration; + SparkConfig = sparkConfig; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets synapse spark job reference. + /// + [JsonProperty(PropertyName = "typeProperties.sparkJob")] + public SynapseSparkJobReference SparkJob { get; set; } + + /// + /// Gets or sets user specified arguments to + /// SynapseSparkJobDefinitionActivity. + /// + [JsonProperty(PropertyName = "typeProperties.args")] + public IList Arguments { get; set; } + + /// + /// Gets or sets the main file used for the job, which will override + /// the 'file' of the spark job definition you provide. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.file")] + public object File { get; set; } + + /// + /// Gets or sets scanning subfolders from the root folder of the main + /// definition file, these files will be added as reference files. The + /// folders named 'jars', 'pyFiles', 'files' or 'archives' will be + /// scanned, and the folders name are case sensitive. Type: boolean (or + /// Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.scanFolder")] + public object ScanFolder { get; set; } + + /// + /// Gets or sets the fully-qualified identifier or the main class that + /// is in the main definition file, which will override the 'className' + /// of the spark job definition you provide. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.className")] + public object ClassName { get; set; } + + /// + /// Gets or sets (Deprecated. Please use pythonCodeReference and + /// filesV2) Additional files used for reference in the main definition + /// file, which will override the 'files' of the spark job definition + /// you provide. + /// + [JsonProperty(PropertyName = "typeProperties.files")] + public IList Files { get; set; } + + /// + /// Gets or sets additional python code files used for reference in the + /// main definition file, which will override the 'pyFiles' of the + /// spark job definition you provide. + /// + [JsonProperty(PropertyName = "typeProperties.pythonCodeReference")] + public IList PythonCodeReference { get; set; } + + /// + /// Gets or sets additional files used for reference in the main + /// definition file, which will override the 'jars' and 'files' of the + /// spark job definition you provide. + /// + [JsonProperty(PropertyName = "typeProperties.filesV2")] + public IList FilesV2 { get; set; } + + /// + /// Gets or sets the name of the big data pool which will be used to + /// execute the spark batch job, which will override the + /// 'targetBigDataPool' of the spark job definition you provide. + /// + [JsonProperty(PropertyName = "typeProperties.targetBigDataPool")] + public BigDataPoolParametrizationReference TargetBigDataPool { get; set; } + + /// + /// Gets or sets number of core and memory to be used for executors + /// allocated in the specified Spark pool for the job, which will be + /// used for overriding 'executorCores' and 'executorMemory' of the + /// spark job definition you provide. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.executorSize")] + public object ExecutorSize { get; set; } + + /// + /// Gets or sets spark configuration properties, which will override + /// the 'conf' of the spark job definition you provide. + /// + [JsonProperty(PropertyName = "typeProperties.conf")] + public object Conf { get; set; } + + /// + /// Gets or sets number of core and memory to be used for driver + /// allocated in the specified Spark pool for the job, which will be + /// used for overriding 'driverCores' and 'driverMemory' of the spark + /// job definition you provide. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.driverSize")] + public object DriverSize { get; set; } + + /// + /// Gets or sets number of executors to launch for this job, which will + /// override the 'numExecutors' of the spark job definition you + /// provide. Type: integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.numExecutors")] + public object NumExecutors { get; set; } + + /// + /// Gets or sets the type of the spark config. Possible values include: + /// 'Default', 'Customized', 'Artifact' + /// + [JsonProperty(PropertyName = "typeProperties.configurationType")] + public string ConfigurationType { get; set; } + + /// + /// Gets or sets the spark configuration of the spark job. + /// + [JsonProperty(PropertyName = "typeProperties.targetSparkConfiguration")] + public SparkConfigurationParametrizationReference TargetSparkConfiguration { get; set; } + + /// + /// Gets or sets spark configuration property. + /// + [JsonProperty(PropertyName = "typeProperties.sparkConfig")] + public IDictionary SparkConfig { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (SparkJob == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SparkJob"); + } + if (SparkJob != null) + { + SparkJob.Validate(); + } + if (TargetBigDataPool != null) + { + TargetBigDataPool.Validate(); + } + if (TargetSparkConfiguration != null) + { + TargetSparkConfiguration.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SynapseSparkJobReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SynapseSparkJobReference.cs new file mode 100644 index 000000000000..702ad4738d2e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SynapseSparkJobReference.cs @@ -0,0 +1,80 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Synapse spark job reference type. + /// + public partial class SynapseSparkJobReference + { + /// + /// Initializes a new instance of the SynapseSparkJobReference class. + /// + public SynapseSparkJobReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SynapseSparkJobReference class. + /// + /// Reference spark job name. Expression + /// with resultType string. + public SynapseSparkJobReference(object referenceName) + { + ReferenceName = referenceName; + CustomInit(); + } + /// + /// Static constructor for SynapseSparkJobReference class. + /// + static SynapseSparkJobReference() + { + Type = "SparkJobDefinitionReference"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets reference spark job name. Expression with resultType + /// string. + /// + [JsonProperty(PropertyName = "referenceName")] + public object ReferenceName { get; set; } + + /// + /// Synapse spark job reference type. + /// + [JsonProperty(PropertyName = "type")] + public static string Type { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ReferenceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ReferenceName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TabularSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TabularSource.cs new file mode 100644 index 000000000000..71aa0cf566c1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TabularSource.cs @@ -0,0 +1,83 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Copy activity sources of tabular type. + /// + public partial class TabularSource : CopySource + { + /// + /// Initializes a new instance of the TabularSource class. + /// + public TabularSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TabularSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public TabularSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + QueryTimeout = queryTimeout; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets query timeout. Type: string (or Expression with + /// resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "queryTimeout")] + public object QueryTimeout { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TabularTranslator.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TabularTranslator.cs new file mode 100644 index 000000000000..b7f33e452c19 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TabularTranslator.cs @@ -0,0 +1,141 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity tabular translator. + /// + public partial class TabularTranslator : CopyTranslator + { + /// + /// Initializes a new instance of the TabularTranslator class. + /// + public TabularTranslator() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TabularTranslator class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Column mappings. Example: "UserId: + /// MyUserId, Group: MyGroup, Name: MyName" Type: string (or Expression + /// with resultType string). This property will be retired. Please use + /// mappings property. + /// The schema mapping to map between + /// tabular data and hierarchical data. Example: {"Column1": + /// "$.Column1", "Column2": "$.Column2.Property1", "Column3": + /// "$.Column2.Property2"}. Type: object (or Expression with resultType + /// object). This property will be retired. Please use mappings + /// property. + /// The JSON Path of the Nested Array + /// that is going to do cross-apply. Type: object (or Expression with + /// resultType object). + /// Whether to map complex + /// (array and object) values to simple strings in json format. Type: + /// boolean (or Expression with resultType boolean). + /// Column mappings with logical types. + /// Tabular->tabular example: + /// [{"source":{"name":"CustomerName","type":"String"},"sink":{"name":"ClientName","type":"String"}},{"source":{"name":"CustomerAddress","type":"String"},"sink":{"name":"ClientAddress","type":"String"}}]. + /// Hierarchical->tabular example: + /// [{"source":{"path":"$.CustomerName","type":"String"},"sink":{"name":"ClientName","type":"String"}},{"source":{"path":"$.CustomerAddress","type":"String"},"sink":{"name":"ClientAddress","type":"String"}}]. + /// Type: object (or Expression with resultType object). + /// Whether to enable the advanced type + /// conversion feature in the Copy activity. Type: boolean (or + /// Expression with resultType boolean). + /// Type conversion + /// settings + public TabularTranslator(IDictionary additionalProperties = default(IDictionary), object columnMappings = default(object), object schemaMapping = default(object), object collectionReference = default(object), object mapComplexValuesToString = default(object), object mappings = default(object), object typeConversion = default(object), TypeConversionSettings typeConversionSettings = default(TypeConversionSettings)) + : base(additionalProperties) + { + ColumnMappings = columnMappings; + SchemaMapping = schemaMapping; + CollectionReference = collectionReference; + MapComplexValuesToString = mapComplexValuesToString; + Mappings = mappings; + TypeConversion = typeConversion; + TypeConversionSettings = typeConversionSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets column mappings. Example: "UserId: MyUserId, Group: + /// MyGroup, Name: MyName" Type: string (or Expression with resultType + /// string). This property will be retired. Please use mappings + /// property. + /// + [JsonProperty(PropertyName = "columnMappings")] + public object ColumnMappings { get; set; } + + /// + /// Gets or sets the schema mapping to map between tabular data and + /// hierarchical data. Example: {"Column1": "$.Column1", "Column2": + /// "$.Column2.Property1", "Column3": "$.Column2.Property2"}. Type: + /// object (or Expression with resultType object). This property will + /// be retired. Please use mappings property. + /// + [JsonProperty(PropertyName = "schemaMapping")] + public object SchemaMapping { get; set; } + + /// + /// Gets or sets the JSON Path of the Nested Array that is going to do + /// cross-apply. Type: object (or Expression with resultType object). + /// + [JsonProperty(PropertyName = "collectionReference")] + public object CollectionReference { get; set; } + + /// + /// Gets or sets whether to map complex (array and object) values to + /// simple strings in json format. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "mapComplexValuesToString")] + public object MapComplexValuesToString { get; set; } + + /// + /// Gets or sets column mappings with logical types. + /// Tabular-&gt;tabular example: + /// [{"source":{"name":"CustomerName","type":"String"},"sink":{"name":"ClientName","type":"String"}},{"source":{"name":"CustomerAddress","type":"String"},"sink":{"name":"ClientAddress","type":"String"}}]. + /// Hierarchical-&gt;tabular example: + /// [{"source":{"path":"$.CustomerName","type":"String"},"sink":{"name":"ClientName","type":"String"}},{"source":{"path":"$.CustomerAddress","type":"String"},"sink":{"name":"ClientAddress","type":"String"}}]. + /// Type: object (or Expression with resultType object). + /// + [JsonProperty(PropertyName = "mappings")] + public object Mappings { get; set; } + + /// + /// Gets or sets whether to enable the advanced type conversion feature + /// in the Copy activity. Type: boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "typeConversion")] + public object TypeConversion { get; set; } + + /// + /// Gets or sets type conversion settings + /// + [JsonProperty(PropertyName = "typeConversionSettings")] + public TypeConversionSettings TypeConversionSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TarGZipReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TarGZipReadSettings.cs new file mode 100644 index 000000000000..af66ed4573f9 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TarGZipReadSettings.cs @@ -0,0 +1,59 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The TarGZip compression read settings. + /// + public partial class TarGZipReadSettings : CompressionReadSettings + { + /// + /// Initializes a new instance of the TarGZipReadSettings class. + /// + public TarGZipReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TarGZipReadSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Preserve the + /// compression file name as folder path. Type: boolean (or Expression + /// with resultType boolean). + public TarGZipReadSettings(IDictionary additionalProperties = default(IDictionary), object preserveCompressionFileNameAsFolder = default(object)) + : base(additionalProperties) + { + PreserveCompressionFileNameAsFolder = preserveCompressionFileNameAsFolder; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets preserve the compression file name as folder path. + /// Type: boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "preserveCompressionFileNameAsFolder")] + public object PreserveCompressionFileNameAsFolder { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TarReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TarReadSettings.cs new file mode 100644 index 000000000000..173e9a28aaea --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TarReadSettings.cs @@ -0,0 +1,59 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Tar compression read settings. + /// + public partial class TarReadSettings : CompressionReadSettings + { + /// + /// Initializes a new instance of the TarReadSettings class. + /// + public TarReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TarReadSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Preserve the + /// compression file name as folder path. Type: boolean (or Expression + /// with resultType boolean). + public TarReadSettings(IDictionary additionalProperties = default(IDictionary), object preserveCompressionFileNameAsFolder = default(object)) + : base(additionalProperties) + { + PreserveCompressionFileNameAsFolder = preserveCompressionFileNameAsFolder; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets preserve the compression file name as folder path. + /// Type: boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "preserveCompressionFileNameAsFolder")] + public object PreserveCompressionFileNameAsFolder { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeamDeskAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeamDeskAuthenticationType.cs new file mode 100644 index 000000000000..fe1b0cb5872f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeamDeskAuthenticationType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for TeamDeskAuthenticationType. + /// + public static class TeamDeskAuthenticationType + { + public const string Basic = "Basic"; + public const string Token = "Token"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeamDeskLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeamDeskLinkedService.cs new file mode 100644 index 000000000000..ce9e17555d99 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeamDeskLinkedService.cs @@ -0,0 +1,135 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for TeamDesk. + /// + [Newtonsoft.Json.JsonObject("TeamDesk")] + [Rest.Serialization.JsonTransformation] + public partial class TeamDeskLinkedService : LinkedService + { + /// + /// Initializes a new instance of the TeamDeskLinkedService class. + /// + public TeamDeskLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TeamDeskLinkedService class. + /// + /// The authentication type to use. + /// Possible values include: 'Basic', 'Token' + /// The url to connect TeamDesk source. Type: string + /// (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The username of the TeamDesk source. Type: + /// string (or Expression with resultType string). + /// The password of the TeamDesk source. + /// The api token for the TeamDesk + /// source. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public TeamDeskLinkedService(string authenticationType, object url, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object userName = default(object), SecretBase password = default(SecretBase), SecretBase apiToken = default(SecretBase), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + AuthenticationType = authenticationType; + Url = url; + UserName = userName; + Password = password; + ApiToken = apiToken; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the authentication type to use. Possible values + /// include: 'Basic', 'Token' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets the url to connect TeamDesk source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.url")] + public object Url { get; set; } + + /// + /// Gets or sets the username of the TeamDesk source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets the password of the TeamDesk source. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the api token for the TeamDesk source. + /// + [JsonProperty(PropertyName = "typeProperties.apiToken")] + public SecretBase ApiToken { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (AuthenticationType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AuthenticationType"); + } + if (Url == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Url"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeradataAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeradataAuthenticationType.cs new file mode 100644 index 000000000000..5633a00ab7da --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeradataAuthenticationType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for TeradataAuthenticationType. + /// + public static class TeradataAuthenticationType + { + public const string Basic = "Basic"; + public const string Windows = "Windows"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeradataLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeradataLinkedService.cs new file mode 100644 index 000000000000..c8f0364dc045 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeradataLinkedService.cs @@ -0,0 +1,128 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for Teradata data source. + /// + [Newtonsoft.Json.JsonObject("Teradata")] + [Rest.Serialization.JsonTransformation] + public partial class TeradataLinkedService : LinkedService + { + /// + /// Initializes a new instance of the TeradataLinkedService class. + /// + public TeradataLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TeradataLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Teradata ODBC connection string. + /// Type: string, SecureString or AzureKeyVaultSecretReference. + /// Server name for connection. Type: string (or + /// Expression with resultType string). + /// AuthenticationType to be used for + /// connection. Possible values include: 'Basic', 'Windows' + /// Username for authentication. Type: string + /// (or Expression with resultType string). + /// Password for authentication. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public TeradataLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object connectionString = default(object), object server = default(object), string authenticationType = default(string), object username = default(object), SecretBase password = default(SecretBase), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionString = connectionString; + Server = server; + AuthenticationType = authenticationType; + Username = username; + Password = password; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets teradata ODBC connection string. Type: string, + /// SecureString or AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets server name for connection. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.server")] + public object Server { get; set; } + + /// + /// Gets or sets authenticationType to be used for connection. Possible + /// values include: 'Basic', 'Windows' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets username for authentication. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public object Username { get; set; } + + /// + /// Gets or sets password for authentication. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeradataPartitionOption.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeradataPartitionOption.cs new file mode 100644 index 000000000000..5522a89a5d79 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeradataPartitionOption.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for TeradataPartitionOption. + /// + public static class TeradataPartitionOption + { + public const string None = "None"; + public const string Hash = "Hash"; + public const string DynamicRange = "DynamicRange"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeradataPartitionSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeradataPartitionSettings.cs new file mode 100644 index 000000000000..d1240a3941eb --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeradataPartitionSettings.cs @@ -0,0 +1,81 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The settings that will be leveraged for teradata source partitioning. + /// + public partial class TeradataPartitionSettings + { + /// + /// Initializes a new instance of the TeradataPartitionSettings class. + /// + public TeradataPartitionSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TeradataPartitionSettings class. + /// + /// The name of the column that will + /// be used for proceeding range or hash partitioning. Type: string (or + /// Expression with resultType string). + /// The maximum value of column + /// specified in partitionColumnName that will be used for proceeding + /// range partitioning. Type: string (or Expression with resultType + /// string). + /// The minimum value of column + /// specified in partitionColumnName that will be used for proceeding + /// range partitioning. Type: string (or Expression with resultType + /// string). + public TeradataPartitionSettings(object partitionColumnName = default(object), object partitionUpperBound = default(object), object partitionLowerBound = default(object)) + { + PartitionColumnName = partitionColumnName; + PartitionUpperBound = partitionUpperBound; + PartitionLowerBound = partitionLowerBound; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the column that will be used for + /// proceeding range or hash partitioning. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "partitionColumnName")] + public object PartitionColumnName { get; set; } + + /// + /// Gets or sets the maximum value of column specified in + /// partitionColumnName that will be used for proceeding range + /// partitioning. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionUpperBound")] + public object PartitionUpperBound { get; set; } + + /// + /// Gets or sets the minimum value of column specified in + /// partitionColumnName that will be used for proceeding range + /// partitioning. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "partitionLowerBound")] + public object PartitionLowerBound { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeradataSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeradataSource.cs new file mode 100644 index 000000000000..fc465b2171b6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeradataSource.cs @@ -0,0 +1,97 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Teradata source. + /// + public partial class TeradataSource : TabularSource + { + /// + /// Initializes a new instance of the TeradataSource class. + /// + public TeradataSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TeradataSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// Teradata query. Type: string (or Expression + /// with resultType string). + /// The partition mechanism that will be + /// used for teradata read in parallel. Possible values include: + /// "None", "Hash", "DynamicRange". + /// The settings that will be leveraged + /// for teradata source partitioning. + public TeradataSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object), object partitionOption = default(object), TeradataPartitionSettings partitionSettings = default(TeradataPartitionSettings)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + PartitionOption = partitionOption; + PartitionSettings = partitionSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets teradata query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets the partition mechanism that will be used for teradata + /// read in parallel. Possible values include: "None", "Hash", + /// "DynamicRange". + /// + [JsonProperty(PropertyName = "partitionOption")] + public object PartitionOption { get; set; } + + /// + /// Gets or sets the settings that will be leveraged for teradata + /// source partitioning. + /// + [JsonProperty(PropertyName = "partitionSettings")] + public TeradataPartitionSettings PartitionSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeradataTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeradataTableDataset.cs new file mode 100644 index 000000000000..b89d0b37f4eb --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TeradataTableDataset.cs @@ -0,0 +1,96 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The Teradata database dataset. + /// + [Newtonsoft.Json.JsonObject("TeradataTable")] + [Rest.Serialization.JsonTransformation] + public partial class TeradataTableDataset : Dataset + { + /// + /// Initializes a new instance of the TeradataTableDataset class. + /// + public TeradataTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the TeradataTableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The database name of Teradata. Type: string + /// (or Expression with resultType string). + /// The table name of Teradata. Type: string (or + /// Expression with resultType string). + public TeradataTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object database = default(object), object table = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Database = database; + Table = table; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the database name of Teradata. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.database")] + public object Database { get; set; } + + /// + /// Gets or sets the table name of Teradata. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TextFormat.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TextFormat.cs new file mode 100644 index 000000000000..8e74882f55e6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TextFormat.cs @@ -0,0 +1,158 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The data stored in text format. + /// + public partial class TextFormat : DatasetStorageFormat + { + /// + /// Initializes a new instance of the TextFormat class. + /// + public TextFormat() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TextFormat class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Serializer. Type: string (or Expression + /// with resultType string). + /// Deserializer. Type: string (or + /// Expression with resultType string). + /// The column delimiter. Type: string + /// (or Expression with resultType string). + /// The row delimiter. Type: string (or + /// Expression with resultType string). + /// The escape character. Type: string (or + /// Expression with resultType string). + /// The quote character. Type: string (or + /// Expression with resultType string). + /// The null value string. Type: string (or + /// Expression with resultType string). + /// The code page name of the preferred + /// encoding. If miss, the default value is ΓÇ£utf-8ΓÇ¥, unless BOM + /// denotes another Unicode encoding. Refer to the ΓÇ£NameΓÇ¥ column of + /// the table in the following link to set supported values: + /// https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: + /// string (or Expression with resultType string). + /// Treat empty column values in the + /// text file as null. The default value is true. Type: boolean (or + /// Expression with resultType boolean). + /// The number of lines/rows to be skipped + /// when parsing text files. The default value is 0. Type: integer (or + /// Expression with resultType integer). + /// When used as input, treat the first + /// row of data as headers. When used as output,write the headers into + /// the output as the first row of data. The default value is false. + /// Type: boolean (or Expression with resultType boolean). + public TextFormat(IDictionary additionalProperties = default(IDictionary), object serializer = default(object), object deserializer = default(object), object columnDelimiter = default(object), object rowDelimiter = default(object), object escapeChar = default(object), object quoteChar = default(object), object nullValue = default(object), object encodingName = default(object), object treatEmptyAsNull = default(object), object skipLineCount = default(object), object firstRowAsHeader = default(object)) + : base(additionalProperties, serializer, deserializer) + { + ColumnDelimiter = columnDelimiter; + RowDelimiter = rowDelimiter; + EscapeChar = escapeChar; + QuoteChar = quoteChar; + NullValue = nullValue; + EncodingName = encodingName; + TreatEmptyAsNull = treatEmptyAsNull; + SkipLineCount = skipLineCount; + FirstRowAsHeader = firstRowAsHeader; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the column delimiter. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "columnDelimiter")] + public object ColumnDelimiter { get; set; } + + /// + /// Gets or sets the row delimiter. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "rowDelimiter")] + public object RowDelimiter { get; set; } + + /// + /// Gets or sets the escape character. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "escapeChar")] + public object EscapeChar { get; set; } + + /// + /// Gets or sets the quote character. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "quoteChar")] + public object QuoteChar { get; set; } + + /// + /// Gets or sets the null value string. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "nullValue")] + public object NullValue { get; set; } + + /// + /// Gets or sets the code page name of the preferred encoding. If miss, + /// the default value is ΓÇ£utf-8ΓÇ¥, unless BOM denotes another + /// Unicode encoding. Refer to the ΓÇ£NameΓÇ¥ column of the table in + /// the following link to set supported values: + /// https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "encodingName")] + public object EncodingName { get; set; } + + /// + /// Gets or sets treat empty column values in the text file as null. + /// The default value is true. Type: boolean (or Expression with + /// resultType boolean). + /// + [JsonProperty(PropertyName = "treatEmptyAsNull")] + public object TreatEmptyAsNull { get; set; } + + /// + /// Gets or sets the number of lines/rows to be skipped when parsing + /// text files. The default value is 0. Type: integer (or Expression + /// with resultType integer). + /// + [JsonProperty(PropertyName = "skipLineCount")] + public object SkipLineCount { get; set; } + + /// + /// Gets or sets when used as input, treat the first row of data as + /// headers. When used as output,write the headers into the output as + /// the first row of data. The default value is false. Type: boolean + /// (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "firstRowAsHeader")] + public object FirstRowAsHeader { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Transformation.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Transformation.cs new file mode 100644 index 000000000000..e5f68a51a657 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Transformation.cs @@ -0,0 +1,109 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A data flow transformation. + /// + public partial class Transformation + { + /// + /// Initializes a new instance of the Transformation class. + /// + public Transformation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Transformation class. + /// + /// Transformation name. + /// Transformation description. + /// Dataset reference. + /// Linked service reference. + /// Flowlet Reference + public Transformation(string name, string description = default(string), DatasetReference dataset = default(DatasetReference), LinkedServiceReference linkedService = default(LinkedServiceReference), DataFlowReference flowlet = default(DataFlowReference)) + { + Name = name; + Description = description; + Dataset = dataset; + LinkedService = linkedService; + Flowlet = flowlet; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets transformation name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets transformation description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets dataset reference. + /// + [JsonProperty(PropertyName = "dataset")] + public DatasetReference Dataset { get; set; } + + /// + /// Gets or sets linked service reference. + /// + [JsonProperty(PropertyName = "linkedService")] + public LinkedServiceReference LinkedService { get; set; } + + /// + /// Gets or sets flowlet Reference + /// + [JsonProperty(PropertyName = "flowlet")] + public DataFlowReference Flowlet { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (Dataset != null) + { + Dataset.Validate(); + } + if (LinkedService != null) + { + LinkedService.Validate(); + } + if (Flowlet != null) + { + Flowlet.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Trigger.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Trigger.cs new file mode 100644 index 000000000000..1462131fd8d0 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Trigger.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure data factory nested object which contains information about + /// creating pipeline run + /// + public partial class Trigger + { + /// + /// Initializes a new instance of the Trigger class. + /// + public Trigger() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Trigger class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Trigger description. + /// Indicates if trigger is running or not. + /// Updated when Start/Stop APIs are called on the Trigger. Possible + /// values include: 'Started', 'Stopped', 'Disabled' + /// List of tags that can be used for + /// describing the trigger. + public Trigger(IDictionary additionalProperties = default(IDictionary), string description = default(string), string runtimeState = default(string), IList annotations = default(IList)) + { + AdditionalProperties = additionalProperties; + Description = description; + RuntimeState = runtimeState; + Annotations = annotations; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets trigger description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets indicates if trigger is running or not. Updated when + /// Start/Stop APIs are called on the Trigger. Possible values include: + /// 'Started', 'Stopped', 'Disabled' + /// + [JsonProperty(PropertyName = "runtimeState")] + public string RuntimeState { get; private set; } + + /// + /// Gets or sets list of tags that can be used for describing the + /// trigger. + /// + [JsonProperty(PropertyName = "annotations")] + public IList Annotations { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerDependencyReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerDependencyReference.cs new file mode 100644 index 000000000000..0081378e4e2b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerDependencyReference.cs @@ -0,0 +1,70 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Trigger referenced dependency. + /// + public partial class TriggerDependencyReference : DependencyReference + { + /// + /// Initializes a new instance of the TriggerDependencyReference class. + /// + public TriggerDependencyReference() + { + ReferenceTrigger = new TriggerReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the TriggerDependencyReference class. + /// + /// Referenced trigger. + public TriggerDependencyReference(TriggerReference referenceTrigger) + { + ReferenceTrigger = referenceTrigger; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets referenced trigger. + /// + [JsonProperty(PropertyName = "referenceTrigger")] + public TriggerReference ReferenceTrigger { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ReferenceTrigger == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ReferenceTrigger"); + } + if (ReferenceTrigger != null) + { + ReferenceTrigger.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerFilterParameters.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerFilterParameters.cs new file mode 100644 index 000000000000..96cd2858e1cd --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerFilterParameters.cs @@ -0,0 +1,63 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Query parameters for triggers. + /// + public partial class TriggerFilterParameters + { + /// + /// Initializes a new instance of the TriggerFilterParameters class. + /// + public TriggerFilterParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TriggerFilterParameters class. + /// + /// The continuation token for getting + /// the next page of results. Null for first page. + /// The name of the parent + /// TumblingWindowTrigger to get the child rerun triggers + public TriggerFilterParameters(string continuationToken = default(string), string parentTriggerName = default(string)) + { + ContinuationToken = continuationToken; + ParentTriggerName = parentTriggerName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the continuation token for getting the next page of + /// results. Null for first page. + /// + [JsonProperty(PropertyName = "continuationToken")] + public string ContinuationToken { get; set; } + + /// + /// Gets or sets the name of the parent TumblingWindowTrigger to get + /// the child rerun triggers + /// + [JsonProperty(PropertyName = "parentTriggerName")] + public string ParentTriggerName { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerPipelineReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerPipelineReference.cs new file mode 100644 index 000000000000..e134054c9b32 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerPipelineReference.cs @@ -0,0 +1,74 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Pipeline that needs to be triggered with the given parameters. + /// + public partial class TriggerPipelineReference + { + /// + /// Initializes a new instance of the TriggerPipelineReference class. + /// + public TriggerPipelineReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TriggerPipelineReference class. + /// + /// Pipeline reference. + /// Pipeline parameters. + public TriggerPipelineReference(PipelineReference pipelineReference = default(PipelineReference), IDictionary parameters = default(IDictionary)) + { + PipelineReference = pipelineReference; + Parameters = parameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets pipeline reference. + /// + [JsonProperty(PropertyName = "pipelineReference")] + public PipelineReference PipelineReference { get; set; } + + /// + /// Gets or sets pipeline parameters. + /// + [JsonProperty(PropertyName = "parameters")] + public IDictionary Parameters { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (PipelineReference != null) + { + PipelineReference.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerQueryResponse.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerQueryResponse.cs new file mode 100644 index 000000000000..82615f3a500c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerQueryResponse.cs @@ -0,0 +1,88 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A query of triggers. + /// + public partial class TriggerQueryResponse + { + /// + /// Initializes a new instance of the TriggerQueryResponse class. + /// + public TriggerQueryResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TriggerQueryResponse class. + /// + /// List of triggers. + /// The continuation token for getting + /// the next page of results, if any remaining results exist, null + /// otherwise. + public TriggerQueryResponse(IList value, string continuationToken = default(string)) + { + Value = value; + ContinuationToken = continuationToken; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of triggers. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + /// + /// Gets or sets the continuation token for getting the next page of + /// results, if any remaining results exist, null otherwise. + /// + [JsonProperty(PropertyName = "continuationToken")] + public string ContinuationToken { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Value == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Value"); + } + if (Value != null) + { + foreach (var element in Value) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerReference.cs new file mode 100644 index 000000000000..2314904b1626 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerReference.cs @@ -0,0 +1,78 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Trigger reference type. + /// + public partial class TriggerReference + { + /// + /// Initializes a new instance of the TriggerReference class. + /// + public TriggerReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TriggerReference class. + /// + /// Reference trigger name. + public TriggerReference(string referenceName) + { + ReferenceName = referenceName; + CustomInit(); + } + /// + /// Static constructor for TriggerReference class. + /// + static TriggerReference() + { + Type = "TriggerReference"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets reference trigger name. + /// + [JsonProperty(PropertyName = "referenceName")] + public string ReferenceName { get; set; } + + /// + /// Trigger reference type. + /// + [JsonProperty(PropertyName = "type")] + public static string Type { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ReferenceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ReferenceName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerResource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerResource.cs new file mode 100644 index 000000000000..5bb43e5580ce --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerResource.cs @@ -0,0 +1,70 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Trigger resource type. + /// + public partial class TriggerResource : SubResource + { + /// + /// Initializes a new instance of the TriggerResource class. + /// + public TriggerResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TriggerResource class. + /// + /// Properties of the trigger. + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + public TriggerResource(Trigger properties, string id = default(string), string name = default(string), string type = default(string), string etag = default(string)) + : base(id, name, type, etag) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets properties of the trigger. + /// + [JsonProperty(PropertyName = "properties")] + public Trigger Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerRun.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerRun.cs new file mode 100644 index 000000000000..5e9e585d51f8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerRun.cs @@ -0,0 +1,142 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Trigger runs. + /// + public partial class TriggerRun + { + /// + /// Initializes a new instance of the TriggerRun class. + /// + public TriggerRun() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TriggerRun class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Trigger run id. + /// Trigger name. + /// Trigger type. + /// Trigger run start time. + /// Trigger run status. Possible values include: + /// 'Succeeded', 'Failed', 'Inprogress' + /// Trigger error message. + /// List of property name and value related to + /// trigger run. Name, value pair depends on type of trigger. + /// List of pipeline name and run Id + /// triggered by the trigger run. + /// Run dimension for which trigger was + /// fired. + /// Status of the upstream + /// pipelines. + public TriggerRun(IDictionary additionalProperties = default(IDictionary), string triggerRunId = default(string), string triggerName = default(string), string triggerType = default(string), System.DateTime? triggerRunTimestamp = default(System.DateTime?), string status = default(string), string message = default(string), IDictionary properties = default(IDictionary), IDictionary triggeredPipelines = default(IDictionary), IDictionary runDimension = default(IDictionary), IDictionary dependencyStatus = default(IDictionary)) + { + AdditionalProperties = additionalProperties; + TriggerRunId = triggerRunId; + TriggerName = triggerName; + TriggerType = triggerType; + TriggerRunTimestamp = triggerRunTimestamp; + Status = status; + Message = message; + Properties = properties; + TriggeredPipelines = triggeredPipelines; + RunDimension = runDimension; + DependencyStatus = dependencyStatus; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets trigger run id. + /// + [JsonProperty(PropertyName = "triggerRunId")] + public string TriggerRunId { get; private set; } + + /// + /// Gets trigger name. + /// + [JsonProperty(PropertyName = "triggerName")] + public string TriggerName { get; private set; } + + /// + /// Gets trigger type. + /// + [JsonProperty(PropertyName = "triggerType")] + public string TriggerType { get; private set; } + + /// + /// Gets trigger run start time. + /// + [JsonProperty(PropertyName = "triggerRunTimestamp")] + public System.DateTime? TriggerRunTimestamp { get; private set; } + + /// + /// Gets trigger run status. Possible values include: 'Succeeded', + /// 'Failed', 'Inprogress' + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; private set; } + + /// + /// Gets trigger error message. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; private set; } + + /// + /// Gets list of property name and value related to trigger run. Name, + /// value pair depends on type of trigger. + /// + [JsonProperty(PropertyName = "properties")] + public IDictionary Properties { get; private set; } + + /// + /// Gets list of pipeline name and run Id triggered by the trigger run. + /// + [JsonProperty(PropertyName = "triggeredPipelines")] + public IDictionary TriggeredPipelines { get; private set; } + + /// + /// Gets run dimension for which trigger was fired. + /// + [JsonProperty(PropertyName = "runDimension")] + public IDictionary RunDimension { get; private set; } + + /// + /// Gets status of the upstream pipelines. + /// + [JsonProperty(PropertyName = "dependencyStatus")] + public IDictionary DependencyStatus { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerRunStatus.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerRunStatus.cs new file mode 100644 index 000000000000..6822273d52dd --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerRunStatus.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for TriggerRunStatus. + /// + public static class TriggerRunStatus + { + public const string Succeeded = "Succeeded"; + public const string Failed = "Failed"; + public const string Inprogress = "Inprogress"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerRunsQueryResponse.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerRunsQueryResponse.cs new file mode 100644 index 000000000000..fcd7ea71ebfb --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerRunsQueryResponse.cs @@ -0,0 +1,78 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A list of trigger runs. + /// + public partial class TriggerRunsQueryResponse + { + /// + /// Initializes a new instance of the TriggerRunsQueryResponse class. + /// + public TriggerRunsQueryResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TriggerRunsQueryResponse class. + /// + /// List of trigger runs. + /// The continuation token for getting + /// the next page of results, if any remaining results exist, null + /// otherwise. + public TriggerRunsQueryResponse(IList value, string continuationToken = default(string)) + { + Value = value; + ContinuationToken = continuationToken; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of trigger runs. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + /// + /// Gets or sets the continuation token for getting the next page of + /// results, if any remaining results exist, null otherwise. + /// + [JsonProperty(PropertyName = "continuationToken")] + public string ContinuationToken { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Value == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Value"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerRuntimeState.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerRuntimeState.cs new file mode 100644 index 000000000000..e9070db0e65e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerRuntimeState.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for TriggerRuntimeState. + /// + public static class TriggerRuntimeState + { + public const string Started = "Started"; + public const string Stopped = "Stopped"; + public const string Disabled = "Disabled"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerSubscriptionOperationStatus.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerSubscriptionOperationStatus.cs new file mode 100644 index 000000000000..dc44fadce22e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TriggerSubscriptionOperationStatus.cs @@ -0,0 +1,64 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines the response of a trigger subscription operation. + /// + public partial class TriggerSubscriptionOperationStatus + { + /// + /// Initializes a new instance of the + /// TriggerSubscriptionOperationStatus class. + /// + public TriggerSubscriptionOperationStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// TriggerSubscriptionOperationStatus class. + /// + /// Trigger name. + /// Event Subscription Status. Possible values + /// include: 'Enabled', 'Provisioning', 'Deprovisioning', 'Disabled', + /// 'Unknown' + public TriggerSubscriptionOperationStatus(string triggerName = default(string), string status = default(string)) + { + TriggerName = triggerName; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets trigger name. + /// + [JsonProperty(PropertyName = "triggerName")] + public string TriggerName { get; private set; } + + /// + /// Gets event Subscription Status. Possible values include: 'Enabled', + /// 'Provisioning', 'Deprovisioning', 'Disabled', 'Unknown' + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; private set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TumblingWindowFrequency.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TumblingWindowFrequency.cs new file mode 100644 index 000000000000..c604611f87e0 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TumblingWindowFrequency.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for TumblingWindowFrequency. + /// + public static class TumblingWindowFrequency + { + public const string Minute = "Minute"; + public const string Hour = "Hour"; + public const string Month = "Month"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TumblingWindowTrigger.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TumblingWindowTrigger.cs new file mode 100644 index 000000000000..ff3c7f15b191 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TumblingWindowTrigger.cs @@ -0,0 +1,194 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Trigger that schedules pipeline runs for all fixed time interval + /// windows from a start time without gaps and also supports backfill + /// scenarios (when start time is in the past). + /// + [Rest.Serialization.JsonTransformation] + public partial class TumblingWindowTrigger : Trigger + { + /// + /// Initializes a new instance of the TumblingWindowTrigger class. + /// + public TumblingWindowTrigger() + { + Pipeline = new TriggerPipelineReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the TumblingWindowTrigger class. + /// + /// Pipeline for which runs are created when an + /// event is fired for trigger window that is ready. + /// The frequency of the time windows. Possible + /// values include: 'Minute', 'Hour', 'Month' + /// The interval of the time windows. The + /// minimum interval allowed is 15 Minutes. + /// The start time for the time period for the + /// trigger during which events are fired for windows that are ready. + /// Only UTC time is currently supported. + /// The max number of parallel time + /// windows (ready for execution) for which a new run is + /// triggered. + /// Unmatched properties from the + /// message are deserialized this collection + /// Trigger description. + /// Indicates if trigger is running or not. + /// Updated when Start/Stop APIs are called on the Trigger. Possible + /// values include: 'Started', 'Stopped', 'Disabled' + /// List of tags that can be used for + /// describing the trigger. + /// The end time for the time period for the + /// trigger during which events are fired for windows that are ready. + /// Only UTC time is currently supported. + /// Specifies how long the trigger waits past due + /// time before triggering new run. It doesn't alter window start and + /// end time. The default is 0. Type: string (or Expression with + /// resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Retry policy that will be applied for + /// failed pipeline runs. + /// Triggers that this trigger depends on. Only + /// tumbling window triggers are supported. + public TumblingWindowTrigger(TriggerPipelineReference pipeline, string frequency, int interval, System.DateTime startTime, int maxConcurrency, IDictionary additionalProperties = default(IDictionary), string description = default(string), string runtimeState = default(string), IList annotations = default(IList), System.DateTime? endTime = default(System.DateTime?), object delay = default(object), RetryPolicy retryPolicy = default(RetryPolicy), IList dependsOn = default(IList)) + : base(additionalProperties, description, runtimeState, annotations) + { + Pipeline = pipeline; + Frequency = frequency; + Interval = interval; + StartTime = startTime; + EndTime = endTime; + Delay = delay; + MaxConcurrency = maxConcurrency; + RetryPolicy = retryPolicy; + DependsOn = dependsOn; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets pipeline for which runs are created when an event is + /// fired for trigger window that is ready. + /// + [JsonProperty(PropertyName = "pipeline")] + public TriggerPipelineReference Pipeline { get; set; } + + /// + /// Gets or sets the frequency of the time windows. Possible values + /// include: 'Minute', 'Hour', 'Month' + /// + [JsonProperty(PropertyName = "typeProperties.frequency")] + public string Frequency { get; set; } + + /// + /// Gets or sets the interval of the time windows. The minimum interval + /// allowed is 15 Minutes. + /// + [JsonProperty(PropertyName = "typeProperties.interval")] + public int Interval { get; set; } + + /// + /// Gets or sets the start time for the time period for the trigger + /// during which events are fired for windows that are ready. Only UTC + /// time is currently supported. + /// + [JsonProperty(PropertyName = "typeProperties.startTime")] + public System.DateTime StartTime { get; set; } + + /// + /// Gets or sets the end time for the time period for the trigger + /// during which events are fired for windows that are ready. Only UTC + /// time is currently supported. + /// + [JsonProperty(PropertyName = "typeProperties.endTime")] + public System.DateTime? EndTime { get; set; } + + /// + /// Gets or sets specifies how long the trigger waits past due time + /// before triggering new run. It doesn't alter window start and end + /// time. The default is 0. Type: string (or Expression with resultType + /// string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "typeProperties.delay")] + public object Delay { get; set; } + + /// + /// Gets or sets the max number of parallel time windows (ready for + /// execution) for which a new run is triggered. + /// + [JsonProperty(PropertyName = "typeProperties.maxConcurrency")] + public int MaxConcurrency { get; set; } + + /// + /// Gets or sets retry policy that will be applied for failed pipeline + /// runs. + /// + [JsonProperty(PropertyName = "typeProperties.retryPolicy")] + public RetryPolicy RetryPolicy { get; set; } + + /// + /// Gets or sets triggers that this trigger depends on. Only tumbling + /// window triggers are supported. + /// + [JsonProperty(PropertyName = "typeProperties.dependsOn")] + public IList DependsOn { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Pipeline == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Pipeline"); + } + if (Frequency == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Frequency"); + } + if (Pipeline != null) + { + Pipeline.Validate(); + } + if (MaxConcurrency > 50) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "MaxConcurrency", 50); + } + if (MaxConcurrency < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "MaxConcurrency", 1); + } + if (RetryPolicy != null) + { + RetryPolicy.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TumblingWindowTriggerDependencyReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TumblingWindowTriggerDependencyReference.cs new file mode 100644 index 000000000000..b274d37a7636 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TumblingWindowTriggerDependencyReference.cs @@ -0,0 +1,110 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Referenced tumbling window trigger dependency. + /// + public partial class TumblingWindowTriggerDependencyReference : TriggerDependencyReference + { + /// + /// Initializes a new instance of the + /// TumblingWindowTriggerDependencyReference class. + /// + public TumblingWindowTriggerDependencyReference() + { + ReferenceTrigger = new TriggerReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// TumblingWindowTriggerDependencyReference class. + /// + /// Referenced trigger. + /// Timespan applied to the start time of a + /// tumbling window when evaluating dependency. + /// The size of the window when evaluating the + /// dependency. If undefined the frequency of the tumbling window will + /// be used. + public TumblingWindowTriggerDependencyReference(TriggerReference referenceTrigger, string offset = default(string), string size = default(string)) + : base(referenceTrigger) + { + Offset = offset; + Size = size; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets timespan applied to the start time of a tumbling + /// window when evaluating dependency. + /// + [JsonProperty(PropertyName = "offset")] + public string Offset { get; set; } + + /// + /// Gets or sets the size of the window when evaluating the dependency. + /// If undefined the frequency of the tumbling window will be used. + /// + [JsonProperty(PropertyName = "size")] + public string Size { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Offset != null) + { + if (Offset.Length > 15) + { + throw new ValidationException(ValidationRules.MaxLength, "Offset", 15); + } + if (Offset.Length < 8) + { + throw new ValidationException(ValidationRules.MinLength, "Offset", 8); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(Offset, "-?((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9]))")) + { + throw new ValidationException(ValidationRules.Pattern, "Offset", "-?((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9]))"); + } + } + if (Size != null) + { + if (Size.Length > 15) + { + throw new ValidationException(ValidationRules.MaxLength, "Size", 15); + } + if (Size.Length < 8) + { + throw new ValidationException(ValidationRules.MinLength, "Size", 8); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(Size, "((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9]))")) + { + throw new ValidationException(ValidationRules.Pattern, "Size", "((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9]))"); + } + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TwilioLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TwilioLinkedService.cs new file mode 100644 index 000000000000..ca6476c31136 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TwilioLinkedService.cs @@ -0,0 +1,94 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for Twilio. + /// + [Newtonsoft.Json.JsonObject("Twilio")] + [Rest.Serialization.JsonTransformation] + public partial class TwilioLinkedService : LinkedService + { + /// + /// Initializes a new instance of the TwilioLinkedService class. + /// + public TwilioLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TwilioLinkedService class. + /// + /// The Account SID of Twilio service. Type: + /// string (or Expression with resultType string). + /// The auth token of Twilio service. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + public TwilioLinkedService(object userName, SecretBase password, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + UserName = userName; + Password = password; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the Account SID of Twilio service. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets the auth token of Twilio service. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (UserName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "UserName"); + } + if (Password == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Password"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TypeConversionSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TypeConversionSettings.cs new file mode 100644 index 000000000000..57c7aa987dbe --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/TypeConversionSettings.cs @@ -0,0 +1,107 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Type conversion settings + /// + public partial class TypeConversionSettings + { + /// + /// Initializes a new instance of the TypeConversionSettings class. + /// + public TypeConversionSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TypeConversionSettings class. + /// + /// Whether to allow data truncation + /// when converting the data. Type: boolean (or Expression with + /// resultType boolean). + /// Whether to treat boolean values + /// as numbers. Type: boolean (or Expression with resultType + /// boolean). + /// The format for DateTime values. Type: + /// string (or Expression with resultType string). + /// The format for DateTimeOffset + /// values. Type: string (or Expression with resultType + /// string). + /// The format for TimeSpan values. Type: + /// string (or Expression with resultType string). + /// The culture used to convert data from/to + /// string. Type: string (or Expression with resultType + /// string). + public TypeConversionSettings(object allowDataTruncation = default(object), object treatBooleanAsNumber = default(object), object dateTimeFormat = default(object), object dateTimeOffsetFormat = default(object), object timeSpanFormat = default(object), object culture = default(object)) + { + AllowDataTruncation = allowDataTruncation; + TreatBooleanAsNumber = treatBooleanAsNumber; + DateTimeFormat = dateTimeFormat; + DateTimeOffsetFormat = dateTimeOffsetFormat; + TimeSpanFormat = timeSpanFormat; + Culture = culture; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets whether to allow data truncation when converting the + /// data. Type: boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "allowDataTruncation")] + public object AllowDataTruncation { get; set; } + + /// + /// Gets or sets whether to treat boolean values as numbers. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "treatBooleanAsNumber")] + public object TreatBooleanAsNumber { get; set; } + + /// + /// Gets or sets the format for DateTime values. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "dateTimeFormat")] + public object DateTimeFormat { get; set; } + + /// + /// Gets or sets the format for DateTimeOffset values. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "dateTimeOffsetFormat")] + public object DateTimeOffsetFormat { get; set; } + + /// + /// Gets or sets the format for TimeSpan values. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "timeSpanFormat")] + public object TimeSpanFormat { get; set; } + + /// + /// Gets or sets the culture used to convert data from/to string. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "culture")] + public object Culture { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/UntilActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/UntilActivity.cs new file mode 100644 index 000000000000..81f093f3c8a1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/UntilActivity.cs @@ -0,0 +1,133 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// This activity executes inner activities until the specified boolean + /// expression results to true or timeout is reached, whichever is earlier. + /// + [Newtonsoft.Json.JsonObject("Until")] + [Rest.Serialization.JsonTransformation] + public partial class UntilActivity : ControlActivity + { + /// + /// Initializes a new instance of the UntilActivity class. + /// + public UntilActivity() + { + Expression = new Expression(); + CustomInit(); + } + + /// + /// Initializes a new instance of the UntilActivity class. + /// + /// Activity name. + /// An expression that would evaluate to + /// Boolean. The loop will continue until this expression evaluates to + /// true + /// List of activities to execute. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Specifies the timeout for the activity to + /// run. If there is no value specified, it takes the value of + /// TimeSpan.FromDays(7) which is 1 week as default. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + public UntilActivity(string name, Expression expression, IList activities, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), object timeout = default(object)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties) + { + Expression = expression; + Timeout = timeout; + Activities = activities; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets an expression that would evaluate to Boolean. The loop + /// will continue until this expression evaluates to true + /// + [JsonProperty(PropertyName = "typeProperties.expression")] + public Expression Expression { get; set; } + + /// + /// Gets or sets specifies the timeout for the activity to run. If + /// there is no value specified, it takes the value of + /// TimeSpan.FromDays(7) which is 1 week as default. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "typeProperties.timeout")] + public object Timeout { get; set; } + + /// + /// Gets or sets list of activities to execute. + /// + [JsonProperty(PropertyName = "typeProperties.activities")] + public IList Activities { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Expression == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Expression"); + } + if (Activities == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Activities"); + } + if (Expression != null) + { + Expression.Validate(); + } + if (Activities != null) + { + foreach (var element in Activities) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/UpdateIntegrationRuntimeNodeRequest.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/UpdateIntegrationRuntimeNodeRequest.cs new file mode 100644 index 000000000000..72b341f49b54 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/UpdateIntegrationRuntimeNodeRequest.cs @@ -0,0 +1,71 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Update integration runtime node request. + /// + public partial class UpdateIntegrationRuntimeNodeRequest + { + /// + /// Initializes a new instance of the + /// UpdateIntegrationRuntimeNodeRequest class. + /// + public UpdateIntegrationRuntimeNodeRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// UpdateIntegrationRuntimeNodeRequest class. + /// + /// The number of concurrent jobs + /// permitted to run on the integration runtime node. Values between 1 + /// and maxConcurrentJobs(inclusive) are allowed. + public UpdateIntegrationRuntimeNodeRequest(int? concurrentJobsLimit = default(int?)) + { + ConcurrentJobsLimit = concurrentJobsLimit; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the number of concurrent jobs permitted to run on the + /// integration runtime node. Values between 1 and + /// maxConcurrentJobs(inclusive) are allowed. + /// + [JsonProperty(PropertyName = "concurrentJobsLimit")] + public int? ConcurrentJobsLimit { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ConcurrentJobsLimit < 1) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "ConcurrentJobsLimit", 1); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/UpdateIntegrationRuntimeRequest.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/UpdateIntegrationRuntimeRequest.cs new file mode 100644 index 000000000000..416b4c6b3f18 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/UpdateIntegrationRuntimeRequest.cs @@ -0,0 +1,71 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Update integration runtime request. + /// + public partial class UpdateIntegrationRuntimeRequest + { + /// + /// Initializes a new instance of the UpdateIntegrationRuntimeRequest + /// class. + /// + public UpdateIntegrationRuntimeRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UpdateIntegrationRuntimeRequest + /// class. + /// + /// Enables or disables the auto-update + /// feature of the self-hosted integration runtime. See + /// https://go.microsoft.com/fwlink/?linkid=854189. Possible values + /// include: 'On', 'Off' + /// The time offset (in hours) in the + /// day, e.g., PT03H is 3 hours. The integration runtime auto update + /// will happen on that time. + public UpdateIntegrationRuntimeRequest(string autoUpdate = default(string), string updateDelayOffset = default(string)) + { + AutoUpdate = autoUpdate; + UpdateDelayOffset = updateDelayOffset; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets enables or disables the auto-update feature of the + /// self-hosted integration runtime. See + /// https://go.microsoft.com/fwlink/?linkid=854189. Possible values + /// include: 'On', 'Off' + /// + [JsonProperty(PropertyName = "autoUpdate")] + public string AutoUpdate { get; set; } + + /// + /// Gets or sets the time offset (in hours) in the day, e.g., PT03H is + /// 3 hours. The integration runtime auto update will happen on that + /// time. + /// + [JsonProperty(PropertyName = "updateDelayOffset")] + public string UpdateDelayOffset { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/UserAccessPolicy.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/UserAccessPolicy.cs new file mode 100644 index 000000000000..17748060ecd6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/UserAccessPolicy.cs @@ -0,0 +1,99 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Get Data Plane read only token request definition. + /// + public partial class UserAccessPolicy + { + /// + /// Initializes a new instance of the UserAccessPolicy class. + /// + public UserAccessPolicy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UserAccessPolicy class. + /// + /// The string with permissions for Data + /// Plane access. Currently only 'r' is supported which grants read + /// only access. + /// The resource path to get access + /// relative to factory. Currently only empty string is supported which + /// corresponds to the factory resource. + /// The name of the profile. Currently only + /// the default is supported. The default value is + /// DefaultProfile. + /// Start time for the token. If not specified + /// the current time will be used. + /// Expiration time for the token. Maximum + /// duration for the token is eight hours and by default the token will + /// expire in eight hours. + public UserAccessPolicy(string permissions = default(string), string accessResourcePath = default(string), string profileName = default(string), string startTime = default(string), string expireTime = default(string)) + { + Permissions = permissions; + AccessResourcePath = accessResourcePath; + ProfileName = profileName; + StartTime = startTime; + ExpireTime = expireTime; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the string with permissions for Data Plane access. + /// Currently only 'r' is supported which grants read only access. + /// + [JsonProperty(PropertyName = "permissions")] + public string Permissions { get; set; } + + /// + /// Gets or sets the resource path to get access relative to factory. + /// Currently only empty string is supported which corresponds to the + /// factory resource. + /// + [JsonProperty(PropertyName = "accessResourcePath")] + public string AccessResourcePath { get; set; } + + /// + /// Gets or sets the name of the profile. Currently only the default is + /// supported. The default value is DefaultProfile. + /// + [JsonProperty(PropertyName = "profileName")] + public string ProfileName { get; set; } + + /// + /// Gets or sets start time for the token. If not specified the current + /// time will be used. + /// + [JsonProperty(PropertyName = "startTime")] + public string StartTime { get; set; } + + /// + /// Gets or sets expiration time for the token. Maximum duration for + /// the token is eight hours and by default the token will expire in + /// eight hours. + /// + [JsonProperty(PropertyName = "expireTime")] + public string ExpireTime { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/UserProperty.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/UserProperty.cs new file mode 100644 index 000000000000..fea6280e73a6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/UserProperty.cs @@ -0,0 +1,79 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// User property. + /// + public partial class UserProperty + { + /// + /// Initializes a new instance of the UserProperty class. + /// + public UserProperty() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UserProperty class. + /// + /// User property name. + /// User property value. Type: string (or + /// Expression with resultType string). + public UserProperty(string name, object value) + { + Name = name; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets user property name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets user property value. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "value")] + public object Value { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (Value == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Value"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ValidationActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ValidationActivity.cs new file mode 100644 index 000000000000..f11f347ce05a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ValidationActivity.cs @@ -0,0 +1,147 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// This activity verifies that an external resource exists. + /// + [Newtonsoft.Json.JsonObject("Validation")] + [Rest.Serialization.JsonTransformation] + public partial class ValidationActivity : ControlActivity + { + /// + /// Initializes a new instance of the ValidationActivity class. + /// + public ValidationActivity() + { + Dataset = new DatasetReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the ValidationActivity class. + /// + /// Activity name. + /// Validation activity dataset + /// reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Specifies the timeout for the activity to + /// run. If there is no value specified, it takes the value of + /// TimeSpan.FromDays(7) which is 1 week as default. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// A delay in seconds between validation attempts. + /// If no value is specified, 10 seconds will be used as the default. + /// Type: integer (or Expression with resultType integer). + /// Can be used if dataset points to a file. + /// The file must be greater than or equal in size to the value + /// specified. Type: integer (or Expression with resultType + /// integer). + /// Can be used if dataset points to a folder. + /// If set to true, the folder must have at least one file. If set to + /// false, the folder must be empty. Type: boolean (or Expression with + /// resultType boolean). + public ValidationActivity(string name, DatasetReference dataset, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), object timeout = default(object), object sleep = default(object), object minimumSize = default(object), object childItems = default(object)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties) + { + Timeout = timeout; + Sleep = sleep; + MinimumSize = minimumSize; + ChildItems = childItems; + Dataset = dataset; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies the timeout for the activity to run. If + /// there is no value specified, it takes the value of + /// TimeSpan.FromDays(7) which is 1 week as default. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "typeProperties.timeout")] + public object Timeout { get; set; } + + /// + /// Gets or sets a delay in seconds between validation attempts. If no + /// value is specified, 10 seconds will be used as the default. Type: + /// integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.sleep")] + public object Sleep { get; set; } + + /// + /// Gets or sets can be used if dataset points to a file. The file must + /// be greater than or equal in size to the value specified. Type: + /// integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.minimumSize")] + public object MinimumSize { get; set; } + + /// + /// Gets or sets can be used if dataset points to a folder. If set to + /// true, the folder must have at least one file. If set to false, the + /// folder must be empty. Type: boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "typeProperties.childItems")] + public object ChildItems { get; set; } + + /// + /// Gets or sets validation activity dataset reference. + /// + [JsonProperty(PropertyName = "typeProperties.dataset")] + public DatasetReference Dataset { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Dataset == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Dataset"); + } + if (Dataset != null) + { + Dataset.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/VariableSpecification.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/VariableSpecification.cs new file mode 100644 index 000000000000..8cec36cec10f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/VariableSpecification.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Definition of a single variable for a Pipeline. + /// + public partial class VariableSpecification + { + /// + /// Initializes a new instance of the VariableSpecification class. + /// + public VariableSpecification() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VariableSpecification class. + /// + /// Variable type. Possible values include: + /// 'String', 'Bool', 'Array' + /// Default value of variable. + public VariableSpecification(string type, object defaultValue = default(object)) + { + Type = type; + DefaultValue = defaultValue; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets variable type. Possible values include: 'String', + /// 'Bool', 'Array' + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets default value of variable. + /// + [JsonProperty(PropertyName = "defaultValue")] + public object DefaultValue { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Type == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Type"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/VariableType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/VariableType.cs new file mode 100644 index 000000000000..bf9e5e79d01e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/VariableType.cs @@ -0,0 +1,23 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for VariableType. + /// + public static class VariableType + { + public const string String = "String"; + public const string Bool = "Bool"; + public const string Array = "Array"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/VerticaLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/VerticaLinkedService.cs new file mode 100644 index 000000000000..44895006c9f8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/VerticaLinkedService.cs @@ -0,0 +1,140 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Vertica linked service. + /// + [Newtonsoft.Json.JsonObject("Vertica")] + [Rest.Serialization.JsonTransformation] + public partial class VerticaLinkedService : LinkedService + { + /// + /// Initializes a new instance of the VerticaLinkedService class. + /// + public VerticaLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VerticaLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// An ODBC connection string. Type: + /// string, SecureString or AzureKeyVaultSecretReference. + /// Server name for connection. Type: + /// string. + /// The port for the connection. Type: + /// integer. + /// Username for authentication. Type: + /// string. + /// Database name for connection. Type: + /// string. + /// The Azure key vault secret reference of password + /// in connection string. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public VerticaLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object connectionString = default(object), object server = default(object), object port = default(object), object uid = default(object), object database = default(object), AzureKeyVaultSecretReference pwd = default(AzureKeyVaultSecretReference), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionString = connectionString; + Server = server; + Port = port; + Uid = uid; + Database = database; + Pwd = pwd; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets an ODBC connection string. Type: string, SecureString + /// or AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.connectionString")] + public object ConnectionString { get; set; } + + /// + /// Gets or sets server name for connection. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.server")] + public object Server { get; set; } + + /// + /// Gets or sets the port for the connection. Type: integer. + /// + [JsonProperty(PropertyName = "typeProperties.port")] + public object Port { get; set; } + + /// + /// Gets or sets username for authentication. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.uid")] + public object Uid { get; set; } + + /// + /// Gets or sets database name for connection. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.database")] + public object Database { get; set; } + + /// + /// Gets or sets the Azure key vault secret reference of password in + /// connection string. + /// + [JsonProperty(PropertyName = "typeProperties.pwd")] + public AzureKeyVaultSecretReference Pwd { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Pwd != null) + { + Pwd.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/VerticaSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/VerticaSource.cs new file mode 100644 index 000000000000..82b372340758 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/VerticaSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Vertica source. + /// + public partial class VerticaSource : TabularSource + { + /// + /// Initializes a new instance of the VerticaSource class. + /// + public VerticaSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VerticaSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public VerticaSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/VerticaTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/VerticaTableDataset.cs new file mode 100644 index 000000000000..4a9ec7b4b855 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/VerticaTableDataset.cs @@ -0,0 +1,107 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Vertica dataset. + /// + [Newtonsoft.Json.JsonObject("VerticaTable")] + [Rest.Serialization.JsonTransformation] + public partial class VerticaTableDataset : Dataset + { + /// + /// Initializes a new instance of the VerticaTableDataset class. + /// + public VerticaTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the VerticaTableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// This property will be retired. Please + /// consider using schema + table properties instead. + /// The table name of the Vertica. Type: string (or + /// Expression with resultType string). + /// The schema name of the + /// Vertica. Type: string (or Expression with resultType + /// string). + public VerticaTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object), object table = default(object), object verticaTableDatasetSchema = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + Table = table; + VerticaTableDatasetSchema = verticaTableDatasetSchema; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property will be retired. Please consider using + /// schema + table properties instead. + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Gets or sets the table name of the Vertica. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Gets or sets the schema name of the Vertica. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object VerticaTableDatasetSchema { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WaitActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WaitActivity.cs new file mode 100644 index 000000000000..e0a58ed8f9e6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WaitActivity.cs @@ -0,0 +1,88 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// This activity suspends pipeline execution for the specified interval. + /// + [Newtonsoft.Json.JsonObject("Wait")] + [Rest.Serialization.JsonTransformation] + public partial class WaitActivity : ControlActivity + { + /// + /// Initializes a new instance of the WaitActivity class. + /// + public WaitActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WaitActivity class. + /// + /// Activity name. + /// Duration in seconds. Type: integer + /// (or Expression with resultType integer). + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + public WaitActivity(string name, object waitTimeInSeconds, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties) + { + WaitTimeInSeconds = waitTimeInSeconds; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets duration in seconds. Type: integer (or Expression with + /// resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.waitTimeInSeconds")] + public object WaitTimeInSeconds { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (WaitTimeInSeconds == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "WaitTimeInSeconds"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WarehouseLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WarehouseLinkedService.cs new file mode 100644 index 000000000000..a7f10560d7cc --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WarehouseLinkedService.cs @@ -0,0 +1,189 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Microsoft Fabric Warehouse linked service. + /// + [Newtonsoft.Json.JsonObject("Warehouse")] + [Rest.Serialization.JsonTransformation] + public partial class WarehouseLinkedService : LinkedService + { + /// + /// Initializes a new instance of the WarehouseLinkedService class. + /// + public WarehouseLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WarehouseLinkedService class. + /// + /// The ID of Microsoft Fabric Warehouse + /// artifact. Type: string (or Expression with resultType + /// string). + /// The endpoint of Microsoft Fabric Warehouse + /// server. Type: string (or Expression with resultType + /// string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The ID of Microsoft Fabric workspace. + /// Type: string (or Expression with resultType string). + /// The ID of the application used to + /// authenticate against Microsoft Fabric Warehouse. Type: string (or + /// Expression with resultType string). + /// The Key of the application used + /// to authenticate against Microsoft Fabric Warehouse. + /// The name or ID of the tenant to which the + /// service principal belongs. Type: string (or Expression with + /// resultType string). + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + /// The service principal + /// credential type to use in Server-To-Server authentication. + /// 'ServicePrincipalKey' for key/secret, 'ServicePrincipalCert' for + /// certificate. Type: string (or Expression with resultType + /// string). + /// The credential of the + /// service principal object in Azure Active Directory. If + /// servicePrincipalCredentialType is 'ServicePrincipalKey', + /// servicePrincipalCredential can be SecureString or + /// AzureKeyVaultSecretReference. If servicePrincipalCredentialType is + /// 'ServicePrincipalCert', servicePrincipalCredential can only be + /// AzureKeyVaultSecretReference. + public WarehouseLinkedService(object artifactId, object endpoint, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object workspaceId = default(object), object servicePrincipalId = default(object), SecretBase servicePrincipalKey = default(SecretBase), object tenant = default(object), string encryptedCredential = default(string), object servicePrincipalCredentialType = default(object), SecretBase servicePrincipalCredential = default(SecretBase)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ArtifactId = artifactId; + Endpoint = endpoint; + WorkspaceId = workspaceId; + ServicePrincipalId = servicePrincipalId; + ServicePrincipalKey = servicePrincipalKey; + Tenant = tenant; + EncryptedCredential = encryptedCredential; + ServicePrincipalCredentialType = servicePrincipalCredentialType; + ServicePrincipalCredential = servicePrincipalCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the ID of Microsoft Fabric Warehouse artifact. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.artifactId")] + public object ArtifactId { get; set; } + + /// + /// Gets or sets the endpoint of Microsoft Fabric Warehouse server. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.endpoint")] + public object Endpoint { get; set; } + + /// + /// Gets or sets the ID of Microsoft Fabric workspace. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.workspaceId")] + public object WorkspaceId { get; set; } + + /// + /// Gets or sets the ID of the application used to authenticate against + /// Microsoft Fabric Warehouse. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalId")] + public object ServicePrincipalId { get; set; } + + /// + /// Gets or sets the Key of the application used to authenticate + /// against Microsoft Fabric Warehouse. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalKey")] + public SecretBase ServicePrincipalKey { get; set; } + + /// + /// Gets or sets the name or ID of the tenant to which the service + /// principal belongs. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.tenant")] + public object Tenant { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Gets or sets the service principal credential type to use in + /// Server-To-Server authentication. 'ServicePrincipalKey' for + /// key/secret, 'ServicePrincipalCert' for certificate. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalCredentialType")] + public object ServicePrincipalCredentialType { get; set; } + + /// + /// Gets or sets the credential of the service principal object in + /// Azure Active Directory. If servicePrincipalCredentialType is + /// 'ServicePrincipalKey', servicePrincipalCredential can be + /// SecureString or AzureKeyVaultSecretReference. If + /// servicePrincipalCredentialType is 'ServicePrincipalCert', + /// servicePrincipalCredential can only be + /// AzureKeyVaultSecretReference. + /// + [JsonProperty(PropertyName = "typeProperties.servicePrincipalCredential")] + public SecretBase ServicePrincipalCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ArtifactId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ArtifactId"); + } + if (Endpoint == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Endpoint"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WarehouseSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WarehouseSink.cs new file mode 100644 index 000000000000..2d645fb30f9b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WarehouseSink.cs @@ -0,0 +1,120 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Microsoft Fabric Warehouse sink. + /// + public partial class WarehouseSink : CopySink + { + /// + /// Initializes a new instance of the WarehouseSink class. + /// + public WarehouseSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WarehouseSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// SQL pre-copy script. Type: string (or + /// Expression with resultType string). + /// Indicates to use Copy Command to + /// copy data into SQL Data Warehouse. Type: boolean (or Expression + /// with resultType boolean). + /// Specifies Copy Command related + /// settings when allowCopyCommand is true. + /// The option to handle sink table, such as + /// autoCreate. For now only 'autoCreate' value is supported. Type: + /// string (or Expression with resultType string). + /// Write behavior when copying data into + /// azure Microsoft Fabric Data Warehouse. Type: DWWriteBehaviorEnum + /// (or Expression with resultType DWWriteBehaviorEnum) + public WarehouseSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object preCopyScript = default(object), object allowCopyCommand = default(object), DWCopyCommandSettings copyCommandSettings = default(DWCopyCommandSettings), object tableOption = default(object), object writeBehavior = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + PreCopyScript = preCopyScript; + AllowCopyCommand = allowCopyCommand; + CopyCommandSettings = copyCommandSettings; + TableOption = tableOption; + WriteBehavior = writeBehavior; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SQL pre-copy script. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "preCopyScript")] + public object PreCopyScript { get; set; } + + /// + /// Gets or sets indicates to use Copy Command to copy data into SQL + /// Data Warehouse. Type: boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "allowCopyCommand")] + public object AllowCopyCommand { get; set; } + + /// + /// Gets or sets specifies Copy Command related settings when + /// allowCopyCommand is true. + /// + [JsonProperty(PropertyName = "copyCommandSettings")] + public DWCopyCommandSettings CopyCommandSettings { get; set; } + + /// + /// Gets or sets the option to handle sink table, such as autoCreate. + /// For now only 'autoCreate' value is supported. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "tableOption")] + public object TableOption { get; set; } + + /// + /// Gets or sets write behavior when copying data into azure Microsoft + /// Fabric Data Warehouse. Type: DWWriteBehaviorEnum (or Expression + /// with resultType DWWriteBehaviorEnum) + /// + [JsonProperty(PropertyName = "writeBehavior")] + public object WriteBehavior { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WarehouseSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WarehouseSource.cs new file mode 100644 index 000000000000..1a3737eae8ba --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WarehouseSource.cs @@ -0,0 +1,141 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Microsoft Fabric Warehouse source. + /// + public partial class WarehouseSource : TabularSource + { + /// + /// Initializes a new instance of the WarehouseSource class. + /// + public WarehouseSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WarehouseSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// Microsoft Fabric Warehouse reader + /// query. Type: string (or Expression with resultType string). + /// Name of the stored + /// procedure for a Microsoft Fabric Warehouse source. This cannot be + /// used at the same time as SqlReaderQuery. Type: string (or + /// Expression with resultType string). + /// Value and type setting for + /// stored procedure parameters. Example: "{Parameter1: {value: "1", + /// type: "int"}}". Type: object (or Expression with resultType + /// object), itemType: StoredProcedureParameter. + /// Specifies the transaction locking + /// behavior for the Microsoft Fabric Warehouse source. Allowed values: + /// ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. + /// The default value is ReadCommitted. Type: string (or Expression + /// with resultType string). + /// The partition mechanism that will be + /// used for Sql read in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". + /// The settings that will be leveraged + /// for Sql source partitioning. + public WarehouseSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object sqlReaderQuery = default(object), object sqlReaderStoredProcedureName = default(object), object storedProcedureParameters = default(object), object isolationLevel = default(object), object partitionOption = default(object), SqlPartitionSettings partitionSettings = default(SqlPartitionSettings)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + SqlReaderQuery = sqlReaderQuery; + SqlReaderStoredProcedureName = sqlReaderStoredProcedureName; + StoredProcedureParameters = storedProcedureParameters; + IsolationLevel = isolationLevel; + PartitionOption = partitionOption; + PartitionSettings = partitionSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets microsoft Fabric Warehouse reader query. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "sqlReaderQuery")] + public object SqlReaderQuery { get; set; } + + /// + /// Gets or sets name of the stored procedure for a Microsoft Fabric + /// Warehouse source. This cannot be used at the same time as + /// SqlReaderQuery. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "sqlReaderStoredProcedureName")] + public object SqlReaderStoredProcedureName { get; set; } + + /// + /// Gets or sets value and type setting for stored procedure + /// parameters. Example: "{Parameter1: {value: "1", type: "int"}}". + /// Type: object (or Expression with resultType object), itemType: + /// StoredProcedureParameter. + /// + [JsonProperty(PropertyName = "storedProcedureParameters")] + public object StoredProcedureParameters { get; set; } + + /// + /// Gets or sets specifies the transaction locking behavior for the + /// Microsoft Fabric Warehouse source. Allowed values: + /// ReadCommitted/ReadUncommitted/RepeatableRead/Serializable/Snapshot. + /// The default value is ReadCommitted. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "isolationLevel")] + public object IsolationLevel { get; set; } + + /// + /// Gets or sets the partition mechanism that will be used for Sql read + /// in parallel. Possible values include: "None", + /// "PhysicalPartitionsOfTable", "DynamicRange". + /// + [JsonProperty(PropertyName = "partitionOption")] + public object PartitionOption { get; set; } + + /// + /// Gets or sets the settings that will be leveraged for Sql source + /// partitioning. + /// + [JsonProperty(PropertyName = "partitionSettings")] + public SqlPartitionSettings PartitionSettings { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WarehouseTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WarehouseTableDataset.cs new file mode 100644 index 000000000000..cf5d25f44679 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WarehouseTableDataset.cs @@ -0,0 +1,98 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Microsoft Fabric Warehouse dataset. + /// + [Newtonsoft.Json.JsonObject("WarehouseTable")] + [Rest.Serialization.JsonTransformation] + public partial class WarehouseTableDataset : Dataset + { + /// + /// Initializes a new instance of the WarehouseTableDataset class. + /// + public WarehouseTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the WarehouseTableDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The schema name of the + /// Microsoft Fabric Warehouse. Type: string (or Expression with + /// resultType string). + /// The table name of the Microsoft Fabric + /// Warehouse. Type: string (or Expression with resultType + /// string). + public WarehouseTableDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object warehouseTableDatasetSchema = default(object), object table = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + WarehouseTableDatasetSchema = warehouseTableDatasetSchema; + Table = table; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the schema name of the Microsoft Fabric Warehouse. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.schema")] + public object WarehouseTableDatasetSchema { get; set; } + + /// + /// Gets or sets the table name of the Microsoft Fabric Warehouse. + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.table")] + public object Table { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebActivity.cs new file mode 100644 index 000000000000..be9108251d93 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebActivity.cs @@ -0,0 +1,235 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Web activity. + /// + [Rest.Serialization.JsonTransformation] + public partial class WebActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the WebActivity class. + /// + public WebActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WebActivity class. + /// + /// Activity name. + /// Rest API method for target endpoint. Possible + /// values include: 'GET', 'POST', 'PUT', 'DELETE' + /// Web activity target endpoint and path. Type: + /// string (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// Represents the headers that will be sent to + /// the request. For example, to set the language and type on a + /// request: "headers" : { "Accept-Language": "en-us", "Content-Type": + /// "application/json" }. Type: string (or Expression with resultType + /// string). + /// Represents the payload that will be sent to the + /// endpoint. Required for POST/PUT method, not allowed for GET method + /// Type: string (or Expression with resultType string). + /// Authentication method used for calling + /// the endpoint. + /// When set to true, Certificate + /// validation will be disabled. + /// Timeout for the HTTP request to + /// get a response. Format is in TimeSpan (hh:mm:ss). This value is the + /// timeout to get a response, not the activity timeout. The default + /// value is 00:01:00 (1 minute). The range is from 1 to 10 + /// minutes + /// Option to disable invoking HTTP GET on + /// location given in response header of a HTTP 202 Response. If set + /// true, it stops invoking HTTP GET on http location given in response + /// header. If set false then continues to invoke HTTP GET call on + /// location given in http response headers. + /// List of datasets passed to web + /// endpoint. + /// List of linked services passed to web + /// endpoint. + /// The integration runtime reference. + public WebActivity(string name, string method, object url, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), IDictionary headers = default(IDictionary), object body = default(object), WebActivityAuthentication authentication = default(WebActivityAuthentication), bool? disableCertValidation = default(bool?), object httpRequestTimeout = default(object), bool? turnOffAsync = default(bool?), IList datasets = default(IList), IList linkedServices = default(IList), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy) + { + Method = method; + Url = url; + Headers = headers; + Body = body; + Authentication = authentication; + DisableCertValidation = disableCertValidation; + HttpRequestTimeout = httpRequestTimeout; + TurnOffAsync = turnOffAsync; + Datasets = datasets; + LinkedServices = linkedServices; + ConnectVia = connectVia; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets rest API method for target endpoint. Possible values + /// include: 'GET', 'POST', 'PUT', 'DELETE' + /// + [JsonProperty(PropertyName = "typeProperties.method")] + public string Method { get; set; } + + /// + /// Gets or sets web activity target endpoint and path. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.url")] + public object Url { get; set; } + + /// + /// Gets or sets represents the headers that will be sent to the + /// request. For example, to set the language and type on a request: + /// "headers" : { "Accept-Language": "en-us", "Content-Type": + /// "application/json" }. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.headers")] + public IDictionary Headers { get; set; } + + /// + /// Gets or sets represents the payload that will be sent to the + /// endpoint. Required for POST/PUT method, not allowed for GET method + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.body")] + public object Body { get; set; } + + /// + /// Gets or sets authentication method used for calling the endpoint. + /// + [JsonProperty(PropertyName = "typeProperties.authentication")] + public WebActivityAuthentication Authentication { get; set; } + + /// + /// Gets or sets when set to true, Certificate validation will be + /// disabled. + /// + [JsonProperty(PropertyName = "typeProperties.disableCertValidation")] + public bool? DisableCertValidation { get; set; } + + /// + /// Gets or sets timeout for the HTTP request to get a response. Format + /// is in TimeSpan (hh:mm:ss). This value is the timeout to get a + /// response, not the activity timeout. The default value is 00:01:00 + /// (1 minute). The range is from 1 to 10 minutes + /// + [JsonProperty(PropertyName = "typeProperties.httpRequestTimeout")] + public object HttpRequestTimeout { get; set; } + + /// + /// Gets or sets option to disable invoking HTTP GET on location given + /// in response header of a HTTP 202 Response. If set true, it stops + /// invoking HTTP GET on http location given in response header. If set + /// false then continues to invoke HTTP GET call on location given in + /// http response headers. + /// + [JsonProperty(PropertyName = "typeProperties.turnOffAsync")] + public bool? TurnOffAsync { get; set; } + + /// + /// Gets or sets list of datasets passed to web endpoint. + /// + [JsonProperty(PropertyName = "typeProperties.datasets")] + public IList Datasets { get; set; } + + /// + /// Gets or sets list of linked services passed to web endpoint. + /// + [JsonProperty(PropertyName = "typeProperties.linkedServices")] + public IList LinkedServices { get; set; } + + /// + /// Gets or sets the integration runtime reference. + /// + [JsonProperty(PropertyName = "typeProperties.connectVia")] + public IntegrationRuntimeReference ConnectVia { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Method == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Method"); + } + if (Url == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Url"); + } + if (Authentication != null) + { + Authentication.Validate(); + } + if (Datasets != null) + { + foreach (var element in Datasets) + { + if (element != null) + { + element.Validate(); + } + } + } + if (LinkedServices != null) + { + foreach (var element1 in LinkedServices) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + if (ConnectVia != null) + { + ConnectVia.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebActivityAuthentication.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebActivityAuthentication.cs new file mode 100644 index 000000000000..9b2b951350d0 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebActivityAuthentication.cs @@ -0,0 +1,132 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Web activity authentication properties. + /// + public partial class WebActivityAuthentication + { + /// + /// Initializes a new instance of the WebActivityAuthentication class. + /// + public WebActivityAuthentication() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WebActivityAuthentication class. + /// + /// Web activity authentication + /// (Basic/ClientCertificate/MSI/ServicePrincipal) + /// Base64-encoded contents of a PFX file or + /// Certificate when used for ServicePrincipal + /// Web activity authentication user name for + /// basic authentication or ClientID when used for ServicePrincipal. + /// Type: string (or Expression with resultType string). + /// Password for the PFX file or basic + /// authentication / Secret when used for ServicePrincipal + /// Resource for which Azure Auth token will be + /// requested when using MSI Authentication. Type: string (or + /// Expression with resultType string). + /// TenantId for which Azure Auth token will + /// be requested when using ServicePrincipal Authentication. Type: + /// string (or Expression with resultType string). + /// The credential reference containing + /// authentication information. + public WebActivityAuthentication(string type = default(string), SecretBase pfx = default(SecretBase), object username = default(object), SecretBase password = default(SecretBase), object resource = default(object), object userTenant = default(object), CredentialReference credential = default(CredentialReference)) + { + Type = type; + Pfx = pfx; + Username = username; + Password = password; + Resource = resource; + UserTenant = userTenant; + Credential = credential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets web activity authentication + /// (Basic/ClientCertificate/MSI/ServicePrincipal) + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets base64-encoded contents of a PFX file or Certificate + /// when used for ServicePrincipal + /// + [JsonProperty(PropertyName = "pfx")] + public SecretBase Pfx { get; set; } + + /// + /// Gets or sets web activity authentication user name for basic + /// authentication or ClientID when used for ServicePrincipal. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "username")] + public object Username { get; set; } + + /// + /// Gets or sets password for the PFX file or basic authentication / + /// Secret when used for ServicePrincipal + /// + [JsonProperty(PropertyName = "password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets resource for which Azure Auth token will be requested + /// when using MSI Authentication. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "resource")] + public object Resource { get; set; } + + /// + /// Gets or sets tenantId for which Azure Auth token will be requested + /// when using ServicePrincipal Authentication. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "userTenant")] + public object UserTenant { get; set; } + + /// + /// Gets or sets the credential reference containing authentication + /// information. + /// + [JsonProperty(PropertyName = "credential")] + public CredentialReference Credential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Credential != null) + { + Credential.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebActivityMethod.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebActivityMethod.cs new file mode 100644 index 000000000000..80df78ecff47 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebActivityMethod.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for WebActivityMethod. + /// + public static class WebActivityMethod + { + public const string GET = "GET"; + public const string POST = "POST"; + public const string PUT = "PUT"; + public const string DELETE = "DELETE"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebAnonymousAuthentication.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebAnonymousAuthentication.cs new file mode 100644 index 000000000000..8158688a8df3 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebAnonymousAuthentication.cs @@ -0,0 +1,59 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// A WebLinkedService that uses anonymous authentication to communicate + /// with an HTTP endpoint. + /// + [Newtonsoft.Json.JsonObject("Anonymous")] + public partial class WebAnonymousAuthentication : WebLinkedServiceTypeProperties + { + /// + /// Initializes a new instance of the WebAnonymousAuthentication class. + /// + public WebAnonymousAuthentication() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WebAnonymousAuthentication class. + /// + /// The URL of the web service endpoint, e.g. + /// https://www.microsoft.com . Type: string (or Expression with + /// resultType string). + public WebAnonymousAuthentication(object url) + : base(url) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebBasicAuthentication.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebBasicAuthentication.cs new file mode 100644 index 000000000000..d1732d2293b2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebBasicAuthentication.cs @@ -0,0 +1,87 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A WebLinkedService that uses basic authentication to communicate with + /// an HTTP endpoint. + /// + [Newtonsoft.Json.JsonObject("Basic")] + public partial class WebBasicAuthentication : WebLinkedServiceTypeProperties + { + /// + /// Initializes a new instance of the WebBasicAuthentication class. + /// + public WebBasicAuthentication() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WebBasicAuthentication class. + /// + /// The URL of the web service endpoint, e.g. + /// https://www.microsoft.com . Type: string (or Expression with + /// resultType string). + /// User name for Basic authentication. Type: + /// string (or Expression with resultType string). + /// The password for Basic + /// authentication. + public WebBasicAuthentication(object url, object username, SecretBase password) + : base(url) + { + Username = username; + Password = password; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets user name for Basic authentication. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "username")] + public object Username { get; set; } + + /// + /// Gets or sets the password for Basic authentication. + /// + [JsonProperty(PropertyName = "password")] + public SecretBase Password { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Username == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Username"); + } + if (Password == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Password"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebClientCertificateAuthentication.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebClientCertificateAuthentication.cs new file mode 100644 index 000000000000..09ba85143ef5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebClientCertificateAuthentication.cs @@ -0,0 +1,88 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A WebLinkedService that uses client certificate based authentication to + /// communicate with an HTTP endpoint. This scheme follows mutual + /// authentication; the server must also provide valid credentials to the + /// client. + /// + [Newtonsoft.Json.JsonObject("ClientCertificate")] + public partial class WebClientCertificateAuthentication : WebLinkedServiceTypeProperties + { + /// + /// Initializes a new instance of the + /// WebClientCertificateAuthentication class. + /// + public WebClientCertificateAuthentication() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// WebClientCertificateAuthentication class. + /// + /// The URL of the web service endpoint, e.g. + /// https://www.microsoft.com . Type: string (or Expression with + /// resultType string). + /// Base64-encoded contents of a PFX file. + /// Password for the PFX file. + public WebClientCertificateAuthentication(object url, SecretBase pfx, SecretBase password) + : base(url) + { + Pfx = pfx; + Password = password; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets base64-encoded contents of a PFX file. + /// + [JsonProperty(PropertyName = "pfx")] + public SecretBase Pfx { get; set; } + + /// + /// Gets or sets password for the PFX file. + /// + [JsonProperty(PropertyName = "password")] + public SecretBase Password { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Pfx == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Pfx"); + } + if (Password == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Password"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebHookActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebHookActivity.cs new file mode 100644 index 000000000000..ec78d5e0421f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebHookActivity.cs @@ -0,0 +1,180 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// WebHook activity. + /// + [Newtonsoft.Json.JsonObject("WebHook")] + [Rest.Serialization.JsonTransformation] + public partial class WebHookActivity : ControlActivity + { + /// + /// Initializes a new instance of the WebHookActivity class. + /// + public WebHookActivity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WebHookActivity class. + /// + /// Activity name. + /// WebHook activity target endpoint and path. Type: + /// string (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity state. This is an optional property + /// and if not provided, the state will be Active by default. Possible + /// values include: 'Active', 'Inactive' + /// Status result of the activity when + /// the state is set to Inactive. This is an optional property and if + /// not provided when the activity is inactive, the status will be + /// Succeeded by default. Possible values include: 'Succeeded', + /// 'Failed', 'Skipped' + /// Activity depends on condition. + /// Activity user properties. + /// The timeout within which the webhook should + /// be called back. If there is no value specified, it defaults to 10 + /// minutes. Type: string. Pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Represents the headers that will be sent to + /// the request. For example, to set the language and type on a + /// request: "headers" : { "Accept-Language": "en-us", "Content-Type": + /// "application/json" }. Type: string (or Expression with resultType + /// string). + /// Represents the payload that will be sent to the + /// endpoint. Required for POST/PUT method, not allowed for GET method + /// Type: string (or Expression with resultType string). + /// Authentication method used for calling + /// the endpoint. + /// When set to true, statusCode, + /// output and error in callback request body will be consumed by + /// activity. The activity can be marked as failed by setting + /// statusCode >= 400 in callback request. Default is false. Type: + /// boolean (or Expression with resultType boolean). + /// Activity policy. + public WebHookActivity(string name, object url, IDictionary additionalProperties = default(IDictionary), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), string timeout = default(string), IDictionary headers = default(IDictionary), object body = default(object), WebActivityAuthentication authentication = default(WebActivityAuthentication), object reportStatusOnCallBack = default(object), SecureInputOutputPolicy policy = default(SecureInputOutputPolicy)) + : base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties) + { + Url = url; + Timeout = timeout; + Headers = headers; + Body = body; + Authentication = authentication; + ReportStatusOnCallBack = reportStatusOnCallBack; + Policy = policy; + CustomInit(); + } + /// + /// Static constructor for WebHookActivity class. + /// + static WebHookActivity() + { + Method = "POST"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets webHook activity target endpoint and path. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.url")] + public object Url { get; set; } + + /// + /// Gets or sets the timeout within which the webhook should be called + /// back. If there is no value specified, it defaults to 10 minutes. + /// Type: string. Pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "typeProperties.timeout")] + public string Timeout { get; set; } + + /// + /// Gets or sets represents the headers that will be sent to the + /// request. For example, to set the language and type on a request: + /// "headers" : { "Accept-Language": "en-us", "Content-Type": + /// "application/json" }. Type: string (or Expression with resultType + /// string). + /// + [JsonProperty(PropertyName = "typeProperties.headers")] + public IDictionary Headers { get; set; } + + /// + /// Gets or sets represents the payload that will be sent to the + /// endpoint. Required for POST/PUT method, not allowed for GET method + /// Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.body")] + public object Body { get; set; } + + /// + /// Gets or sets authentication method used for calling the endpoint. + /// + [JsonProperty(PropertyName = "typeProperties.authentication")] + public WebActivityAuthentication Authentication { get; set; } + + /// + /// Gets or sets when set to true, statusCode, output and error in + /// callback request body will be consumed by activity. The activity + /// can be marked as failed by setting statusCode &gt;= 400 in + /// callback request. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// + [JsonProperty(PropertyName = "typeProperties.reportStatusOnCallBack")] + public object ReportStatusOnCallBack { get; set; } + + /// + /// Gets or sets activity policy. + /// + [JsonProperty(PropertyName = "policy")] + public SecureInputOutputPolicy Policy { get; set; } + + /// + /// Rest API method for target endpoint. + /// + [JsonProperty(PropertyName = "typeProperties.method")] + public static string Method { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Url == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Url"); + } + if (Authentication != null) + { + Authentication.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebHookActivityMethod.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebHookActivityMethod.cs new file mode 100644 index 000000000000..877c76ec8db7 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebHookActivityMethod.cs @@ -0,0 +1,21 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for WebHookActivityMethod. + /// + public static class WebHookActivityMethod + { + public const string POST = "POST"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebLinkedService.cs new file mode 100644 index 000000000000..6ccb58e1cee7 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebLinkedService.cs @@ -0,0 +1,82 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Web linked service. + /// + [Newtonsoft.Json.JsonObject("Web")] + public partial class WebLinkedService : LinkedService + { + /// + /// Initializes a new instance of the WebLinkedService class. + /// + public WebLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WebLinkedService class. + /// + /// Web linked service properties. + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + public WebLinkedService(WebLinkedServiceTypeProperties typeProperties, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + TypeProperties = typeProperties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets web linked service properties. + /// + [JsonProperty(PropertyName = "typeProperties")] + public WebLinkedServiceTypeProperties TypeProperties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (TypeProperties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "TypeProperties"); + } + if (TypeProperties != null) + { + TypeProperties.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebLinkedServiceTypeProperties.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebLinkedServiceTypeProperties.cs new file mode 100644 index 000000000000..f14c8be215a5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebLinkedServiceTypeProperties.cs @@ -0,0 +1,73 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Base definition of WebLinkedServiceTypeProperties, this typeProperties + /// is polymorphic based on authenticationType, so not flattened in SDK + /// models. + /// + public partial class WebLinkedServiceTypeProperties + { + /// + /// Initializes a new instance of the WebLinkedServiceTypeProperties + /// class. + /// + public WebLinkedServiceTypeProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WebLinkedServiceTypeProperties + /// class. + /// + /// The URL of the web service endpoint, e.g. + /// https://www.microsoft.com . Type: string (or Expression with + /// resultType string). + public WebLinkedServiceTypeProperties(object url) + { + Url = url; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the URL of the web service endpoint, e.g. + /// https://www.microsoft.com . Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "url")] + public object Url { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Url == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Url"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebSource.cs new file mode 100644 index 000000000000..ea77dcb33d9f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebSource.cs @@ -0,0 +1,71 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity source for web page table. + /// + public partial class WebSource : CopySource + { + /// + /// Initializes a new instance of the WebSource class. + /// + public WebSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WebSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public WebSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebTableDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebTableDataset.cs new file mode 100644 index 000000000000..3ff522defefa --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WebTableDataset.cs @@ -0,0 +1,102 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The dataset points to a HTML table in the web page. + /// + [Newtonsoft.Json.JsonObject("WebTable")] + [Rest.Serialization.JsonTransformation] + public partial class WebTableDataset : Dataset + { + /// + /// Initializes a new instance of the WebTableDataset class. + /// + public WebTableDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the WebTableDataset class. + /// + /// Linked service reference. + /// The zero-based index of the table in the web + /// page. Type: integer (or Expression with resultType integer), + /// minimum: 0. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The relative URL to the web page from the linked + /// service URL. Type: string (or Expression with resultType + /// string). + public WebTableDataset(LinkedServiceReference linkedServiceName, object index, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object path = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Index = index; + Path = path; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the zero-based index of the table in the web page. + /// Type: integer (or Expression with resultType integer), minimum: 0. + /// + [JsonProperty(PropertyName = "typeProperties.index")] + public object Index { get; set; } + + /// + /// Gets or sets the relative URL to the web page from the linked + /// service URL. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.path")] + public object Path { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Index == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Index"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WranglingDataFlow.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WranglingDataFlow.cs new file mode 100644 index 000000000000..5712b59b5f01 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/WranglingDataFlow.cs @@ -0,0 +1,79 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Power Query data flow. + /// + [Rest.Serialization.JsonTransformation] + public partial class WranglingDataFlow : DataFlow + { + /// + /// Initializes a new instance of the WranglingDataFlow class. + /// + public WranglingDataFlow() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WranglingDataFlow class. + /// + /// The description of the data flow. + /// List of tags that can be used for + /// describing the data flow. + /// The folder that this data flow is in. If not + /// specified, Data flow will appear at the root level. + /// List of sources in Power Query. + /// Power query mashup script. + /// Locale of the Power query mashup + /// document. + public WranglingDataFlow(string description = default(string), IList annotations = default(IList), DataFlowFolder folder = default(DataFlowFolder), IList sources = default(IList), string script = default(string), string documentLocale = default(string)) + : base(description, annotations, folder) + { + Sources = sources; + Script = script; + DocumentLocale = documentLocale; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of sources in Power Query. + /// + [JsonProperty(PropertyName = "typeProperties.sources")] + public IList Sources { get; set; } + + /// + /// Gets or sets power query mashup script. + /// + [JsonProperty(PropertyName = "typeProperties.script")] + public string Script { get; set; } + + /// + /// Gets or sets locale of the Power query mashup document. + /// + [JsonProperty(PropertyName = "typeProperties.documentLocale")] + public string DocumentLocale { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/XeroLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/XeroLinkedService.cs new file mode 100644 index 000000000000..c883201501f0 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/XeroLinkedService.cs @@ -0,0 +1,158 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Xero Service linked service. + /// + [Newtonsoft.Json.JsonObject("Xero")] + [Rest.Serialization.JsonTransformation] + public partial class XeroLinkedService : LinkedService + { + /// + /// Initializes a new instance of the XeroLinkedService class. + /// + public XeroLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the XeroLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Properties used to connect to + /// Xero. It is mutually exclusive with any other properties in the + /// linked service. Type: object. + /// The endpoint of the Xero server. (i.e. + /// api.xero.com) + /// The consumer key associated with the Xero + /// application. + /// The private key from the .pem file that + /// was generated for your Xero private application. You must include + /// all the text from the .pem file, including the Unix line endings( + /// ). + /// Specifies whether the data + /// source endpoints are encrypted using HTTPS. The default value is + /// true. + /// Specifies whether to require the + /// host name in the server's certificate to match the host name of the + /// server when connecting over SSL. The default value is true. + /// Specifies whether to verify the + /// identity of the server when connecting over SSL. The default value + /// is true. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public XeroLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object connectionProperties = default(object), object host = default(object), SecretBase consumerKey = default(SecretBase), SecretBase privateKey = default(SecretBase), object useEncryptedEndpoints = default(object), object useHostVerification = default(object), object usePeerVerification = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionProperties = connectionProperties; + Host = host; + ConsumerKey = consumerKey; + PrivateKey = privateKey; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets properties used to connect to Xero. It is mutually + /// exclusive with any other properties in the linked service. Type: + /// object. + /// + [JsonProperty(PropertyName = "typeProperties.connectionProperties")] + public object ConnectionProperties { get; set; } + + /// + /// Gets or sets the endpoint of the Xero server. (i.e. api.xero.com) + /// + [JsonProperty(PropertyName = "typeProperties.host")] + public object Host { get; set; } + + /// + /// Gets or sets the consumer key associated with the Xero application. + /// + [JsonProperty(PropertyName = "typeProperties.consumerKey")] + public SecretBase ConsumerKey { get; set; } + + /// + /// Gets or sets the private key from the .pem file that was generated + /// for your Xero private application. You must include all the text + /// from the .pem file, including the Unix line endings( + /// ). + /// + [JsonProperty(PropertyName = "typeProperties.privateKey")] + public SecretBase PrivateKey { get; set; } + + /// + /// Gets or sets specifies whether the data source endpoints are + /// encrypted using HTTPS. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useEncryptedEndpoints")] + public object UseEncryptedEndpoints { get; set; } + + /// + /// Gets or sets specifies whether to require the host name in the + /// server's certificate to match the host name of the server when + /// connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useHostVerification")] + public object UseHostVerification { get; set; } + + /// + /// Gets or sets specifies whether to verify the identity of the server + /// when connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.usePeerVerification")] + public object UsePeerVerification { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/XeroObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/XeroObjectDataset.cs new file mode 100644 index 000000000000..afb6203af8b3 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/XeroObjectDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Xero Service dataset. + /// + [Newtonsoft.Json.JsonObject("XeroObject")] + [Rest.Serialization.JsonTransformation] + public partial class XeroObjectDataset : Dataset + { + /// + /// Initializes a new instance of the XeroObjectDataset class. + /// + public XeroObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the XeroObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name. Type: string (or Expression + /// with resultType string). + public XeroObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/XeroSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/XeroSource.cs new file mode 100644 index 000000000000..ea34450de2e8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/XeroSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Xero Service source. + /// + public partial class XeroSource : TabularSource + { + /// + /// Initializes a new instance of the XeroSource class. + /// + public XeroSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the XeroSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public XeroSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/XmlDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/XmlDataset.cs new file mode 100644 index 000000000000..e631ec0d8da0 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/XmlDataset.cs @@ -0,0 +1,130 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Xml dataset. + /// + [Newtonsoft.Json.JsonObject("Xml")] + [Rest.Serialization.JsonTransformation] + public partial class XmlDataset : Dataset + { + /// + /// Initializes a new instance of the XmlDataset class. + /// + public XmlDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the XmlDataset class. + /// + /// Linked service reference. + /// The location of the json data + /// storage. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The code page name of the preferred + /// encoding. If not specified, the default value is UTF-8, unless BOM + /// denotes another Unicode encoding. Refer to the name column of the + /// table in the following link to set supported values: + /// https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: + /// string (or Expression with resultType string). + /// The null value string. Type: string (or + /// Expression with resultType string). + /// The data compression method used for the + /// json dataset. + public XmlDataset(LinkedServiceReference linkedServiceName, DatasetLocation location, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object encodingName = default(object), object nullValue = default(object), DatasetCompression compression = default(DatasetCompression)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + Location = location; + EncodingName = encodingName; + NullValue = nullValue; + Compression = compression; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the location of the json data storage. + /// + [JsonProperty(PropertyName = "typeProperties.location")] + public DatasetLocation Location { get; set; } + + /// + /// Gets or sets the code page name of the preferred encoding. If not + /// specified, the default value is UTF-8, unless BOM denotes another + /// Unicode encoding. Refer to the name column of the table in the + /// following link to set supported values: + /// https://msdn.microsoft.com/library/system.text.encoding.aspx. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.encodingName")] + public object EncodingName { get; set; } + + /// + /// Gets or sets the null value string. Type: string (or Expression + /// with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.nullValue")] + public object NullValue { get; set; } + + /// + /// Gets or sets the data compression method used for the json dataset. + /// + [JsonProperty(PropertyName = "typeProperties.compression")] + public DatasetCompression Compression { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Location"); + } + if (Compression != null) + { + Compression.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/XmlReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/XmlReadSettings.cs new file mode 100644 index 000000000000..7a24131901b3 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/XmlReadSettings.cs @@ -0,0 +1,110 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Xml read settings. + /// + public partial class XmlReadSettings : FormatReadSettings + { + /// + /// Initializes a new instance of the XmlReadSettings class. + /// + public XmlReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the XmlReadSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Compression settings. + /// Indicates what validation method is + /// used when reading the xml files. Allowed values: 'none', 'xsd', or + /// 'dtd'. Type: string (or Expression with resultType string). + /// Indicates whether type detection is + /// enabled when reading the xml files. Type: boolean (or Expression + /// with resultType boolean). + /// Indicates whether namespace is enabled + /// when reading the xml files. Type: boolean (or Expression with + /// resultType boolean). + /// Namespace uri to prefix mappings to + /// override the prefixes in column names when namespace is enabled, if + /// no prefix is defined for a namespace uri, the prefix of xml + /// element/attribute name in the xml data file will be used. Example: + /// "{"http://www.example.com/xml":"prefix"}" Type: object (or + /// Expression with resultType object). + public XmlReadSettings(IDictionary additionalProperties = default(IDictionary), CompressionReadSettings compressionProperties = default(CompressionReadSettings), object validationMode = default(object), object detectDataType = default(object), object namespaces = default(object), object namespacePrefixes = default(object)) + : base(additionalProperties) + { + CompressionProperties = compressionProperties; + ValidationMode = validationMode; + DetectDataType = detectDataType; + Namespaces = namespaces; + NamespacePrefixes = namespacePrefixes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets compression settings. + /// + [JsonProperty(PropertyName = "compressionProperties")] + public CompressionReadSettings CompressionProperties { get; set; } + + /// + /// Gets or sets indicates what validation method is used when reading + /// the xml files. Allowed values: 'none', 'xsd', or 'dtd'. Type: + /// string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "validationMode")] + public object ValidationMode { get; set; } + + /// + /// Gets or sets indicates whether type detection is enabled when + /// reading the xml files. Type: boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "detectDataType")] + public object DetectDataType { get; set; } + + /// + /// Gets or sets indicates whether namespace is enabled when reading + /// the xml files. Type: boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "namespaces")] + public object Namespaces { get; set; } + + /// + /// Gets or sets namespace uri to prefix mappings to override the + /// prefixes in column names when namespace is enabled, if no prefix is + /// defined for a namespace uri, the prefix of xml element/attribute + /// name in the xml data file will be used. Example: + /// "{"http://www.example.com/xml":"prefix"}" Type: object (or + /// Expression with resultType object). + /// + [JsonProperty(PropertyName = "namespacePrefixes")] + public object NamespacePrefixes { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/XmlSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/XmlSource.cs new file mode 100644 index 000000000000..76f76cf358ee --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/XmlSource.cs @@ -0,0 +1,87 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Xml source. + /// + public partial class XmlSource : CopySource + { + /// + /// Initializes a new instance of the XmlSource class. + /// + public XmlSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the XmlSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Xml store settings. + /// Xml format settings. + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + public XmlSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), StoreReadSettings storeSettings = default(StoreReadSettings), XmlReadSettings formatSettings = default(XmlReadSettings), object additionalColumns = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection) + { + StoreSettings = storeSettings; + FormatSettings = formatSettings; + AdditionalColumns = additionalColumns; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets xml store settings. + /// + [JsonProperty(PropertyName = "storeSettings")] + public StoreReadSettings StoreSettings { get; set; } + + /// + /// Gets or sets xml format settings. + /// + [JsonProperty(PropertyName = "formatSettings")] + public XmlReadSettings FormatSettings { get; set; } + + /// + /// Gets or sets specifies the additional columns to be added to source + /// data. Type: array of objects(AdditionalColumns) (or Expression with + /// resultType array of objects). + /// + [JsonProperty(PropertyName = "additionalColumns")] + public object AdditionalColumns { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ZendeskAuthenticationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ZendeskAuthenticationType.cs new file mode 100644 index 000000000000..4f43799c39e5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ZendeskAuthenticationType.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for ZendeskAuthenticationType. + /// + public static class ZendeskAuthenticationType + { + public const string Basic = "Basic"; + public const string Token = "Token"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ZendeskLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ZendeskLinkedService.cs new file mode 100644 index 000000000000..a17581c84ae4 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ZendeskLinkedService.cs @@ -0,0 +1,135 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Linked service for Zendesk. + /// + [Newtonsoft.Json.JsonObject("Zendesk")] + [Rest.Serialization.JsonTransformation] + public partial class ZendeskLinkedService : LinkedService + { + /// + /// Initializes a new instance of the ZendeskLinkedService class. + /// + public ZendeskLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ZendeskLinkedService class. + /// + /// The authentication type to use. + /// Possible values include: 'Basic', 'Token' + /// The url to connect Zendesk source. Type: string + /// (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// The username of the Zendesk source. Type: + /// string (or Expression with resultType string). + /// The password of the Zendesk source. + /// The api token for the Zendesk + /// source. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public ZendeskLinkedService(string authenticationType, object url, IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object userName = default(object), SecretBase password = default(SecretBase), SecretBase apiToken = default(SecretBase), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + AuthenticationType = authenticationType; + Url = url; + UserName = userName; + Password = password; + ApiToken = apiToken; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the authentication type to use. Possible values + /// include: 'Basic', 'Token' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets the url to connect Zendesk source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.url")] + public object Url { get; set; } + + /// + /// Gets or sets the username of the Zendesk source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.userName")] + public object UserName { get; set; } + + /// + /// Gets or sets the password of the Zendesk source. + /// + [JsonProperty(PropertyName = "typeProperties.password")] + public SecretBase Password { get; set; } + + /// + /// Gets or sets the api token for the Zendesk source. + /// + [JsonProperty(PropertyName = "typeProperties.apiToken")] + public SecretBase ApiToken { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (AuthenticationType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AuthenticationType"); + } + if (Url == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Url"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ZipDeflateReadSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ZipDeflateReadSettings.cs new file mode 100644 index 000000000000..9bbbef438717 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ZipDeflateReadSettings.cs @@ -0,0 +1,59 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The ZipDeflate compression read settings. + /// + public partial class ZipDeflateReadSettings : CompressionReadSettings + { + /// + /// Initializes a new instance of the ZipDeflateReadSettings class. + /// + public ZipDeflateReadSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ZipDeflateReadSettings class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Preserve the zip file + /// name as folder path. Type: boolean (or Expression with resultType + /// boolean). + public ZipDeflateReadSettings(IDictionary additionalProperties = default(IDictionary), object preserveZipFileNameAsFolder = default(object)) + : base(additionalProperties) + { + PreserveZipFileNameAsFolder = preserveZipFileNameAsFolder; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets preserve the zip file name as folder path. Type: + /// boolean (or Expression with resultType boolean). + /// + [JsonProperty(PropertyName = "preserveZipFileNameAsFolder")] + public object PreserveZipFileNameAsFolder { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ZohoLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ZohoLinkedService.cs new file mode 100644 index 000000000000..50a3001390c7 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ZohoLinkedService.cs @@ -0,0 +1,145 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Zoho server linked service. + /// + [Newtonsoft.Json.JsonObject("Zoho")] + [Rest.Serialization.JsonTransformation] + public partial class ZohoLinkedService : LinkedService + { + /// + /// Initializes a new instance of the ZohoLinkedService class. + /// + public ZohoLinkedService() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ZohoLinkedService class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Version of the linked service. + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the linked service. + /// Properties used to connect to + /// Zoho. It is mutually exclusive with any other properties in the + /// linked service. Type: object. + /// The endpoint of the Zoho server. (i.e. + /// crm.zoho.com/crm/private) + /// The access token for Zoho + /// authentication. + /// Specifies whether the data + /// source endpoints are encrypted using HTTPS. The default value is + /// true. + /// Specifies whether to require the + /// host name in the server's certificate to match the host name of the + /// server when connecting over SSL. The default value is true. + /// Specifies whether to verify the + /// identity of the server when connecting over SSL. The default value + /// is true. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string. + public ZohoLinkedService(IDictionary additionalProperties = default(IDictionary), string version = default(string), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object connectionProperties = default(object), object endpoint = default(object), SecretBase accessToken = default(SecretBase), object useEncryptedEndpoints = default(object), object useHostVerification = default(object), object usePeerVerification = default(object), string encryptedCredential = default(string)) + : base(additionalProperties, version, connectVia, description, parameters, annotations) + { + ConnectionProperties = connectionProperties; + Endpoint = endpoint; + AccessToken = accessToken; + UseEncryptedEndpoints = useEncryptedEndpoints; + UseHostVerification = useHostVerification; + UsePeerVerification = usePeerVerification; + EncryptedCredential = encryptedCredential; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets properties used to connect to Zoho. It is mutually + /// exclusive with any other properties in the linked service. Type: + /// object. + /// + [JsonProperty(PropertyName = "typeProperties.connectionProperties")] + public object ConnectionProperties { get; set; } + + /// + /// Gets or sets the endpoint of the Zoho server. (i.e. + /// crm.zoho.com/crm/private) + /// + [JsonProperty(PropertyName = "typeProperties.endpoint")] + public object Endpoint { get; set; } + + /// + /// Gets or sets the access token for Zoho authentication. + /// + [JsonProperty(PropertyName = "typeProperties.accessToken")] + public SecretBase AccessToken { get; set; } + + /// + /// Gets or sets specifies whether the data source endpoints are + /// encrypted using HTTPS. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useEncryptedEndpoints")] + public object UseEncryptedEndpoints { get; set; } + + /// + /// Gets or sets specifies whether to require the host name in the + /// server's certificate to match the host name of the server when + /// connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.useHostVerification")] + public object UseHostVerification { get; set; } + + /// + /// Gets or sets specifies whether to verify the identity of the server + /// when connecting over SSL. The default value is true. + /// + [JsonProperty(PropertyName = "typeProperties.usePeerVerification")] + public object UsePeerVerification { get; set; } + + /// + /// Gets or sets the encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string. + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public string EncryptedCredential { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ZohoObjectDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ZohoObjectDataset.cs new file mode 100644 index 000000000000..adae9c6bec80 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ZohoObjectDataset.cs @@ -0,0 +1,86 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Zoho server dataset. + /// + [Newtonsoft.Json.JsonObject("ZohoObject")] + [Rest.Serialization.JsonTransformation] + public partial class ZohoObjectDataset : Dataset + { + /// + /// Initializes a new instance of the ZohoObjectDataset class. + /// + public ZohoObjectDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the ZohoObjectDataset class. + /// + /// Linked service reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + /// The table name. Type: string (or Expression + /// with resultType string). + public ZohoObjectDataset(LinkedServiceReference linkedServiceName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder), object tableName = default(object)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + TableName = tableName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the table name. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.tableName")] + public object TableName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ZohoSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ZohoSource.cs new file mode 100644 index 000000000000..b992696d3a69 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ZohoSource.cs @@ -0,0 +1,75 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Zoho server source. + /// + public partial class ZohoSource : TabularSource + { + /// + /// Initializes a new instance of the ZohoSource class. + /// + public ZohoSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ZohoSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// If true, disable data store + /// metrics collection. Default is false. Type: boolean (or Expression + /// with resultType boolean). + /// Query timeout. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Specifies the additional columns to + /// be added to source data. Type: array of objects(AdditionalColumns) + /// (or Expression with resultType array of objects). + /// A query to retrieve data from source. Type: + /// string (or Expression with resultType string). + public ZohoSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object queryTimeout = default(object), object additionalColumns = default(object), object query = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, queryTimeout, additionalColumns) + { + Query = query; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a query to retrieve data from source. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Operations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Operations.cs new file mode 100644 index 000000000000..29d01eb797b5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Operations.cs @@ -0,0 +1,400 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Operations operations. + /// + internal partial class Operations : IServiceOperations, IOperations + { + /// + /// Initializes a new instance of the Operations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal Operations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// Lists the available Azure Data Factory API operations. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.DataFactory/operations").ToString(); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists the available Azure Data Factory API operations. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/OperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/OperationsExtensions.cs new file mode 100644 index 000000000000..92df29dcf4f2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/OperationsExtensions.cs @@ -0,0 +1,87 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for Operations. + /// + public static partial class OperationsExtensions + { + /// + /// Lists the available Azure Data Factory API operations. + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this IOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Lists the available Azure Data Factory API operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists the available Azure Data Factory API operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists the available Azure Data Factory API operations. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PipelineRunsOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PipelineRunsOperations.cs new file mode 100644 index 000000000000..7d02d8fda7a1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PipelineRunsOperations.cs @@ -0,0 +1,756 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// PipelineRunsOperations operations. + /// + internal partial class PipelineRunsOperations : IServiceOperations, IPipelineRunsOperations + { + /// + /// Initializes a new instance of the PipelineRunsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal PipelineRunsOperations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// Query pipeline runs in the factory based on input filter conditions. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Parameters to filter the pipeline run. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> QueryByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, RunFilterParameters filterParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (filterParameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "filterParameters"); + } + if (filterParameters != null) + { + filterParameters.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("filterParameters", filterParameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "QueryByFactory", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryPipelineRuns").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(filterParameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(filterParameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get a pipeline run by its run ID. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline run identifier. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string runId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (runId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "runId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("runId", runId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{runId}", System.Uri.EscapeDataString(runId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Cancel a pipeline run by its run ID. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline run identifier. + /// + /// + /// If true, cancel all the Child pipelines that are triggered by the current + /// pipeline. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task CancelWithHttpMessagesAsync(string resourceGroupName, string factoryName, string runId, bool? isRecursive = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (runId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "runId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("runId", runId); + tracingParameters.Add("isRecursive", isRecursive); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Cancel", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId}/cancel").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{runId}", System.Uri.EscapeDataString(runId)); + List _queryParameters = new List(); + if (isRecursive != null) + { + _queryParameters.Add(string.Format("isRecursive={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(isRecursive, Client.SerializationSettings).Trim('"')))); + } + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PipelineRunsOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PipelineRunsOperationsExtensions.cs new file mode 100644 index 000000000000..55018489e04d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PipelineRunsOperationsExtensions.cs @@ -0,0 +1,168 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for PipelineRunsOperations. + /// + public static partial class PipelineRunsOperationsExtensions + { + /// + /// Query pipeline runs in the factory based on input filter conditions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Parameters to filter the pipeline run. + /// + public static PipelineRunsQueryResponse QueryByFactory(this IPipelineRunsOperations operations, string resourceGroupName, string factoryName, RunFilterParameters filterParameters) + { + return operations.QueryByFactoryAsync(resourceGroupName, factoryName, filterParameters).GetAwaiter().GetResult(); + } + + /// + /// Query pipeline runs in the factory based on input filter conditions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Parameters to filter the pipeline run. + /// + /// + /// The cancellation token. + /// + public static async Task QueryByFactoryAsync(this IPipelineRunsOperations operations, string resourceGroupName, string factoryName, RunFilterParameters filterParameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.QueryByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, filterParameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get a pipeline run by its run ID. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline run identifier. + /// + public static PipelineRun Get(this IPipelineRunsOperations operations, string resourceGroupName, string factoryName, string runId) + { + return operations.GetAsync(resourceGroupName, factoryName, runId).GetAwaiter().GetResult(); + } + + /// + /// Get a pipeline run by its run ID. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline run identifier. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IPipelineRunsOperations operations, string resourceGroupName, string factoryName, string runId, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, factoryName, runId, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Cancel a pipeline run by its run ID. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline run identifier. + /// + /// + /// If true, cancel all the Child pipelines that are triggered by the current + /// pipeline. + /// + public static void Cancel(this IPipelineRunsOperations operations, string resourceGroupName, string factoryName, string runId, bool? isRecursive = default(bool?)) + { + operations.CancelAsync(resourceGroupName, factoryName, runId, isRecursive).GetAwaiter().GetResult(); + } + + /// + /// Cancel a pipeline run by its run ID. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline run identifier. + /// + /// + /// If true, cancel all the Child pipelines that are triggered by the current + /// pipeline. + /// + /// + /// The cancellation token. + /// + public static async Task CancelAsync(this IPipelineRunsOperations operations, string resourceGroupName, string factoryName, string runId, bool? isRecursive = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.CancelWithHttpMessagesAsync(resourceGroupName, factoryName, runId, isRecursive, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PipelinesOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PipelinesOperations.cs new file mode 100644 index 000000000000..8433a0986787 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PipelinesOperations.cs @@ -0,0 +1,1526 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// PipelinesOperations operations. + /// + internal partial class PipelinesOperations : IServiceOperations, IPipelinesOperations + { + /// + /// Initializes a new instance of the PipelinesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal PipelinesOperations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// Lists pipelines. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactory", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates a pipeline. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline name. + /// + /// + /// Pipeline resource definition. + /// + /// + /// ETag of the pipeline entity. Should only be specified for update, for + /// which it should match existing entity or can be * for unconditional update. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string pipelineName, PipelineResource pipeline, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (pipelineName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "pipelineName"); + } + if (pipelineName != null) + { + if (pipelineName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "pipelineName", 260); + } + if (pipelineName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "pipelineName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(pipelineName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "pipelineName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (pipeline == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "pipeline"); + } + if (pipeline != null) + { + pipeline.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("pipelineName", pipelineName); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("pipeline", pipeline); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{pipelineName}", System.Uri.EscapeDataString(pipelineName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifMatch != null) + { + if (_httpRequest.Headers.Contains("If-Match")) + { + _httpRequest.Headers.Remove("If-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(pipeline != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(pipeline, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a pipeline. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline name. + /// + /// + /// ETag of the pipeline entity. Should only be specified for get. If the ETag + /// matches the existing entity tag, or if * was provided, then no content will + /// be returned. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string pipelineName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (pipelineName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "pipelineName"); + } + if (pipelineName != null) + { + if (pipelineName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "pipelineName", 260); + } + if (pipelineName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "pipelineName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(pipelineName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "pipelineName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("pipelineName", pipelineName); + tracingParameters.Add("ifNoneMatch", ifNoneMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{pipelineName}", System.Uri.EscapeDataString(pipelineName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifNoneMatch != null) + { + if (_httpRequest.Headers.Contains("If-None-Match")) + { + _httpRequest.Headers.Remove("If-None-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-None-Match", ifNoneMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 304) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes a pipeline. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string pipelineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (pipelineName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "pipelineName"); + } + if (pipelineName != null) + { + if (pipelineName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "pipelineName", 260); + } + if (pipelineName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "pipelineName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(pipelineName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "pipelineName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("pipelineName", pipelineName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{pipelineName}", System.Uri.EscapeDataString(pipelineName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates a run of a pipeline. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline name. + /// + /// + /// The pipeline run identifier. If run ID is specified the parameters of the + /// specified run will be used to create a new run. + /// + /// + /// Recovery mode flag. If recovery mode is set to true, the specified + /// referenced pipeline run and the new run will be grouped under the same + /// groupId. + /// + /// + /// In recovery mode, the rerun will start from this activity. If not + /// specified, all activities will run. + /// + /// + /// In recovery mode, if set to true, the rerun will start from failed + /// activities. The property will be used only if startActivityName is not + /// specified. + /// + /// + /// Parameters of the pipeline run. These parameters will be used only if the + /// runId is not specified. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateRunWithHttpMessagesAsync(string resourceGroupName, string factoryName, string pipelineName, string referencePipelineRunId = default(string), bool? isRecovery = default(bool?), string startActivityName = default(string), bool? startFromFailure = default(bool?), IDictionary parameters = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (pipelineName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "pipelineName"); + } + if (pipelineName != null) + { + if (pipelineName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "pipelineName", 260); + } + if (pipelineName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "pipelineName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(pipelineName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "pipelineName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("pipelineName", pipelineName); + tracingParameters.Add("referencePipelineRunId", referencePipelineRunId); + tracingParameters.Add("isRecovery", isRecovery); + tracingParameters.Add("startActivityName", startActivityName); + tracingParameters.Add("startFromFailure", startFromFailure); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateRun", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelines/{pipelineName}/createRun").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{pipelineName}", System.Uri.EscapeDataString(pipelineName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (referencePipelineRunId != null) + { + _queryParameters.Add(string.Format("referencePipelineRunId={0}", System.Uri.EscapeDataString(referencePipelineRunId))); + } + if (isRecovery != null) + { + _queryParameters.Add(string.Format("isRecovery={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(isRecovery, Client.SerializationSettings).Trim('"')))); + } + if (startActivityName != null) + { + _queryParameters.Add(string.Format("startActivityName={0}", System.Uri.EscapeDataString(startActivityName))); + } + if (startFromFailure != null) + { + _queryParameters.Add(string.Format("startFromFailure={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(startFromFailure, Client.SerializationSettings).Trim('"')))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists pipelines. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactoryNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PipelinesOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PipelinesOperationsExtensions.cs new file mode 100644 index 000000000000..09978899849d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PipelinesOperationsExtensions.cs @@ -0,0 +1,350 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for PipelinesOperations. + /// + public static partial class PipelinesOperationsExtensions + { + /// + /// Lists pipelines. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + public static IPage ListByFactory(this IPipelinesOperations operations, string resourceGroupName, string factoryName) + { + return operations.ListByFactoryAsync(resourceGroupName, factoryName).GetAwaiter().GetResult(); + } + + /// + /// Lists pipelines. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryAsync(this IPipelinesOperations operations, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a pipeline. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline name. + /// + /// + /// Pipeline resource definition. + /// + /// + /// ETag of the pipeline entity. Should only be specified for update, for + /// which it should match existing entity or can be * for unconditional update. + /// + public static PipelineResource CreateOrUpdate(this IPipelinesOperations operations, string resourceGroupName, string factoryName, string pipelineName, PipelineResource pipeline, string ifMatch = default(string)) + { + return operations.CreateOrUpdateAsync(resourceGroupName, factoryName, pipelineName, pipeline, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a pipeline. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline name. + /// + /// + /// Pipeline resource definition. + /// + /// + /// ETag of the pipeline entity. Should only be specified for update, for + /// which it should match existing entity or can be * for unconditional update. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IPipelinesOperations operations, string resourceGroupName, string factoryName, string pipelineName, PipelineResource pipeline, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, factoryName, pipelineName, pipeline, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a pipeline. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline name. + /// + /// + /// ETag of the pipeline entity. Should only be specified for get. If the ETag + /// matches the existing entity tag, or if * was provided, then no content will + /// be returned. + /// + public static PipelineResource Get(this IPipelinesOperations operations, string resourceGroupName, string factoryName, string pipelineName, string ifNoneMatch = default(string)) + { + return operations.GetAsync(resourceGroupName, factoryName, pipelineName, ifNoneMatch).GetAwaiter().GetResult(); + } + + /// + /// Gets a pipeline. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline name. + /// + /// + /// ETag of the pipeline entity. Should only be specified for get. If the ETag + /// matches the existing entity tag, or if * was provided, then no content will + /// be returned. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IPipelinesOperations operations, string resourceGroupName, string factoryName, string pipelineName, string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, factoryName, pipelineName, ifNoneMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a pipeline. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline name. + /// + public static void Delete(this IPipelinesOperations operations, string resourceGroupName, string factoryName, string pipelineName) + { + operations.DeleteAsync(resourceGroupName, factoryName, pipelineName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a pipeline. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline name. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IPipelinesOperations operations, string resourceGroupName, string factoryName, string pipelineName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, factoryName, pipelineName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Creates a run of a pipeline. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline name. + /// + /// + /// The pipeline run identifier. If run ID is specified the parameters of the + /// specified run will be used to create a new run. + /// + /// + /// Recovery mode flag. If recovery mode is set to true, the specified + /// referenced pipeline run and the new run will be grouped under the same + /// groupId. + /// + /// + /// In recovery mode, the rerun will start from this activity. If not + /// specified, all activities will run. + /// + /// + /// In recovery mode, if set to true, the rerun will start from failed + /// activities. The property will be used only if startActivityName is not + /// specified. + /// + /// + /// Parameters of the pipeline run. These parameters will be used only if the + /// runId is not specified. + /// + public static CreateRunResponse CreateRun(this IPipelinesOperations operations, string resourceGroupName, string factoryName, string pipelineName, string referencePipelineRunId = default(string), bool? isRecovery = default(bool?), string startActivityName = default(string), bool? startFromFailure = default(bool?), IDictionary parameters = default(IDictionary)) + { + return operations.CreateRunAsync(resourceGroupName, factoryName, pipelineName, referencePipelineRunId, isRecovery, startActivityName, startFromFailure, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates a run of a pipeline. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The pipeline name. + /// + /// + /// The pipeline run identifier. If run ID is specified the parameters of the + /// specified run will be used to create a new run. + /// + /// + /// Recovery mode flag. If recovery mode is set to true, the specified + /// referenced pipeline run and the new run will be grouped under the same + /// groupId. + /// + /// + /// In recovery mode, the rerun will start from this activity. If not + /// specified, all activities will run. + /// + /// + /// In recovery mode, if set to true, the rerun will start from failed + /// activities. The property will be used only if startActivityName is not + /// specified. + /// + /// + /// Parameters of the pipeline run. These parameters will be used only if the + /// runId is not specified. + /// + /// + /// The cancellation token. + /// + public static async Task CreateRunAsync(this IPipelinesOperations operations, string resourceGroupName, string factoryName, string pipelineName, string referencePipelineRunId = default(string), bool? isRecovery = default(bool?), string startActivityName = default(string), bool? startFromFailure = default(bool?), IDictionary parameters = default(IDictionary), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateRunWithHttpMessagesAsync(resourceGroupName, factoryName, pipelineName, referencePipelineRunId, isRecovery, startActivityName, startFromFailure, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists pipelines. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByFactoryNext(this IPipelinesOperations operations, string nextPageLink) + { + return operations.ListByFactoryNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists pipelines. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryNextAsync(this IPipelinesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PrivateEndPointConnectionsOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PrivateEndPointConnectionsOperations.cs new file mode 100644 index 000000000000..ffedd38c80e4 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PrivateEndPointConnectionsOperations.cs @@ -0,0 +1,453 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// PrivateEndPointConnectionsOperations operations. + /// + internal partial class PrivateEndPointConnectionsOperations : IServiceOperations, IPrivateEndPointConnectionsOperations + { + /// + /// Initializes a new instance of the PrivateEndPointConnectionsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal PrivateEndPointConnectionsOperations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// Lists Private endpoint connections + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactory", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/privateEndPointConnections").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists Private endpoint connections + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactoryNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PrivateEndPointConnectionsOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PrivateEndPointConnectionsOperationsExtensions.cs new file mode 100644 index 000000000000..52b4908a1e3f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PrivateEndPointConnectionsOperationsExtensions.cs @@ -0,0 +1,99 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for PrivateEndPointConnectionsOperations. + /// + public static partial class PrivateEndPointConnectionsOperationsExtensions + { + /// + /// Lists Private endpoint connections + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + public static IPage ListByFactory(this IPrivateEndPointConnectionsOperations operations, string resourceGroupName, string factoryName) + { + return operations.ListByFactoryAsync(resourceGroupName, factoryName).GetAwaiter().GetResult(); + } + + /// + /// Lists Private endpoint connections + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryAsync(this IPrivateEndPointConnectionsOperations operations, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists Private endpoint connections + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByFactoryNext(this IPrivateEndPointConnectionsOperations operations, string nextPageLink) + { + return operations.ListByFactoryNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists Private endpoint connections + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryNextAsync(this IPrivateEndPointConnectionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PrivateEndpointConnectionOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PrivateEndpointConnectionOperations.cs new file mode 100644 index 000000000000..09a4dc3b84d1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PrivateEndpointConnectionOperations.cs @@ -0,0 +1,779 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// PrivateEndpointConnectionOperations operations. + /// + internal partial class PrivateEndpointConnectionOperations : IServiceOperations, IPrivateEndpointConnectionOperations + { + /// + /// Initializes a new instance of the PrivateEndpointConnectionOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal PrivateEndpointConnectionOperations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// Approves or rejects a private endpoint connection + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The private endpoint connection name. + /// + /// + /// + /// + /// ETag of the private endpoint connection entity. Should only be specified + /// for update, for which it should match existing entity or can be * for + /// unconditional update. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (privateEndpointConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (privateEndpointWrapper == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointWrapper"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("privateEndpointWrapper", privateEndpointWrapper); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifMatch != null) + { + if (_httpRequest.Headers.Contains("If-Match")) + { + _httpRequest.Headers.Remove("If-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(privateEndpointWrapper != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(privateEndpointWrapper, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a private endpoint connection + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The private endpoint connection name. + /// + /// + /// ETag of the private endpoint connection entity. Should only be specified + /// for get. If the ETag matches the existing entity tag, or if * was provided, + /// then no content will be returned. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string privateEndpointConnectionName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (privateEndpointConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); + tracingParameters.Add("ifNoneMatch", ifNoneMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifNoneMatch != null) + { + if (_httpRequest.Headers.Contains("If-None-Match")) + { + _httpRequest.Headers.Remove("If-None-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-None-Match", ifNoneMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes a private endpoint connection + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The private endpoint connection name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (privateEndpointConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PrivateEndpointConnectionOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PrivateEndpointConnectionOperationsExtensions.cs new file mode 100644 index 000000000000..e1afbd95ccf2 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PrivateEndpointConnectionOperationsExtensions.cs @@ -0,0 +1,184 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for PrivateEndpointConnectionOperations. + /// + public static partial class PrivateEndpointConnectionOperationsExtensions + { + /// + /// Approves or rejects a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The private endpoint connection name. + /// + /// + /// + /// + /// ETag of the private endpoint connection entity. Should only be specified + /// for update, for which it should match existing entity or can be * for + /// unconditional update. + /// + public static PrivateEndpointConnectionResource CreateOrUpdate(this IPrivateEndpointConnectionOperations operations, string resourceGroupName, string factoryName, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, string ifMatch = default(string)) + { + return operations.CreateOrUpdateAsync(resourceGroupName, factoryName, privateEndpointConnectionName, privateEndpointWrapper, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Approves or rejects a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The private endpoint connection name. + /// + /// + /// + /// + /// ETag of the private endpoint connection entity. Should only be specified + /// for update, for which it should match existing entity or can be * for + /// unconditional update. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IPrivateEndpointConnectionOperations operations, string resourceGroupName, string factoryName, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, factoryName, privateEndpointConnectionName, privateEndpointWrapper, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The private endpoint connection name. + /// + /// + /// ETag of the private endpoint connection entity. Should only be specified + /// for get. If the ETag matches the existing entity tag, or if * was provided, + /// then no content will be returned. + /// + public static PrivateEndpointConnectionResource Get(this IPrivateEndpointConnectionOperations operations, string resourceGroupName, string factoryName, string privateEndpointConnectionName, string ifNoneMatch = default(string)) + { + return operations.GetAsync(resourceGroupName, factoryName, privateEndpointConnectionName, ifNoneMatch).GetAwaiter().GetResult(); + } + + /// + /// Gets a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The private endpoint connection name. + /// + /// + /// ETag of the private endpoint connection entity. Should only be specified + /// for get. If the ETag matches the existing entity tag, or if * was provided, + /// then no content will be returned. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IPrivateEndpointConnectionOperations operations, string resourceGroupName, string factoryName, string privateEndpointConnectionName, string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, factoryName, privateEndpointConnectionName, ifNoneMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The private endpoint connection name. + /// + public static void Delete(this IPrivateEndpointConnectionOperations operations, string resourceGroupName, string factoryName, string privateEndpointConnectionName) + { + operations.DeleteAsync(resourceGroupName, factoryName, privateEndpointConnectionName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a private endpoint connection + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The private endpoint connection name. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IPrivateEndpointConnectionOperations operations, string resourceGroupName, string factoryName, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, factoryName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PrivateLinkResourcesOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PrivateLinkResourcesOperations.cs new file mode 100644 index 000000000000..9f60f8af0d7a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PrivateLinkResourcesOperations.cs @@ -0,0 +1,280 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// PrivateLinkResourcesOperations operations. + /// + internal partial class PrivateLinkResourcesOperations : IServiceOperations, IPrivateLinkResourcesOperations + { + /// + /// Initializes a new instance of the PrivateLinkResourcesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal PrivateLinkResourcesOperations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// Gets the private link resources + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/privateLinkResources").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PrivateLinkResourcesOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PrivateLinkResourcesOperationsExtensions.cs new file mode 100644 index 000000000000..b2d2795876e3 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/PrivateLinkResourcesOperationsExtensions.cs @@ -0,0 +1,65 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for PrivateLinkResourcesOperations. + /// + public static partial class PrivateLinkResourcesOperationsExtensions + { + /// + /// Gets the private link resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + public static PrivateLinkResourcesWrapper Get(this IPrivateLinkResourcesOperations operations, string resourceGroupName, string factoryName) + { + return operations.GetAsync(resourceGroupName, factoryName).GetAwaiter().GetResult(); + } + + /// + /// Gets the private link resources + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IPrivateLinkResourcesOperations operations, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, factoryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/SdkInfo_DataFactoryManagementClient.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/SdkInfo_DataFactoryManagementClient.cs new file mode 100644 index 000000000000..0fa9ad8e041a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/SdkInfo_DataFactoryManagementClient.cs @@ -0,0 +1,49 @@ + +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using System; + using System.Collections.Generic; + using System.Linq; + + internal static partial class SdkInfo + { + public static IEnumerable> ApiInfo_DataFactoryManagementClient + { + get + { + return new Tuple[] + { + new Tuple("DataFactory", "ActivityRuns", "2018-06-01"), + new Tuple("DataFactory", "ChangeDataCapture", "2018-06-01"), + new Tuple("DataFactory", "CredentialOperations", "2018-06-01"), + new Tuple("DataFactory", "DataFlowDebugSession", "2018-06-01"), + new Tuple("DataFactory", "DataFlows", "2018-06-01"), + new Tuple("DataFactory", "Datasets", "2018-06-01"), + new Tuple("DataFactory", "ExposureControl", "2018-06-01"), + new Tuple("DataFactory", "Factories", "2018-06-01"), + new Tuple("DataFactory", "GlobalParameters", "2018-06-01"), + new Tuple("DataFactory", "IntegrationRuntimeNodes", "2018-06-01"), + new Tuple("DataFactory", "IntegrationRuntimeObjectMetadata", "2018-06-01"), + new Tuple("DataFactory", "IntegrationRuntimes", "2018-06-01"), + new Tuple("DataFactory", "LinkedServices", "2018-06-01"), + new Tuple("DataFactory", "ManagedPrivateEndpoints", "2018-06-01"), + new Tuple("DataFactory", "ManagedVirtualNetworks", "2018-06-01"), + new Tuple("DataFactory", "Operations", "2018-06-01"), + new Tuple("DataFactory", "PipelineRuns", "2018-06-01"), + new Tuple("DataFactory", "Pipelines", "2018-06-01"), + new Tuple("DataFactory", "PrivateEndpointConnection", "2018-06-01"), + new Tuple("DataFactory", "TriggerRuns", "2018-06-01"), + new Tuple("DataFactory", "Triggers", "2018-06-01"), + new Tuple("DataFactory", "privateEndPointConnections", "2018-06-01"), + new Tuple("DataFactory", "privateLinkResources", "2018-06-01"), + }.AsEnumerable(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/TriggerRunsOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/TriggerRunsOperations.cs new file mode 100644 index 000000000000..c87cbf6cf311 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/TriggerRunsOperations.cs @@ -0,0 +1,774 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// TriggerRunsOperations operations. + /// + internal partial class TriggerRunsOperations : IServiceOperations, ITriggerRunsOperations + { + /// + /// Initializes a new instance of the TriggerRunsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal TriggerRunsOperations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// Rerun single trigger instance by runId. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The pipeline run identifier. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task RerunWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, string runId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (triggerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "triggerName"); + } + if (triggerName != null) + { + if (triggerName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "triggerName", 260); + } + if (triggerName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "triggerName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(triggerName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "triggerName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (runId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "runId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("triggerName", triggerName); + tracingParameters.Add("runId", runId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Rerun", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/triggerRuns/{runId}/rerun").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{triggerName}", System.Uri.EscapeDataString(triggerName)); + _url = _url.Replace("{runId}", System.Uri.EscapeDataString(runId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Cancel a single trigger instance by runId. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The pipeline run identifier. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task CancelWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, string runId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (triggerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "triggerName"); + } + if (triggerName != null) + { + if (triggerName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "triggerName", 260); + } + if (triggerName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "triggerName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(triggerName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "triggerName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (runId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "runId"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("triggerName", triggerName); + tracingParameters.Add("runId", runId); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Cancel", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/triggerRuns/{runId}/cancel").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{triggerName}", System.Uri.EscapeDataString(triggerName)); + _url = _url.Replace("{runId}", System.Uri.EscapeDataString(runId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Query trigger runs. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Parameters to filter the pipeline run. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> QueryByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, RunFilterParameters filterParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (filterParameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "filterParameters"); + } + if (filterParameters != null) + { + filterParameters.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("filterParameters", filterParameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "QueryByFactory", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryTriggerRuns").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(filterParameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(filterParameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/TriggerRunsOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/TriggerRunsOperationsExtensions.cs new file mode 100644 index 000000000000..5414089fbcf8 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/TriggerRunsOperationsExtensions.cs @@ -0,0 +1,169 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for TriggerRunsOperations. + /// + public static partial class TriggerRunsOperationsExtensions + { + /// + /// Rerun single trigger instance by runId. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The pipeline run identifier. + /// + public static void Rerun(this ITriggerRunsOperations operations, string resourceGroupName, string factoryName, string triggerName, string runId) + { + operations.RerunAsync(resourceGroupName, factoryName, triggerName, runId).GetAwaiter().GetResult(); + } + + /// + /// Rerun single trigger instance by runId. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The pipeline run identifier. + /// + /// + /// The cancellation token. + /// + public static async Task RerunAsync(this ITriggerRunsOperations operations, string resourceGroupName, string factoryName, string triggerName, string runId, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.RerunWithHttpMessagesAsync(resourceGroupName, factoryName, triggerName, runId, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Cancel a single trigger instance by runId. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The pipeline run identifier. + /// + public static void Cancel(this ITriggerRunsOperations operations, string resourceGroupName, string factoryName, string triggerName, string runId) + { + operations.CancelAsync(resourceGroupName, factoryName, triggerName, runId).GetAwaiter().GetResult(); + } + + /// + /// Cancel a single trigger instance by runId. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The pipeline run identifier. + /// + /// + /// The cancellation token. + /// + public static async Task CancelAsync(this ITriggerRunsOperations operations, string resourceGroupName, string factoryName, string triggerName, string runId, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.CancelWithHttpMessagesAsync(resourceGroupName, factoryName, triggerName, runId, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Query trigger runs. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Parameters to filter the pipeline run. + /// + public static TriggerRunsQueryResponse QueryByFactory(this ITriggerRunsOperations operations, string resourceGroupName, string factoryName, RunFilterParameters filterParameters) + { + return operations.QueryByFactoryAsync(resourceGroupName, factoryName, filterParameters).GetAwaiter().GetResult(); + } + + /// + /// Query trigger runs. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Parameters to filter the pipeline run. + /// + /// + /// The cancellation token. + /// + public static async Task QueryByFactoryAsync(this ITriggerRunsOperations operations, string resourceGroupName, string factoryName, RunFilterParameters filterParameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.QueryByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, filterParameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/TriggersOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/TriggersOperations.cs new file mode 100644 index 000000000000..24c8316dfff1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/TriggersOperations.cs @@ -0,0 +1,2775 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// TriggersOperations operations. + /// + internal partial class TriggersOperations : IServiceOperations, ITriggersOperations + { + /// + /// Initializes a new instance of the TriggersOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal TriggersOperations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// Lists triggers. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactory", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Query triggers. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Parameters to filter the triggers. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> QueryByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, TriggerFilterParameters filterParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (filterParameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "filterParameters"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("filterParameters", filterParameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "QueryByFactory", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/querytriggers").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(filterParameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(filterParameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates a trigger. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// Trigger resource definition. + /// + /// + /// ETag of the trigger entity. Should only be specified for update, for which + /// it should match existing entity or can be * for unconditional update. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, TriggerResource trigger, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (triggerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "triggerName"); + } + if (triggerName != null) + { + if (triggerName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "triggerName", 260); + } + if (triggerName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "triggerName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(triggerName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "triggerName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (trigger == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "trigger"); + } + if (trigger != null) + { + trigger.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("triggerName", triggerName); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("trigger", trigger); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{triggerName}", System.Uri.EscapeDataString(triggerName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifMatch != null) + { + if (_httpRequest.Headers.Contains("If-Match")) + { + _httpRequest.Headers.Remove("If-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(trigger != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(trigger, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a trigger. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// ETag of the trigger entity. Should only be specified for get. If the ETag + /// matches the existing entity tag, or if * was provided, then no content will + /// be returned. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (triggerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "triggerName"); + } + if (triggerName != null) + { + if (triggerName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "triggerName", 260); + } + if (triggerName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "triggerName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(triggerName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "triggerName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("triggerName", triggerName); + tracingParameters.Add("ifNoneMatch", ifNoneMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{triggerName}", System.Uri.EscapeDataString(triggerName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifNoneMatch != null) + { + if (_httpRequest.Headers.Contains("If-None-Match")) + { + _httpRequest.Headers.Remove("If-None-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-None-Match", ifNoneMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 304) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes a trigger. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (triggerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "triggerName"); + } + if (triggerName != null) + { + if (triggerName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "triggerName", 260); + } + if (triggerName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "triggerName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(triggerName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "triggerName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("triggerName", triggerName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{triggerName}", System.Uri.EscapeDataString(triggerName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Subscribe event trigger to events. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> SubscribeToEventsWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginSubscribeToEventsWithHttpMessagesAsync(resourceGroupName, factoryName, triggerName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a trigger's event subscription status. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetEventSubscriptionStatusWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (triggerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "triggerName"); + } + if (triggerName != null) + { + if (triggerName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "triggerName", 260); + } + if (triggerName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "triggerName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(triggerName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "triggerName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("triggerName", triggerName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetEventSubscriptionStatus", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/getEventSubscriptionStatus").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{triggerName}", System.Uri.EscapeDataString(triggerName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Unsubscribe event trigger from events. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> UnsubscribeFromEventsWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginUnsubscribeFromEventsWithHttpMessagesAsync(resourceGroupName, factoryName, triggerName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Starts a trigger. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task StartWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginStartWithHttpMessagesAsync(resourceGroupName, factoryName, triggerName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Stops a trigger. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task StopWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginStopWithHttpMessagesAsync(resourceGroupName, factoryName, triggerName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Subscribe event trigger to events. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginSubscribeToEventsWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (triggerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "triggerName"); + } + if (triggerName != null) + { + if (triggerName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "triggerName", 260); + } + if (triggerName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "triggerName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(triggerName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "triggerName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("triggerName", triggerName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginSubscribeToEvents", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/subscribeToEvents").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{triggerName}", System.Uri.EscapeDataString(triggerName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Unsubscribe event trigger from events. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> BeginUnsubscribeFromEventsWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (triggerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "triggerName"); + } + if (triggerName != null) + { + if (triggerName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "triggerName", 260); + } + if (triggerName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "triggerName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(triggerName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "triggerName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("triggerName", triggerName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginUnsubscribeFromEvents", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/unsubscribeFromEvents").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{triggerName}", System.Uri.EscapeDataString(triggerName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Starts a trigger. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task BeginStartWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (triggerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "triggerName"); + } + if (triggerName != null) + { + if (triggerName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "triggerName", 260); + } + if (triggerName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "triggerName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(triggerName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "triggerName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("triggerName", triggerName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginStart", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/start").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{triggerName}", System.Uri.EscapeDataString(triggerName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Stops a trigger. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task BeginStopWithHttpMessagesAsync(string resourceGroupName, string factoryName, string triggerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (triggerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "triggerName"); + } + if (triggerName != null) + { + if (triggerName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "triggerName", 260); + } + if (triggerName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "triggerName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(triggerName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "triggerName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("triggerName", triggerName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginStop", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/triggers/{triggerName}/stop").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{triggerName}", System.Uri.EscapeDataString(triggerName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists triggers. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactoryNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/TriggersOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/TriggersOperationsExtensions.cs new file mode 100644 index 000000000000..a8037398ce7a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/TriggersOperationsExtensions.cs @@ -0,0 +1,706 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for TriggersOperations. + /// + public static partial class TriggersOperationsExtensions + { + /// + /// Lists triggers. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + public static IPage ListByFactory(this ITriggersOperations operations, string resourceGroupName, string factoryName) + { + return operations.ListByFactoryAsync(resourceGroupName, factoryName).GetAwaiter().GetResult(); + } + + /// + /// Lists triggers. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryAsync(this ITriggersOperations operations, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Query triggers. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Parameters to filter the triggers. + /// + public static TriggerQueryResponse QueryByFactory(this ITriggersOperations operations, string resourceGroupName, string factoryName, TriggerFilterParameters filterParameters) + { + return operations.QueryByFactoryAsync(resourceGroupName, factoryName, filterParameters).GetAwaiter().GetResult(); + } + + /// + /// Query triggers. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Parameters to filter the triggers. + /// + /// + /// The cancellation token. + /// + public static async Task QueryByFactoryAsync(this ITriggersOperations operations, string resourceGroupName, string factoryName, TriggerFilterParameters filterParameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.QueryByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, filterParameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a trigger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// Trigger resource definition. + /// + /// + /// ETag of the trigger entity. Should only be specified for update, for which + /// it should match existing entity or can be * for unconditional update. + /// + public static TriggerResource CreateOrUpdate(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName, TriggerResource trigger, string ifMatch = default(string)) + { + return operations.CreateOrUpdateAsync(resourceGroupName, factoryName, triggerName, trigger, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a trigger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// Trigger resource definition. + /// + /// + /// ETag of the trigger entity. Should only be specified for update, for which + /// it should match existing entity or can be * for unconditional update. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName, TriggerResource trigger, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, factoryName, triggerName, trigger, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a trigger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// ETag of the trigger entity. Should only be specified for get. If the ETag + /// matches the existing entity tag, or if * was provided, then no content will + /// be returned. + /// + public static TriggerResource Get(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName, string ifNoneMatch = default(string)) + { + return operations.GetAsync(resourceGroupName, factoryName, triggerName, ifNoneMatch).GetAwaiter().GetResult(); + } + + /// + /// Gets a trigger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// ETag of the trigger entity. Should only be specified for get. If the ETag + /// matches the existing entity tag, or if * was provided, then no content will + /// be returned. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName, string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, factoryName, triggerName, ifNoneMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a trigger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + public static void Delete(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName) + { + operations.DeleteAsync(resourceGroupName, factoryName, triggerName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a trigger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, factoryName, triggerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Subscribe event trigger to events. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + public static TriggerSubscriptionOperationStatus SubscribeToEvents(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName) + { + return operations.SubscribeToEventsAsync(resourceGroupName, factoryName, triggerName).GetAwaiter().GetResult(); + } + + /// + /// Subscribe event trigger to events. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The cancellation token. + /// + public static async Task SubscribeToEventsAsync(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.SubscribeToEventsWithHttpMessagesAsync(resourceGroupName, factoryName, triggerName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get a trigger's event subscription status. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + public static TriggerSubscriptionOperationStatus GetEventSubscriptionStatus(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName) + { + return operations.GetEventSubscriptionStatusAsync(resourceGroupName, factoryName, triggerName).GetAwaiter().GetResult(); + } + + /// + /// Get a trigger's event subscription status. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The cancellation token. + /// + public static async Task GetEventSubscriptionStatusAsync(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetEventSubscriptionStatusWithHttpMessagesAsync(resourceGroupName, factoryName, triggerName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Unsubscribe event trigger from events. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + public static TriggerSubscriptionOperationStatus UnsubscribeFromEvents(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName) + { + return operations.UnsubscribeFromEventsAsync(resourceGroupName, factoryName, triggerName).GetAwaiter().GetResult(); + } + + /// + /// Unsubscribe event trigger from events. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The cancellation token. + /// + public static async Task UnsubscribeFromEventsAsync(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UnsubscribeFromEventsWithHttpMessagesAsync(resourceGroupName, factoryName, triggerName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Starts a trigger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + public static void Start(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName) + { + operations.StartAsync(resourceGroupName, factoryName, triggerName).GetAwaiter().GetResult(); + } + + /// + /// Starts a trigger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The cancellation token. + /// + public static async Task StartAsync(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.StartWithHttpMessagesAsync(resourceGroupName, factoryName, triggerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Stops a trigger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + public static void Stop(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName) + { + operations.StopAsync(resourceGroupName, factoryName, triggerName).GetAwaiter().GetResult(); + } + + /// + /// Stops a trigger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The cancellation token. + /// + public static async Task StopAsync(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.StopWithHttpMessagesAsync(resourceGroupName, factoryName, triggerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Subscribe event trigger to events. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + public static TriggerSubscriptionOperationStatus BeginSubscribeToEvents(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName) + { + return operations.BeginSubscribeToEventsAsync(resourceGroupName, factoryName, triggerName).GetAwaiter().GetResult(); + } + + /// + /// Subscribe event trigger to events. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The cancellation token. + /// + public static async Task BeginSubscribeToEventsAsync(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginSubscribeToEventsWithHttpMessagesAsync(resourceGroupName, factoryName, triggerName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Unsubscribe event trigger from events. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + public static TriggerSubscriptionOperationStatus BeginUnsubscribeFromEvents(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName) + { + return operations.BeginUnsubscribeFromEventsAsync(resourceGroupName, factoryName, triggerName).GetAwaiter().GetResult(); + } + + /// + /// Unsubscribe event trigger from events. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The cancellation token. + /// + public static async Task BeginUnsubscribeFromEventsAsync(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginUnsubscribeFromEventsWithHttpMessagesAsync(resourceGroupName, factoryName, triggerName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Starts a trigger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + public static void BeginStart(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName) + { + operations.BeginStartAsync(resourceGroupName, factoryName, triggerName).GetAwaiter().GetResult(); + } + + /// + /// Starts a trigger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The cancellation token. + /// + public static async Task BeginStartAsync(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginStartWithHttpMessagesAsync(resourceGroupName, factoryName, triggerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Stops a trigger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + public static void BeginStop(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName) + { + operations.BeginStopAsync(resourceGroupName, factoryName, triggerName).GetAwaiter().GetResult(); + } + + /// + /// Stops a trigger. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The trigger name. + /// + /// + /// The cancellation token. + /// + public static async Task BeginStopAsync(this ITriggersOperations operations, string resourceGroupName, string factoryName, string triggerName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginStopWithHttpMessagesAsync(resourceGroupName, factoryName, triggerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists triggers. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByFactoryNext(this ITriggersOperations operations, string nextPageLink) + { + return operations.ListByFactoryNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists triggers. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryNextAsync(this ITriggersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +}