Skip to content

Commit

Permalink
chore: assume binarydata is datafactoryelement
Browse files Browse the repository at this point in the history
Might be an invalid assumption and have to find a way to let autorest determine the right type.
  • Loading branch information
arjendev committed Aug 31, 2023
1 parent 55a4ce5 commit a46ff38
Show file tree
Hide file tree
Showing 1,044 changed files with 2,485 additions and 2,324 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<PropertyGroup>
<PackageId>AzureDataFactory.TestingFramework</PackageId>
<PackageVersion>0.1.0-alpha</PackageVersion>
<PackageVersion>0.1.1-alpha</PackageVersion>
<Authors>arjendev</Authors>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#nullable disable

using Azure.Core;
using Azure.Core.Expressions.DataFactory;
using AzureDataFactory.TestingFramework.Models;
using Azure.ResourceManager.Models;

Expand All @@ -31,7 +32,7 @@ public DataFactoryChangeDataCaptureData(IEnumerable<MapperSourceConnectionsInfo>
SourceConnectionsInfo = sourceConnectionsInfo.ToList();
TargetConnectionsInfo = targetConnectionsInfo.ToList();
Policy = policy;
AdditionalProperties = new ChangeTrackingDictionary<string, BinaryData>();
AdditionalProperties = new ChangeTrackingDictionary<string, DataFactoryElement<string>>();
}

/// <summary> Initializes a new instance of DataFactoryChangeDataCaptureData. </summary>
Expand All @@ -48,7 +49,7 @@ public DataFactoryChangeDataCaptureData(IEnumerable<MapperSourceConnectionsInfo>
/// <param name="status"> Status of the CDC as to if it is running or stopped. </param>
/// <param name="eTag"> Etag identifies change in the resource. </param>
/// <param name="additionalProperties"> Additional Properties. </param>
internal DataFactoryChangeDataCaptureData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ChangeDataCaptureFolder folder, string description, IList<MapperSourceConnectionsInfo> sourceConnectionsInfo, IList<MapperTargetConnectionsInfo> targetConnectionsInfo, MapperPolicy policy, bool? allowVnetOverride, string status, ETag? eTag, IDictionary<string, BinaryData> additionalProperties) : base(id, name, resourceType, systemData)
internal DataFactoryChangeDataCaptureData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ChangeDataCaptureFolder folder, string description, IList<MapperSourceConnectionsInfo> sourceConnectionsInfo, IList<MapperTargetConnectionsInfo> targetConnectionsInfo, MapperPolicy policy, bool? allowVnetOverride, string status, ETag? eTag, IDictionary<string, DataFactoryElement<string>> additionalProperties) : base(id, name, resourceType, systemData)

Check warning on line 52 in src/AzureDataFactory.TestingFramework/Generated/DataFactoryChangeDataCaptureData.cs

View workflow job for this annotation

GitHub Actions / build (7.0.x)

