From e38aab17ecceeca1f8f4135fc69fbc4c78031f96 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 9 Oct 2024 08:32:07 +0000 Subject: [PATCH] CodeGen from PR 30559 in Azure/azure-rest-api-specs Merge 2dbe3d986b63105f3e60fe1ae5f6e8975d27722c into 18cd47e85bd88ebd94f7710feb56f2373c709c8a --- ...sourceManager.DataFactory.netstandard2.0.cs | 5 ++++- .../PostgreSqlV2LinkedService.Serialization.cs | 9 +++++++++ .../Models/PostgreSqlV2LinkedService.cs | 13 ++++++++++--- .../Models/SalesforceV2Source.Serialization.cs | 18 +++++++++++++++++- .../src/Generated/Models/SalesforceV2Source.cs | 6 +++++- .../Models/ServiceNowV2Source.Serialization.cs | 18 +++++++++++++++++- .../src/Generated/Models/ServiceNowV2Source.cs | 6 +++++- .../src/autorest.md | 2 +- 8 files changed, 68 insertions(+), 9 deletions(-) diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/api/Azure.ResourceManager.DataFactory.netstandard2.0.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/api/Azure.ResourceManager.DataFactory.netstandard2.0.cs index 9beaf9426c3a..39d8a90f5c66 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/api/Azure.ResourceManager.DataFactory.netstandard2.0.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/api/Azure.ResourceManager.DataFactory.netstandard2.0.cs @@ -9259,7 +9259,8 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write } public partial class PostgreSqlV2LinkedService : Azure.ResourceManager.DataFactory.Models.DataFactoryLinkedServiceProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public PostgreSqlV2LinkedService(Azure.Core.Expressions.DataFactory.DataFactoryElement server, Azure.Core.Expressions.DataFactory.DataFactoryElement username, Azure.Core.Expressions.DataFactory.DataFactoryElement database, Azure.Core.Expressions.DataFactory.DataFactoryElement sslMode) { } + public PostgreSqlV2LinkedService(Azure.Core.Expressions.DataFactory.DataFactoryElement server, Azure.Core.Expressions.DataFactory.DataFactoryElement username, Azure.Core.Expressions.DataFactory.DataFactoryElement database, Azure.Core.Expressions.DataFactory.DataFactoryElement authenticationType, Azure.Core.Expressions.DataFactory.DataFactoryElement sslMode) { } + public Azure.Core.Expressions.DataFactory.DataFactoryElement AuthenticationType { get { throw null; } set { } } public Azure.Core.Expressions.DataFactory.DataFactoryElement CommandTimeout { get { throw null; } set { } } public Azure.Core.Expressions.DataFactory.DataFactoryElement ConnectionTimeout { get { throw null; } set { } } public Azure.Core.Expressions.DataFactory.DataFactoryElement Database { get { throw null; } set { } } @@ -10112,6 +10113,7 @@ public partial class SalesforceV2Source : Azure.ResourceManager.DataFactory.Mode { public SalesforceV2Source() { } public Azure.Core.Expressions.DataFactory.DataFactoryElement IncludeDeletedObjects { get { throw null; } set { } } + public Azure.Core.Expressions.DataFactory.DataFactoryElement PageSize { get { throw null; } set { } } public Azure.Core.Expressions.DataFactory.DataFactoryElement Query { get { throw null; } set { } } public Azure.Core.Expressions.DataFactory.DataFactoryElement SoqlQuery { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -10845,6 +10847,7 @@ public partial class ServiceNowV2Source : Azure.ResourceManager.DataFactory.Mode { public ServiceNowV2Source() { } public Azure.ResourceManager.DataFactory.Models.DataFactoryExpressionV2 Expression { get { throw null; } set { } } + public Azure.Core.Expressions.DataFactory.DataFactoryElement PageSize { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DataFactory.Models.ServiceNowV2Source System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/PostgreSqlV2LinkedService.Serialization.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/PostgreSqlV2LinkedService.Serialization.cs index 963813ff62c1..ccaefe8e037d 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/PostgreSqlV2LinkedService.Serialization.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/PostgreSqlV2LinkedService.Serialization.cs @@ -49,6 +49,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri JsonSerializer.Serialize(writer, Username); writer.WritePropertyName("database"u8); JsonSerializer.Serialize(writer, Database); + writer.WritePropertyName("authenticationType"u8); + JsonSerializer.Serialize(writer, AuthenticationType); writer.WritePropertyName("sslMode"u8); JsonSerializer.Serialize(writer, SslMode); if (Optional.IsDefined(Schema)) @@ -166,6 +168,7 @@ internal static PostgreSqlV2LinkedService DeserializePostgreSqlV2LinkedService(J DataFactoryElement port = default; DataFactoryElement username = default; DataFactoryElement database = default; + DataFactoryElement authenticationType = default; DataFactoryElement sslMode = default; DataFactoryElement schema = default; DataFactoryElement pooling = default; @@ -277,6 +280,11 @@ internal static PostgreSqlV2LinkedService DeserializePostgreSqlV2LinkedService(J database = JsonSerializer.Deserialize>(property0.Value.GetRawText()); continue; } + if (property0.NameEquals("authenticationType"u8)) + { + authenticationType = JsonSerializer.Deserialize>(property0.Value.GetRawText()); + continue; + } if (property0.NameEquals("sslMode"u8)) { sslMode = JsonSerializer.Deserialize>(property0.Value.GetRawText()); @@ -422,6 +430,7 @@ internal static PostgreSqlV2LinkedService DeserializePostgreSqlV2LinkedService(J port, username, database, + authenticationType, sslMode, schema, pooling, diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/PostgreSqlV2LinkedService.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/PostgreSqlV2LinkedService.cs index 9cc6851dfd52..490ee849179d 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/PostgreSqlV2LinkedService.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/PostgreSqlV2LinkedService.cs @@ -18,18 +18,21 @@ public partial class PostgreSqlV2LinkedService : DataFactoryLinkedServicePropert /// Server name for connection. Type: string. /// Username for authentication. Type: string. /// Database name for connection. Type: string. + /// The authentication type to use. Type: string. /// SSL mode for connection. Type: integer. 0: disable, 1:allow, 2: prefer, 3: require, 4: verify-ca, 5: verify-full. Type: integer. - /// , , or is null. - public PostgreSqlV2LinkedService(DataFactoryElement server, DataFactoryElement username, DataFactoryElement database, DataFactoryElement sslMode) + /// , , , or is null. + public PostgreSqlV2LinkedService(DataFactoryElement server, DataFactoryElement username, DataFactoryElement database, DataFactoryElement authenticationType, DataFactoryElement sslMode) { Argument.AssertNotNull(server, nameof(server)); Argument.AssertNotNull(username, nameof(username)); Argument.AssertNotNull(database, nameof(database)); + Argument.AssertNotNull(authenticationType, nameof(authenticationType)); Argument.AssertNotNull(sslMode, nameof(sslMode)); Server = server; Username = username; Database = database; + AuthenticationType = authenticationType; SslMode = sslMode; LinkedServiceType = "PostgreSqlV2"; } @@ -46,6 +49,7 @@ public PostgreSqlV2LinkedService(DataFactoryElement server, DataFactoryE /// The port for the connection. Type: integer. /// Username for authentication. Type: string. /// Database name for connection. Type: string. + /// The authentication type to use. Type: string. /// SSL mode for connection. Type: integer. 0: disable, 1:allow, 2: prefer, 3: require, 4: verify-ca, 5: verify-full. Type: integer. /// Sets the schema search path. Type: string. /// Whether connection pooling should be used. Type: boolean. @@ -61,12 +65,13 @@ public PostgreSqlV2LinkedService(DataFactoryElement server, DataFactoryE /// Gets or sets the .NET encoding that will be used to encode/decode PostgreSQL string data. Type: string. /// The Azure key vault secret reference of password in connection string. Type: string. /// The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. - internal PostgreSqlV2LinkedService(string linkedServiceType, string linkedServiceVersion, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, DataFactoryElement server, DataFactoryElement port, DataFactoryElement username, DataFactoryElement database, DataFactoryElement sslMode, DataFactoryElement schema, DataFactoryElement pooling, DataFactoryElement connectionTimeout, DataFactoryElement commandTimeout, DataFactoryElement trustServerCertificate, DataFactoryElement sslCertificate, DataFactoryElement sslKey, DataFactoryElement sslPassword, DataFactoryElement readBufferSize, DataFactoryElement logParameters, DataFactoryElement timezone, DataFactoryElement encoding, DataFactoryKeyVaultSecret password, string encryptedCredential) : base(linkedServiceType, linkedServiceVersion, connectVia, description, parameters, annotations, additionalProperties) + internal PostgreSqlV2LinkedService(string linkedServiceType, string linkedServiceVersion, IntegrationRuntimeReference connectVia, string description, IDictionary parameters, IList annotations, IDictionary additionalProperties, DataFactoryElement server, DataFactoryElement port, DataFactoryElement username, DataFactoryElement database, DataFactoryElement authenticationType, DataFactoryElement sslMode, DataFactoryElement schema, DataFactoryElement pooling, DataFactoryElement connectionTimeout, DataFactoryElement commandTimeout, DataFactoryElement trustServerCertificate, DataFactoryElement sslCertificate, DataFactoryElement sslKey, DataFactoryElement sslPassword, DataFactoryElement readBufferSize, DataFactoryElement logParameters, DataFactoryElement timezone, DataFactoryElement encoding, DataFactoryKeyVaultSecret password, string encryptedCredential) : base(linkedServiceType, linkedServiceVersion, connectVia, description, parameters, annotations, additionalProperties) { Server = server; Port = port; Username = username; Database = database; + AuthenticationType = authenticationType; SslMode = sslMode; Schema = schema; Pooling = pooling; @@ -98,6 +103,8 @@ internal PostgreSqlV2LinkedService() public DataFactoryElement Username { get; set; } /// Database name for connection. Type: string. public DataFactoryElement Database { get; set; } + /// The authentication type to use. Type: string. + public DataFactoryElement AuthenticationType { get; set; } /// SSL mode for connection. Type: integer. 0: disable, 1:allow, 2: prefer, 3: require, 4: verify-ca, 5: verify-full. Type: integer. public DataFactoryElement SslMode { get; set; } /// Sets the schema search path. Type: string. diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SalesforceV2Source.Serialization.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SalesforceV2Source.Serialization.cs index b35d1969531f..e1d3746ab423 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SalesforceV2Source.Serialization.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SalesforceV2Source.Serialization.cs @@ -51,6 +51,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("includeDeletedObjects"u8); JsonSerializer.Serialize(writer, IncludeDeletedObjects); } + if (Optional.IsDefined(PageSize)) + { + writer.WritePropertyName("pageSize"u8); + JsonSerializer.Serialize(writer, PageSize); + } foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -88,6 +93,7 @@ internal static SalesforceV2Source DeserializeSalesforceV2Source(JsonElement ele DataFactoryElement soqlQuery = default; DataFactoryElement query = default; DataFactoryElement includeDeletedObjects = default; + DataFactoryElement pageSize = default; DataFactoryElement queryTimeout = default; BinaryData additionalColumns = default; string type = default; @@ -126,6 +132,15 @@ internal static SalesforceV2Source DeserializeSalesforceV2Source(JsonElement ele includeDeletedObjects = JsonSerializer.Deserialize>(property.Value.GetRawText()); continue; } + if (property.NameEquals("pageSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pageSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); + continue; + } if (property.NameEquals("queryTimeout"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -199,7 +214,8 @@ internal static SalesforceV2Source DeserializeSalesforceV2Source(JsonElement ele additionalColumns, soqlQuery, query, - includeDeletedObjects); + includeDeletedObjects, + pageSize); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SalesforceV2Source.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SalesforceV2Source.cs index 5b09cb5c1337..cc837f8609f5 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SalesforceV2Source.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SalesforceV2Source.cs @@ -32,11 +32,13 @@ public SalesforceV2Source() /// Deprecating, please use 'query' property instead. Type: string (or Expression with resultType string). /// You can only use Salesforce Object Query Language (SOQL) query with limitations. For SOQL limitations, see this article: https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/queries.htm#SOQL%20Considerations. If query is not specified, all the data of the Salesforce object specified in ObjectApiName/reportId in dataset will be retrieved. Type: string (or Expression with resultType string). /// This property control whether query result contains Deleted objects. Default is false. Type: boolean (or Expression with resultType boolean). - internal SalesforceV2Source(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement soqlQuery, DataFactoryElement query, DataFactoryElement includeDeletedObjects) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) + /// Page size for each http request, too large pageSize will caused timeout, default 300,000. Type: integer (or Expression with resultType integer). + internal SalesforceV2Source(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryElement soqlQuery, DataFactoryElement query, DataFactoryElement includeDeletedObjects, DataFactoryElement pageSize) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) { SoqlQuery = soqlQuery; Query = query; IncludeDeletedObjects = includeDeletedObjects; + PageSize = pageSize; CopySourceType = copySourceType ?? "SalesforceV2Source"; } @@ -46,5 +48,7 @@ internal SalesforceV2Source(string copySourceType, DataFactoryElement sourc public DataFactoryElement Query { get; set; } /// This property control whether query result contains Deleted objects. Default is false. Type: boolean (or Expression with resultType boolean). public DataFactoryElement IncludeDeletedObjects { get; set; } + /// Page size for each http request, too large pageSize will caused timeout, default 300,000. Type: integer (or Expression with resultType integer). + public DataFactoryElement PageSize { get; set; } } } diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/ServiceNowV2Source.Serialization.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/ServiceNowV2Source.Serialization.cs index 2d40098816e7..bb09bfbc9067 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/ServiceNowV2Source.Serialization.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/ServiceNowV2Source.Serialization.cs @@ -41,6 +41,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("expression"u8); writer.WriteObjectValue(Expression, options); } + if (Optional.IsDefined(PageSize)) + { + writer.WritePropertyName("pageSize"u8); + JsonSerializer.Serialize(writer, PageSize); + } foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -76,6 +81,7 @@ internal static ServiceNowV2Source DeserializeServiceNowV2Source(JsonElement ele return null; } DataFactoryExpressionV2 expression = default; + DataFactoryElement pageSize = default; DataFactoryElement queryTimeout = default; BinaryData additionalColumns = default; string type = default; @@ -96,6 +102,15 @@ internal static ServiceNowV2Source DeserializeServiceNowV2Source(JsonElement ele expression = DataFactoryExpressionV2.DeserializeDataFactoryExpressionV2(property.Value, options); continue; } + if (property.NameEquals("pageSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pageSize = JsonSerializer.Deserialize>(property.Value.GetRawText()); + continue; + } if (property.NameEquals("queryTimeout"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -167,7 +182,8 @@ internal static ServiceNowV2Source DeserializeServiceNowV2Source(JsonElement ele additionalProperties, queryTimeout, additionalColumns, - expression); + expression, + pageSize); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/ServiceNowV2Source.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/ServiceNowV2Source.cs index 62e0c258de31..3817f061ee6c 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/ServiceNowV2Source.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/ServiceNowV2Source.cs @@ -30,13 +30,17 @@ public ServiceNowV2Source() /// Query timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). /// Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). /// Expression to filter data from source. - internal ServiceNowV2Source(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryExpressionV2 expression) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) + /// Page size of the result. Type: integer (or Expression with resultType integer). + internal ServiceNowV2Source(string copySourceType, DataFactoryElement sourceRetryCount, DataFactoryElement sourceRetryWait, DataFactoryElement maxConcurrentConnections, DataFactoryElement disableMetricsCollection, IDictionary additionalProperties, DataFactoryElement queryTimeout, BinaryData additionalColumns, DataFactoryExpressionV2 expression, DataFactoryElement pageSize) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns) { Expression = expression; + PageSize = pageSize; CopySourceType = copySourceType ?? "ServiceNowV2Source"; } /// Expression to filter data from source. public DataFactoryExpressionV2 Expression { get; set; } + /// Page size of the result. Type: integer (or Expression with resultType integer). + public DataFactoryElement PageSize { get; set; } } } diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/autorest.md b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/autorest.md index 16fe93617a19..7183098c184a 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/autorest.md +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: DataFactory namespace: Azure.ResourceManager.DataFactory -require: https://github.com/Azure/azure-rest-api-specs/blob/1ad29756bd141a47cac770140105a706d065ae1b/specification/datafactory/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/datafactory/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: