Skip to content

Commit 21f511e

Browse files
authored
ADF: DataFactory fix headers deseralize error (#24338)
* fix * fix json deseralize for web activity header * add changelog * Add ServiceNowV2, PostgreSqlV2, GoogleBigQuery and update changelog
1 parent e5eb88d commit 21f511e

26 files changed

+2065
-13
lines changed

src/DataFactory/DataFactory.Management.Sdk/Generated/Models/AzureFunctionActivity.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public AzureFunctionActivity()
7474
/// POST/PUT method, not allowed for GET method Type: string (or Expression
7575
/// with resultType string).
7676
/// </param>
77-
public AzureFunctionActivity(string name, string method, object functionName, System.Collections.Generic.IDictionary<string, object> additionalProperties = default(System.Collections.Generic.IDictionary<string, object>), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), System.Collections.Generic.IList<ActivityDependency> dependsOn = default(System.Collections.Generic.IList<ActivityDependency>), System.Collections.Generic.IList<UserProperty> userProperties = default(System.Collections.Generic.IList<UserProperty>), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), System.Collections.Generic.IDictionary<string, string> headers = default(System.Collections.Generic.IDictionary<string, string>), object body = default(object))
77+
public AzureFunctionActivity(string name, string method, object functionName, System.Collections.Generic.IDictionary<string, object> additionalProperties = default(System.Collections.Generic.IDictionary<string, object>), string description = default(string), string state = default(string), string onInactiveMarkAs = default(string), System.Collections.Generic.IList<ActivityDependency> dependsOn = default(System.Collections.Generic.IList<ActivityDependency>), System.Collections.Generic.IList<UserProperty> userProperties = default(System.Collections.Generic.IList<UserProperty>), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), System.Collections.Generic.IDictionary<string, object> headers = default(System.Collections.Generic.IDictionary<string, object>), object body = default(object))
7878

