Skip to content

Commit

Permalink
ADF: DataFactory fix headers deseralize error (#24338)
Browse files Browse the repository at this point in the history
* fix

* fix json deseralize for web activity header

* add changelog

* Add ServiceNowV2, PostgreSqlV2, GoogleBigQuery and update changelog
  • Loading branch information
ruowan authored Mar 12, 2024
1 parent e5eb88d commit 21f511e
Show file tree
Hide file tree
Showing 26 changed files with 2,065 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public AzureFunctionActivity()
/// POST/PUT method, not allowed for GET method Type: string (or Expression
/// with resultType string).
/// </param>
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))
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))

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

/// <summary>
/// Gets or sets represents the payload that will be sent to the endpoint.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public AzureFunctionActivityTypeProperties()
/// POST/PUT method, not allowed for GET method Type: string (or Expression
/// with resultType string).
/// </param>
public AzureFunctionActivityTypeProperties(string method, object functionName, System.Collections.Generic.IDictionary<string, string> headers = default(System.Collections.Generic.IDictionary<string, string>), object body = default(object))
public AzureFunctionActivityTypeProperties(string method, object functionName, System.Collections.Generic.IDictionary<string, object> headers = default(System.Collections.Generic.IDictionary<string, object>), object body = default(object))

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

/// <summary>
/// Gets or sets represents the payload that will be sent to the endpoint.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
// 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.

namespace Microsoft.Azure.Management.DataFactory.Models
{
using System.Linq;

/// <summary>
/// Nested representation of a complex expression.
/// </summary>
public partial class ExpressionV2
{
/// <summary>
/// Initializes a new instance of the ExpressionV2 class.
/// </summary>
public ExpressionV2()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the ExpressionV2 class.
/// </summary>

/// <param name="type">Type of expressions supported by the system. Type: string.
/// Possible values include: &#39;Constant&#39;, &#39;Field&#39;, &#39;Unary&#39;, &#39;Binary&#39;</param>

/// <param name="value">Value for Constant/Field Type: string.
/// </param>

/// <param name="operatorProperty">Expression operator value Type: string.
/// </param>

/// <param name="operands">List of nested expressions.
/// </param>
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>))

{
this.Type = type;
this.Value = value;
this.OperatorProperty = operatorProperty;
this.Operands = operands;
CustomInit();
}

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


/// <summary>
/// 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;
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "type")]
public string Type {get; set; }

/// <summary>
/// Gets or sets value for Constant/Field Type: string.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "value")]
public string Value {get; set; }

/// <summary>
/// Gets or sets expression operator value Type: string.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "operator")]
public string OperatorProperty {get; set; }

