diff --git a/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/ValidationActivity.cs b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/ValidationActivity.cs new file mode 100644 index 000000000000..e3d4412c85ca --- /dev/null +++ b/src/SDKs/DataFactory/Management.DataFactory/Generated/Models/ValidationActivity.cs @@ -0,0 +1,139 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// This activity verifies that an external resource exists. + /// + [Newtonsoft.Json.JsonObject("Validation")] + [Rest.Serialization.JsonTransformation] + public partial class ValidationActivity : ControlActivity + { + /// + /// Initializes a new instance of the ValidationActivity class. + /// + public ValidationActivity() + { + Dataset = new DatasetReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the ValidationActivity class. + /// + /// Activity name. + /// Validation activity dataset + /// reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// Specifies the timeout for the activity to + /// run. If there is no value specified, it takes the value of + /// TimeSpan.FromDays(7) which is 1 week as default. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// A delay in seconds between validation attempts. + /// If no value is specified, 10 seconds will be used as the default. + /// Type: integer (or Expression with resultType integer). + /// Can be used if dataset points to a file. + /// The file must be greater than or equal in size to the value + /// specified. Type: integer (or Expression with resultType + /// integer). + /// Can be used if dataset points to a folder. + /// If set to true, the folder must have at least one file. If set to + /// false, the folder must be empty. Type: boolean (or Expression with + /// resultType boolean). + public ValidationActivity(string name, DatasetReference dataset, IDictionary additionalProperties = default(IDictionary), string description = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), object timeout = default(object), object sleep = default(object), object minimumSize = default(object), object childItems = default(object)) + : base(name, additionalProperties, description, dependsOn, userProperties) + { + Timeout = timeout; + Sleep = sleep; + MinimumSize = minimumSize; + ChildItems = childItems; + Dataset = dataset; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies the timeout for the activity to run. If + /// there is no value specified, it takes the value of + /// TimeSpan.FromDays(7) which is 1 week as default. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// + [JsonProperty(PropertyName = "typeProperties.timeout")] + public object Timeout { get; set; } + + /// + /// Gets or sets a delay in seconds between validation attempts. If no + /// value is specified, 10 seconds will be used as the default. Type: + /// integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.sleep")] + public object Sleep { get; set; } + + /// + /// Gets or sets can be used if dataset points to a file. The file must + /// be greater than or equal in size to the value specified. Type: + /// integer (or Expression with resultType integer). + /// + [JsonProperty(PropertyName = "typeProperties.minimumSize")] + public object MinimumSize { get; set; } + + /// + /// Gets or sets can be used if dataset points to a folder. If set to + /// true, the folder must have at least one file. If set to false, the + /// folder must be empty. Type: boolean (or Expression with resultType + /// boolean). + /// + [JsonProperty(PropertyName = "typeProperties.childItems")] + public object ChildItems { get; set; } + + /// + /// Gets or sets validation activity dataset reference. + /// + [JsonProperty(PropertyName = "typeProperties.dataset")] + public DatasetReference Dataset { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Dataset == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Dataset"); + } + if (Dataset != null) + { + Dataset.Validate(); + } + } + } +}