7979
: base(name, additionalProperties, description, state, onInactiveMarkAs, dependsOn, userProperties, linkedServiceName, policy)
8080
{
@@ -111,7 +111,7 @@ public AzureFunctionActivity()
111111
/// string (or Expression with resultType string).
112112
/// </summary>
113113
[Newtonsoft.Json.JsonProperty(PropertyName = "typeProperties.headers")]
114-
public System.Collections.Generic.IDictionary<string, string> Headers {get; set; }
114+
public System.Collections.Generic.IDictionary<string, object> Headers {get; set; }
115115

116116
/// <summary>
117117
/// Gets or sets represents the payload that will be sent to the endpoint.

src/DataFactory/DataFactory.Management.Sdk/Generated/Models/AzureFunctionActivityTypeProperties.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public AzureFunctionActivityTypeProperties()
4242
/// POST/PUT method, not allowed for GET method Type: string (or Expression
4343
/// with resultType string).
4444
/// </param>
45-
public AzureFunctionActivityTypeProperties(string method, object functionName, System.Collections.Generic.IDictionary<string, string> headers = default(System.Collections.Generic.IDictionary<string, string>), object body = default(object))
45+
public AzureFunctionActivityTypeProperties(string method, object functionName, System.Collections.Generic.IDictionary<string, object> headers = default(System.Collections.Generic.IDictionary<string, object>), object body = default(object))
4646

4747
{
4848
this.Method = method;
@@ -78,7 +78,7 @@ public AzureFunctionActivityTypeProperties()
7878
/// string (or Expression with resultType string).
7979
/// </summary>
8080
[Newtonsoft.Json.JsonProperty(PropertyName = "headers")]
81-
public System.Collections.Generic.IDictionary<string, string> Headers {get; set; }
81+
public System.Collections.Generic.IDictionary<string, object> Headers {get; set; }
8282

8383
/// <summary>
8484
/// Gets or sets represents the payload that will be sent to the endpoint.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
6+
namespace Microsoft.Azure.Management.DataFactory.Models
7+
{
8+
using System.Linq;
9+
10+
/// <summary>
11+
/// Nested representation of a complex expression.
12+
/// </summary>
13+
public partial class ExpressionV2
14+
{
15+
/// <summary>
16+
/// Initializes a new instance of the ExpressionV2 class.
17+
/// </summary>
18+
public ExpressionV2()
19+
{
20+
CustomInit();
21+
}
22+
23+
/// <summary>
24+
/// Initializes a new instance of the ExpressionV2 class.
25+
/// </summary>
26+
27+
/// <param name="type">Type of expressions supported by the system. Type: string.
28+
/// Possible values include: &#39;Constant&#39;, &#39;Field&#39;, &#39;Unary&#39;, &#39;Binary&#39;</param>
29+
30+
/// <param name="value">Value for Constant/Field Type: string.
31+
/// </param>
32+
33+
/// <param name="operatorProperty">Expression operator value Type: string.
34+
/// </param>
35+
36+
/// <param name="operands">List of nested expressions.
37+
/// </param>
38+
public ExpressionV2(string type = default(string), string value = default(string), string operatorProperty = default(string), System.Collections.Generic.IList<ExpressionV2> operands = default(System.Collections.Generic.IList<ExpressionV2>))
39+
40+
{
41+
this.Type = type;
42+
this.Value = value;
43+
this.OperatorProperty = operatorProperty;
44+
this.Operands = operands;
45+
CustomInit();
46+
}
47+
48+
/// <summary>
49+
/// An initialization method that performs custom operations like setting defaults
50+
/// </summary>
51+
partial void CustomInit();
52+
53+
54+
/// <summary>
55+
/// Gets or sets type of expressions supported by the system. Type: string. Possible values include: &#39;Constant&#39;, &#39;Field&#39;, &#39;Unary&#39;, &#39;Binary&#39;
56+
/// </summary>
57+
[Newtonsoft.Json.JsonProperty(PropertyName = "type")]
58+
public string Type {get; set; }
59+
60+
/// <summary>
61+
/// Gets or sets value for Constant/Field Type: string.
62+
/// </summary>
63+
[Newtonsoft.Json.JsonProperty(PropertyName = "value")]
64+
public string Value {get; set; }
65+
66+
/// <summary>
67+
/// Gets or sets expression operator value Type: string.
68+
/// </summary>
69+
[Newtonsoft.Json.JsonProperty(PropertyName = "operator")]
70+
public string OperatorProperty {get; set; }
71+
72+
/// <summary>
73+
/// Gets or sets list of nested expressions.
74+
/// </summary>
75+
[Newtonsoft.Json.JsonProperty(PropertyName = "operands")]
76+
public System.Collections.Generic.IList<ExpressionV2> Operands {get; set; }
77+
}
78+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
6+
namespace Microsoft.Azure.Management.DataFactory.Models
7+
{
8+
9+
/// <summary>
10+
/// Defines values for ExpressionV2Type.
11+
/// </summary>
12+
13+
14+
public static class ExpressionV2Type
15+
{
16+
public const string Constant = "Constant";
17+
public const string Field = "Field";
18+
public const string Unary = "Unary";
19+
public const string Binary = "Binary";
20+
}
21+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
6+
namespace Microsoft.Azure.Management.DataFactory.Models
7+
{
8+
9+
/// <summary>
10+
/// Defines values for GoogleBigQueryV2AuthenticationType.
11+
/// </summary>
12+
13+
14+
public static class GoogleBigQueryV2AuthenticationType
15+
{
16+
public const string ServiceAuthentication = "ServiceAuthentication";
17+
public const string UserAuthentication = "UserAuthentication";
18+
}
19+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
6+
namespace Microsoft.Azure.Management.DataFactory.Models
7+
{
8+
using System.Linq;
9+
10+
/// <summary>
11+
/// Google BigQuery Dataset Properties
12+
/// </summary>
13+
public partial class GoogleBigQueryV2DatasetTypeProperties
14+
{
15+
/// <summary>
16+
/// Initializes a new instance of the GoogleBigQueryV2DatasetTypeProperties class.
17+
/// </summary>
18+
public GoogleBigQueryV2DatasetTypeProperties()
19+
{
20+
CustomInit();
21+
}
22+
23+
/// <summary>
24+
/// Initializes a new instance of the GoogleBigQueryV2DatasetTypeProperties class.
25+
/// </summary>
26+
27+
/// <param name="table">The table name of the Google BigQuery. Type: string (or Expression with
28+
/// resultType string).
29+
/// </param>
30+
31+
/// <param name="dataset">The database name of the Google BigQuery. Type: string (or Expression with
32+
/// resultType string).
33+
/// </param>
34+
public GoogleBigQueryV2DatasetTypeProperties(object table = default(object), object dataset = default(object))
35+
36+
{
37+
this.Table = table;
38+
this.Dataset = dataset;
39+
CustomInit();
40+
}
41+
42+
/// <summary>
43+
/// An initialization method that performs custom operations like setting defaults
44+
/// </summary>
45+
partial void CustomInit();
46+
47+
48+
/// <summary>
49+
/// Gets or sets the table name of the Google BigQuery. Type: string (or
50+
/// Expression with resultType string).
51+
/// </summary>
52+
[Newtonsoft.Json.JsonProperty(PropertyName = "table")]
53+
public object Table {get; set; }
54+
55+
/// <summary>
56+
/// Gets or sets the database name of the Google BigQuery. Type: string (or
57+
/// Expression with resultType string).
58+
/// </summary>
59+
[Newtonsoft.Json.JsonProperty(PropertyName = "dataset")]
60+
public object Dataset {get; set; }
61+
}
62+
}
Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
6+
namespace Microsoft.Azure.Management.DataFactory.Models
7+
{
8+
using System.Linq;
9+
10+
/// <summary>
11+
/// Google BigQuery service linked service.
12+
/// </summary>
13+
[Newtonsoft.Json.JsonObject("GoogleBigQueryV2")]
14+
[Microsoft.Rest.Serialization.JsonTransformation]
15+
public partial class GoogleBigQueryV2LinkedService : LinkedService
16+
{
17+
/// <summary>
18+
/// Initializes a new instance of the GoogleBigQueryV2LinkedService class.
19+
/// </summary>
20+
public GoogleBigQueryV2LinkedService()
21+
{
22+
CustomInit();
23+
}
24+
25+
/// <summary>
26+
/// Initializes a new instance of the GoogleBigQueryV2LinkedService class.
27+
/// </summary>
28+
29+
/// <param name="additionalProperties">The nested object which contains the information and credential which can
30+
/// be used to connect with related store or compute resource.
31+
/// </param>
32+
33+
/// <param name="connectVia">The integration runtime reference.
34+
/// </param>
35+
36+
/// <param name="description">Linked service description.
37+
/// </param>
38+
39+
/// <param name="parameters">Parameters for linked service.
40+
/// </param>
41+
42+
/// <param name="annotations">List of tags that can be used for describing the linked service.
43+
/// </param>
44+
45+
/// <param name="projectId">The default BigQuery project id to query against. Type: string (or
46+
/// Expression with resultType string).
47+
/// </param>
48+
49+
/// <param name="authenticationType">The OAuth 2.0 authentication mechanism used for authentication.
50+
/// Possible values include: &#39;ServiceAuthentication&#39;, &#39;UserAuthentication&#39;</param>
51+
52+
/// <param name="clientId">The client id of the google application used to acquire the refresh token.
53+
/// Type: string (or Expression with resultType string).
54+
/// </param>
55+
56+
/// <param name="clientSecret">The client secret of the google application used to acquire the refresh
57+
/// token.
58+
/// </param>
59+
60+
/// <param name="refreshToken">The refresh token obtained from Google for authorizing access to BigQuery
61+
/// for UserAuthentication.
62+
/// </param>
63+
64+
/// <param name="keyFileContent">The content of the .json key file that is used to authenticate the service
65+
/// account. Type: string (or Expression with resultType string).
66+
/// </param>
67+
68+
/// <param name="encryptedCredential">The encrypted credential used for authentication. Credentials are encrypted
69+
/// using the integration runtime credential manager. Type: string.
70+
/// </param>
71+
public GoogleBigQueryV2LinkedService(object projectId, string authenticationType, System.Collections.Generic.IDictionary<string, object> additionalProperties = default(System.Collections.Generic.IDictionary<string, object>), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), System.Collections.Generic.IDictionary<string, ParameterSpecification> parameters = default(System.Collections.Generic.IDictionary<string, ParameterSpecification>), System.Collections.Generic.IList<object> annotations = default(System.Collections.Generic.IList<object>), object clientId = default(object), SecretBase clientSecret = default(SecretBase), SecretBase refreshToken = default(SecretBase), SecretBase keyFileContent = default(SecretBase), string encryptedCredential = default(string))
72+
73+
: base(additionalProperties, connectVia, description, parameters, annotations)
74+
{
75+
this.ProjectId = projectId;
76+
this.AuthenticationType = authenticationType;
77+
this.ClientId = clientId;
78+
this.ClientSecret = clientSecret;
79+
this.RefreshToken = refreshToken;
80+
this.KeyFileContent = keyFileContent;
81+
this.EncryptedCredential = encryptedCredential;
82+
CustomInit();
83+
}
84+
85+
/// <summary>
86+
/// An initialization method that performs custom operations like setting defaults
87+
/// </summary>
88+
partial void CustomInit();
89+
90+
91+
/// <summary>
92+
/// Gets or sets the default BigQuery project id to query against. Type: string
93+
/// (or Expression with resultType string).
94+
/// </summary>
95+
[Newtonsoft.Json.JsonProperty(PropertyName = "typeProperties.projectId")]
96+
public object ProjectId {get; set; }
97+
98+
/// <summary>
99+
/// Gets or sets the OAuth 2.0 authentication mechanism used for
100+
/// authentication. Possible values include: &#39;ServiceAuthentication&#39;, &#39;UserAuthentication&#39;
101+
/// </summary>
102+
[Newtonsoft.Json.JsonProperty(PropertyName = "typeProperties.authenticationType")]
103+
public string AuthenticationType {get; set; }
104+
105+
/// <summary>
106+
/// Gets or sets the client id of the google application used to acquire the
107+
/// refresh token. Type: string (or Expression with resultType string).
108+
/// </summary>
109+
[Newtonsoft.Json.JsonProperty(PropertyName = "typeProperties.clientId")]
110+
public object ClientId {get; set; }
111+
112+
/// <summary>
113+
/// Gets or sets the client secret of the google application used to acquire
114+
/// the refresh token.
115+
/// </summary>
116+
[Newtonsoft.Json.JsonProperty(PropertyName = "typeProperties.clientSecret")]
117+
public SecretBase ClientSecret {get; set; }
118+
119+
/// <summary>
120+
/// Gets or sets the refresh token obtained from Google for authorizing access
121+
/// to BigQuery for UserAuthentication.
122+
/// </summary>
123+
[Newtonsoft.Json.JsonProperty(PropertyName = "typeProperties.refreshToken")]
124+
public SecretBase RefreshToken {get; set; }
125+
126+
/// <summary>
127+
/// Gets or sets the content of the .json key file that is used to authenticate
128+
/// the service account. Type: string (or Expression with resultType string).
129+
/// </summary>
130+
[Newtonsoft.Json.JsonProperty(PropertyName = "typeProperties.keyFileContent")]
131+
public SecretBase KeyFileContent {get; set; }
132+
133+
/// <summary>
134+
/// Gets or sets the encrypted credential used for authentication. Credentials
135+
/// are encrypted using the integration runtime credential manager. Type:
136+
/// string.
137+
/// </summary>
138+
[Newtonsoft.Json.JsonProperty(PropertyName = "typeProperties.encryptedCredential")]
139+
public string EncryptedCredential {get; set; }
140+
/// <summary>
141+
/// Validate the object.
142+
/// </summary>
143+
/// <exception cref="Microsoft.Rest.ValidationException">
144+
/// Thrown if validation fails
145+
/// </exception>
146+
public override void Validate()
147+
{
148+
base.Validate();
149+
if (this.ProjectId == null)
150+
{
151+
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ProjectId");
152+
}
153+
if (this.AuthenticationType == null)
154+
{
155+
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "AuthenticationType");
156+
}
157+
158+
159+
160+
161+
162+
163+
164+
}
165+
}
166+
}

0 commit comments

Comments
 (0)