Skip to content

Commit

Permalink
[AutoPR Microsoft.Azure.Management.DataFactory] Chainingtrigger (#163)
Browse files Browse the repository at this point in the history
* Generated from cce264ba7c751076c58518d67e19b9e469832c0c (#136)

Update ListLegacyPeerings.json

* Generated from 92006e420d65cb70e4b93bc5850af575da4efb78 (#162)

Mark "provisioningState" as read-only

* Generated from 5e1bb35d5c3314d8f4fead76c3d69a2522be026b

Update review comments
  • Loading branch information
openapi-sdkautomation[bot] authored and azuresdkci committed Sep 5, 2019
1 parent 9ff75d8 commit 357657d
Show file tree
Hide file tree
Showing 6 changed files with 164 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
// <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>
/// Trigger that allows the referenced pipeline to depend on other pipeline
/// runs based on runDimension Name/Value pairs. Upstream pipelines should
/// declare the same runDimension Name and their runs should have the
/// values for those runDimensions. The referenced pipeline run would be
/// triggered if the values for the runDimension match for all upstream
/// pipeline runs.
/// </summary>
[Rest.Serialization.JsonTransformation]
public partial class ChainingTrigger : Trigger
{
/// <summary>
/// Initializes a new instance of the ChainingTrigger class.
/// </summary>
public ChainingTrigger()
{
Pipeline = new TriggerPipelineReference();
CustomInit();
}

/// <summary>
/// Initializes a new instance of the ChainingTrigger class.
/// </summary>
/// <param name="pipeline">Pipeline for which runs are created when all
/// upstream pipelines complete successfully.</param>
/// <param name="dependsOn">Upstream Pipelines.</param>
/// <param name="runDimension">Run Dimension property that needs to be
/// emitted by upstream pipelines.</param>
/// <param name="additionalProperties">Unmatched properties from the
/// message are deserialized this collection</param>
/// <param name="description">Trigger description.</param>
/// <param name="runtimeState">Indicates if trigger is running or not.
/// Updated when Start/Stop APIs are called on the Trigger. Possible
/// values include: 'Started', 'Stopped', 'Disabled'</param>
/// <param name="annotations">List of tags that can be used for
/// describing the trigger.</param>
public ChainingTrigger(TriggerPipelineReference pipeline, IList<PipelineReference> dependsOn, string runDimension, IDictionary<string, object> additionalProperties = default(IDictionary<string, object>), string description = default(string), string runtimeState = default(string), IList<object> annotations = default(IList<object>))
: base(additionalProperties, description, runtimeState, annotations)
{
Pipeline = pipeline;
DependsOn = dependsOn;
RunDimension = runDimension;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets or sets pipeline for which runs are created when all upstream
/// pipelines complete successfully.
/// </summary>
[JsonProperty(PropertyName = "pipeline")]
public TriggerPipelineReference Pipeline { get; set; }

/// <summary>
/// Gets or sets upstream Pipelines.
/// </summary>
[JsonProperty(PropertyName = "typeProperties.dependsOn")]
public IList<PipelineReference> DependsOn { get; set; }

/// <summary>
/// Gets or sets run Dimension property that needs to be emitted by
/// upstream pipelines.
/// </summary>
[JsonProperty(PropertyName = "typeProperties.runDimension")]
public string RunDimension { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Pipeline == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "Pipeline");
}
if (DependsOn == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "DependsOn");
}
if (RunDimension == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "RunDimension");
}
if (Pipeline != null)
{
Pipeline.Validate();
}
if (DependsOn != null)
{
foreach (var element in DependsOn)
{
if (element != null)
{
element.Validate();
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ public PipelineResource()
/// pipeline.</param>
/// <param name="annotations">List of tags that can be used for
/// describing the Pipeline.</param>
/// <param name="runDimensions">Dimensions emitted by Pipeline.</param>
/// <param name="folder">The folder that this Pipeline is in. If not
/// specified, Pipeline will appear at the root level.</param>
public PipelineResource(string id = default(string), string name = default(string), string type = default(string), string etag = default(string), IDictionary<string, object> additionalProperties = default(IDictionary<string, object>), string description = default(string), IList<Activity> activities = default(IList<Activity>), IDictionary<string, ParameterSpecification> parameters = default(IDictionary<string, ParameterSpecification>), IDictionary<string, VariableSpecification> variables = default(IDictionary<string, VariableSpecification>), int? concurrency = default(int?), IList<object> annotations = default(IList<object>), PipelineFolder folder = default(PipelineFolder))
public PipelineResource(string id = default(string), string name = default(string), string type = default(string), string etag = default(string), IDictionary<string, object> additionalProperties = default(IDictionary<string, object>), string description = default(string), IList<Activity> activities = default(IList<Activity>), IDictionary<string, ParameterSpecification> parameters = default(IDictionary<string, ParameterSpecification>), IDictionary<string, VariableSpecification> variables = default(IDictionary<string, VariableSpecification>), int? concurrency = default(int?), IList<object> annotations = default(IList<object>), IDictionary<string, object> runDimensions = default(IDictionary<string, object>), PipelineFolder folder = default(PipelineFolder))
: base(id, name, type, etag)
{
AdditionalProperties = additionalProperties;
Expand All @@ -60,6 +61,7 @@ public PipelineResource()
Variables = variables;
Concurrency = concurrency;
Annotations = annotations;
RunDimensions = runDimensions;
Folder = folder;
CustomInit();
}
Expand Down Expand Up @@ -113,6 +115,12 @@ public PipelineResource()
[JsonProperty(PropertyName = "properties.annotations")]
public IList<object> Annotations { get; set; }

/// <summary>
/// Gets or sets dimensions emitted by Pipeline.
/// </summary>
[JsonProperty(PropertyName = "properties.runDimensions")]
public IDictionary<string, object> RunDimensions { get; set; }

/// <summary>
/// Gets or sets the folder that this Pipeline is in. If not specified,
/// Pipeline will appear at the root level.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public PipelineRun()
/// <param name="pipelineName">The pipeline name.</param>
/// <param name="parameters">The full or partial list of parameter
/// name, value pair used in the pipeline run.</param>
/// <param name="runDimensions">Run dimensions emitted by Pipeline
/// run.</param>
/// <param name="invokedBy">Entity that started the pipeline
/// run.</param>
/// <param name="lastUpdated">The last updated timestamp for the
Expand All @@ -52,14 +54,15 @@ public PipelineRun()
/// <param name="durationInMs">The duration of a pipeline run.</param>
/// <param name="status">The status of a pipeline run.</param>
/// <param name="message">The message from a pipeline run.</param>
public PipelineRun(IDictionary<string, object> additionalProperties = default(IDictionary<string, object>), string runId = default(string), string runGroupId = default(string), bool? isLatest = default(bool?), string pipelineName = default(string), IDictionary<string, string> parameters = default(IDictionary<string, string>), PipelineRunInvokedBy invokedBy = default(PipelineRunInvokedBy), System.DateTime? lastUpdated = default(System.DateTime?), System.DateTime? runStart = default(System.DateTime?), System.DateTime? runEnd = default(System.DateTime?), int? durationInMs = default(int?), string status = default(string), string message = default(string))
public PipelineRun(IDictionary<string, object> additionalProperties = default(IDictionary<string, object>), string runId = default(string), string runGroupId = default(string), bool? isLatest = default(bool?), string pipelineName = default(string), IDictionary<string, string> parameters = default(IDictionary<string, string>), IDictionary<string, string> runDimensions = default(IDictionary<string, string>), PipelineRunInvokedBy invokedBy = default(PipelineRunInvokedBy), System.DateTime? lastUpdated = default(System.DateTime?), System.DateTime? runStart = default(System.DateTime?), System.DateTime? runEnd = default(System.DateTime?), int? durationInMs = default(int?), string status = default(string), string message = default(string))
{
AdditionalProperties = additionalProperties;
RunId = runId;
RunGroupId = runGroupId;
IsLatest = isLatest;
PipelineName = pipelineName;
Parameters = parameters;
RunDimensions = runDimensions;
InvokedBy = invokedBy;
LastUpdated = lastUpdated;
RunStart = runStart;
Expand Down Expand Up @@ -115,6 +118,12 @@ public PipelineRun()
[JsonProperty(PropertyName = "parameters")]
public IDictionary<string, string> Parameters { get; private set; }

/// <summary>
/// Gets run dimensions emitted by Pipeline run.
/// </summary>
[JsonProperty(PropertyName = "runDimensions")]
public IDictionary<string, string> RunDimensions { get; private set; }

/// <summary>
/// Gets entity that started the pipeline run.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ public TriggerRun()
/// trigger run. Name, value pair depends on type of trigger.</param>
/// <param name="triggeredPipelines">List of pipeline name and run Id
/// triggered by the trigger run.</param>
public TriggerRun(IDictionary<string, object> additionalProperties = default(IDictionary<string, object>), string triggerRunId = default(string), string triggerName = default(string), string triggerType = default(string), System.DateTime? triggerRunTimestamp = default(System.DateTime?), string status = default(string), string message = default(string), IDictionary<string, string> properties = default(IDictionary<string, string>), IDictionary<string, string> triggeredPipelines = default(IDictionary<string, string>))
/// <param name="runDimension">Run dimension for which trigger was
/// fired.</param>
/// <param name="dependencyStatus">Status of the upstream
/// pipelines.</param>
public TriggerRun(IDictionary<string, object> additionalProperties = default(IDictionary<string, object>), string triggerRunId = default(string), string triggerName = default(string), string triggerType = default(string), System.DateTime? triggerRunTimestamp = default(System.DateTime?), string status = default(string), string message = default(string), IDictionary<string, string> properties = default(IDictionary<string, string>), IDictionary<string, string> triggeredPipelines = default(IDictionary<string, string>), IDictionary<string, string> runDimension = default(IDictionary<string, string>), IDictionary<string, object> dependencyStatus = default(IDictionary<string, object>))
{
AdditionalProperties = additionalProperties;
TriggerRunId = triggerRunId;
Expand All @@ -55,6 +59,8 @@ public TriggerRun()
Message = message;
Properties = properties;
TriggeredPipelines = triggeredPipelines;
RunDimension = runDimension;
DependencyStatus = dependencyStatus;
CustomInit();
}

Expand Down Expand Up @@ -120,5 +126,17 @@ public TriggerRun()
[JsonProperty(PropertyName = "triggeredPipelines")]
public IDictionary<string, string> TriggeredPipelines { get; private set; }

/// <summary>
/// Gets run dimension for which trigger was fired.
/// </summary>
[JsonProperty(PropertyName = "runDimension")]
public IDictionary<string, string> RunDimension { get; private set; }

/// <summary>
/// Gets status of the upstream pipelines.
/// </summary>
[JsonProperty(PropertyName = "dependencyStatus")]
public IDictionary<string, object> DependencyStatus { get; private set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,5 @@ public static IEnumerable<Tuple<string, string, string>> ApiInfo_DataFactoryMana
}.AsEnumerable();
}
}
// BEGIN: Code Generation Metadata Section
public static readonly String AutoRestVersion = "latest";
public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283";
public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/datafactory/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --tag=package-2018-06 --csharp-sdks-folder=C:\\azure-sdk-for-net\\sdk";
public static readonly String GithubForkName = "Azure";
public static readonly String GithubBranchName = "master";
public static readonly String GithubCommidId = "fb8f078deac2367f3dbcfbd8a542c77083c28a5b";
public static readonly String CodeGenerationErrors = "";
public static readonly String GithubRepoName = "azure-rest-api-specs";
// END: Code Generation Metadata Section
}
}

0 comments on commit 357657d

Please sign in to comment.