diff --git a/src/SDKs/DataFactory/DataFactory.Tests/JsonSamples/DatasetJsonSamples.cs b/src/SDKs/DataFactory/DataFactory.Tests/JsonSamples/DatasetJsonSamples.cs index 42039f2516b8..3b547aaa2525 100644 --- a/src/SDKs/DataFactory/DataFactory.Tests/JsonSamples/DatasetJsonSamples.cs +++ b/src/SDKs/DataFactory/DataFactory.Tests/JsonSamples/DatasetJsonSamples.cs @@ -825,6 +825,26 @@ public class DatasetJsonSamples : JsonSampleCollection } } } +"; + + [JsonSample] + public const string SapEccResourceDataset = @" +{ + name: ""SapEccResourceDataset"", + properties: + { + type: ""SapEccResource"", + linkedServiceName: + { + referenceName : ""ls"", + type : ""LinkedServiceReference"" + }, + typeProperties: + { + path: ""dd04tentitySet"" + } + } +} "; } } diff --git a/src/SDKs/DataFactory/DataFactory.Tests/JsonSamples/PipelineJsonSamples.cs b/src/SDKs/DataFactory/DataFactory.Tests/JsonSamples/PipelineJsonSamples.cs index 96865d70d807..98cf47899f74 100644 --- a/src/SDKs/DataFactory/DataFactory.Tests/JsonSamples/PipelineJsonSamples.cs +++ b/src/SDKs/DataFactory/DataFactory.Tests/JsonSamples/PipelineJsonSamples.cs @@ -3148,5 +3148,55 @@ public class PipelineJsonSamples : JsonSampleCollection ] } }"; + + [JsonSample(version: "Copy")] + public const string CopySapEccToAdls = @" +{ + name: ""MyPipelineName"", + properties: + { + description : ""Copy from SAP ECC to Azure Data Lake Store"", + activities: + [ + { + type: ""Copy"", + name: ""TestActivity"", + description: ""Test activity description"", + typeProperties: + { + source: + { + type: ""SapEccSource"", + query: ""$top=1"" + }, + sink: + { + type: ""AzureDataLakeStoreSink"", + copyBehavior: ""FlattenHierarchy"" + } + }, + inputs: + [ + { + referenceName: ""InputSapEcc"", 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/SapEccLinkedService.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapEccLinkedService.cs new file mode 100644 index 000000000000..06e762ebfc4a --- /dev/null +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapEccLinkedService.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; + + /// + /// 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 + /// The integration runtime reference. + /// Linked service description. + /// 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 (or Expression + /// with resultType string). + public SapEccLinkedService(string url, IDictionary additionalProperties = default(IDictionary), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), string username = default(string), SecretBase password = default(SecretBase), string encryptedCredential = default(string)) + : base(additionalProperties, connectVia, description) + { + 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 string Url { get; set; } + + /// + /// Gets or sets the username for Basic authentication. Type: string + /// (or Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.username")] + public string 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 (or Expression with resultType 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/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapEccResourceDataset.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapEccResourceDataset.cs new file mode 100644 index 000000000000..512ef4717e55 --- /dev/null +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapEccResourceDataset.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 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. + /// Parameters for dataset. + public SapEccResourceDataset(LinkedServiceReference linkedServiceName, string path, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), IDictionary parameters = default(IDictionary)) + : base(linkedServiceName, additionalProperties, description, structure, parameters) + { + 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 string 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/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapEccSource.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapEccSource.cs new file mode 100644 index 000000000000..a6150e9c47ae --- /dev/null +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapEccSource.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; + + /// + /// A copy activity source for SAP ECC source. + /// + public partial class SapEccSource : CopySource + { + /// + /// 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])). + /// SAP ECC OData query. For example, "$top=1". + /// Type: string (or Expression with resultType string). + public SapEccSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), string query = default(string)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait) + { + Query = query; + 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 string Query { get; set; } + + } +} diff --git a/src/SDKs/DataFactory/Management.DataFactory/changelog.md b/src/SDKs/DataFactory/Management.DataFactory/changelog.md index 2ecb5b3e9b9a..28a3ae5b0040 100644 --- a/src/SDKs/DataFactory/Management.DataFactory/changelog.md +++ b/src/SDKs/DataFactory/Management.DataFactory/changelog.md @@ -1,5 +1,10 @@ # Changelog for the Azure Data Factory V2 .NET SDK +## Version 0.6.0-preview + +### Feature Additions + * Add SAP ECC Source + ## Version 0.5.0-preview ### Feature Additions