The type 'DataFactoryElement<T>' in '/home/runner/work/azure-data-factory-testing-framework/azure-data-factory-testing-framework/src/AzureDataFactory.TestingFramework/Shared/DataFactoryElement.cs' conflicts with the imported type 'DataFactoryElement<T>' in 'Azure.Core.Expressions.DataFactory, Version=1.0.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8'. Using the type defined in '/home/runner/work/azure-data-factory-testing-framework/azure-data-factory-testing-framework/src/AzureDataFactory.TestingFramework/Shared/DataFactoryElement.cs'.
{
Folder = folder;
Description = description;
Expand Down Expand Up @@ -119,6 +120,6 @@ public string FolderName
/// </list>
/// </para>
/// </summary>
public IDictionary<string, BinaryData> AdditionalProperties { get; }
public IDictionary<string, DataFactoryElement<string>> AdditionalProperties { get; }

Check warning on line 123 in src/AzureDataFactory.TestingFramework/Generated/DataFactoryChangeDataCaptureData.cs

View workflow job for this annotation

GitHub Actions / build (7.0.x)

The type 'DataFactoryElement<T>' in '/home/runner/work/azure-data-factory-testing-framework/azure-data-factory-testing-framework/src/AzureDataFactory.TestingFramework/Shared/DataFactoryElement.cs' conflicts with the imported type 'DataFactoryElement<T>' in 'Azure.Core.Expressions.DataFactory, Version=1.0.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8'. Using the type defined in '/home/runner/work/azure-data-factory-testing-framework/azure-data-factory-testing-framework/src/AzureDataFactory.TestingFramework/Shared/DataFactoryElement.cs'.
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#nullable disable

using Azure.Core;
using Azure.Core.Expressions.DataFactory;
using AzureDataFactory.TestingFramework.Models;
using Azure.ResourceManager.Models;

Expand All @@ -22,7 +23,7 @@ public partial class DataFactoryData : TrackedResourceData
public DataFactoryData(AzureLocation location) : base(location)
{
GlobalParameters = new ChangeTrackingDictionary<string, DataFactoryGlobalParameterProperties>();
AdditionalProperties = new ChangeTrackingDictionary<string, BinaryData>();
AdditionalProperties = new ChangeTrackingDictionary<string, DataFactoryElement<string>>();
}

/// <summary> Initializes a new instance of DataFactoryData. </summary>
Expand All @@ -47,7 +48,7 @@ public DataFactoryData(AzureLocation location) : base(location)
/// <param name="publicNetworkAccess"> Whether or not public network access is allowed for the data factory. </param>
/// <param name="eTag"> Etag identifies change in the resource. </param>
/// <param name="additionalProperties"> Additional Properties. </param>
internal DataFactoryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary<string, string> tags, AzureLocation location, ManagedServiceIdentity identity, string provisioningState, DateTimeOffset? createdOn, string version, DataFactoryPurviewConfiguration purviewConfiguration, FactoryRepoConfiguration repoConfiguration, IDictionary<string, DataFactoryGlobalParameterProperties> globalParameters, DataFactoryEncryptionConfiguration encryption, DataFactoryPublicNetworkAccess? publicNetworkAccess, ETag? eTag, IDictionary<string, BinaryData> additionalProperties) : base(id, name, resourceType, systemData, tags, location)
internal DataFactoryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary<string, string> tags, AzureLocation location, ManagedServiceIdentity identity, string provisioningState, DateTimeOffset? createdOn, string version, DataFactoryPurviewConfiguration purviewConfiguration, FactoryRepoConfiguration repoConfiguration, IDictionary<string, DataFactoryGlobalParameterProperties> globalParameters, DataFactoryEncryptionConfiguration encryption, DataFactoryPublicNetworkAccess? publicNetworkAccess, ETag? eTag, IDictionary<string, DataFactoryElement<string>> additionalProperties) : base(id, name, resourceType, systemData, tags, location)

Check warning on line 51 in src/AzureDataFactory.TestingFramework/Generated/DataFactoryData.cs

View workflow job for this annotation

GitHub Actions / build (7.0.x)

