/
AzureFunctionActivity.cs
72 lines (64 loc) · 5.25 KB
/
AzureFunctionActivity.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
using Azure.Core.Expressions.DataFactory;
using Azure.ResourceManager.DataFactory;
namespace Azure.ResourceManager.DataFactory.Models
{
/// <summary> Azure Function activity. </summary>
public partial class AzureFunctionActivity : ExecutionActivity
{
/// <summary> Initializes a new instance of <see cref="AzureFunctionActivity"/>. </summary>
/// <param name="name"> Activity name. </param>
/// <param name="method"> Rest API method for target endpoint. </param>
/// <param name="functionName"> Name of the Function that the Azure Function Activity will call. Type: string (or Expression with resultType string). </param>
/// <exception cref="ArgumentNullException"> <paramref name="name"/> or <paramref name="functionName"/> is null. </exception>
public AzureFunctionActivity(string name, AzureFunctionActivityMethod method, DataFactoryElement<string> functionName) : base(name)
{
Argument.AssertNotNull(name, nameof(name));
Argument.AssertNotNull(functionName, nameof(functionName));
Method = method;
FunctionName = functionName;
Headers = new ChangeTrackingDictionary<string, DataFactoryElement<string>>();
ActivityType = "AzureFunctionActivity";
}
/// <summary> Initializes a new instance of <see cref="AzureFunctionActivity"/>. </summary>
/// <param name="name"> Activity name. </param>
/// <param name="activityType"> Type of activity. </param>
/// <param name="description"> Activity description. </param>
/// <param name="state"> Activity state. This is an optional property and if not provided, the state will be Active by default. </param>
/// <param name="onInactiveMarkAs"> Status result of the activity when the state is set to Inactive. This is an optional property and if not provided when the activity is inactive, the status will be Succeeded by default. </param>
/// <param name="dependsOn"> Activity depends on condition. </param>
/// <param name="userProperties"> Activity user properties. </param>
/// <param name="additionalProperties"> Additional Properties. </param>
/// <param name="linkedServiceName"> Linked service reference. </param>
/// <param name="policy"> Activity policy. </param>
/// <param name="method"> Rest API method for target endpoint. </param>
/// <param name="functionName"> Name of the Function that the Azure Function Activity will call. Type: string (or Expression with resultType string). </param>
/// <param name="headers"> Represents the headers that will be sent to the request. For example, to set the language and type on a request: "headers" : { "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: string (or Expression with resultType string). </param>
/// <param name="body"> Represents the payload that will be sent to the endpoint. Required for POST/PUT method, not allowed for GET method Type: string (or Expression with resultType string). </param>
internal AzureFunctionActivity(string name, string activityType, string description, PipelineActivityState? state, ActivityOnInactiveMarkAs? onInactiveMarkAs, IList<PipelineActivityDependency> dependsOn, IList<PipelineActivityUserProperty> userProperties, IDictionary<string, BinaryData> additionalProperties, DataFactoryLinkedServiceReference linkedServiceName, PipelineActivityPolicy policy, AzureFunctionActivityMethod method, DataFactoryElement<string> functionName, IDictionary<string, DataFactoryElement<string>> headers, DataFactoryElement<string> body) : base(name, activityType, description, state, onInactiveMarkAs, dependsOn, userProperties, additionalProperties, linkedServiceName, policy)
{
Method = method;
FunctionName = functionName;
Headers = headers;
Body = body;
ActivityType = activityType ?? "AzureFunctionActivity";
}
/// <summary> Initializes a new instance of <see cref="AzureFunctionActivity"/> for deserialization. </summary>
internal AzureFunctionActivity()
{
}
/// <summary> Rest API method for target endpoint. </summary>
public AzureFunctionActivityMethod Method { get; set; }
/// <summary> Name of the Function that the Azure Function Activity will call. Type: string (or Expression with resultType string). </summary>
public DataFactoryElement<string> FunctionName { get; set; }
/// <summary> Represents the headers that will be sent to the request. For example, to set the language and type on a request: "headers" : { "Accept-Language": "en-us", "Content-Type": "application/json" }. Type: string (or Expression with resultType string). </summary>
public IDictionary<string, DataFactoryElement<string>> Headers { get; }
/// <summary> Represents the payload that will be sent to the endpoint. Required for POST/PUT method, not allowed for GET method Type: string (or Expression with resultType string). </summary>
public DataFactoryElement<string> Body { get; set; }
}
}