From 0ff2c54bf46bee8dc306ea52a3630b06c6e7455c Mon Sep 17 00:00:00 2001 From: Sharmadha Date: Fri, 17 Nov 2017 11:21:32 -0800 Subject: [PATCH 1/5] Tumbling window trigger app model changes --- .../JsonSamples/TriggerJsonSamples.cs | 74 +++++++- .../DataFactory.Tests/Utils/ExampleCapture.cs | 2 +- .../Generated/DataFactoryManagementClient.cs | 2 - .../Models/AzureDataLakeStoreDataset.cs | 12 +- .../Generated/Models/BlobTrigger.cs | 8 +- .../Models/DatasetDateTimePartitionValue.cs | 66 ------- .../Generated/Models/DatasetPartition.cs | 61 ------ .../Generated/Models/DatasetPartitionValue.cs | 35 ---- .../Models/DatasetZipDeflateCompression.cs | 56 ++++++ .../Generated/Models/DynamicsLinkedService.cs | 30 +-- .../Generated/Models/HttpDataset.cs | 11 +- .../Models/MultiplePipelineTrigger.cs | 59 ++++++ .../Models/RedirectIncompatibleRowSettings.cs | 26 +-- .../Generated/Models/RetryPolicy.cs | 81 ++++++++ .../Models/SapCloudForCustomerSink.cs | 65 +++++++ .../SapCloudForCustomerSinkWriteBehavior.cs | 22 +++ .../Generated/Models/ScheduleTrigger.cs | 8 +- .../Generated/Models/Trigger.cs | 12 +- .../Models/TumblingWindowFrequency.cs | 22 +++ .../Generated/Models/TumblingWindowTrigger.cs | 174 ++++++++++++++++++ .../Management.DataFactory/changelog.md | 1 + 21 files changed, 595 insertions(+), 232 deletions(-) delete mode 100644 src/SDKs/DataFactory/Management.DataFactory/Generated/Models/DatasetDateTimePartitionValue.cs delete mode 100644 src/SDKs/DataFactory/Management.DataFactory/Generated/Models/DatasetPartition.cs delete mode 100644 src/SDKs/DataFactory/Management.DataFactory/Generated/Models/DatasetPartitionValue.cs create mode 100644 src/SDKs/DataFactory/Management.DataFactory/Generated/Models/DatasetZipDeflateCompression.cs create mode 100644 src/SDKs/DataFactory/Management.DataFactory/Generated/Models/MultiplePipelineTrigger.cs create mode 100644 src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RetryPolicy.cs create mode 100644 src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapCloudForCustomerSink.cs create mode 100644 src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapCloudForCustomerSinkWriteBehavior.cs create mode 100644 src/SDKs/DataFactory/Management.DataFactory/Generated/Models/TumblingWindowFrequency.cs create mode 100644 src/SDKs/DataFactory/Management.DataFactory/Generated/Models/TumblingWindowTrigger.cs diff --git a/src/SDKs/DataFactory/DataFactory.Tests/JsonSamples/TriggerJsonSamples.cs b/src/SDKs/DataFactory/DataFactory.Tests/JsonSamples/TriggerJsonSamples.cs index 303ded5755fd..056e4aaf0d06 100644 --- a/src/SDKs/DataFactory/DataFactory.Tests/JsonSamples/TriggerJsonSamples.cs +++ b/src/SDKs/DataFactory/DataFactory.Tests/JsonSamples/TriggerJsonSamples.cs @@ -43,6 +43,78 @@ public class TriggerJsonSamples : JsonSampleCollection ] } }"; - + + [JsonSample] + public const string ScheduleTriggerSample = @" +{ + name: ""myDemoScheduleTrigger"", + properties: { + type: ""ScheduleTrigger"", + typeProperties: { + recurrence: { + frequency: ""Month"", + interval: 1, + timeZone: ""UTC"", + startTime: ""2017-04-14T13:00:00Z"", + endTime: ""2018-04-14T13:00:00Z"" + } + }, + pipelines: [ + { + pipelineReference: { + type: ""PipelineReference"", + referenceName: ""myPipeline"" + }, + parameters: { + mySinkDatasetFolderPath: { + type: ""Expression"", + value: ""@{concat('output',formatDateTime(trigger().startTime,'-dd-MM-yyyy-HH-mm-ss-ffff'))}"" + }, + mySourceDatasetFolderPath: ""input/"" + } + } + ] + } +} +"; + + [JsonSample] + public const string TumblingWindowTriggerSample = @" +{ + name: ""myDemoTWTrigger"", + properties: { + type: ""TumblingWindowTrigger"", + typeProperties: { + frequency: ""Hour"", + interval: 24, + startTime: ""2017-04-14T13:00:00Z"", + endTime: ""2018-04-14T13:00:00Z"", + delay: 10, + retryPolicy: { + count: 3, + intervalInSeconds: 30 + }, + maxConcurrency: 10 + }, + pipeline: { + pipelineReference: { + type: ""PipelineReference"", + referenceName: ""myPipeline"" + }, + parameters: { + windowStart: { + type: ""Expression"", + value: ""@{trigger().outputs.windowStartTime}"" + }, + windowEnd: { + type: ""Expression"", + value: ""@{trigger().outputs.windowEndTime}"" + }, + } + } + } +} +"; + } } diff --git a/src/SDKs/DataFactory/DataFactory.Tests/Utils/ExampleCapture.cs b/src/SDKs/DataFactory/DataFactory.Tests/Utils/ExampleCapture.cs index 2b0184aaa1cc..57936fb23c52 100644 --- a/src/SDKs/DataFactory/DataFactory.Tests/Utils/ExampleCapture.cs +++ b/src/SDKs/DataFactory/DataFactory.Tests/Utils/ExampleCapture.cs @@ -671,7 +671,7 @@ private TriggerResource GetTriggerResource(string description) triggerPipelineReference.Parameters.Add("OutputBlobNameList", outputBlobNameArray); - resource.Properties.Pipelines.Add(triggerPipelineReference); + (resource.Properties as MultiplePipelineTrigger).Pipelines.Add(triggerPipelineReference); return resource; } diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/DataFactoryManagementClient.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/DataFactoryManagementClient.cs index 598553f51972..cafe7f996b10 100644 --- a/src/SDKs/DataFactory/Management.DataFactory/Generated/DataFactoryManagementClient.cs +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/DataFactoryManagementClient.cs @@ -380,8 +380,6 @@ private void Initialize() 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")); diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/AzureDataLakeStoreDataset.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/AzureDataLakeStoreDataset.cs index de1c6efa0d02..e1a27320a047 100644 --- a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/AzureDataLakeStoreDataset.cs +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/AzureDataLakeStoreDataset.cs @@ -49,16 +49,13 @@ public AzureDataLakeStoreDataset() /// The format of the Data Lake Store. /// The data compression method used for the /// item(s) in the Azure Data Lake Store. - /// Specify a dynamic path and filename for - /// time series data. - public AzureDataLakeStoreDataset(LinkedServiceReference linkedServiceName, object folderPath, string description = default(string), object structure = default(object), IDictionary parameters = default(IDictionary), object fileName = default(object), DatasetStorageFormat format = default(DatasetStorageFormat), DatasetCompression compression = default(DatasetCompression), IList partitionedBy = default(IList)) + public AzureDataLakeStoreDataset(LinkedServiceReference linkedServiceName, object folderPath, string description = default(string), object structure = default(object), IDictionary parameters = default(IDictionary), object fileName = default(object), DatasetStorageFormat format = default(DatasetStorageFormat), DatasetCompression compression = default(DatasetCompression)) : base(linkedServiceName, description, structure, parameters) { FolderPath = folderPath; FileName = fileName; Format = format; Compression = compression; - PartitionedBy = partitionedBy; CustomInit(); } @@ -94,13 +91,6 @@ public AzureDataLakeStoreDataset() [JsonProperty(PropertyName = "typeProperties.compression")] public DatasetCompression Compression { get; set; } - /// - /// Gets or sets specify a dynamic path and filename for time series - /// data. - /// - [JsonProperty(PropertyName = "typeProperties.partitionedBy")] - public IList PartitionedBy { get; set; } - /// /// Validate the object. /// diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/BlobTrigger.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/BlobTrigger.cs index 47f0b6956818..456c00cb2baa 100644 --- a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/BlobTrigger.cs +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/BlobTrigger.cs @@ -21,7 +21,7 @@ namespace Microsoft.Azure.Management.DataFactory.Models /// Trigger that runs everytime the selected Blob container changes. /// [Rest.Serialization.JsonTransformation] - public partial class BlobTrigger : Trigger + public partial class BlobTrigger : MultiplePipelineTrigger { /// /// Initializes a new instance of the BlobTrigger class. @@ -35,18 +35,18 @@ public BlobTrigger() /// Initializes a new instance of the BlobTrigger class. /// /// Trigger description. - /// Pipelines that need to be started. /// Indicates if trigger is running or not. /// Updated when Start/Stop APIs are called on the Trigger. Possible /// values include: 'Started', 'Stopped', 'Disabled' + /// Pipelines that need to be started. /// 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. - public BlobTrigger(string description = default(string), IList pipelines = default(IList), string runtimeState = default(string), string folderPath = default(string), int? maxConcurrency = default(int?), LinkedServiceReference linkedService = default(LinkedServiceReference)) - : base(description, pipelines, runtimeState) + public BlobTrigger(string description = default(string), string runtimeState = default(string), IList pipelines = default(IList), string folderPath = default(string), int? maxConcurrency = default(int?), LinkedServiceReference linkedService = default(LinkedServiceReference)) + : base(description, runtimeState, pipelines) { FolderPath = folderPath; MaxConcurrency = maxConcurrency; diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/DatasetDateTimePartitionValue.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/DatasetDateTimePartitionValue.cs deleted file mode 100644 index cf5be90477de..000000000000 --- a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/DatasetDateTimePartitionValue.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes 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 date/time value of a partition. - /// - [Newtonsoft.Json.JsonObject("DateTime")] - public partial class DatasetDateTimePartitionValue : DatasetPartitionValue - { - /// - /// Initializes a new instance of the DatasetDateTimePartitionValue - /// class. - /// - public DatasetDateTimePartitionValue() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DatasetDateTimePartitionValue - /// class. - /// - /// Name of variable containing date. Type: string - /// (or Expression with resultType string). - /// Format string for the Date value. Type: string - /// (or Expression with resultType string). - public DatasetDateTimePartitionValue(object date = default(object), object format = default(object)) - { - Date = date; - Format = format; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of variable containing date. Type: string (or - /// Expression with resultType string). - /// - [JsonProperty(PropertyName = "date")] - public object Date { get; set; } - - /// - /// Gets or sets format string for the Date value. Type: string (or - /// Expression with resultType string). - /// - [JsonProperty(PropertyName = "format")] - public object Format { get; set; } - - } -} diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/DatasetPartition.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/DatasetPartition.cs deleted file mode 100644 index 23cfdfcf0b8e..000000000000 --- a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/DatasetPartition.cs +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes 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 partition definition. - /// - public partial class DatasetPartition - { - /// - /// Initializes a new instance of the DatasetPartition class. - /// - public DatasetPartition() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DatasetPartition class. - /// - /// Name of the partition. Type: string (or - /// Expression with resultType string). - /// Value of the partition. - public DatasetPartition(object name = default(object), DatasetPartitionValue value = default(DatasetPartitionValue)) - { - Name = name; - Value = value; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of the partition. Type: string (or Expression - /// with resultType string). - /// - [JsonProperty(PropertyName = "name")] - public object Name { get; set; } - - /// - /// Gets or sets value of the partition. - /// - [JsonProperty(PropertyName = "value")] - public DatasetPartitionValue Value { get; set; } - - } -} diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/DatasetPartitionValue.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/DatasetPartitionValue.cs deleted file mode 100644 index 775e7b4ef659..000000000000 --- a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/DatasetPartitionValue.cs +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) 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 value of a partition. - /// - public partial class DatasetPartitionValue - { - /// - /// Initializes a new instance of the DatasetPartitionValue class. - /// - public DatasetPartitionValue() - { - CustomInit(); - } - - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - } -} diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/DatasetZipDeflateCompression.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/DatasetZipDeflateCompression.cs new file mode 100644 index 000000000000..3ebaf88048b4 --- /dev/null +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/DatasetZipDeflateCompression.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 ZipDeflate compression method used on a dataset. + /// + [Newtonsoft.Json.JsonObject("ZipDeflate")] + public partial class DatasetZipDeflateCompression : DatasetCompression + { + /// + /// Initializes a new instance of the DatasetZipDeflateCompression + /// class. + /// + public DatasetZipDeflateCompression() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatasetZipDeflateCompression + /// class. + /// + /// The ZipDeflate compression level. Possible + /// values include: 'Optimal', 'Fastest' + public DatasetZipDeflateCompression(string level = default(string)) + { + Level = level; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the ZipDeflate compression level. Possible values + /// include: 'Optimal', 'Fastest' + /// + [JsonProperty(PropertyName = "level")] + public string Level { get; set; } + + } +} diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/DynamicsLinkedService.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/DynamicsLinkedService.cs index 1bba92c9967a..f86eae3f9ee8 100644 --- a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/DynamicsLinkedService.cs +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/DynamicsLinkedService.cs @@ -27,7 +27,6 @@ public partial class DynamicsLinkedService : LinkedService /// public DynamicsLinkedService() { - Password = new AzureKeyVaultSecretReference(); CustomInit(); } @@ -44,8 +43,6 @@ public DynamicsLinkedService() /// resultType string). /// User name to access the Dynamics instance. /// Type: string (or Expression with resultType string). - /// Password to access the Dynamics - /// instance. /// The integration runtime reference. /// Linked service description. /// The host name of the on-premises Dynamics @@ -61,7 +58,13 @@ public DynamicsLinkedService() /// required for online when there are more than one Dynamics instances /// associated with the user. Type: string (or Expression with /// resultType string). - public DynamicsLinkedService(object deploymentType, object authenticationType, object username, AzureKeyVaultSecretReference password, IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), object hostName = default(object), object port = default(object), object organizationName = default(object)) + /// Password to access the Dynamics + /// instance. + /// The encrypted credential used for + /// authentication. Credentials are encrypted using the integration + /// runtime credential manager. Type: string (or Expression with + /// resultType string). + public DynamicsLinkedService(object deploymentType, object authenticationType, object username, IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), object hostName = default(object), object port = default(object), object organizationName = default(object), SecretBase password = default(SecretBase), object encryptedCredential = default(object)) : base(connectVia, description) { DeploymentType = deploymentType; @@ -71,6 +74,7 @@ public DynamicsLinkedService() AuthenticationType = authenticationType; Username = username; Password = password; + EncryptedCredential = encryptedCredential; CustomInit(); } @@ -132,7 +136,15 @@ public DynamicsLinkedService() /// Gets or sets password to access the Dynamics instance. /// [JsonProperty(PropertyName = "typeProperties.password")] - public AzureKeyVaultSecretReference Password { get; set; } + 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. @@ -155,14 +167,6 @@ public override void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "Username"); } - if (Password == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Password"); - } - if (Password != null) - { - Password.Validate(); - } } } } diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/HttpDataset.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/HttpDataset.cs index 143bd76eac98..252e0a1f2906 100644 --- a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/HttpDataset.cs +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/HttpDataset.cs @@ -54,19 +54,16 @@ public HttpDataset() /// ... /// request-header-name-n:request-header-value-n Type: string (or /// Expression with resultType string). - /// The HTTP method for the HTTP - /// request. /// The format of files. /// The data compression method used on /// files. - public HttpDataset(LinkedServiceReference linkedServiceName, string description = default(string), object structure = default(object), IDictionary parameters = default(IDictionary), object relativeUrl = default(object), object requestMethod = default(object), object requestBody = default(object), object additionalHeaders = default(object), DatasetPartition partitionedBy = default(DatasetPartition), DatasetStorageFormat format = default(DatasetStorageFormat), DatasetCompression compression = default(DatasetCompression)) + public HttpDataset(LinkedServiceReference linkedServiceName, string description = default(string), object structure = default(object), IDictionary parameters = default(IDictionary), 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, description, structure, parameters) { RelativeUrl = relativeUrl; RequestMethod = requestMethod; RequestBody = requestBody; AdditionalHeaders = additionalHeaders; - PartitionedBy = partitionedBy; Format = format; Compression = compression; CustomInit(); @@ -109,12 +106,6 @@ public HttpDataset() [JsonProperty(PropertyName = "typeProperties.additionalHeaders")] public object AdditionalHeaders { get; set; } - /// - /// Gets or sets the HTTP method for the HTTP request. - /// - [JsonProperty(PropertyName = "typeProperties.partitionedBy")] - public DatasetPartition PartitionedBy { get; set; } - /// /// Gets or sets the format of files. /// diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/MultiplePipelineTrigger.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/MultiplePipelineTrigger.cs new file mode 100644 index 000000000000..89ed9b4271b6 --- /dev/null +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/MultiplePipelineTrigger.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; + + /// + /// 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. + /// + /// 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' + /// Pipelines that need to be started. + public MultiplePipelineTrigger(string description = default(string), string runtimeState = default(string), IList pipelines = default(IList)) + : base(description, runtimeState) + { + 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/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RedirectIncompatibleRowSettings.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RedirectIncompatibleRowSettings.cs index f1382a467c58..bd46068716fa 100644 --- a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RedirectIncompatibleRowSettings.cs +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RedirectIncompatibleRowSettings.cs @@ -32,12 +32,13 @@ public RedirectIncompatibleRowSettings() /// Initializes a new instance of the RedirectIncompatibleRowSettings /// class. /// - /// Name of the Azure Storage or - /// Storage SAS linked service used for redirecting incompatible row. - /// Must be specified if redirectIncompatibleRowSettings is specified. - /// Type: string (or Expression with resultType string). - /// The path to storage for storing the redirect - /// incompatible row data Type: string (or Expression with resultType + /// 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). + /// The path for storing the redirect incompatible + /// row data. Type: string (or Expression with resultType /// string). public RedirectIncompatibleRowSettings(object linkedServiceName, object path = default(object)) { @@ -52,18 +53,17 @@ public RedirectIncompatibleRowSettings() partial void CustomInit(); /// - /// Gets or sets name of the Azure Storage or Storage SAS linked - /// service used for redirecting incompatible row. Must be specified if - /// redirectIncompatibleRowSettings is specified. Type: string (or - /// Expression with resultType string). + /// 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 to storage for storing the redirect - /// incompatible row data Type: string (or Expression with resultType - /// string). + /// 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; } diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RetryPolicy.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RetryPolicy.cs new file mode 100644 index 000000000000..1e6d96936895 --- /dev/null +++ b/src/SDKs/DataFactory/Management.DataFactory/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 retry = default(object), int? intervalInSeconds = default(int?)) + { + Retry = retry; + 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 = "retry")] + public object Retry { 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/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapCloudForCustomerSink.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapCloudForCustomerSink.cs new file mode 100644 index 000000000000..4d11e0049be5 --- /dev/null +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapCloudForCustomerSink.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; + + /// + /// 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. + /// + /// 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 write behavior for the operation. + /// Default is 'Insert'. Possible values include: 'Insert', + /// 'Update' + public SapCloudForCustomerSink(object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), string writeBehavior = default(string)) + : base(writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait) + { + WriteBehavior = writeBehavior; + 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; } + + } +} diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapCloudForCustomerSinkWriteBehavior.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/SapCloudForCustomerSinkWriteBehavior.cs new file mode 100644 index 000000000000..716a044002ac --- /dev/null +++ b/src/SDKs/DataFactory/Management.DataFactory/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/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/ScheduleTrigger.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/ScheduleTrigger.cs index c466053ef103..c21473e52263 100644 --- a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/ScheduleTrigger.cs +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/ScheduleTrigger.cs @@ -21,7 +21,7 @@ namespace Microsoft.Azure.Management.DataFactory.Models /// Trigger that creates pipeline runs periodically, on schedule. /// [Rest.Serialization.JsonTransformation] - public partial class ScheduleTrigger : Trigger + public partial class ScheduleTrigger : MultiplePipelineTrigger { /// /// Initializes a new instance of the ScheduleTrigger class. @@ -35,13 +35,13 @@ public ScheduleTrigger() /// Initializes a new instance of the ScheduleTrigger class. /// /// Trigger description. - /// Pipelines that need to be started. /// Indicates if trigger is running or not. /// Updated when Start/Stop APIs are called on the Trigger. Possible /// values include: 'Started', 'Stopped', 'Disabled' + /// Pipelines that need to be started. /// Recurrence schedule configuration. - public ScheduleTrigger(string description = default(string), IList pipelines = default(IList), string runtimeState = default(string), ScheduleTriggerRecurrence recurrence = default(ScheduleTriggerRecurrence)) - : base(description, pipelines, runtimeState) + public ScheduleTrigger(string description = default(string), string runtimeState = default(string), IList pipelines = default(IList), ScheduleTriggerRecurrence recurrence = default(ScheduleTriggerRecurrence)) + : base(description, runtimeState, pipelines) { Recurrence = recurrence; CustomInit(); diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/Trigger.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/Trigger.cs index 1fd81a501435..900512af5ab3 100644 --- a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/Trigger.cs +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/Trigger.cs @@ -11,8 +11,6 @@ namespace Microsoft.Azure.Management.DataFactory.Models { using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; using System.Linq; /// @@ -33,14 +31,12 @@ public Trigger() /// Initializes a new instance of the Trigger class. /// /// Trigger description. - /// Pipelines that need to be started. /// Indicates if trigger is running or not. /// Updated when Start/Stop APIs are called on the Trigger. Possible /// values include: 'Started', 'Stopped', 'Disabled' - public Trigger(string description = default(string), IList pipelines = default(IList), string runtimeState = default(string)) + public Trigger(string description = default(string), string runtimeState = default(string)) { Description = description; - Pipelines = pipelines; RuntimeState = runtimeState; CustomInit(); } @@ -56,12 +52,6 @@ public Trigger() [JsonProperty(PropertyName = "description")] public string Description { get; set; } - /// - /// Gets or sets pipelines that need to be started. - /// - [JsonProperty(PropertyName = "pipelines")] - public IList Pipelines { get; set; } - /// /// Gets indicates if trigger is running or not. Updated when /// Start/Stop APIs are called on the Trigger. Possible values include: diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/TumblingWindowFrequency.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/TumblingWindowFrequency.cs new file mode 100644 index 000000000000..cb9b05f7a2cc --- /dev/null +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/TumblingWindowFrequency.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 TumblingWindowFrequency. + /// + public static class TumblingWindowFrequency + { + public const string Minute = "Minute"; + public const string Hour = "Hour"; + } +} diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/TumblingWindowTrigger.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/TumblingWindowTrigger.cs new file mode 100644 index 000000000000..9e70d8f428ab --- /dev/null +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/TumblingWindowTrigger.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.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. + /// 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' + /// The frequency of the time windows. Possible + /// values include: 'Minute', 'Hour' + /// 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 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])). + /// The max number of parallel time + /// windows (ready for execution) for which a new run is + /// triggered. + /// Retry policy that will be applied for + /// failed pipeline runs. + public TumblingWindowTrigger(TriggerPipelineReference pipeline, string description = default(string), string runtimeState = default(string), string frequency = default(string), int? interval = default(int?), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), object delay = default(object), int? maxConcurrency = default(int?), RetryPolicy retryPolicy = default(RetryPolicy)) + : base(description, runtimeState) + { + Pipeline = pipeline; + Frequency = frequency; + Interval = interval; + StartTime = startTime; + EndTime = endTime; + Delay = delay; + MaxConcurrency = maxConcurrency; + RetryPolicy = retryPolicy; + 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' + /// + [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; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Pipeline == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Pipeline"); + } + 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/src/SDKs/DataFactory/Management.DataFactory/changelog.md b/src/SDKs/DataFactory/Management.DataFactory/changelog.md index 73b10fb50d8d..865a30f56f02 100644 --- a/src/SDKs/DataFactory/Management.DataFactory/changelog.md +++ b/src/SDKs/DataFactory/Management.DataFactory/changelog.md @@ -5,6 +5,7 @@ ### Feature Additions * Add SAP Cloud For Customer Source * Add SAP Cloud For Customer Dataset + * App model for Tumbling Window Trigger ## Version 0.2.1-preview From f9fcd0ad601ee50a62328c6b0ad76591d72ff584 Mon Sep 17 00:00:00 2001 From: Sharmadha Date: Fri, 17 Nov 2017 12:02:54 -0800 Subject: [PATCH 2/5] Rename retry to count in RetryPolicy --- .../Properties/AssemblyInfo.cs | 16 +++++++------- .../Generated/Models/RetryPolicy.cs | 10 ++++----- .../Properties/AssemblyInfo.cs | 22 +++++++++---------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/SDKs/DataFactory/DataFactory.Tests/Properties/AssemblyInfo.cs b/src/SDKs/DataFactory/DataFactory.Tests/Properties/AssemblyInfo.cs index 097c1181cacc..cf25a5bc3e50 100644 --- a/src/SDKs/DataFactory/DataFactory.Tests/Properties/AssemblyInfo.cs +++ b/src/SDKs/DataFactory/DataFactory.Tests/Properties/AssemblyInfo.cs @@ -6,11 +6,11 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("DataFactory.Tests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("DataFactory.Tests")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2017")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] +//[assembly: AssemblyTitle("DataFactory.Tests")] +//[assembly: AssemblyDescription("")] +//[assembly: AssemblyConfiguration("")] +//[assembly: AssemblyCompany("Microsoft")] +//[assembly: AssemblyProduct("DataFactory.Tests")] +//[assembly: AssemblyCopyright("Copyright © Microsoft 2017")] +//[assembly: AssemblyTrademark("")] +//[assembly: AssemblyCulture("")] diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RetryPolicy.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RetryPolicy.cs index 1e6d96936895..3f7162a05438 100644 --- a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RetryPolicy.cs +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/RetryPolicy.cs @@ -30,14 +30,14 @@ public RetryPolicy() /// /// Initializes a new instance of the RetryPolicy class. /// - /// Maximum ordinary retry attempts. Default is 0. + /// 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 retry = default(object), int? intervalInSeconds = default(int?)) + public RetryPolicy(object count = default(object), int? intervalInSeconds = default(int?)) { - Retry = retry; + Count = count; IntervalInSeconds = intervalInSeconds; CustomInit(); } @@ -51,8 +51,8 @@ public RetryPolicy() /// 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; } + [JsonProperty(PropertyName = "count")] + public object Count { get; set; } /// /// Gets or sets interval between retries in seconds. Default is 30. diff --git a/src/SDKs/DataFactory/Management.DataFactory/Properties/AssemblyInfo.cs b/src/SDKs/DataFactory/Management.DataFactory/Properties/AssemblyInfo.cs index cd25f48f17c4..d4d6a00f77d2 100644 --- a/src/SDKs/DataFactory/Management.DataFactory/Properties/AssemblyInfo.cs +++ b/src/SDKs/DataFactory/Management.DataFactory/Properties/AssemblyInfo.cs @@ -4,14 +4,14 @@ using System.Reflection; using System.Resources; -[assembly: AssemblyTitle("Microsoft Azure Data Factory Management Library")] -[assembly: AssemblyDescription("Provides management functionality for Microsoft Azure Data Factory Resources.")] -[assembly: AssemblyVersion("0.2.0.0")] -[assembly: AssemblyFileVersion("0.2.1.0")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("Microsoft Azure .NET SDK")] -[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: NeutralResourcesLanguage("en")] +//[assembly: AssemblyTitle("Microsoft Azure Data Factory Management Library")] +//[assembly: AssemblyDescription("Provides management functionality for Microsoft Azure Data Factory Resources.")] +//[assembly: AssemblyVersion("0.2.0.0")] +//[assembly: AssemblyFileVersion("0.2.1.0")] +//[assembly: AssemblyConfiguration("")] +//[assembly: AssemblyCompany("Microsoft")] +//[assembly: AssemblyProduct("Microsoft Azure .NET SDK")] +//[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation")] +//[assembly: AssemblyTrademark("")] +//[assembly: AssemblyCulture("")] +//[assembly: NeutralResourcesLanguage("en")] From 054ac1338adceb219dd0d732e150f054919b20f8 Mon Sep 17 00:00:00 2001 From: Sharmadha Date: Fri, 17 Nov 2017 13:55:54 -0800 Subject: [PATCH 3/5] Added TWTrigger resource to capture examples and other minor fixes --- .../JsonSamples/TriggerJsonSamples.cs | 2 +- .../Properties/AssemblyInfo.cs | 16 ++++---- .../DataFactory.Tests/Utils/ExampleCapture.cs | 40 ++++++++++++++++++- .../Properties/AssemblyInfo.cs | 22 +++++----- 4 files changed, 59 insertions(+), 21 deletions(-) diff --git a/src/SDKs/DataFactory/DataFactory.Tests/JsonSamples/TriggerJsonSamples.cs b/src/SDKs/DataFactory/DataFactory.Tests/JsonSamples/TriggerJsonSamples.cs index 056e4aaf0d06..ec5412d84cdb 100644 --- a/src/SDKs/DataFactory/DataFactory.Tests/JsonSamples/TriggerJsonSamples.cs +++ b/src/SDKs/DataFactory/DataFactory.Tests/JsonSamples/TriggerJsonSamples.cs @@ -89,7 +89,7 @@ public class TriggerJsonSamples : JsonSampleCollection interval: 24, startTime: ""2017-04-14T13:00:00Z"", endTime: ""2018-04-14T13:00:00Z"", - delay: 10, + delay: ""00:00:01"", retryPolicy: { count: 3, intervalInSeconds: 30 diff --git a/src/SDKs/DataFactory/DataFactory.Tests/Properties/AssemblyInfo.cs b/src/SDKs/DataFactory/DataFactory.Tests/Properties/AssemblyInfo.cs index cf25a5bc3e50..097c1181cacc 100644 --- a/src/SDKs/DataFactory/DataFactory.Tests/Properties/AssemblyInfo.cs +++ b/src/SDKs/DataFactory/DataFactory.Tests/Properties/AssemblyInfo.cs @@ -6,11 +6,11 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -//[assembly: AssemblyTitle("DataFactory.Tests")] -//[assembly: AssemblyDescription("")] -//[assembly: AssemblyConfiguration("")] -//[assembly: AssemblyCompany("Microsoft")] -//[assembly: AssemblyProduct("DataFactory.Tests")] -//[assembly: AssemblyCopyright("Copyright © Microsoft 2017")] -//[assembly: AssemblyTrademark("")] -//[assembly: AssemblyCulture("")] +[assembly: AssemblyTitle("DataFactory.Tests")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("DataFactory.Tests")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] diff --git a/src/SDKs/DataFactory/DataFactory.Tests/Utils/ExampleCapture.cs b/src/SDKs/DataFactory/DataFactory.Tests/Utils/ExampleCapture.cs index 57936fb23c52..836efb3200cb 100644 --- a/src/SDKs/DataFactory/DataFactory.Tests/Utils/ExampleCapture.cs +++ b/src/SDKs/DataFactory/DataFactory.Tests/Utils/ExampleCapture.cs @@ -11,6 +11,7 @@ using System.Linq; using System.Collections.Generic; using Newtonsoft.Json.Linq; +using System.Globalization; namespace DataFactory.Tests.Utils { @@ -73,7 +74,7 @@ public void CaptureAllExamples() CaptureIntegrationRuntimes_ListAuthKeys(); // 200 CaptureIntegrationRuntimes_RegenerateAuthKey(); // 200 CaptureIntegrationRuntimes_GetStatus(); // 200 - + // Start LinkedServices operations, leaving linked service available CaptureLinkedServices_Create(); // 200 CaptureLinkedServices_Update(); // 200 @@ -676,6 +677,43 @@ private TriggerResource GetTriggerResource(string description) return resource; } + private TriggerResource GetTWTriggerResource(string description) + { + TriggerResource resource = new TriggerResource() + { + Properties = new TumblingWindowTrigger() + { + Description = description, + StartTime = DateTime.UtcNow.AddMinutes(-10), + EndTime = DateTime.UtcNow.AddMinutes(5), + Frequency = RecurrenceFrequency.Minute, + Interval = 1, + Delay = "00:00:01", + MaxConcurrency = 1, + RetryPolicy = new RetryPolicy(1, 1), + Pipeline = new TriggerPipelineReference() + } + }; + + TriggerPipelineReference triggerPipelineReference = new TriggerPipelineReference() + { + PipelineReference = new PipelineReference(pipelineName), + Parameters = new Dictionary() + }; + + string[] outputBlobNameList = new string[1]; + outputBlobNameList[0] = string.Format(CultureInfo.InvariantCulture, "{0}-{1}", outputBlobName, "@{concat('output',formatDateTime(trigger().outputs.windowStartTime,'-dd-MM-yyyy-HH-mm-ss-ffff'))}"); + outputBlobNameList[0] = string.Format(CultureInfo.InvariantCulture, "{0}-{1}", outputBlobName, "@{concat('output',formatDateTime(trigger().outputs.windowEndTime,'-dd-MM-yyyy-HH-mm-ss-ffff'))}"); + + JArray outputBlobNameArray = JArray.FromObject(outputBlobNameList); + + triggerPipelineReference.Parameters.Add("OutputBlobNameList", outputBlobNameArray); + + (resource.Properties as TumblingWindowTrigger).Pipeline = triggerPipelineReference; + + return resource; + } + private void CaptureTriggers_Create() { interceptor.CurrentExampleName = "Triggers_Create"; diff --git a/src/SDKs/DataFactory/Management.DataFactory/Properties/AssemblyInfo.cs b/src/SDKs/DataFactory/Management.DataFactory/Properties/AssemblyInfo.cs index d4d6a00f77d2..cd25f48f17c4 100644 --- a/src/SDKs/DataFactory/Management.DataFactory/Properties/AssemblyInfo.cs +++ b/src/SDKs/DataFactory/Management.DataFactory/Properties/AssemblyInfo.cs @@ -4,14 +4,14 @@ using System.Reflection; using System.Resources; -//[assembly: AssemblyTitle("Microsoft Azure Data Factory Management Library")] -//[assembly: AssemblyDescription("Provides management functionality for Microsoft Azure Data Factory Resources.")] -//[assembly: AssemblyVersion("0.2.0.0")] -//[assembly: AssemblyFileVersion("0.2.1.0")] -//[assembly: AssemblyConfiguration("")] -//[assembly: AssemblyCompany("Microsoft")] -//[assembly: AssemblyProduct("Microsoft Azure .NET SDK")] -//[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation")] -//[assembly: AssemblyTrademark("")] -//[assembly: AssemblyCulture("")] -//[assembly: NeutralResourcesLanguage("en")] +[assembly: AssemblyTitle("Microsoft Azure Data Factory Management Library")] +[assembly: AssemblyDescription("Provides management functionality for Microsoft Azure Data Factory Resources.")] +[assembly: AssemblyVersion("0.2.0.0")] +[assembly: AssemblyFileVersion("0.2.1.0")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Microsoft Azure .NET SDK")] +[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: NeutralResourcesLanguage("en")] From 90ff68334b2dcc0e0922b452bb6b68ce7a1e9aac Mon Sep 17 00:00:00 2001 From: Sharmadha Date: Fri, 17 Nov 2017 14:45:37 -0800 Subject: [PATCH 4/5] Updated metadata file after running generate.cmd --- src/SDKs/_metadata/datafactory_resource-manager.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/SDKs/_metadata/datafactory_resource-manager.txt b/src/SDKs/_metadata/datafactory_resource-manager.txt index e7da835b962f..f7b64c0b9367 100644 --- a/src/SDKs/_metadata/datafactory_resource-manager.txt +++ b/src/SDKs/_metadata/datafactory_resource-manager.txt @@ -1,10 +1,11 @@ -2017-11-09 09:18:16 UTC +2017-11-17 22:44:04 UTC 1) azure-rest-api-specs repository information GitHub user: Azure Branch: current -Commit: 76718235cc24729845c495620de826bfc8bc74cb +Commit: 69fc8095833c9fb0e15cb1b635c0abe24f3942af 2) AutoRest information Requested version: latest -Bootstrapper version: C:\Users\peshen\AppData\Roaming\npm `-- autorest@2.0.4166 +Bootstrapper version: C:\Users\sharmm\AppData\Roaming\npm +-- autorest@2.0.4166 `-- oad@0.1.7 `-- autorest@1.9.1 +Latest installed version: 2.0.4168 From 919b22e1e7cd051a7058e513c2d486d3877d8dd9 Mon Sep 17 00:00:00 2001 From: Sharmadha Date: Mon, 20 Nov 2017 10:31:42 -0800 Subject: [PATCH 5/5] whitespace to retry build --- src/SDKs/DataFactory/DataFactory.Tests/Utils/ExampleCapture.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SDKs/DataFactory/DataFactory.Tests/Utils/ExampleCapture.cs b/src/SDKs/DataFactory/DataFactory.Tests/Utils/ExampleCapture.cs index 836efb3200cb..840dea0facfb 100644 --- a/src/SDKs/DataFactory/DataFactory.Tests/Utils/ExampleCapture.cs +++ b/src/SDKs/DataFactory/DataFactory.Tests/Utils/ExampleCapture.cs @@ -679,7 +679,7 @@ private TriggerResource GetTriggerResource(string description) private TriggerResource GetTWTriggerResource(string description) { - TriggerResource resource = new TriggerResource() + TriggerResource resource = new TriggerResource() { Properties = new TumblingWindowTrigger() {