Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoPr-DataFactory-cesher-REST Spec PrNumber 5473 #5607

Merged
merged 1 commit into from
Apr 1, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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();
}
}
}
}