The type 'DataFactoryElement<T>' in '/home/runner/work/azure-data-factory-testing-framework/azure-data-factory-testing-framework/src/AzureDataFactory.TestingFramework/Shared/DataFactoryElement.cs' conflicts with the imported type 'DataFactoryElement<T>' in 'Azure.Core.Expressions.DataFactory, Version=1.0.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8'. Using the type defined in '/home/runner/work/azure-data-factory-testing-framework/azure-data-factory-testing-framework/src/AzureDataFactory.TestingFramework/Shared/DataFactoryElement.cs'.
{
Identity = identity;
ProvisioningState = provisioningState;
Expand Down Expand Up @@ -128,6 +129,6 @@ public ResourceIdentifier PurviewResourceId
/// </list>
/// </para>
/// </summary>
public IDictionary<string, BinaryData> AdditionalProperties { get; }
public IDictionary<string, DataFactoryElement<string>> AdditionalProperties { get; }

Check warning on line 132 in src/AzureDataFactory.TestingFramework/Generated/DataFactoryData.cs

View workflow job for this annotation

GitHub Actions / build (7.0.x)

The type 'DataFactoryElement<T>' in '/home/runner/work/azure-data-factory-testing-framework/azure-data-factory-testing-framework/src/AzureDataFactory.TestingFramework/Shared/DataFactoryElement.cs' conflicts with the imported type 'DataFactoryElement<T>' in 'Azure.Core.Expressions.DataFactory, Version=1.0.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8'. Using the type defined in '/home/runner/work/azure-data-factory-testing-framework/azure-data-factory-testing-framework/src/AzureDataFactory.TestingFramework/Shared/DataFactoryElement.cs'.
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

using System.Globalization;
using Azure.Core;
using Azure.Core.Expressions.DataFactory;
using Azure.Core.Pipeline;
using AzureDataFactory.TestingFramework.Models;

Expand Down Expand Up @@ -313,7 +314,7 @@ public virtual ArmOperation<DataFactoryPipelineResource> Update(WaitUntil waitUn
/// <param name="startActivityName"> In recovery mode, the rerun will start from this activity. If not specified, all activities will run. </param>
/// <param name="startFromFailure"> In recovery mode, if set to true, the rerun will start from failed activities. The property will be used only if startActivityName is not specified. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
public virtual async Task<Response<PipelineCreateRunResult>> CreateRunAsync(IDictionary<string, BinaryData> parameterValueSpecification = null, string referencePipelineRunId = null, bool? isRecovery = null, string startActivityName = null, bool? startFromFailure = null, CancellationToken cancellationToken = default)
public virtual async Task<Response<PipelineCreateRunResult>> CreateRunAsync(IDictionary<string, DataFactoryElement<string>> parameterValueSpecification = null, string referencePipelineRunId = null, bool? isRecovery = null, string startActivityName = null, bool? startFromFailure = null, CancellationToken cancellationToken = default)
{
using var scope = _dataFactoryPipelinePipelinesClientDiagnostics.CreateScope("DataFactoryPipelineResource.CreateRun");
scope.Start();
Expand Down Expand Up @@ -348,7 +349,7 @@ public virtual async Task<Response<PipelineCreateRunResult>> CreateRunAsync(IDic
/// <param name="startActivityName"> In recovery mode, the rerun will start from this activity. If not specified, all activities will run. </param>
/// <param name="startFromFailure"> In recovery mode, if set to true, the rerun will start from failed activities. The property will be used only if startActivityName is not specified. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
public virtual Response<PipelineCreateRunResult> CreateRun(IDictionary<string, BinaryData> parameterValueSpecification = null, string referencePipelineRunId = null, bool? isRecovery = null, string startActivityName = null, bool? startFromFailure = null, CancellationToken cancellationToken = default)
public virtual Response<PipelineCreateRunResult> CreateRun(IDictionary<string, DataFactoryElement<string>> parameterValueSpecification = null, string referencePipelineRunId = null, bool? isRecovery = null, string startActivityName = null, bool? startFromFailure = null, CancellationToken cancellationToken = default)
{
using var scope = _dataFactoryPipelinePipelinesClientDiagnostics.CreateScope("DataFactoryPipelineResource.CreateRun");
scope.Start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ internal static AmazonMwsLinkedService DeserializeAmazonMwsLinkedService(JsonEle
Optional<DataFactoryElement<bool>> useHostVerification = default;
Optional<DataFactoryElement<bool>> usePeerVerification = default;
Optional<string> encryptedCredential = default;
IDictionary<string, BinaryData> additionalProperties = default;
Dictionary<string, BinaryData> additionalPropertiesDictionary = new Dictionary<string, BinaryData>();
IDictionary<string, DataFactoryElement<string>> additionalProperties = default;
Dictionary<string, DataFactoryElement<string>> additionalPropertiesDictionary = new Dictionary<string, DataFactoryElement<string>>();
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("type"u8))
Expand Down Expand Up @@ -272,7 +272,7 @@ internal static AmazonMwsLinkedService DeserializeAmazonMwsLinkedService(JsonEle
}
continue;
}
additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize<DataFactoryElement<string>>(property.Value.GetRawText()));
}
additionalProperties = additionalPropertiesDictionary;
return new AmazonMwsLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, endpoint, marketplaceId, sellerId, mwsAuthToken, accessKeyId, secretKey, useEncryptedEndpoints.Value, useHostVerification.Value, usePeerVerification.Value, encryptedCredential.Value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public AmazonMwsLinkedService(DataFactoryElement<string> endpoint, DataFactoryEl
/// <param name="useHostVerification"> Specifies whether to require the host name in the server's certificate to match the host name of the server when connecting over SSL. The default value is true. </param>
/// <param name="usePeerVerification"> Specifies whether to verify the identity of the server when connecting over SSL. The default value is true. </param>
/// <param name="encryptedCredential"> The encrypted credential used for authentication. Credentials are encrypted using the integration runtime credential manager. Type: string. </param>
internal AmazonMwsLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary<string, EntityParameterSpecification> parameters, IList<BinaryData> annotations, IDictionary<string, BinaryData> additionalProperties, DataFactoryElement<string> endpoint, DataFactoryElement<string> marketplaceId, DataFactoryElement<string> sellerId, DataFactorySecretBaseDefinition mwsAuthToken, DataFactoryElement<string> accessKeyId, DataFactorySecretBaseDefinition secretKey, DataFactoryElement<bool> useEncryptedEndpoints, DataFactoryElement<bool> useHostVerification, DataFactoryElement<bool> usePeerVerification, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties)
internal AmazonMwsLinkedService(string linkedServiceType, IntegrationRuntimeReference connectVia, string description, IDictionary<string, EntityParameterSpecification> parameters, IList<BinaryData> annotations, IDictionary<string, DataFactoryElement<string>> additionalProperties, DataFactoryElement<string> endpoint, DataFactoryElement<string> marketplaceId, DataFactoryElement<string> sellerId, DataFactorySecretBaseDefinition mwsAuthToken, DataFactoryElement<string> accessKeyId, DataFactorySecretBaseDefinition secretKey, DataFactoryElement<bool> useEncryptedEndpoints, DataFactoryElement<bool> useHostVerification, DataFactoryElement<bool> usePeerVerification, string encryptedCredential) : base(linkedServiceType, connectVia, description, parameters, annotations, additionalProperties)
{
Endpoint = endpoint;
MarketplaceId = marketplaceId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ internal static AmazonMwsObjectDataset DeserializeAmazonMwsObjectDataset(JsonEle
Optional<IList<BinaryData>> annotations = default;
Optional<DatasetFolder> folder = default;
Optional<DataFactoryElement<string>> tableName = default;
IDictionary<string, BinaryData> additionalProperties = default;
Dictionary<string, BinaryData> additionalPropertiesDictionary = new Dictionary<string, BinaryData>();
IDictionary<string, DataFactoryElement<string>> additionalProperties = default;
Dictionary<string, DataFactoryElement<string>> additionalPropertiesDictionary = new Dictionary<string, DataFactoryElement<string>>();
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("type"u8))
Expand Down Expand Up @@ -206,7 +206,7 @@ internal static AmazonMwsObjectDataset DeserializeAmazonMwsObjectDataset(JsonEle
}
continue;
}
additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize<DataFactoryElement<string>>(property.Value.GetRawText()));
}
additionalProperties = additionalPropertiesDictionary;
return new AmazonMwsObjectDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public AmazonMwsObjectDataset(DataFactoryLinkedServiceReference linkedServiceNam
/// <param name="folder"> The folder that this Dataset is in. If not specified, Dataset will appear at the root level. </param>
/// <param name="additionalProperties"> Additional Properties. </param>
/// <param name="tableName"> The table name. Type: string (or Expression with resultType string). </param>
internal AmazonMwsObjectDataset(string datasetType, string description, DataFactoryElement<IList<DatasetDataElement>> structure, DataFactoryElement<IList<DatasetSchemaDataElement>> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary<string, EntityParameterSpecification> parameters, IList<BinaryData> annotations, DatasetFolder folder, IDictionary<string, BinaryData> additionalProperties, DataFactoryElement<string> tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties)
internal AmazonMwsObjectDataset(string datasetType, string description, DataFactoryElement<IList<DatasetDataElement>> structure, DataFactoryElement<IList<DatasetSchemaDataElement>> schema, DataFactoryLinkedServiceReference linkedServiceName, IDictionary<string, EntityParameterSpecification> parameters, IList<BinaryData> annotations, DatasetFolder folder, IDictionary<string, DataFactoryElement<string>> additionalProperties, DataFactoryElement<string> tableName) : base(datasetType, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties)
{
TableName = tableName;
DatasetType = datasetType ?? "AmazonMWSObject";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ internal static AmazonMwsSource DeserializeAmazonMwsSource(JsonElement element)
Optional<DataFactoryElement<string>> sourceRetryWait = default;
Optional<DataFactoryElement<int>> maxConcurrentConnections = default;
Optional<DataFactoryElement<bool>> disableMetricsCollection = default;
IDictionary<string, BinaryData> additionalProperties = default;
Dictionary<string, BinaryData> additionalPropertiesDictionary = new Dictionary<string, BinaryData>();
IDictionary<string, DataFactoryElement<string>> additionalProperties = default;
Dictionary<string, DataFactoryElement<string>> additionalPropertiesDictionary = new Dictionary<string, DataFactoryElement<string>>();
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("query"u8))
Expand Down Expand Up @@ -155,7 +155,7 @@ internal static AmazonMwsSource DeserializeAmazonMwsSource(JsonElement element)
disableMetricsCollection = JsonSerializer.Deserialize<DataFactoryElement<bool>>(property.Value.GetRawText());
continue;
}
additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
additionalPropertiesDictionary.Add(property.Name, JsonSerializer.Deserialize<DataFactoryElement<string>>(property.Value.GetRawText()));
}
additionalProperties = additionalPropertiesDictionary;
return new AmazonMwsSource(type, sourceRetryCount.Value, sourceRetryWait.Value, maxConcurrentConnections.Value, disableMetricsCollection.Value, additionalProperties, queryTimeout.Value, additionalColumns.Value, query.Value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public AmazonMwsSource()
/// <param name="queryTimeout"> Query timeout. Type: string (or Expression with resultType string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). </param>
/// <param name="additionalColumns"> Specifies the additional columns to be added to source data. Type: array of objects(AdditionalColumns) (or Expression with resultType array of objects). </param>
/// <param name="query"> A query to retrieve data from source. Type: string (or Expression with resultType string). </param>
internal AmazonMwsSource(string copySourceType, DataFactoryElement<int> sourceRetryCount, DataFactoryElement<string> sourceRetryWait, DataFactoryElement<int> maxConcurrentConnections, DataFactoryElement<bool> disableMetricsCollection, IDictionary<string, BinaryData> additionalProperties, DataFactoryElement<string> queryTimeout, BinaryData additionalColumns, DataFactoryElement<string> query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns)
internal AmazonMwsSource(string copySourceType, DataFactoryElement<int> sourceRetryCount, DataFactoryElement<string> sourceRetryWait, DataFactoryElement<int> maxConcurrentConnections, DataFactoryElement<bool> disableMetricsCollection, IDictionary<string, DataFactoryElement<string>> additionalProperties, DataFactoryElement<string> queryTimeout, BinaryData additionalColumns, DataFactoryElement<string> query) : base(copySourceType, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection, additionalProperties, queryTimeout, additionalColumns)
{
Query = query;
CopySourceType = copySourceType ?? "AmazonMWSSource";
Expand Down
Loading

0 comments on commit a46ff38

Please sign in to comment.