/// <summary>
/// Gets or sets list of nested expressions.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "operands")]
public System.Collections.Generic.IList<ExpressionV2> Operands {get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// 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.

namespace Microsoft.Azure.Management.DataFactory.Models
{

/// <summary>
/// Defines values for ExpressionV2Type.
/// </summary>


public static class ExpressionV2Type
{
public const string Constant = "Constant";
public const string Field = "Field";
public const string Unary = "Unary";
public const string Binary = "Binary";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// 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.

namespace Microsoft.Azure.Management.DataFactory.Models
{

/// <summary>
/// Defines values for GoogleBigQueryV2AuthenticationType.
/// </summary>


public static class GoogleBigQueryV2AuthenticationType
{
public const string ServiceAuthentication = "ServiceAuthentication";
public const string UserAuthentication = "UserAuthentication";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// 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.

namespace Microsoft.Azure.Management.DataFactory.Models
{
using System.Linq;

/// <summary>
/// Google BigQuery Dataset Properties
/// </summary>
public partial class GoogleBigQueryV2DatasetTypeProperties
{
/// <summary>
/// Initializes a new instance of the GoogleBigQueryV2DatasetTypeProperties class.
/// </summary>
public GoogleBigQueryV2DatasetTypeProperties()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the GoogleBigQueryV2DatasetTypeProperties class.
/// </summary>

/// <param name="table">The table name of the Google BigQuery. Type: string (or Expression with
/// resultType string).
/// </param>

/// <param name="dataset">The database name of the Google BigQuery. Type: string (or Expression with
/// resultType string).
/// </param>
public GoogleBigQueryV2DatasetTypeProperties(object table = default(object), object dataset = default(object))

{
this.Table = table;
this.Dataset = dataset;
CustomInit();
}

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


/// <summary>
/// Gets or sets the table name of the Google BigQuery. Type: string (or
/// Expression with resultType string).
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "table")]
public object Table {get; set; }

/// <summary>
/// Gets or sets the database name of the Google BigQuery. Type: string (or
/// Expression with resultType string).
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "dataset")]
public object Dataset {get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
// 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.

namespace Microsoft.Azure.Management.DataFactory.Models
{
using System.Linq;

/// <summary>
/// Google BigQuery service linked service.
/// </summary>
[Newtonsoft.Json.JsonObject("GoogleBigQueryV2")]
[Microsoft.Rest.Serialization.JsonTransformation]
public partial class GoogleBigQueryV2LinkedService : LinkedService
{
/// <summary>
/// Initializes a new instance of the GoogleBigQueryV2LinkedService class.
/// </summary>
public GoogleBigQueryV2LinkedService()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the GoogleBigQueryV2LinkedService class.
/// </summary>

/// <param name="additionalProperties">The nested object which contains the information and credential which can
/// be used to connect with related store or compute resource.
/// </param>

/// <param name="connectVia">The integration runtime reference.
/// </param>

/// <param name="description">Linked service description.
/// </param>

/// <param name="parameters">Parameters for linked service.
/// </param>

/// <param name="annotations">List of tags that can be used for describing the linked service.
/// </param>

/// <param name="projectId">The default BigQuery project id to query against. Type: string (or
/// Expression with resultType string).
/// </param>

/// <param name="authenticationType">The OAuth 2.0 authentication mechanism used for authentication.
/// Possible values include: &#39;ServiceAuthentication&#39;, &#39;UserAuthentication&#39;</param>

/// <param name="clientId">The client id of the google application used to acquire the refresh token.
/// Type: string (or Expression with resultType string).
/// </param>

/// <param name="clientSecret">The client secret of the google application used to acquire the refresh
/// token.
/// </param>

/// <param name="refreshToken">The refresh token obtained from Google for authorizing access to BigQuery
/// for UserAuthentication.
/// </param>

/// <param name="keyFileContent">The content of the .json key file that is used to authenticate the service
/// account. Type: string (or Expression with resultType string).
/// </param>

/// <param name="encryptedCredential">The encrypted credential used for authentication. Credentials are encrypted
/// using the integration runtime credential manager. Type: string.
/// </param>
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))

: base(additionalProperties, connectVia, description, parameters, annotations)
{
this.ProjectId = projectId;
this.AuthenticationType = authenticationType;
this.ClientId = clientId;
this.ClientSecret = clientSecret;
this.RefreshToken = refreshToken;
this.KeyFileContent = keyFileContent;
this.EncryptedCredential = encryptedCredential;
CustomInit();
}

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


/// <summary>
/// Gets or sets the default BigQuery project id to query against. Type: string
/// (or Expression with resultType string).
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "typeProperties.projectId")]
public object ProjectId {get; set; }

/// <summary>
/// Gets or sets the OAuth 2.0 authentication mechanism used for
/// authentication. Possible values include: &#39;ServiceAuthentication&#39;, &#39;UserAuthentication&#39;
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "typeProperties.authenticationType")]
public string AuthenticationType {get; set; }

/// <summary>
/// Gets or sets the client id of the google application used to acquire the
/// refresh token. Type: string (or Expression with resultType string).
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "typeProperties.clientId")]
public object ClientId {get; set; }

/// <summary>
/// Gets or sets the client secret of the google application used to acquire
/// the refresh token.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "typeProperties.clientSecret")]
public SecretBase ClientSecret {get; set; }

/// <summary>
/// Gets or sets the refresh token obtained from Google for authorizing access
/// to BigQuery for UserAuthentication.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "typeProperties.refreshToken")]
public SecretBase RefreshToken {get; set; }

/// <summary>
/// Gets or sets the content of the .json key file that is used to authenticate
/// the service account. Type: string (or Expression with resultType string).
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "typeProperties.keyFileContent")]
public SecretBase KeyFileContent {get; set; }

/// <summary>
/// Gets or sets the encrypted credential used for authentication. Credentials
/// are encrypted using the integration runtime credential manager. Type:
/// string.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "typeProperties.encryptedCredential")]
public string EncryptedCredential {get; set; }
/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown if validation fails
/// </exception>
public override void Validate()
{
base.Validate();
if (this.ProjectId == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "ProjectId");
}
if (this.AuthenticationType == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "AuthenticationType");
}







}
}
}
Loading

0 comments on commit 21f511e

Please sign in to comment.