forked from Azure/azure-sdk-for-net
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.NET SDK Resource Provider:'DataFactory' (Azure#5607)
REST Spec PR 'Azure/azure-rest-api-specs#5473' REST Spec PR Author 'cesher' REST Spec PR Last commit
- Loading branch information
Showing
1 changed file
with
139 additions
and
0 deletions.
There are no files selected for viewing
139 changes: 139 additions & 0 deletions
139
src/SDKs/DataFactory/Management.DataFactory/Generated/Models/ValidationActivity.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
// <auto-generated> | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for | ||
// license information. | ||
// | ||
// Code generated by Microsoft (R) AutoRest Code Generator. | ||
// Changes may cause incorrect behavior and will be lost if the code is | ||
// regenerated. | ||
// </auto-generated> | ||
|
||
namespace Microsoft.Azure.Management.DataFactory.Models | ||
{ | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Serialization; | ||
using Newtonsoft.Json; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
/// <summary> | ||
/// This activity verifies that an external resource exists. | ||
/// </summary> | ||
[Newtonsoft.Json.JsonObject("Validation")] | ||
[Rest.Serialization.JsonTransformation] | ||
public partial class ValidationActivity : ControlActivity | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the ValidationActivity class. | ||
/// </summary> | ||
public ValidationActivity() | ||
{ | ||
Dataset = new DatasetReference(); | ||
CustomInit(); | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the ValidationActivity class. | ||
/// </summary> | ||
/// <param name="name">Activity name.</param> | ||
/// <param name="dataset">Validation activity dataset | ||
/// reference.</param> | ||
/// <param name="additionalProperties">Unmatched properties from the | ||
/// message are deserialized this collection</param> | ||
/// <param name="description">Activity description.</param> | ||
/// <param name="dependsOn">Activity depends on condition.</param> | ||
/// <param name="userProperties">Activity user properties.</param> | ||
/// <param name="timeout">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])).</param> | ||
/// <param name="sleep">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).</param> | ||
/// <param name="minimumSize">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).</param> | ||
/// <param name="childItems">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).</param> | ||
public ValidationActivity(string name, DatasetReference dataset, IDictionary<string, object> additionalProperties = default(IDictionary<string, object>), string description = default(string), IList<ActivityDependency> dependsOn = default(IList<ActivityDependency>), IList<UserProperty> userProperties = default(IList<UserProperty>), 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(); | ||
} | ||
|
||
/// <summary> | ||
/// An initialization method that performs custom operations like setting defaults | ||
/// </summary> | ||
partial void CustomInit(); | ||
|
||
/// <summary> | ||
/// 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])). | ||
/// </summary> | ||
[JsonProperty(PropertyName = "typeProperties.timeout")] | ||
public object Timeout { get; set; } | ||
|
||
/// <summary> | ||
/// 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). | ||
/// </summary> | ||
[JsonProperty(PropertyName = "typeProperties.sleep")] | ||
public object Sleep { get; set; } | ||
|
||
/// <summary> | ||
/// 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). | ||
/// </summary> | ||
[JsonProperty(PropertyName = "typeProperties.minimumSize")] | ||
public object MinimumSize { get; set; } | ||
|
||
/// <summary> | ||
/// 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). | ||
/// </summary> | ||
[JsonProperty(PropertyName = "typeProperties.childItems")] | ||
public object ChildItems { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets validation activity dataset reference. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "typeProperties.dataset")] | ||
public DatasetReference Dataset { get; set; } | ||
|
||
/// <summary> | ||
/// Validate the object. | ||
/// </summary> | ||
/// <exception cref="ValidationException"> | ||
/// Thrown if validation fails | ||
/// </exception> | ||
public override void Validate() | ||
{ | ||
base.Validate(); | ||
if (Dataset == null) | ||
{ | ||
throw new ValidationException(ValidationRules.CannotBeNull, "Dataset"); | ||
} | ||
if (Dataset != null) | ||
{ | ||
Dataset.Validate(); | ||
} | ||
} | ||
} | ||
} |