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.
[AutoPR Microsoft.Azure.Management.DataFactory] Chainingtrigger (#163)
* 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
1 parent
9ff75d8
commit 357657d
Showing
6 changed files
with
164 additions
and
14 deletions.
There are no files selected for viewing
126 changes: 126 additions & 0 deletions
126
...atafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ChainingTrigger.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,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(); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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
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
File renamed without changes.
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
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