From 2bc58ffbbce3ff9e4daa5325563383a4fad3b1ae Mon Sep 17 00:00:00 2001 From: wenbof Date: Fri, 22 Feb 2019 04:46:59 +0800 Subject: [PATCH] [Datafactory]SDK Change for SapOpenHub and Rest (#5260) * [Datafactory]SDK Change for SapOpenHub and Rest * fix indention --- .../JsonSamples/DatasetJsonSamples.cs | 42 ++++ .../JsonSamples/LinkedServiceJsonSamples.cs | 37 ++++ .../JsonSamples/PipelineJsonSamples.cs | 109 ++++++++++- .../Generated/Models/RestResourceDataset.cs | 133 +++++++++++++ .../Models/RestServiceAuthenticationType.cs | 24 +++ .../Models/RestServiceLinkedService.cs | 180 ++++++++++++++++++ .../Generated/Models/RestSource.cs | 78 ++++++++ .../Models/SapOpenHubLinkedService.cs | 166 ++++++++++++++++ .../Generated/Models/SapOpenHubSource.cs | 53 ++++++ .../Models/SapOpenHubTableDataset.cs | 118 ++++++++++++ .../Generated/Models/TabularTranslator.cs | 13 +- .../Management.DataFactory/changelog.md | 7 + 12 files changed, 956 insertions(+), 4 deletions(-) create mode 100644 src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RestResourceDataset.cs create mode 100644 src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RestServiceAuthenticationType.cs create mode 100644 src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RestServiceLinkedService.cs create mode 100644 src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RestSource.cs create mode 100644 src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapOpenHubLinkedService.cs create mode 100644 src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapOpenHubSource.cs create mode 100644 src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapOpenHubTableDataset.cs diff --git a/src/SDKs/DataFactory/DataFactory.Tests/JsonSamples/DatasetJsonSamples.cs b/src/SDKs/DataFactory/DataFactory.Tests/JsonSamples/DatasetJsonSamples.cs index 61a1de40e904c..fd31edc4b11d3 100644 --- a/src/SDKs/DataFactory/DataFactory.Tests/JsonSamples/DatasetJsonSamples.cs +++ b/src/SDKs/DataFactory/DataFactory.Tests/JsonSamples/DatasetJsonSamples.cs @@ -872,5 +872,47 @@ public class DatasetJsonSamples : JsonSampleCollection } } "; + [JsonSample] + public const string SapOpenHubDataset = @" +{ + ""name"": ""SAPBWOpenHubDataset"", + ""properties"": { + ""type"": ""SapOpenHubTable"", + ""linkedServiceName"": { + ""referenceName"": ""OpenHubLinkedService"", + ""type"": ""LinkedServiceReference"" + }, + ""typeProperties"": { + ""openHubDestinationName"": ""fakeOhdName"", + ""excludeLastRequest"": true, + ""baseRequestId"": 231 + } + } +} +"; + + [JsonSample] + public const string RestDataset = @" +{ + ""name"": ""RESTDataset"", + ""properties"": { + ""type"": ""RestResource"", + ""linkedServiceName"": { + ""referenceName"": ""RestLinkedService"", + ""type"": ""LinkedServiceReference"" + }, + ""typeProperties"": { + ""relativeUrl"": ""https://fakeurl/"", + ""additionalHeaders"": { + ""x-user-defined"": ""helloworld"" + }, + ""paginationRules"": { + ""AbsoluteUrl"": ""$.paging.next"" + } + } + } +} +"; + } } diff --git a/src/SDKs/DataFactory/DataFactory.Tests/JsonSamples/LinkedServiceJsonSamples.cs b/src/SDKs/DataFactory/DataFactory.Tests/JsonSamples/LinkedServiceJsonSamples.cs index 668c2a9698f5e..7893ed3075ee6 100644 --- a/src/SDKs/DataFactory/DataFactory.Tests/JsonSamples/LinkedServiceJsonSamples.cs +++ b/src/SDKs/DataFactory/DataFactory.Tests/JsonSamples/LinkedServiceJsonSamples.cs @@ -1991,5 +1991,42 @@ public class LinkedServiceJsonSamples : JsonSampleCollection } } "; - [JsonSample] + [JsonSample] public const string CopyActivityWithSkipIncompatibleRows = @" { ""name"": ""MyPipeline"", @@ -122,7 +122,7 @@ public class PipelineJsonSamples : JsonSampleCollection } } "; - + [JsonSample] public const string ChainedActivitiesWithParametersPipeline = @" @@ -1985,7 +1985,7 @@ public class PipelineJsonSamples : JsonSampleCollection ] } }"; - + [JsonSample] public const string AzureMLBatchExecutionPipeline = @" { @@ -3392,5 +3392,108 @@ public class PipelineJsonSamples : JsonSampleCollection } }"; + [JsonSample(version: "Copy")] + public const string CopySapOpenHubToAdls = @" +{ + name: ""MyPipelineName"", + properties: + { + description : ""Copy from SAP Open Hub to Azure Data Lake Store"", + activities: + [ + { + type: ""Copy"", + name: ""TestActivity"", + description: ""Test activity description"", + typeProperties: + { + source: + { + type: ""SapOpenHubSource"" + }, + sink: + { + type: ""AzureDataLakeStoreSink"", + copyBehavior: ""FlattenHierarchy"" + } + }, + inputs: + [ + { + referenceName: ""InputSapOpenHub"", type: ""DatasetReference"" + } + ], + outputs: + [ + { + referenceName: ""OutputAdlsDA"", type: ""DatasetReference"" + } + ], + linkedServiceName: { referenceName: ""MyLinkedServiceName"", type: ""LinkedServiceReference"" }, + policy: + { + retry: 3, + timeout: ""00:00:05"", + } + } + ] + } +} +"; + + [JsonSample(version: "Copy")] + public const string CopyRestToAdls = @" +{ + name: ""MyPipelineName"", + properties: + { + description : ""Copy from REST to Azure Data Lake Store"", + activities: + [ + { + type: ""Copy"", + name: ""TestActivity"", + description: ""Test activity description"", + typeProperties: + { + source: + { + type: ""RestSource"", + ""httpRequestTimeout"": ""00:01:00"" + }, + sink: + { + type: ""AzureDataLakeStoreSink"", + copyBehavior: ""FlattenHierarchy"" + }, + translator: + { + type: ""TabularTranslator"", + collectionReference: ""$.fakekey"" + } + }, + inputs: + [ + { + referenceName: ""InputRest"", type: ""DatasetReference"" + } + ], + outputs: + [ + { + referenceName: ""OutputAdlsDA"", type: ""DatasetReference"" + } + ], + linkedServiceName: { referenceName: ""MyLinkedServiceName"", type: ""LinkedServiceReference"" }, + policy: + { + retry: 3, + timeout: ""00:00:05"", + } + } + ] + } +} +"; } } diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RestResourceDataset.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RestResourceDataset.cs new file mode 100644 index 0000000000000..e9a28c70854f1 --- /dev/null +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RestResourceDataset.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; + + /// + /// 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. Type: string (or Expression with + /// resultType string). + /// The pagination rules to compose next + /// page requests. Type: string (or Expression with resultType + /// string). + 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), object additionalHeaders = default(object), object paginationRules = default(object)) + : 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. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.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 = "typeProperties.paginationRules")] + public object PaginationRules { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RestServiceAuthenticationType.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RestServiceAuthenticationType.cs new file mode 100644 index 0000000000000..28c096262569c --- /dev/null +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RestServiceAuthenticationType.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 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"; + } +} diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RestServiceLinkedService.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RestServiceLinkedService.cs new file mode 100644 index 0000000000000..2ced602429dbf --- /dev/null +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RestServiceLinkedService.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; + + /// + /// 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 of authentication used to + /// connect to the REST service. Possible values include: 'Anonymous', + /// 'Basic', 'AadServicePrincipal', 'ManagedServiceIdentity' + /// Unmatched properties from the + /// message are deserialized this collection + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the Dataset. + /// 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. + /// The password used in Basic authentication + /// type. + /// The application's client ID used + /// in AadServicePrincipal authentication type. + /// 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. + /// The resource you are requesting + /// authorization to use. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string (or Expression with + /// resultType string). + public RestServiceLinkedService(object url, string authenticationType, IDictionary additionalProperties = default(IDictionary), 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 servicePrincipalId = default(object), SecretBase servicePrincipalKey = default(SecretBase), object tenant = default(object), object aadResourceId = default(object), object encryptedCredential = default(object)) + : base(additionalProperties, connectVia, description, parameters, annotations) + { + Url = url; + EnableServerCertificateValidation = enableServerCertificateValidation; + AuthenticationType = authenticationType; + UserName = userName; + Password = password; + 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 base URL of the REST service. + /// + [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' + /// + [JsonProperty(PropertyName = "typeProperties.authenticationType")] + public string AuthenticationType { get; set; } + + /// + /// Gets or sets the user name used in Basic authentication type. + /// + [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 application's client ID used in + /// AadServicePrincipal authentication type. + /// + [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. + /// + [JsonProperty(PropertyName = "typeProperties.tenant")] + public object Tenant { get; set; } + + /// + /// Gets or sets the resource you are requesting authorization to use. + /// + [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 (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public object 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 (AuthenticationType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AuthenticationType"); + } + } + } +} diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RestSource.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RestSource.cs new file mode 100644 index 0000000000000..cbf748d79160f --- /dev/null +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RestSource.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; + + /// + /// 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 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. + public RestSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object httpRequestTimeout = default(object), object requestInterval = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait) + { + HttpRequestTimeout = httpRequestTimeout; + RequestInterval = requestInterval; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// 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; } + + } +} diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapOpenHubLinkedService.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapOpenHubLinkedService.cs new file mode 100644 index 0000000000000..5fb57ca899780 --- /dev/null +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapOpenHubLinkedService.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; + + /// + /// 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. + /// + /// 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). + /// Unmatched properties from the + /// message are deserialized this collection + /// The integration runtime reference. + /// Linked service description. + /// Parameters for linked service. + /// List of tags that can be used for + /// describing the Dataset. + /// Language of the BW system where the open hub + /// destination is located. The default value is EN. 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 encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string (or Expression with + /// resultType string). + public SapOpenHubLinkedService(object server, object systemNumber, object clientId, IDictionary additionalProperties = default(IDictionary), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object language = default(object), object userName = default(object), SecretBase password = default(SecretBase), object encryptedCredential = default(object)) + : base(additionalProperties, connectVia, description, parameters, annotations) + { + Server = server; + SystemNumber = systemNumber; + ClientId = clientId; + Language = language; + 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 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 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 encrypted credential used for authentication. + /// Credentials are encrypted using the integration runtime credential + /// manager. Type: string (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.encryptedCredential")] + public object 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/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapOpenHubSource.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapOpenHubSource.cs new file mode 100644 index 0000000000000..363762ee04a31 --- /dev/null +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapOpenHubSource.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 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 : CopySource + { + /// + /// 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])). + public SapOpenHubSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapOpenHubTableDataset.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapOpenHubTableDataset.cs new file mode 100644 index 0000000000000..7052c2ddd5846 --- /dev/null +++ b/src/SDKs/DataFactory/Management.DataFactory/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/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/TabularTranslator.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/TabularTranslator.cs index 05d0edfcce4f5..e5e80ccf5a07d 100644 --- a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/TabularTranslator.cs +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/TabularTranslator.cs @@ -41,11 +41,15 @@ public TabularTranslator() /// "$.Column1", "Column2": "$.Column2.Property1", "Column3": /// "$.Column2.Property2"}. Type: object (or Expression with resultType /// object). - public TabularTranslator(IDictionary additionalProperties = default(IDictionary), object columnMappings = default(object), object schemaMapping = default(object)) + /// The JSON Path of the Nested Array + /// that is going to do cross-apply. Type: object (or Expression with + /// resultType object). + public TabularTranslator(IDictionary additionalProperties = default(IDictionary), object columnMappings = default(object), object schemaMapping = default(object), object collectionReference = default(object)) : base(additionalProperties) { ColumnMappings = columnMappings; SchemaMapping = schemaMapping; + CollectionReference = collectionReference; CustomInit(); } @@ -71,5 +75,12 @@ public TabularTranslator() [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; } + } } diff --git a/src/SDKs/DataFactory/Management.DataFactory/changelog.md b/src/SDKs/DataFactory/Management.DataFactory/changelog.md index a2e25c6a4cc85..15b9179e6c2a1 100644 --- a/src/SDKs/DataFactory/Management.DataFactory/changelog.md +++ b/src/SDKs/DataFactory/Management.DataFactory/changelog.md @@ -1,6 +1,13 @@ # Changelog for the Azure Data Factory V2 .NET SDK ## Current version +## Version 3.0.2 + +### Feature Additions + - Add support for RestService Source + - Add support for SAP BW Open Hub Source + - Add support for collectionReference + ## Version 3.0.1 ### Feature Additions